import { type ProviderModel } from "@cline/shared"; import { z } from "zod"; import type { ProviderSettings, StoredProviderSettings } from "../../types/provider-settings"; import type { ProviderSettingsManager } from "../storage/provider-settings-manager"; export declare const StoredModelEntrySchema: z.ZodObject<{ id: z.ZodOptional; name: z.ZodOptional; maxTokens: z.ZodCatch>; contextWindow: z.ZodCatch>; maxInputTokens: z.ZodCatch>; capabilities: z.ZodOptional>>; supportsVision: z.ZodOptional; supportsAttachments: z.ZodOptional; supportsReasoning: z.ZodOptional; inputPrice: z.ZodCatch>; outputPrice: z.ZodCatch>; cacheReadsPrice: z.ZodCatch>; cacheWritesPrice: z.ZodCatch>; temperature: z.ZodCatch>; apiFormat: z.ZodOptional>; isR1FormatRequired: z.ZodOptional; }, z.core.$loose>; export type StoredModelEntry = z.infer; export declare const StoredProviderMetadataSchema: z.ZodObject<{ name: z.ZodString; baseUrl: z.ZodString; defaultModelId: z.ZodOptional; protocol: z.ZodOptional>; client: z.ZodOptional>; capabilities: z.ZodOptional>>; modelsSourceUrl: z.ZodOptional; }, z.core.$loose>; export declare const StoredProviderEntrySchema: z.ZodObject<{ provider: z.ZodOptional; protocol: z.ZodOptional>; client: z.ZodOptional>; capabilities: z.ZodOptional>>; modelsSourceUrl: z.ZodOptional; }, z.core.$loose>>; models: z.ZodOptional; name: z.ZodOptional; maxTokens: z.ZodCatch>; contextWindow: z.ZodCatch>; maxInputTokens: z.ZodCatch>; capabilities: z.ZodOptional>>; supportsVision: z.ZodOptional; supportsAttachments: z.ZodOptional; supportsReasoning: z.ZodOptional; inputPrice: z.ZodCatch>; outputPrice: z.ZodCatch>; cacheReadsPrice: z.ZodCatch>; cacheWritesPrice: z.ZodCatch>; temperature: z.ZodCatch>; apiFormat: z.ZodOptional>; isR1FormatRequired: z.ZodOptional; }, z.core.$loose>>>; }, z.core.$loose>; export type StoredProviderEntry = z.infer; export declare const StoredModelsFileSchema: z.ZodObject<{ version: z.ZodLiteral<1>; providers: z.ZodRecord; protocol: z.ZodOptional>; client: z.ZodOptional>; capabilities: z.ZodOptional>>; modelsSourceUrl: z.ZodOptional; }, z.core.$loose>>; models: z.ZodOptional; name: z.ZodOptional; maxTokens: z.ZodCatch>; contextWindow: z.ZodCatch>; maxInputTokens: z.ZodCatch>; capabilities: z.ZodOptional>>; supportsVision: z.ZodOptional; supportsAttachments: z.ZodOptional; supportsReasoning: z.ZodOptional; inputPrice: z.ZodCatch>; outputPrice: z.ZodCatch>; cacheReadsPrice: z.ZodCatch>; cacheWritesPrice: z.ZodCatch>; temperature: z.ZodCatch>; apiFormat: z.ZodOptional>; isR1FormatRequired: z.ZodOptional; }, z.core.$loose>>>; }, z.core.$loose>>; }, z.core.$strip>; export type StoredModelsFile = z.infer; export declare function resolveModelsRegistryPath(manager: ProviderSettingsManager): string; export declare function emptyModelsFile(): StoredModelsFile; export declare function parseModelsFile(input: unknown): StoredModelsFile; export declare function readModelsFileSync(filePath: string): StoredModelsFile; export declare function readModelsFile(filePath: string): Promise; export declare function writeModelsFileSync(filePath: string, state: StoredModelsFile): void; export declare function writeModelsFile(filePath: string, state: StoredModelsFile): Promise; export declare function toProviderModel(modelId: string, info: { name?: string; capabilities?: string[]; thinkingConfig?: unknown; }): ProviderModel; export declare function registerProviderSettingsProvider(settings: ProviderSettings): void; export declare function registerConfiguredProvidersFromSettings(state: StoredProviderSettings): void; /** * Custom Provider Registry * * This module manages the registration of custom OpenAI-compatible providers and * their models based on local JSON files. It provides functions to read/write the models * registry file and to register providers with the LlmsModels system. */ export declare function registerCustomProvider(providerId: string, entry: StoredProviderEntry): void; /** * Apply a single provider's updated models.json entry to the live @cline/llms * registry. Unlike {@link ensureCustomProvidersLoadedSync}, which loads a * models.json path at most once per process, this applies on every call so * writes made after startup are reflected immediately: models removed from the * entry are unregistered, and the remaining entry is (re-)registered. */ export declare function syncStoredProviderRegistration(providerId: string, previous: StoredProviderEntry | undefined, next: StoredProviderEntry | undefined): void; /** * Load models.json into the @cline/llms registry at most once per path per * process; subsequent calls are no-ops. It does NOT re-read the file after * writes — use {@link syncStoredProviderRegistration} to reflect a write in * the live registry. */ export declare function ensureCustomProvidersLoadedSync(manager: ProviderSettingsManager): void; export declare function ensureCustomProvidersLoaded(manager: ProviderSettingsManager): Promise;