import { MODELS } from "./models.generated.js"; import type { Api, KnownProvider, Model, Usage } from "./types.js"; type ModelApi = (typeof MODELS)[TProvider][TModelId] extends { api: infer TApi; } ? (TApi extends Api ? TApi : never) : never; export declare function getModel(provider: TProvider, modelId: TModelId): Model>; /** * Check if a model ID looks like an alias (no date suffix). * Aliases are preferred over dated versions when fuzzy matching. * * IDs ending with `-latest` are treated as aliases. * IDs ending with a date pattern (`-YYYYMMDD`) are treated as dated versions. */ export declare function isModelAlias(id: string): boolean; /** * Find a model by fuzzy matching against the provider's registered models. * * Resolution order: * 1. Exact match by provider + model ID (via registry Map.get) * 2. Case-insensitive substring match against model ID and display name * 3. Among matches, prefer aliases (non-dated IDs) over dated versions * 4. Among ties, pick the lexicographically highest (latest) ID * * This is the same matching logic used by the CLI, subagent model resolution, * and interactive mode — centralised here so tests can exercise the real path. * * @example * findModel("anthropic", "sonnet") // → latest claude-sonnet alias * findModel("anthropic", "haiku") // → latest claude-haiku alias * findModel("openai", "gpt-5") // → latest gpt-5 alias */ export declare function findModel(provider: string, pattern: string): Model | undefined; /** * Find a model by fuzzy matching against a flat array of models. * Same algorithm as findModel() but operates on an arbitrary model list * instead of the built-in registry. * * Used by model-resolver.ts and other code that manages its own model lists. */ export declare function findModelInList(pattern: string, models: Model[]): Model | undefined; export declare function getProviders(): KnownProvider[]; export declare function getModels(provider: TProvider): Model>[]; export declare function calculateCost(model: Model, usage: Usage): Usage["cost"]; /** * Check whether a model id belongs to Qwen 3.8 or a later Qwen generation — the first * Qwen family with graded `reasoning_effort` tiers (low/medium/xhigh, default xhigh). */ export declare function isQwen38OrLater(modelId: string): boolean; /** * Check if a model supports the native `max` reasoning tier. * * Supported today: * - GPT-5.6 model families (Sol, Terra, Luna, and the alias) * - GPT-6 model families (Astra and future variants) */ export declare function supportsMax(model: Model): boolean; /** * Check if a model supports xhigh thinking level. * * Supported today: * - GPT-5.2 through GPT-5.6 model families * - GPT-6 model families (Astra and future variants) * - Claude Opus 4.6–4.x and Claude 5 model families * - Kimi Code K3 (xhigh maps to its advertised "max" effort) * - Qwen 3.8+ model families (xhigh is their top native effort tier) */ export declare function supportsXhigh(model: Model): boolean; /** * Check if a model uses adaptive thinking (Opus/Sonnet 4.6–4.x and Claude 5 * families), where the `thinkingDisplay` option is honored. Mirrors the * per-provider internal checks. */ export declare function supportsAdaptiveThinking(model: Model): boolean; /** * Check if two models are equal by comparing both their id and provider. * Returns false if either model is null or undefined. */ export declare function modelsAreEqual(a: Model | null | undefined, b: Model | null | undefined): boolean; export {}; //# sourceMappingURL=models.d.ts.map