/** * Model Information Types * * Zod schemas and inferred types for model capabilities, pricing, * and metadata. These live in shared so that agent types can reference * ModelInfo without depending on @cline/llms. */ import { z } from "zod"; export declare const ApiFormatSchema: z.ZodEnum<{ default: "default"; "openai-responses": "openai-responses"; r1: "r1"; }>; export type ApiFormat = z.infer; export declare const ApiFormat: { readonly DEFAULT: "default"; readonly OPENAI_RESPONSES: "openai-responses"; readonly R1: "r1"; }; export declare const ModelCapabilitySchema: z.ZodEnum<{ video: "video"; images: "images"; tools: "tools"; streaming: "streaming"; "prompt-cache": "prompt-cache"; reasoning: "reasoning"; "reasoning-effort": "reasoning-effort"; "computer-use": "computer-use"; "global-endpoint": "global-endpoint"; structured_output: "structured_output"; temperature: "temperature"; files: "files"; }>; export type ModelCapability = z.infer; export declare const ModelStatusSchema: z.ZodEnum<{ active: "active"; preview: "preview"; deprecated: "deprecated"; legacy: "legacy"; }>; export type ModelStatus = z.infer; export declare const ModelPricingSchema: z.ZodObject<{ input: z.ZodOptional; output: z.ZodOptional; cacheWrite: z.ZodOptional; cacheRead: z.ZodOptional; }, z.core.$strip>; export type ModelPricing = z.infer; export declare const ThinkingConfigSchema: z.ZodObject<{ maxBudget: z.ZodOptional; outputPrice: z.ZodOptional; thinkingLevel: z.ZodOptional>; }, z.core.$strip>; export type ThinkingConfig = z.infer; export declare const ModelMetadataSchema: z.ZodObject<{ reasoningDefaultOn: z.ZodOptional; }, z.core.$catchall>; export type ModelMetadata = z.infer; export declare const ModelModalitySchema: z.ZodEnum<{ image: "image"; audio: "audio"; video: "video"; text: "text"; pdf: "pdf"; }>; export type ModelModality = z.infer; export declare const ModelModalitiesSchema: z.ZodObject<{ input: z.ZodArray>; output: z.ZodArray>; }, z.core.$strip>; export type ModelModalities = z.infer; export type ChatModelModalities = { readonly input?: readonly ModelModality[]; readonly output?: readonly ModelModality[]; }; /** * Returns whether a model can participate in a text chat turn. * * Missing modality metadata is treated as chat-compatible for backwards * compatibility. When a catalog does provide modalities, the model must both * accept text and produce text; dedicated transcription and media-generation * endpoints therefore stay available in the shared catalog without leaking * into chat model pickers. */ export declare function supportsChatModalities(modalities: ChatModelModalities | undefined): boolean; /** * Provider operation used to execute a model request. * * Modalities describe the values a model accepts and produces; they do not * identify the provider endpoint. Keeping the operation explicit prevents an * image-output model from being routed to a generic chat or compatible-image * endpoint merely because its catalog advertises an image modality. */ export declare const ModelOperationSchema: z.ZodEnum<{ language: "language"; "image-generation": "image-generation"; "speech-generation": "speech-generation"; "video-generation": "video-generation"; transcription: "transcription"; }>; export type ModelOperation = z.infer; export type ChatCompatibleModelDescriptor = { readonly operation?: ModelOperation; readonly modalities?: ChatModelModalities; }; /** * Returns whether a model uses the language operation and supports a text chat * turn. Missing operation and modality metadata remain chat-compatible for * backwards compatibility, while any explicitly non-language operation is * excluded even when its modalities are absent. */ export declare function isChatCompatibleModel(model: ChatCompatibleModelDescriptor): boolean; /** * Execution modes supported by a non-language model operation. * * The operation selects the provider transport; the mode describes how that * transport is consumed. Keeping this separate from generic model * capabilities prevents transcription-specific flags from spreading through * otherwise modality-agnostic clients. */ export declare const ModelOperationModeSchema: z.ZodEnum<{ streaming: "streaming"; batch: "batch"; }>; export type ModelOperationMode = z.infer; interface ImageOutputModelDescriptor { operation?: ModelOperation; modalities?: ModelModalities; } export declare function modelProducesImages(model: ImageOutputModelDescriptor): boolean; export declare function usesImageGenerationOperation(model: ImageOutputModelDescriptor): boolean; /** * Whether a model's capability metadata declares `capability`. * * Capability lists reach this check from sources of very different fidelity: * the generated catalog is complete, but host boundaries (VS Code's legacy * ModelInfo, user-authored overrides, dynamic provider listings) may carry * partial lists reconstructed from a handful of boolean flags. A missing or * empty list therefore carries no signal, and each check declares its own * default via `assumeWhenUnspecified` instead of treating absence as denial. * * Capability gates added by future model modes (audio, video, transcription, * …) should route through this helper rather than reading * `model.capabilities` directly, so the unspecified-list semantics stay * consistent across the codebase. */ export declare function modelHasCapability(model: { capabilities?: readonly string[]; }, capability: string, options?: { assumeWhenUnspecified?: boolean; }): boolean; /** * Whether a model can receive function/tool definitions. Fails open when the * capability list is missing or empty (user-entered and dynamically * discovered models); a populated capability list without `tools` is * authoritative. */ export declare function modelSupportsToolCalling(model: { capabilities?: readonly string[]; }): boolean; export declare const ModelInfoSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodOptional; description: z.ZodOptional; maxTokens: z.ZodOptional; contextWindow: z.ZodOptional; maxInputTokens: z.ZodOptional; capabilities: z.ZodOptional>>; operation: z.ZodOptional>; operationModes: z.ZodOptional>>; modalities: z.ZodOptional>; output: z.ZodArray>; }, z.core.$strip>>; reasoningOptions: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"effort">; values: z.ZodArray>>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"budget_tokens">; min: z.ZodOptional; max: z.ZodOptional; }, z.core.$strict>], "type">>>; apiFormat: z.ZodOptional>; systemRole: z.ZodOptional>; temperature: z.ZodOptional; pricing: z.ZodOptional; output: z.ZodOptional; cacheWrite: z.ZodOptional; cacheRead: z.ZodOptional; }, z.core.$strip>>; thinkingConfig: z.ZodOptional; outputPrice: z.ZodOptional; thinkingLevel: z.ZodOptional>; }, z.core.$strip>>; status: z.ZodOptional>; deprecationNotice: z.ZodOptional; replacedBy: z.ZodOptional; releaseDate: z.ZodOptional; deprecationDate: z.ZodOptional; family: z.ZodOptional; metadata: z.ZodOptional; }, z.core.$catchall>>; }, z.core.$strip>; export type ModelInfo = z.infer; export {};