import type { ModelCapabilityProfile, ModelEntry, ModelRegistry, ReasoningMode } from "./model-registry.js";
import type { ConfigPort } from "../ports/index.js";
export declare const LLMROUTER_CATALOG_UNAVAILABLE_MESSAGE = "\u65E0\u6CD5\u8FDE\u63A5 llmrouter \u6A21\u578B\u76EE\u5F55";
export declare const LLMROUTER_PROVIDER_ID = "llmrouter";
export declare const LLMROUTER_PROVIDER_NAME = "LLMRouter";
interface CatalogFetchOptions {
    force?: boolean;
}
export declare class LlmrouterCatalogUnavailableError extends Error {
    constructor(message?: string);
}
export interface LlmrouterCatalogProvider {
    id: string;
    name?: string;
    displayName?: string;
    group?: string;
    baseUrl?: string;
    base_url?: string;
    transport?: string;
    authType?: string;
    apiKeyEnvVars?: string[];
    models?: Array<{
        id?: string;
    }>;
}
export interface LlmrouterCatalogModel {
    id: string;
    public_model?: string;
    publicModel?: string;
    provider?: string;
    owned_by?: string;
    native_model_id?: string;
    nativeModelId?: string;
    display_name?: string;
    displayName?: string;
    name?: string;
    category?: string;
    route_intents?: string[];
    baseUrl?: string;
    base_url?: string;
    provider_transport?: string;
    providerTransport?: string;
    context_window?: number;
    contextWindow?: number;
    max_output?: number;
    maxOutput?: number;
    stream_required?: boolean;
    streamRequired?: boolean;
    tool_call?: boolean;
    toolCall?: boolean;
    reasoning_mode?: ReasoningMode;
    reasoningMode?: ReasoningMode;
    media_type?: string | null;
    mediaType?: string | null;
    capability_profile?: ModelCapabilityProfile;
    pricing?: Record<string, unknown>;
}
export declare function getLlmrouterBaseUrl(configPort?: ConfigPort): string;
export declare function getLlmrouterModelsUrl(baseUrl: string): string;
export declare function listLlmrouterCatalogProviders(configPort?: ConfigPort, options?: CatalogFetchOptions): Promise<LlmrouterCatalogProvider[]>;
export declare function listLlmrouterCatalogModels(configPort?: ConfigPort, options?: CatalogFetchOptions): Promise<LlmrouterCatalogModel[]>;
export declare function listLlmrouterModelsByApiKey(baseUrl: string, apiKey: string): Promise<LlmrouterCatalogModel[]>;
export declare function providerDisplayName(provider: LlmrouterCatalogProvider): string;
export declare function providerBaseUrl(provider: LlmrouterCatalogProvider): string | undefined;
export declare function getLlmrouterCatalogProvider(providerId: string, configPort?: ConfigPort, options?: CatalogFetchOptions): Promise<LlmrouterCatalogProvider | null>;
export declare function refreshRegistryFromLlmrouterCatalog(registry: ModelRegistry, configPort?: ConfigPort, options?: CatalogFetchOptions): Promise<ModelEntry[]>;
export declare function refreshRegistryFromLlmrouterApiKey(registry: ModelRegistry, options: {
    baseUrl: string;
    apiKey: string;
    configPort?: ConfigPort;
    forceCatalog?: boolean;
}): Promise<ModelEntry[]>;
/**
 * Hydrate the registry with the user's PUBLISHED llmrouter models (/v1/models) when an inference
 * key is available — the set they can actually call. Falls back to the full discovery catalog only
 * when no key is configured yet (e.g. pre-sign-in) so the UI is never empty. This is the entry point
 * the startup/settings hydration uses; it keeps the 600+ discovery catalog (and its direct-provider
 * dual-registration) out of the user-facing model list.
 */
export declare function refreshRegistryFromLlmrouterPublished(registry: ModelRegistry, configPort?: ConfigPort, options?: CatalogFetchOptions): Promise<ModelEntry[]>;
export declare function resetLlmrouterCatalogClientCache(): void;
/**
 * 零配置默认模型:全新安装(无 textGeneration binding)且网关注入了设备账号推理 key 时,
 * 自动把默认文本模型设为一个 DeepSeek(经 llmrouter)。调用方需先刷新过目录(this.models 里要有
 * `llmrouter:deepseek-*` 条目)。已有 binding 则尊重用户配置、不覆盖。返回是否设置了默认。
 *
 * key 不在此注册 —— ModelRegistry 取 llmrouter key 时会回退到 QLOGIC_LLMROUTER_INFERENCE_KEY env。
 */
export declare function ensureLlmrouterDefaultBinding(registry: ModelRegistry, configPort?: ConfigPort): boolean;
export declare function toModelEntry(model: LlmrouterCatalogModel): ModelEntry | null;
export declare function toModelEntries(model: LlmrouterCatalogModel): ModelEntry[];
export {};
