Project Files
dist / inventory.d.ts
type ModelsResponse = {
data?: Array<ModelCandidate | string>;
models?: Array<ModelCandidate | string>;
};
type ModelServiceStateResponse = {
selected_model_id?: string;
hosted_candidates?: Array<ModelCandidate & {
display_name?: string;
displayName?: string;
source?: string;
lane?: string;
loaded?: boolean;
status?: string;
}>;
loaded_models?: Array<{
id?: string;
display_name?: string;
displayName?: string;
owned_by?: string;
source?: string;
lane?: string;
loaded?: boolean;
status?: string;
metadata?: ModelCandidate["metadata"];
}>;
};
type ModelCandidate = {
id?: string;
displayName?: string;
display_name?: string;
owned_by?: string;
source?: string;
lane?: string;
loaded?: boolean;
status?: string;
metadata?: {
backend?: string;
capability?: string;
capabilities?: string[];
accelerator_plane?: string;
provider_plane?: string;
};
};
export type GeneratorModel = {
id: string;
displayName: string;
owned_by?: string;
metadata?: {
backend?: string;
capability?: string;
capabilities?: string[];
accelerator_plane?: string;
provider_plane?: string;
};
};
export type EmbedModel = GeneratorModel;
export declare function normalizeBaseUrl(rawBaseUrl: string): string;
export declare function buildInventoryUrl(rawBaseUrl: string, inventoryMode: string): string;
export declare function buildModelServiceStateUrl(rawBaseUrl: string): string;
export declare function isGeneratorCapableModel(candidate: ModelCandidate): boolean;
export declare function isEmbeddingCapableModel(candidate: ModelCandidate): boolean;
export declare function buildHostedDisplayName(model: {
id: string;
displayName?: string;
owned_by?: string;
metadata?: GeneratorModel["metadata"];
}): string;
export declare function extractGeneratorModels(payload: ModelsResponse): GeneratorModel[];
export declare function extractEmbeddingModels(payload: ModelsResponse): EmbedModel[];
export declare function extractActiveGeneratorModelsFromState(payload: ModelServiceStateResponse): GeneratorModel[];
export declare function fetchGeneratorModelIds(rawBaseUrl: string, inventoryMode: string): Promise<{
inventoryUrl: string;
models: GeneratorModel[];
}>;
export declare function fetchEmbedModelIds(rawBaseUrl: string, inventoryMode: string): Promise<{
inventoryUrl: string;
models: EmbedModel[];
}>;
export declare function fetchPreferredHostedModelId(rawBaseUrl: string): Promise<string | undefined>;
export {};
//# sourceMappingURL=inventory.d.ts.map