/** * Static OpenCode Go & Zen model catalog data. * * Pure data, no behavior: the canonical per-model specifications the patch * ships as its offline shim. Split out of `models-catalog.ts` so the parsing, * SWR revalidation and gateway enrichment logic reads without wading through * several hundred lines of literals. * * Prices are USD per million tokens. `models.opencode.ai/api.json` remains the * live source of truth; this shim is what the meter and picker use before the * first successful revalidation (and if it never succeeds). * * **GENERATED — do not hand-edit.** `scripts/regenerate-catalog-shim.ts` writes * both arrays from `parseModelsDevCatalog`, the plugin's own parser, so the shim * cannot disagree with what a live refresh produces. Run it and commit the diff: * * ```sh * node --experimental-strip-types scripts/regenerate-catalog-shim.ts --write * ``` * * It drifted once already, and the damage was invisible from here: `provider_npm` * was added to the parser and to exactly one entry by hand, so every other model * naming an SDK was routed to an endpoint that does not speak its format — a * model that is *present but wrong* fails with a gateway error reading like a * model problem, where a model that is merely *absent* simply waits for the first * refresh. That asymmetry is why the shim is complete rather than curated. * * @module dsh-opencode-patch/catalog-data */ import type { ModelCostRate } from "./session-cost.ts"; /** * One way a model accepts a thinking/reasoning setting. * * `models.dev` describes these as a discriminated list; only the fields it * actually sends are modelled, and an unknown `type` is dropped rather than * guessed at. */ export interface ReasoningOptionSpec { min?: number; type: string; values?: readonly string[]; } export interface CatalogModelSpec { context_window: number; cost?: ModelCostRate; id: string; input_modalities: string[]; is_free?: boolean; /** * Whether the model accepts a thinking/reasoning setting at all, and which * kind - `models.dev` carries it as a boolean plus an options list. The three * shapes seen live are `{type:"effort",values:[…]}`, `{type:"budget_tokens", * min}`, and `{type:"toggle"}`. * * The shim dropped both fields, so a picker built from it could not offer a * thinking level for any model: 117 of 122 Zen models declare `reasoning` and * none of them reached the plugin. */ reasoning?: boolean; reasoning_options?: readonly ReasoningOptionSpec[]; max_output_tokens: number; name: string; /** * The SDK this model needs, present only when it differs from the provider's * default. * * models.dev sets `provider.npm` as an OVERRIDE: `opencode`'s provider-level * value is `@ai-sdk/openai-compatible`, so the 53 models carrying no override * speak that, while the 32 carrying `@ai-sdk/openai` are served on the * Responses API and the 23 carrying `@ai-sdk/anthropic` on Messages. That is * the vendor's own statement of the split, which is why `responses-routes.ts` * dispatches on it rather than on a list we would have to maintain. */ provider_npm?: string; } /** * The endpoint each plane's provider declares, read from the catalog rather than * assumed - the field the client itself consumes (`models-dev.ts:107`), so the * mount can read this instead of hard-coding a family. */ export const OPENCODE_PLANE_API: Readonly> = { go: "https://opencode.ai/inference/go/openai/v1", zen: "https://opencode.ai/inference/openai/v1", }; /** * The endpoint each wire family declares, per plane, keyed by the SDK package the * catalog names for that family (`""` is the provider's own default). * * GENERATED by `scripts/regenerate-catalog-shim.ts` — never hand-edit. The * provider-level `OPENCODE_PLANE_API` above is the default family's address only; * anthropic and google are served at their own paths, and this is where that is * recorded. */ export const OPENCODE_FAMILY_API: Readonly< Record<"go" | "zen", Readonly>> > = { go: { "": "https://opencode.ai/inference/go/openai/v1", "@ai-sdk/anthropic": "https://opencode.ai/inference/go/anthropic/v1", "@ai-sdk/google": "https://opencode.ai/inference/go/google/v1beta", "@ai-sdk/openai": "https://opencode.ai/inference/go/openai/v1", }, zen: { "": "https://opencode.ai/inference/openai/v1", "@ai-sdk/anthropic": "https://opencode.ai/inference/anthropic/v1", "@ai-sdk/google": "https://opencode.ai/inference/google/v1beta", "@ai-sdk/mistral": "https://opencode.ai/inference/openai/v1", "@ai-sdk/openai": "https://opencode.ai/inference/openai/v1", }, }; export const OPENCODE_GO_CATALOG: readonly CatalogModelSpec[] = [ { context_window: 1_048_576, cost: { cache_read: 0, input: 0, output: 0, }, id: "beam-free", input_modalities: ["text"], is_free: true, max_output_tokens: 131_072, name: "Beam Free", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.01, cache_write: 0.125, input: 0.1, output: 0.5, }, id: "claude-haiku-5-5", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "Claude Haiku 5.5", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "toggle" }, { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.022, input: 0.66, output: 1.98, }, id: "deepseek-v4-pro", input_modalities: ["text"], max_output_tokens: 384_000, name: "DeepSeek V4 Pro", reasoning: true, reasoning_options: [{ type: "effort", values: ["high", "max"] }], }, { context_window: 1_000_000, cost: { cache_read: 0.003, input: 0.15, output: 0.6, }, id: "deepseek-v4.1-flash", input_modalities: ["text", "image"], max_output_tokens: 384_000, name: "DeepSeek V4.1 Flash 1017", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "high", "max"] }], }, { context_window: 1_048_576, cost: { cache_read: 0.1, input: 2, output: 10, }, id: "gemini-4-argon", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Gemini 4 Argon", provider_npm: "@ai-sdk/google", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "medium", "high"] }], }, { context_window: 1_000_000, cost: { cache_read: 0.26, input: 1.4, output: 4.4, }, id: "glm-5.2", input_modalities: ["text"], max_output_tokens: 131_072, name: "GLM-5.2", reasoning: true, reasoning_options: [{ type: "effort", values: ["high", "max"] }], }, { context_window: 1_000_000, cost: { cache_read: 0.26, input: 1.4, output: 4.4, }, id: "glm-5.3", input_modalities: ["text"], max_output_tokens: 131_072, name: "GLM-5.3", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "high", "max"] }], }, { context_window: 1_000_000, cost: { cache_read: 0.03, input: 0.15, output: 0.5, }, id: "glm-5.3-flash", input_modalities: ["text", "image"], max_output_tokens: 131_072, name: "GLM-5.3-Flash", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "high", "max"] }], }, { context_window: 1_050_000, cost: { cache_read: 0.02, cache_write: 0.25, input: 0.2, output: 1.2, }, id: "gpt-5.6-luna", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.6 Luna", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "low", "medium", "high", "xhigh", "max"], }, ], }, { context_window: 1_050_000, cost: { cache_read: 0.01, cache_write: 0.125, input: 0.1, output: 0.5, }, id: "gpt-6-luna", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-6 Luna", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "low", "medium", "high", "xhigh", "max"], }, ], }, { context_window: 500_000, cost: { cache_read: 0.5, input: 2, output: 6, }, id: "grok-4.7", input_modalities: ["text", "image"], max_output_tokens: 500_000, name: "Grok 4.7", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh"] }, ], }, { context_window: 256_000, cost: { cache_read: 0.035, input: 0.14, output: 0.58, }, id: "hy3", input_modalities: ["text"], max_output_tokens: 128_000, name: "Hy3", reasoning: true, reasoning_options: [{ type: "effort", values: ["none", "low", "high"] }], }, { context_window: 1_048_576, cost: { cache_read: 0.042, input: 0.834, output: 2.501, }, id: "hy4", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Hy4", reasoning: true, reasoning_options: [{ type: "effort", values: ["none", "high"] }], }, { context_window: 1_048_576, cost: { cache_read: 0, input: 0, output: 0, }, id: "hy4-flash-free", input_modalities: ["text", "image"], is_free: true, max_output_tokens: 65_536, name: "Hy4 flash Free", reasoning: true, reasoning_options: [{ type: "effort", values: ["none", "high"] }], }, { context_window: 1_024_000, cost: { cache_read: 0.042, input: 0.834, output: 2.501, }, id: "hy4-preview", input_modalities: ["text"], max_output_tokens: 64_000, name: "Hy4 preview", reasoning: true, reasoning_options: [{ type: "effort", values: ["none", "high"] }], }, { context_window: 262_144, cost: { cache_read: 0, input: 0, output: 0, }, id: "iceman-contributor-free", input_modalities: ["text"], is_free: true, max_output_tokens: 131_072, name: "Iceman Contributor Free", reasoning: true, }, { context_window: 262_144, cost: { cache_read: 0.19, input: 0.95, output: 4, }, id: "kimi-k2.7-code", input_modalities: ["text", "image"], max_output_tokens: 262_144, name: "Kimi K2.7 Code", reasoning: true, }, { context_window: 1_048_576, cost: { cache_read: 0.3, cache_write: 3, input: 3, output: 15, }, id: "kimi-k3", input_modalities: ["text", "image"], max_output_tokens: 1_048_576, name: "Kimi K3", reasoning: true, reasoning_options: [{ type: "effort", values: ["max"] }], }, { context_window: 1_048_576, cost: { cache_read: 0.2, cache_write: 2, input: 2, output: 10, }, id: "kimi-k3.1-pro", input_modalities: ["text", "image"], max_output_tokens: 1_048_576, name: "Kimi K3.1 Pro", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "high", "max"] }], }, { context_window: 1_000_000, cost: { cache_read: 0.006, input: 0.3, output: 1.2, }, id: "longcat-2.0", input_modalities: ["text"], max_output_tokens: 131_072, name: "LongCat-2.0", reasoning: true, reasoning_options: [{ type: "toggle" }], }, { context_window: 1_000_000, cost: { cache_read: 0, input: 0, output: 0, }, id: "longcat-2.5-free", input_modalities: ["text", "image"], is_free: true, max_output_tokens: 262_144, name: "LongCat 2.5 Free", reasoning: true, reasoning_options: [{ type: "toggle" }], }, { context_window: 1_000_000, cost: { cache_read: 0.0028, input: 0.14, output: 0.28, }, id: "mimo-v2.5", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "MiMo V2.5", reasoning: true, }, { context_window: 1_048_576, cost: { cache_read: 0.003625, input: 0.435, output: 0.87, }, id: "mimo-v2.5-pro", input_modalities: ["text"], max_output_tokens: 128_000, name: "MiMo V2.5 Pro", reasoning: true, }, { context_window: 1_048_576, cost: { cache_read: 0.0028, input: 0.14, output: 0.28, }, id: "mimo-v2.6-flash", input_modalities: ["text", "image"], max_output_tokens: 131_072, name: "MiMo-V2.6-Flash", reasoning: true, }, { context_window: 1_048_576, cost: { cache_read: 0.003625, input: 0.435, output: 0.87, }, id: "mimo-v2.6-pro", input_modalities: ["text", "image"], max_output_tokens: 131_072, name: "MiMo-V2.6-Pro", reasoning: true, }, { context_window: 1_000_000, cost: { cache_read: 0.06, input: 0.3, output: 1.2, }, id: "minimax-m3", input_modalities: ["text", "image"], max_output_tokens: 131_072, name: "MiniMax-M3", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [{ type: "toggle" }], }, { context_window: 1_000_000, cost: { cache_read: 0.015, input: 0.15, output: 0.6, }, id: "minimax-m3.1-flash", input_modalities: ["text", "image"], max_output_tokens: 512_000, name: "MiniMax M3.1 Flash", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 1_048_576, cost: { cache_read: 0.002, input: 0.1, output: 0.2, }, id: "muse-spark-1.2-contributor", input_modalities: ["text", "image"], max_output_tokens: 131_072, name: "Muse Spark 1.2 Contributor", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["minimal", "low", "medium", "high", "xhigh"] }, ], }, { context_window: 1_048_576, cost: { cache_read: 0.002, input: 0.1, output: 0.2, }, id: "muse-spark-1.3-contributor", input_modalities: ["text", "image"], max_output_tokens: 131_072, name: "Muse Spark 1.3 Contributor", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["minimal", "low", "medium", "high", "xhigh"] }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.04, cache_write: 0.5, input: 0.4, output: 1.6, }, id: "qwen3.7-plus", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Qwen3.7 Plus", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [{ type: "toggle" }, { type: "budget_tokens" }], }, { context_window: 1_000_000, cost: { cache_read: 0.016, cache_write: 0.2, input: 0.15, output: 0.47, }, id: "qwen3.8-flash", input_modalities: ["text", "image"], max_output_tokens: 131_072, name: "Qwen3.8 Flash", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "toggle" }, { type: "effort", values: ["low", "medium", "xhigh"] }, { type: "budget_tokens" }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.25, cache_write: 2.5, input: 2, output: 6, }, id: "qwen3.8-max", input_modalities: ["text", "image"], max_output_tokens: 131_072, name: "Qwen3.8 Max", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "toggle" }, { type: "effort", values: ["low", "medium", "xhigh"] }, { type: "budget_tokens" }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.075, cache_write: 1.875, input: 1.5, output: 4.5, }, id: "qwen4-max", input_modalities: ["text", "image"], max_output_tokens: 262_144, name: "Qwen4 Max", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "toggle" }, { type: "effort", values: ["low", "high", "xhigh"] }, { type: "budget_tokens" }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.1, input: 1, output: 2.7, }, id: "step-5-preview", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Step 5 Preview", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "medium", "high"] }], }, ]; /** Complete catalog of OpenCode Zen models (free tier & flagships) from models.dev. */ export const OPENCODE_ZEN_CATALOG: readonly CatalogModelSpec[] = [ { context_window: 1_048_576, cost: { cache_read: 0, input: 0, output: 0, }, id: "beam-free", input_modalities: ["text"], is_free: true, max_output_tokens: 131_072, name: "Beam Free", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 200_000, cost: { cache_read: 0, cache_write: 0, input: 0, output: 0, }, id: "big-pickle", input_modalities: ["text"], is_free: true, max_output_tokens: 32_000, name: "Big Pickle", reasoning: true, }, { context_window: 1_000_000, cost: { cache_read: 1, cache_write: 12.5, input: 10, output: 50, }, id: "claude-fable-5", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "Claude Fable 5", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.25, cache_write: 12.5, input: 10, output: 50, }, id: "claude-fable-5-1", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "Claude Fable 5.1", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.2, cache_write: 10, input: 8, output: 40, }, id: "claude-fable-5-2", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "Claude Fable 5.2", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 200_000, cost: { cache_read: 0.1, cache_write: 1.25, input: 1, output: 5, }, id: "claude-haiku-4-5", input_modalities: ["text", "image"], max_output_tokens: 64_000, name: "Claude Haiku 4.5", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [{ min: 1024, type: "budget_tokens" }], }, { context_window: 1_000_000, cost: { cache_read: 0.01, cache_write: 0.125, input: 0.1, output: 0.5, }, id: "claude-haiku-5-5", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "Claude Haiku 5.5", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "toggle" }, { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 200_000, cost: { cache_read: 0.5, cache_write: 6.25, input: 5, output: 25, }, id: "claude-opus-4-5", input_modalities: ["text", "image"], max_output_tokens: 64_000, name: "Claude Opus 4.5", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high"] }, { min: 1024, type: "budget_tokens" }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.5, cache_write: 6.25, input: 5, output: 25, }, id: "claude-opus-4-6", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "Claude Opus 4.6", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "max"] }, { min: 1024, type: "budget_tokens" }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.5, cache_write: 6.25, input: 5, output: 25, }, id: "claude-opus-4-7", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "Claude Opus 4.7", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.5, cache_write: 6.25, input: 5, output: 25, }, id: "claude-opus-4-8", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "Claude Opus 4.8", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.5, cache_write: 6.25, input: 5, output: 25, }, id: "claude-opus-5", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "Claude Opus 5", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.2, cache_write: 5, input: 4, output: 20, }, id: "claude-opus-5-5", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "Claude Opus 5.5", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.3, cache_write: 3.75, input: 3, output: 15, }, id: "claude-sonnet-4-5", input_modalities: ["text", "image"], max_output_tokens: 64_000, name: "Claude Sonnet 4.5", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [{ min: 1024, type: "budget_tokens" }], }, { context_window: 1_000_000, cost: { cache_read: 0.3, cache_write: 3.75, input: 3, output: 15, }, id: "claude-sonnet-4-6", input_modalities: ["text", "image"], max_output_tokens: 64_000, name: "Claude Sonnet 4.6", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "max"] }, { min: 1024, type: "budget_tokens" }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.2, cache_write: 2.5, input: 2, output: 10, }, id: "claude-sonnet-5", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "Claude Sonnet 5", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.1, cache_write: 2.5, input: 2, output: 10, }, id: "claude-sonnet-5-5", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "Claude Sonnet 5.5", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.145, input: 1.74, output: 3.48, }, id: "deepseek-v4-pro", input_modalities: ["text"], max_output_tokens: 384_000, name: "DeepSeek V4 Pro", reasoning: true, reasoning_options: [ { type: "toggle" }, { type: "effort", values: ["high", "max"] }, ], }, { context_window: 1_000_000, cost: { cache_read: 0.006, input: 0.3, output: 1.2, }, id: "deepseek-v4.1-flash", input_modalities: ["text", "image"], max_output_tokens: 384_000, name: "DeepSeek V4.1 Flash 1017", reasoning: true, reasoning_options: [ { type: "toggle" }, { type: "effort", values: ["low", "high", "max"] }, ], }, { context_window: 200_000, cost: { cache_read: 0, input: 0, output: 0, }, id: "deepseek-v4.1-flash-free", input_modalities: ["text", "image"], is_free: true, max_output_tokens: 32_000, name: "DeepSeek V4.1 Flash Free", reasoning: true, reasoning_options: [ { type: "toggle" }, { type: "effort", values: ["low", "high", "max"] }, ], }, { context_window: 262_144, cost: { cache_read: 0, input: 0, output: 0, }, id: "flint-40b-free", input_modalities: ["text"], is_free: true, max_output_tokens: 65_536, name: "Flint 40B Free", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 1_048_576, cost: { cache_read: 0.05, input: 0.5, output: 3, }, id: "gemini-3-flash", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Gemini 3 Flash", provider_npm: "@ai-sdk/google", reasoning: true, reasoning_options: [ { type: "effort", values: ["minimal", "low", "medium", "high"] }, ], }, { context_window: 1_048_576, cost: { cache_read: 0.2, input: 2, output: 12, }, id: "gemini-3.1-pro", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Gemini 3.1 Pro Preview", provider_npm: "@ai-sdk/google", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "medium", "high"] }], }, { context_window: 1_048_576, cost: { cache_read: 0.15, input: 1.5, output: 9, }, id: "gemini-3.5-flash", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Gemini 3.5 Flash", provider_npm: "@ai-sdk/google", reasoning: true, reasoning_options: [ { type: "effort", values: ["minimal", "low", "medium", "high"] }, ], }, { context_window: 1_048_576, cost: { cache_read: 0.03, input: 0.3, output: 2.5, }, id: "gemini-3.5-flash-lite", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Gemini 3.5 Flash Lite", provider_npm: "@ai-sdk/google", reasoning: true, reasoning_options: [ { type: "effort", values: ["minimal", "low", "medium", "high"] }, ], }, { context_window: 1_048_576, cost: { cache_read: 0.075, input: 0.75, output: 3.75, }, id: "gemini-3.6-flash", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Gemini 3.6 Flash", provider_npm: "@ai-sdk/google", reasoning: true, reasoning_options: [ { type: "effort", values: ["minimal", "low", "medium", "high"] }, ], }, { context_window: 1_048_576, cost: { cache_read: 0.075, input: 0.75, output: 3.75, }, id: "gemini-3.7-flash", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Gemini 3.7 Flash", provider_npm: "@ai-sdk/google", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "medium", "high"] }], }, { context_window: 1_048_576, cost: { cache_read: 0.075, input: 0.75, output: 3.75, }, id: "gemini-3.8-flash", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Gemini 3.8 Flash", provider_npm: "@ai-sdk/google", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "medium", "high"] }], }, { context_window: 1_048_576, cost: { cache_read: 0.1, input: 2, output: 10, }, id: "gemini-4-argon", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Gemini 4 Argon", provider_npm: "@ai-sdk/google", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "medium", "high"] }], }, { context_window: 1_048_576, cost: { cache_read: 0.1, input: 2, output: 10, }, id: "gemini-4-carbon", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Gemini 4 Carbon", provider_npm: "@ai-sdk/google", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "medium", "high"] }], }, { context_window: 1_048_576, cost: { cache_read: 0.075, input: 1.5, output: 7.5, }, id: "gemini-4-hydrogen", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Gemini 4 Hydrogen", provider_npm: "@ai-sdk/google", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh"] }, ], }, { context_window: 204_800, cost: { cache_read: 0.2, input: 1, output: 3.2, }, id: "glm-5", input_modalities: ["text"], max_output_tokens: 131_072, name: "GLM-5", reasoning: true, reasoning_options: [{ type: "toggle" }], }, { context_window: 204_800, cost: { cache_read: 0.26, input: 1.4, output: 4.4, }, id: "glm-5.1", input_modalities: ["text"], max_output_tokens: 131_072, name: "GLM-5.1", reasoning: true, reasoning_options: [{ type: "toggle" }], }, { context_window: 1_000_000, cost: { cache_read: 0.26, input: 1.4, output: 4.4, }, id: "glm-5.2", input_modalities: ["text"], max_output_tokens: 131_072, name: "GLM-5.2", reasoning: true, reasoning_options: [{ type: "effort", values: ["high", "max"] }], }, { context_window: 1_000_000, cost: { cache_read: 0.26, input: 1.4, output: 4.4, }, id: "glm-5.3", input_modalities: ["text"], max_output_tokens: 131_072, name: "GLM-5.3", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "high", "max"] }], }, { context_window: 1_000_000, cost: { cache_read: 0.03, input: 0.15, output: 0.5, }, id: "glm-5.3-flash", input_modalities: ["text", "image"], max_output_tokens: 131_072, name: "GLM-5.3-Flash", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "high", "max"] }], }, { context_window: 200_000, cost: { cache_read: 0, input: 0, output: 0, }, id: "glm-5.3-flash-free", input_modalities: ["text", "image"], is_free: true, max_output_tokens: 32_000, name: "GLM-5.3-Flash Free", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "high", "max"] }], }, { context_window: 400_000, cost: { cache_read: 0.107, input: 1.07, output: 8.5, }, id: "gpt-5", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["minimal", "low", "medium", "high"] }, ], }, { context_window: 400_000, cost: { cache_read: 0.107, input: 1.07, output: 8.5, }, id: "gpt-5-codex", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5 Codex", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "medium", "high"] }], }, { context_window: 400_000, cost: { cache_read: 0.005, input: 0.05, output: 0.4, }, id: "gpt-5-nano", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5 Nano", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["minimal", "low", "medium", "high"] }, ], }, { context_window: 400_000, cost: { cache_read: 0.107, input: 1.07, output: 8.5, }, id: "gpt-5.1", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.1", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "low", "medium", "high"] }, ], }, { context_window: 400_000, cost: { cache_read: 0.107, input: 1.07, output: 8.5, }, id: "gpt-5.1-codex", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.1 Codex", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "medium", "high"] }], }, { context_window: 400_000, cost: { cache_read: 0.125, input: 1.25, output: 10, }, id: "gpt-5.1-codex-max", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.1 Codex Max", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh"] }, ], }, { context_window: 400_000, cost: { cache_read: 0.025, input: 0.25, output: 2, }, id: "gpt-5.1-codex-mini", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.1 Codex Mini", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "medium", "high"] }], }, { context_window: 400_000, cost: { cache_read: 0.175, input: 1.75, output: 14, }, id: "gpt-5.2", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.2", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "low", "medium", "high", "xhigh"] }, ], }, { context_window: 400_000, cost: { cache_read: 0.175, input: 1.75, output: 14, }, id: "gpt-5.2-codex", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.2 Codex", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh"] }, ], }, { context_window: 400_000, cost: { cache_read: 0.175, input: 1.75, output: 14, }, id: "gpt-5.3-codex", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.3 Codex", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "low", "medium", "high", "xhigh"] }, ], }, { context_window: 128_000, cost: { cache_read: 0.175, input: 1.75, output: 14, }, id: "gpt-5.3-codex-spark", input_modalities: ["text"], max_output_tokens: 128_000, name: "GPT-5.3 Codex Spark", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh"] }, ], }, { context_window: 1_050_000, cost: { cache_read: 0.25, input: 2.5, output: 15, }, id: "gpt-5.4", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.4", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "low", "medium", "high", "xhigh"] }, ], }, { context_window: 400_000, cost: { cache_read: 0.075, input: 0.75, output: 4.5, }, id: "gpt-5.4-mini", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.4 Mini", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "low", "medium", "high", "xhigh"] }, ], }, { context_window: 400_000, cost: { cache_read: 0.02, input: 0.2, output: 1.25, }, id: "gpt-5.4-nano", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.4 Nano", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "low", "medium", "high", "xhigh"] }, ], }, { context_window: 1_050_000, cost: { cache_read: 30, input: 30, output: 180, }, id: "gpt-5.4-pro", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.4 Pro", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["medium", "high", "xhigh"] }, ], }, { context_window: 1_050_000, cost: { cache_read: 0.5, input: 5, output: 30, }, id: "gpt-5.5", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.5", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "low", "medium", "high", "xhigh"] }, ], }, { context_window: 1_050_000, cost: { cache_read: 30, input: 30, output: 180, }, id: "gpt-5.5-pro", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.5 Pro", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["medium", "high", "xhigh"] }, ], }, { context_window: 1_050_000, cost: { cache_read: 0.02, cache_write: 0.25, input: 0.2, output: 1.2, }, id: "gpt-5.6-luna", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.6 Luna", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "low", "medium", "high", "xhigh", "max"], }, ], }, { context_window: 1_050_000, cost: { cache_read: 0.4, cache_write: 5, input: 4, output: 20, }, id: "gpt-5.6-sol", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.6 Sol", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "low", "medium", "high", "xhigh", "max"], }, ], }, { context_window: 1_050_000, cost: { cache_read: 0.2, cache_write: 2.5, input: 2, output: 12, }, id: "gpt-5.6-terra", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-5.6 Terra", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "low", "medium", "high", "xhigh", "max"], }, ], }, { context_window: 1_050_000, cost: { cache_read: 1, cache_write: 12.5, input: 10, output: 50, }, id: "gpt-6-astra", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-6 Astra", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 1_050_000, cost: { cache_read: 0.01, cache_write: 0.125, input: 0.1, output: 0.5, }, id: "gpt-6-luna", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-6 Luna", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "low", "medium", "high", "xhigh", "max"], }, ], }, { context_window: 1_050_000, cost: { cache_read: 0.2, cache_write: 2.5, input: 2, output: 10, }, id: "gpt-6-sol", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-6 Sol", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "low", "medium", "high", "xhigh", "max"], }, ], }, { context_window: 1_050_000, cost: { cache_read: 0.1, cache_write: 2.5, input: 2, output: 10, }, id: "gpt-6.1-sol", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "GPT-6.1 Sol", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 500_000, cost: { cache_read: 0.3, input: 2, output: 6, }, id: "grok-4.5", input_modalities: ["text", "image"], max_output_tokens: 500_000, name: "Grok 4.5", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [{ type: "effort", values: ["low", "medium", "high"] }], }, { context_window: 500_000, cost: { cache_read: 0.5, input: 2, output: 6, }, id: "grok-4.6", input_modalities: ["text", "image"], max_output_tokens: 500_000, name: "Grok 4.6", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh"] }, ], }, { context_window: 500_000, cost: { cache_read: 0.5, input: 2, output: 6, }, id: "grok-4.7", input_modalities: ["text", "image"], max_output_tokens: 500_000, name: "Grok 4.7", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh"] }, ], }, { context_window: 256_000, cost: { cache_read: 0.2, input: 1, output: 2, }, id: "grok-build-0.1", input_modalities: ["text", "image"], max_output_tokens: 256_000, name: "Grok Build 0.1", provider_npm: "@ai-sdk/openai", reasoning: true, }, { context_window: 1_048_576, cost: { cache_read: 0, input: 0, output: 0, }, id: "hy4-flash-free", input_modalities: ["text", "image"], is_free: true, max_output_tokens: 65_536, name: "Hy4 flash Free", reasoning: true, reasoning_options: [{ type: "effort", values: ["none", "high"] }], }, { context_window: 262_144, cost: { cache_read: 0, input: 0, output: 0, }, id: "iceman-free", input_modalities: ["text"], is_free: true, max_output_tokens: 131_072, name: "Iceman Free", reasoning: true, }, { context_window: 1_048_576, cost: { cache_read: 0, cache_write: 0, input: 0, output: 0, }, id: "inkling-2-small-free", input_modalities: ["text", "image"], is_free: true, max_output_tokens: 131_072, name: "Inkling 2 Small Free", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "minimal", "low", "medium", "high", "max"], }, ], }, { context_window: 262_144, cost: { cache_read: 0.1, input: 0.6, output: 3, }, id: "kimi-k2.5", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Kimi K2.5", reasoning: true, reasoning_options: [{ type: "toggle" }], }, { context_window: 262_144, cost: { cache_read: 0.16, input: 0.95, output: 4, }, id: "kimi-k2.6", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Kimi K2.6", reasoning: true, reasoning_options: [{ type: "toggle" }], }, { context_window: 262_144, cost: { cache_read: 0.19, input: 0.95, output: 4, }, id: "kimi-k2.7-code", input_modalities: ["text", "image"], max_output_tokens: 262_144, name: "Kimi K2.7 Code", reasoning: true, }, { context_window: 1_048_576, cost: { cache_read: 0.3, cache_write: 3, input: 3, output: 15, }, id: "kimi-k3", input_modalities: ["text", "image"], max_output_tokens: 1_048_576, name: "Kimi K3", reasoning: true, reasoning_options: [ { type: "toggle" }, { type: "effort", values: ["low", "high", "max"] }, ], }, { context_window: 1_000_000, cost: { cache_read: 0, input: 0, output: 0, }, id: "longcat-2.5-free", input_modalities: ["text", "image"], is_free: true, max_output_tokens: 262_144, name: "LongCat 2.5 Free", reasoning: true, reasoning_options: [{ type: "toggle" }], }, { context_window: 200_000, cost: { cache_read: 0, input: 0, output: 0, }, id: "mimo-v2.6-flash-free", input_modalities: ["text", "image"], is_free: true, max_output_tokens: 32_000, name: "MiMo-V2.6-Flash Free", reasoning: true, }, { context_window: 204_800, cost: { cache_read: 0.06, input: 0.3, output: 1.2, }, id: "minimax-m2.5", input_modalities: ["text"], max_output_tokens: 131_072, name: "MiniMax-M2.5", reasoning: true, }, { context_window: 204_800, cost: { cache_read: 0.06, input: 0.3, output: 1.2, }, id: "minimax-m2.7", input_modalities: ["text"], max_output_tokens: 131_072, name: "MiniMax-M2.7", reasoning: true, }, { context_window: 512_000, cost: { cache_read: 0.06, input: 0.3, output: 1.2, }, id: "minimax-m3", input_modalities: ["text", "image"], max_output_tokens: 128_000, name: "MiniMax-M3", reasoning: true, reasoning_options: [{ type: "toggle" }], }, { context_window: 1_000_000, cost: { cache_read: 0, input: 0, output: 0, }, id: "minimax-m3.1-flash-free", input_modalities: ["text", "image"], is_free: true, max_output_tokens: 512_000, name: "MiniMax M3.1 Flash Free", reasoning: true, reasoning_options: [ { type: "effort", values: ["low", "medium", "high", "xhigh", "max"] }, ], }, { context_window: 524_288, cost: { cache_read: 0.07, input: 0.68, output: 2.09, }, id: "mistral-large-4", input_modalities: ["text", "image"], max_output_tokens: 262_144, name: "Mistral Large 4", provider_npm: "@ai-sdk/mistral", reasoning: true, reasoning_options: [{ type: "effort", values: ["none", "high"] }], }, { context_window: 1_048_576, cost: { cache_read: 0.004, cache_write: 0, input: 0.1, output: 0.5, }, id: "muse-ember-1.0", input_modalities: ["text", "image"], max_output_tokens: 270_000, name: "Muse Ember 1.0", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["minimal", "low", "medium", "high", "xhigh", "max"], }, ], }, { context_window: 1_048_576, cost: { cache_read: 0.15, input: 1.25, output: 4.25, }, id: "muse-spark-1.2", input_modalities: ["text", "image"], max_output_tokens: 131_072, name: "Muse Spark 1.2", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["minimal", "low", "medium", "high", "xhigh"] }, ], }, { context_window: 1_048_576, cost: { cache_read: 0.15, input: 1.25, output: 4.25, }, id: "muse-spark-1.3", input_modalities: ["text", "image"], max_output_tokens: 131_072, name: "Muse Spark 1.3", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["minimal", "low", "medium", "high", "xhigh"] }, ], }, { context_window: 1_048_576, cost: { cache_read: 0.2, input: 4, output: 20, }, id: "muse-wonder-1.0", input_modalities: ["text", "image"], max_output_tokens: 131_072, name: "Muse Wonder", provider_npm: "@ai-sdk/openai", reasoning: true, reasoning_options: [ { type: "effort", values: ["minimal", "low", "medium", "high", "xhigh", "max"], }, ], }, { context_window: 262_144, cost: { cache_read: 0, input: 0, output: 0, }, id: "nemotron-3.5-lightning-free", input_modalities: ["text"], is_free: true, max_output_tokens: 262_144, name: "Nemotron 3.5 Lightning Free", reasoning: true, }, { context_window: 1_048_576, cost: { cache_read: 0, input: 0, output: 0, }, id: "nemotron-3.5-super-vl-free", input_modalities: ["text", "image"], is_free: true, max_output_tokens: 131_072, name: "Nemotron 3.5 Super VL Free", reasoning: true, reasoning_options: [ { type: "effort", values: ["none", "minimal", "low", "medium", "high", "xhigh"], }, ], }, { context_window: 262_144, cost: { cache_read: 0.02, cache_write: 0.25, input: 0.2, output: 1.2, }, id: "qwen3.5-plus", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Qwen3.5 Plus", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [{ type: "toggle" }, { type: "budget_tokens" }], }, { context_window: 262_144, cost: { cache_read: 0.05, cache_write: 0.625, input: 0.5, output: 3, }, id: "qwen3.6-plus", input_modalities: ["text", "image"], max_output_tokens: 65_536, name: "Qwen3.6 Plus", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [{ type: "toggle" }, { type: "budget_tokens" }], }, { context_window: 1_000_000, cost: { cache_read: 0.016, cache_write: 0.2, input: 0.15, output: 0.47, }, id: "qwen3.8-flash", input_modalities: ["text", "image"], max_output_tokens: 131_072, name: "Qwen3.8 Flash", provider_npm: "@ai-sdk/anthropic", reasoning: true, reasoning_options: [ { type: "toggle" }, { type: "effort", values: ["low", "medium", "xhigh"] }, { type: "budget_tokens" }, ], }, { context_window: 262_144, cost: { cache_read: 0.25, cache_write: 2.5, input: 2, output: 6, }, id: "qwen3.8-max", input_modalities: ["text", "image"], max_output_tokens: 131_072, name: "Qwen3.8 Max", reasoning: true, reasoning_options: [ { type: "toggle" }, { type: "effort", values: ["low", "medium", "xhigh"] }, { min: 1024, type: "budget_tokens" }, ], }, ];