import { type ReasoningEffort } from "../shared/reasoning-effort.js"; export type ModelRating = 1 | 2 | 3 | 4 | 5; export interface ModelRatings { cost: ModelRating; reasoning: ModelRating; speed: ModelRating; } export declare const MODEL_PROVIDERS: readonly ["anthropic", "openai", "google", "xai", "qwen", "moonshot", "deepseek", "zai", "meta", "inception"]; export type ModelProvider = (typeof MODEL_PROVIDERS)[number]; export interface ModelCatalogEntry { /** Canonical id: what `canonicalModelId` returns for every engine's id. */ id: string; name: string; /** Picker row name, without the family prefix ("Opus 5.5"). Defaults to `name`. */ shortName?: string; /** Two or three muted words under the row name. Absent when we don't know. */ descriptor?: ModelDescriptorId; /** One neutral line for the hover card. Absent when we don't know. */ description?: string; provider?: ModelProvider; ratings?: ModelRatings; /** * Eligible for the picker's short list. Recommended entries are ranked by * their order in `MODEL_CATALOG`. */ recommended?: boolean; /** * The level the provider applies when a request names none, from the * provider's documentation. Absent where the docs state no default. */ providerDefaultEffort?: ReasoningEffort; /** Engine ids that canonicalization alone does not map onto `id`. */ aliases?: readonly string[]; } /** Row descriptors, shared across models so each is translated once. */ export declare const MODEL_DESCRIPTORS: { readonly recommended: "Recommended"; readonly flagship: "Flagship capability"; readonly balanced: "Balanced, efficient"; readonly fastLightweight: "Fast, lightweight"; readonly fastLowerCost: "Fast, lower cost"; readonly previousGeneration: "Previous generation"; readonly smallLowCost: "Small, low cost"; readonly smallCoding: "Small, for coding"; readonly lowestCost: "Lowest cost"; readonly fastCoding: "Fast, for coding"; readonly openWeightCoding: "Open-weight coding"; }; export type ModelDescriptorId = keyof typeof MODEL_DESCRIPTORS; /** Order is the picker's order, and the rank among recommended entries. */ export declare const MODEL_CATALOG: readonly ModelCatalogEntry[]; /** * One key for every engine's spelling of a model: OpenRouter's * `anthropic/claude-opus-5.5`, Anthropic's `claude-opus-5-5`, a dated * `claude-haiku-4-5-20251001`, and Gemini's `-preview` ids all collapse to the * dashed, unprefixed id the Builder gateway uses. It names the model; it does * not upgrade one version to another (that is `model-version`'s job). */ export declare function canonicalModelId(modelId: string): string; /** * The picker's root list after Auto, in order; everything else is under More * models. A model the engine doesn't offer is skipped, and an engine offering * none of these falls back to its own recommended ladder. */ export declare const PICKER_ROOT_MODEL_IDS: readonly ["claude-opus-5-5", "claude-sonnet-5-5", "gpt-6-1-sol", "gpt-6-luna"]; /** The catalog entry for any engine's id, or undefined for an unknown model. */ export declare function findModelCatalogEntry(modelId: string | undefined): ModelCatalogEntry | undefined; /** How the active engine pays for a request; a property of the engine, not the model. */ export type EngineBilling = { kind: "builder-credits"; } | { kind: "provider-key"; provider: string; } | { kind: "subscription"; plan: string; }; /** * Undefined for engines with no billing we can state: local runtimes (Ollama, * Codex, Claude Code sign-ins) and custom registered engines. */ export declare function getEngineBilling(engine: string | undefined): EngineBilling | undefined; export interface ModelDescription { /** The id the engine was asked about, unchanged. */ modelId: string; engine?: string; /** False for custom ids and plan models with no catalog entry. */ known: boolean; /** The catalog entry's id, for copy keyed by model. */ catalogId?: string; name?: string; shortName?: string; descriptorId?: ModelDescriptorId; descriptor?: string; description?: string; provider?: ModelProvider; ratings?: ModelRatings; recommended: boolean; /** Position among recommended models; undefined for the rest. */ recommendedRank?: number; /** Position in the picker's root list; undefined for the rest. */ rootRank?: number; /** The level the provider uses when no effort is sent; see the catalog. */ providerDefaultEffort?: ReasoningEffort; /** Undefined when no table or family heuristic knows the window. */ contextWindow?: number; /** The model's levels that the engine forwards; empty means no effort control. */ efforts: ReasoningEffort[]; billing?: EngineBilling; /** Whether efforts and the window came from the provider's model list. */ source: "provider" | "catalog"; } /** Facts a provider's model list reported, which win over the catalog. */ export interface LiveModelFacts { contextWindow?: number; /** Undefined when the provider did not report effort support. */ efforts?: readonly ReasoningEffort[]; } /** * Describe a model as one engine offers it. The catalog only enriches: it * never decides which models an engine lists, and an unknown model gets its * engine facts (efforts, billing, a known window) with nothing invented. */ export declare function describeModelForEngine(modelId: string, engine?: string, live?: LiveModelFacts): ModelDescription; /** * The documented provider default for a model, or undefined when the * provider's docs state none. Used where a level must be named for a model * whose requests carry no effort, such as stepping effort down on a retry. */ export declare function getProviderDefaultEffort(modelId: string | undefined): ReasoningEffort | undefined;