diff --git a/.changeset/README.md b/.changeset/README.md index fa4dbbf550..5add966934 100644 --- a/.changeset/README.md +++ b/.changeset/README.md @@ -4,7 +4,7 @@ This directory contains changeset files used to track changes for the next relea ## Adding a changeset -When making a user-facing change, run: +When making a user-facing change, prefer one concise changeset per PR, grouping related changes when possible. Run: ```sh bunx changeset add diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..b6d8d73512 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,12 @@ +.git +.opencode +.sst +.turbo +.wrangler +node_modules +**/node_modules +**/.output +**/dist +**/.turbo +**/.vite +**/coverage diff --git a/.gitattributes b/.gitattributes index a53ef3c352..a382c23972 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10,16 +10,32 @@ packages/kilo-ui/tests/**/*.png filter=lfs diff=lfs merge=lfs -text packages/kilo-vscode/tests/**/*.png filter=lfs diff=lfs merge=lfs -text packages/kilo-docs/public/img/screenshot-tests/**/*.png filter=lfs diff=lfs merge=lfs -text -# Hide non-English localization files by default in GitHub PR diffs. +# Hide most localization files by default in GitHub PR diffs. Show English as the source +# language and German so reviewers can catch untranslated copy-pasted English strings. **/i18n/*.ts linguist-generated=true +**/i18n/**/*.ts linguist-generated=true **/i18n/en.ts linguist-generated=false **/i18n/en*.ts linguist-generated=false +**/i18n/**/en.ts linguist-generated=false +**/i18n/**/en*.ts linguist-generated=false +**/i18n/de.ts linguist-generated=false +**/i18n/de*.ts linguist-generated=false +**/i18n/**/de.ts linguist-generated=false +**/i18n/**/de*.ts linguist-generated=false **/i18n/package-nls-en.ts linguist-generated=false +**/i18n/package-nls-de.ts linguist-generated=false **/i18n/index.ts linguist-generated=false +**/i18n/**/index.ts linguist-generated=false **/i18n/parity.test.ts linguist-generated=false +**/i18n/**/parity.test.ts linguist-generated=false packages/kilo-i18n/src/*.ts linguist-generated=true packages/kilo-i18n/src/en.ts linguist-generated=false +packages/kilo-i18n/src/de.ts linguist-generated=false # Auto-generated CLI reference docs packages/kilo-docs/markdoc/partials/cli-commands-table.md linguist-generated=true packages/kilo-docs/pages/code-with-ai/platforms/cli-reference.md linguist-generated=true + +# Upstream generated migration artifacts +packages/core/migration/**/snapshot.json linguist-generated +packages/core/src/database/migration.gen.ts linguist-generated diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3aeef82d62..c6dfb0ebda 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,3 @@ # web + desktop packages -packages/app/ @adamdotdevin -packages/tauri/ @adamdotdevin -packages/desktop/src-tauri/ @brendonovich -packages/desktop/ @adamdotdevin +packages/app/ @Hona @Brendonovich +packages/desktop/ @Hona @Brendonovich diff --git a/.github/actions/setup-bun/action.yml b/.github/actions/setup-bun/action.yml index 5b44517ec5..b8c9ce5479 100644 --- a/.github/actions/setup-bun/action.yml +++ b/.github/actions/setup-bun/action.yml @@ -33,7 +33,10 @@ runs: shell: bash run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT" + # Restoring and extracting the ~1 GB cache took 2m23s on Windows, while a # kilocode_change + # fresh install took 1m27s. Keep Windows off this cache until that reverses. # kilocode_change - name: Restore Bun dependencies + if: runner.os != 'Windows' # kilocode_change id: bun-cache uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: @@ -42,24 +45,66 @@ runs: restore-keys: | ${{ runner.os }}-bun- + # kilocode_change start + - name: Setup Node for native dependency builds + if: runner.os != 'Windows' + uses: actions/setup-node@v6 + with: + node-version: "24" + package-manager-cache: false + + - name: Configure node-gyp Node headers + if: runner.os != 'Windows' + id: node-gyp + run: | + node <<'NODE' + const fs = require("node:fs") + const path = require("node:path") + + const exe = path.dirname(fs.realpathSync(process.execPath)) + const dirs = [exe, path.dirname(exe)] + const root = dirs.find((dir) => fs.existsSync(path.join(dir, "include", "node", "node.h"))) + if (!root) { + throw new Error(`Node headers not found under ${dirs.join(", ")}`) + } + + fs.appendFileSync(process.env.GITHUB_OUTPUT, `nodedir=${root}\n`) + NODE + shell: bash + # kilocode_change end + - name: Install setuptools for distutils compatibility run: python3 -m pip install setuptools || pip install setuptools || true shell: bash - name: Install dependencies run: | + # kilocode_change start + if [ "$RUNNER_OS" != "Windows" ]; then + export npm_config_nodedir="${{ steps.node-gyp.outputs.nodedir }}" + fi + # kilocode_change end + # Workaround for patched peer variants # e.g. ./patches/ for standard-openapi - # https://github.com/oven-sh/bun/issues/28147 + # https://github.com/oven-sh/bun/issues/28147 # kilocode_change if [ "$RUNNER_OS" = "Windows" ]; then - bun install --linker hoisted ${{ inputs.install-flags }} + # kilocode_change start + if ! bun install --frozen-lockfile --linker hoisted ${{ inputs.install-flags }}; then + echo "::warning::Bun install failed on Windows; retrying with conservative extraction" + sleep 5 + BUN_FEATURE_FLAG_DISABLE_STREAMING_INSTALL=1 \ + bun install --frozen-lockfile --linker hoisted --network-concurrency 16 ${{ inputs.install-flags }} + fi + # kilocode_change end else - bun install ${{ inputs.install-flags }} + bun install --frozen-lockfile ${{ inputs.install-flags }} # kilocode_change fi shell: bash + # Do not upload a Windows cache that Windows jobs intentionally never restore. # kilocode_change - name: Save Bun dependencies - if: steps.bun-cache.outputs.cache-hit != 'true' && github.event_name != 'pull_request' && github.event_name != 'pull_request_target' + if: runner.os != 'Windows' && steps.bun-cache.outputs.cache-hit != 'true' && github.event_name != 'pull_request' && github.event_name != 'pull_request_target' # kilocode_change uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: ${{ steps.cache.outputs.dir }} diff --git a/.github/actions/setup-linux-sandbox/action.yml b/.github/actions/setup-linux-sandbox/action.yml new file mode 100644 index 0000000000..6e3a780420 --- /dev/null +++ b/.github/actions/setup-linux-sandbox/action.yml @@ -0,0 +1,21 @@ +# kilocode_change - new file +name: "Setup Linux Sandbox" +description: "Build the Linux bubblewrap helper" +runs: + using: "composite" + steps: + - name: Setup Zig + run: | + curl --fail --location --retry 3 \ + https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz \ + --output "$RUNNER_TEMP/zig.tar.xz" + echo "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982 $RUNNER_TEMP/zig.tar.xz" | sha256sum --check --status + tar -xJf "$RUNNER_TEMP/zig.tar.xz" -C "$RUNNER_TEMP" + echo "$RUNNER_TEMP/zig-linux-x86_64-0.14.0" >> "$GITHUB_PATH" + shell: bash + + - name: Build bubblewrap helper + run: | + bun packages/opencode/script/kilocode/bubblewrap.ts --arch x64 --output "$RUNNER_TEMP/bwrap" + echo "KILO_BWRAP_PATH=$RUNNER_TEMP/bwrap" >> "$GITHUB_ENV" + shell: bash diff --git a/.github/docs-sync/collect.mjs b/.github/docs-sync/collect.mjs new file mode 100644 index 0000000000..75ab641039 --- /dev/null +++ b/.github/docs-sync/collect.mjs @@ -0,0 +1,180 @@ +// kilocode_change - new file + +/** + * Collects PRs merged to the source repos since the watermark, applies a + * deterministic pre-filter, and writes docs-sync-out/digest.json for the LLM + * triage pass. + * + * Pre-filter drops (triage never sees these): + * - PRs labeled auto-docs (this bot's own rolling PRs) + * - chore/test/ci/build/docs/style/refactor conventional titles + * - PRs touching only docs/non-product paths + * + * Revert PRs (conventional `revert(...):` and GitHub-native `Revert "..."` titles) + * are intercepted as signals, never added to the digest; affected digest entries + * gain `reverted_by` so triage/edit can skip them. + * + * Bot-authored PRs are kept: release/dependency bots ship user-facing + * changes too, and the label + docs-only guards above prevent loops. + */ + +import fs from "node:fs" +import { api, appendOutput, appendSummary, listPrFiles, searchIssues } from "./lib.mjs" +import { revertTitleKind, parseRevertTargets, applyRevertAnnotations, unannotatedRevertSignals } from "./reverts.mjs" + +const SOURCE_REPOS = ["Kilo-Org/cloud", "Kilo-Org/kilocode"] +const OUT_DIR = "docs-sync-out" +const BODY_LIMIT = 2000 +const SLIM_BODY_LIMIT = 300 +const PATCH_LIMIT = 8000 +const FILE_LIMIT = 30 +// Revert PRs (conventional AND GitHub-native) are intercepted below BEFORE this filter; the "revert" alternative here is unreachable and kept only to minimize diff. +const DROP_TITLE = /^(chore|test|ci|build|docs|style|refactor|revert)(\(.+\))?!?:/i +const DOCS_ONLY_PATH = /^(packages\/kilo-docs\/|\.github\/docs-sync\/|docs-sync-out\/|docs\/|[^/]+\.md$)/ + +function argSince() { + const i = process.argv.indexOf("--since") + const v = i >= 0 ? process.argv[i + 1] : null + if (!v || Number.isNaN(new Date(v).getTime())) { + throw new Error("usage: collect.mjs --since ") + } + return new Date(v) +} + +async function mergedPrs(fullRepo, since) { + const query = `repo:${fullRepo} is:pr is:merged merged:>=${since.toISOString()}` + return searchIssues(query) +} + +const since = argSince() +console.log(`collecting PRs merged since ${since.toISOString()}`) + +const digest = [] +const dropped = { label: 0, title: 0, docs_only: 0, fetch_error: 0, revert: 0 } +const reverts = [] + +for (const fullRepo of SOURCE_REPOS) { + const prs = await mergedPrs(fullRepo, since) + console.log(`${fullRepo}: ${prs.length} merged PRs in window`) + + for (const item of prs) { + const author = item.user?.login ?? "" + if ((item.labels ?? []).some((l) => l.name === "auto-docs")) { + dropped.label++ + continue + } + if (revertTitleKind(item.title ?? "")) { + try { + const pr = await api(`/repos/${fullRepo}/pulls/${item.number}`) + const targets = parseRevertTargets(pr.body ?? "", fullRepo) + reverts.push({ url: pr.html_url, merged_at: pr.merged_at, targets }) + if (targets.length === 0) { + console.warn(`::warning::revert PR ${fullRepo}#${item.number} has no parseable targets`) + } + dropped.revert++ + } catch (err) { + // One dead revert PR must not abort the run; its targets just go unannotated. + console.warn(`::warning::skipping revert ${fullRepo}#${item.number}: ${err.message}`) + dropped.fetch_error++ + } + continue + } + if (DROP_TITLE.test(item.title ?? "")) { + dropped.title++ + continue + } + + const number = item.number + let pr + let files + try { + pr = await api(`/repos/${fullRepo}/pulls/${number}`) + files = await listPrFiles(fullRepo, number) + } catch (err) { + // Isolate per-PR failures: one dead PR must not abort the whole run. + console.warn(`::warning::skipping ${fullRepo}#${number}: ${err.message}`) + dropped.fetch_error++ + continue + } + // listPrFiles caps at 300 files; a truncated list can't support the + // docs-only classification, so keep such PRs and record the true total. + const truncated = files.length >= 300 + if (!truncated && files.length > 0 && files.every((f) => DOCS_ONLY_PATH.test(f.filename))) { + dropped.docs_only++ + continue + } + + let patch = "" + for (const f of files) { + if (!f.patch) continue + const chunk = `--- ${f.filename}\n${f.patch}\n` + if (patch.length + chunk.length > PATCH_LIMIT) { + patch += "\n... (diff truncated) ...\n" + break + } + patch += chunk + } + + digest.push({ + repo: fullRepo, + number, + title: pr.title, + url: pr.html_url, + author, + merged_at: pr.merged_at, + labels: (pr.labels ?? []).map((l) => l.name), + body: (pr.body ?? "").slice(0, BODY_LIMIT), + files: files.slice(0, FILE_LIMIT).map((f) => `${f.status} ${f.filename} (+${f.additions}/-${f.deletions})`), + files_total: pr.changed_files ?? files.length, + patch_excerpt: patch, + }) + } +} + +const applied = applyRevertAnnotations(digest, reverts) +const unannotated = unannotatedRevertSignals(reverts, applied) + +digest.sort((a, b) => new Date(a.merged_at) - new Date(b.merged_at)) + +fs.mkdirSync(OUT_DIR, { recursive: true }) +// Full digest (bodies + patch excerpts) is filtered down to docs-worthy PRs +// for the edit pass; the slim digest keeps the triage pass context small. +fs.writeFileSync(`${OUT_DIR}/digest-full.json`, JSON.stringify(digest, null, 2)) +const slim = digest.map(({ patch_excerpt, body, ...rest }) => ({ + ...rest, + body: body.slice(0, SLIM_BODY_LIMIT), +})) +fs.writeFileSync(`${OUT_DIR}/digest.json`, JSON.stringify(slim, null, 2)) + +console.log(`kept ${digest.length} PRs, dropped:`, dropped) +appendOutput("count", digest.length) +appendOutput("digest", `${OUT_DIR}/digest.json`) + +const summaryLines = [ + "### docs-sync collect", + "", + `- window: since \`${since.toISOString()}\``, + `- kept: **${digest.length}** PRs`, + `- dropped: ${dropped.label} auto-docs, ${dropped.title} title filter, ${dropped.docs_only} docs-only, ${dropped.fetch_error} fetch errors, ${dropped.revert} reverts intercepted`, + "", + ...digest.map((d) => `- [${d.repo}#${d.number}](${d.url}) ${d.title}`), +] +if (applied.length > 0) { + summaryLines.push("", "**revert annotations:**", ...applied.map(([target, reverter]) => `- ${target} — reverted by ${reverter}`)) +} +if (unannotated.missed.length > 0 || unannotated.unparsed.length > 0) { + summaryLines.push("", "**revert targets with no in-window annotation:**") + for (const m of unannotated.missed) { + summaryLines.push(`- ${m.url} — unannotated targets: ${m.targets.join(", ")}`) + } + for (const url of unannotated.unparsed) { + summaryLines.push(`- ${url} (no parseable targets)`) + } +} +if (unannotated.chains.length > 0) { + summaryLines.push("", "**revert chains (not annotated):**") + for (const c of unannotated.chains) { + summaryLines.push(`- ${c.url}${c.targets.length > 0 ? ` (targets: ${c.targets.join(", ")})` : ""}`) + } +} +appendSummary(summaryLines.join("\n")) diff --git a/.github/docs-sync/edit-prompt.md b/.github/docs-sync/edit-prompt.md new file mode 100644 index 0000000000..c9a2b86abe --- /dev/null +++ b/.github/docs-sync/edit-prompt.md @@ -0,0 +1,27 @@ +You are the Kilo Code documentation bot. You update the public product documentation in `packages/kilo-docs` (a Markdoc/Next.js site served at kilo.ai/docs) so it reflects recently merged PRs. You are handling one batch of PRs; the batch files and your output file are named at the end of these instructions. + +Before writing anything: + +1. Read `packages/kilo-docs/AGENTS.md` and `packages/kilo-docs/STYLE_GUIDE.md` and follow them exactly: Markdoc custom tags, the `/docs` prefix in image paths, navigation files under `lib/nav/`, redirect rules, and the generated-screenshot policy. +2. Read the attached batch files: the full-details file (PR title, body, file list, `patch_excerpt` diffs) and the triage file (docs-worthiness verdicts, target sections, priorities). +3. Verify facts against the current source tree — for Kilo-Org/kilocode PRs. This checkout reflects current kilocode main: before documenting a command, flag, setting, default, or behavior from a kilocode PR, confirm it exists in the current source. Existence alone is not enough: defaults, whether an option is required or optional, and on-by-default behavior must also match the current tree — a symbol that still exists as opt-in does not justify documenting default-on behavior. When the merged diff and the current tree disagree, the current tree wins — the change may have been reverted or superseded; skip it and record why. For Kilo-Org/cloud PRs the source is not in this checkout: rely on the PR diff and body, and on the `reverted_by` field below. Reading any file in the checkout for verification is expected; the hard rule against touching anything outside `packages/kilo-docs/` applies to writing only. + +For each PR in the batch, in priority order, first decide whether it needs documentation at all — skipping is a first-class outcome. For each one that does: + +- Find the most relevant existing docs page(s) and make minimal, precise updates in the style of the surrounding content. +- Create a new page only when no existing page fits; then add it to the matching nav file in `packages/kilo-docs/lib/nav/`. +- Document only behavior that is actually present in the merged diff and still present in the product now (step 3 above: when they disagree, the current state wins). If the PR body or diff shows the feature is behind a flag or otherwise not user-visible yet, skip it and record why. +- If a PR turns out not to need documentation, skip it and record why. Trust evidence over the triage verdict. +- A batch PR with a `reverted_by` field was reverted by that PR; skip it unless there is clear evidence the change is present now — for kilocode PRs verify it in the current source tree (re-land); for cloud PRs require explicit re-land evidence in the entry itself. +- Skipping is a normal outcome: a batch where every PR is skipped is a valid result. Never write docs just to have something to show. + +Hard rules: + +- Only create or modify files under `packages/kilo-docs/`. Never touch code, tests, config, images, or anything outside that directory. +- Never remove or rename pages. Never document unreleased behavior. Never copy internal PR discussion into the docs; write user-facing documentation. +- Do not run git commands and do not commit anything; automation handles git. +- Keep the change small and precise. Do not rewrite sections that are already accurate. + +When finished, write the summary JSON file named in the batch specifics below: a JSON array with exactly one entry per batch PR, consumed by automation (this file is never committed). Use `action` values like `updated `, `created `, or `skipped`. Example: + +[{"pr": 123, "url": "https://github.com/Kilo-Org/kilocode/pull/123", "action": "updated pages/code-with-ai/platforms/cli.md", "reason": "documented --variant flag"}, {"pr": 124, "url": "https://github.com/Kilo-Org/kilocode/pull/124", "action": "skipped", "reason": "feature behind unreleased flag"}] diff --git a/.github/docs-sync/edit.mjs b/.github/docs-sync/edit.mjs new file mode 100644 index 0000000000..167656eda3 --- /dev/null +++ b/.github/docs-sync/edit.mjs @@ -0,0 +1,203 @@ +// kilocode_change - new file + +/** + * Runs the LLM edit pass over docs-sync-out/worthy.json in batches. + * + * Batching bounds each `kilo run` context (a replay window can yield dozens + * of docs-worthy PRs with large diffs). Each batch gets its own CLI session + * and writes its own summary file; results are merged into + * docs-sync-out/edit-summary.json. A batch that fails or is deferred by the + * wall-clock budget is recorded as action "pending" so the watermark holds + * back and the next run re-collects those PRs. + * + * Env: EDIT_MODEL (provider/model), KILO_API_KEY + KILO_ORG_ID (set by workflow; read natively by the kilo provider). + * Budgets: EDIT_BUDGET_MINUTES (default 50), EDIT_BATCH_TIMEOUT_MINUTES (default 15). + * Test hook: DOCS_SYNC_BACKOFF_MS replaces every retry wait when set. + */ + +import fs from "node:fs" +import path from "node:path" +import { fileURLToPath } from "node:url" +import { backoffMsForAttempt, deadline, remainingMs, runKilo, sleepSync } from "./lib.mjs" + +const BATCH_SIZE = 5 +const ATTEMPTS = 3 +const OUT_DIR = "docs-sync-out" +export const SUMMARY_FILE = ".docs-sync-summary.json" + +const HERE = path.dirname(fileURLToPath(import.meta.url)) +const basePrompt = fs.readFileSync(path.join(HERE, "edit-prompt.md"), "utf8") +const model = process.env.EDIT_MODEL +if (!model) throw new Error("EDIT_MODEL is required") + +const EDIT_BUDGET_MINUTES = Number(process.env.EDIT_BUDGET_MINUTES) || 50 +const EDIT_BATCH_TIMEOUT_MINUTES = Number(process.env.EDIT_BATCH_TIMEOUT_MINUTES) || 15 +const BATCH_TIMEOUT_MS = EDIT_BATCH_TIMEOUT_MINUTES * 60 * 1000 + +const worthy = JSON.parse(fs.readFileSync(`${OUT_DIR}/worthy.json`, "utf8")) +const triage = JSON.parse(fs.readFileSync(`${OUT_DIR}/triage.json`, "utf8")) +const priority = new Map(triage.map((e) => [e.url, e])) +const ordered = [...worthy].sort((a, b) => { + const rank = { high: 0, medium: 1, low: 2 } + return (rank[priority.get(a.url)?.priority] ?? 1) - (rank[priority.get(b.url)?.priority] ?? 1) +}) + +/** @type {Map} url → pending cause for failed/deferred batches */ +const pendingCauses = new Map() + +function formatCause(result) { + const bits = [] + if (result.timedOut) bits.push("timed out") + if (result.exitCode !== null && result.exitCode !== undefined) bits.push(`exit ${result.exitCode}`) + if (result.stderrTail) bits.push(result.stderrTail.replaceAll("\n", " ").slice(0, 200)) + return bits.join("; ") || "no diagnostic" +} + +function editBatch(batch, index, budgetDeadline) { + const batchFile = `${OUT_DIR}/edit-batch-${index}.json` + const triageFile = `${OUT_DIR}/edit-batch-triage-${index}.json` + const summaryFile = `${OUT_DIR}/edit-summary-${index}.json` + fs.writeFileSync(batchFile, JSON.stringify(batch, null, 2)) + fs.writeFileSync( + triageFile, + JSON.stringify( + batch.map((d) => priority.get(d.url)).filter(Boolean), + null, + 2, + ), + ) + + const prompt = `${basePrompt} + +Batch specifics for this run: the PRs to handle are in the attached ${batchFile} (full details) and ${triageFile} (triage verdicts). Handle ONLY the PRs in these batch files. When finished, write your per-PR results in the summary JSON format described above to the file \`${summaryFile}\` (path relative to the repository root).` + + let lastCause = "edit pass failed" + for (let attempt = 1; attempt <= ATTEMPTS; attempt++) { + const left = remainingMs(budgetDeadline) + if (left < BATCH_TIMEOUT_MS) { + lastCause = `edit budget exhausted before batch ${index} attempt ${attempt} (${Math.ceil(left / 1000)}s left, need ${EDIT_BATCH_TIMEOUT_MINUTES}m)` + console.warn( + `batch ${index}: stopping retries — remaining budget cannot fit another ${EDIT_BATCH_TIMEOUT_MINUTES}m attempt`, + ) + break + } + + // Headless `kilo run` auto-rejects every permission ask; without --auto the + // agent cannot run shell commands. SECURITY: --auto grants unrestricted bash + // to an agent steered by external PR content. Hardening deferred: a scoped + // permission.bash map via KILO_CONFIG_CONTENT should replace --auto once the + // required shell patterns are stable (see PR #12605 review thread). + const result = runKilo({ + args: ["run", "--auto", prompt, "-m", model, "--variant", "high", "--dir", process.cwd(), "-f", batchFile, "-f", triageFile], + timeoutMs: Math.min(BATCH_TIMEOUT_MS, left), + streamStdout: true, + label: `edit batch ${index} attempt ${attempt}`, + }) + + if (fs.existsSync(summaryFile)) return true + // Tolerate the agent dropping the docs-sync-out/ prefix. + const alt = path.basename(summaryFile) + if (fs.existsSync(alt)) { + fs.renameSync(alt, summaryFile) + return true + } + + // Exit 0 is not success: missing summary is a failure logged WITH the + // captured stderrTail and exit code on every attempt. + const cause = formatCause(result) + lastCause = `edit batch ${index}: ${cause}` + console.warn( + `batch ${index} attempt ${attempt}: summary file ${summaryFile} not produced` + + ` (exit ${result.exitCode}${result.timedOut ? ", timed out" : ""})` + + (result.stderrTail ? `\nstderr tail:\n${result.stderrTail}` : "\nstderr tail: (empty)"), + ) + + if (attempt < ATTEMPTS) { + const wait = backoffMsForAttempt(attempt) + // Skip the wait when the remaining budget cannot fit another attempt. + const afterWait = remainingMs(budgetDeadline) - wait + if (wait > 0 && afterWait >= BATCH_TIMEOUT_MS) { + console.warn(`batch ${index}: backing off ${wait / 1000}s before attempt ${attempt + 1}`) + sleepSync(wait) + } else if (wait > 0) { + console.warn( + `batch ${index}: skipping backoff — remaining budget cannot fit attempt ${attempt + 1} after wait`, + ) + } + } + } + + console.warn(`::warning::edit batch ${index} failed after up to ${ATTEMPTS} attempts; ${batch.length} PRs pending`) + for (const d of batch) pendingCauses.set(d.url, lastCause) + return false +} + +const batches = [] +for (let i = 0; i < ordered.length; i += BATCH_SIZE) { + batches.push(ordered.slice(i, i + BATCH_SIZE)) +} +console.log(`editing docs for ${ordered.length} PRs in ${batches.length} batches of up to ${BATCH_SIZE}`) + +const budgetDeadline = deadline(EDIT_BUDGET_MINUTES) +let deferredFrom = -1 + +for (let i = 0; i < batches.length; i++) { + const left = remainingMs(budgetDeadline) + if (left < BATCH_TIMEOUT_MS) { + deferredFrom = i + const deferredPrs = batches.slice(i).reduce((n, b) => n + b.length, 0) + console.warn( + `stopping edit pass before batch ${i}: remaining budget (${Math.ceil(left / 1000)}s) cannot fit a ${EDIT_BATCH_TIMEOUT_MINUTES}m batch; deferring ${deferredPrs} PRs`, + ) + const cause = `edit budget exhausted before batch ${i} (${Math.ceil(left / 1000)}s left)` + for (let j = i; j < batches.length; j++) { + for (const d of batches[j]) pendingCauses.set(d.url, cause) + } + break + } + editBatch(batches[i], i, budgetDeadline) +} + +if (deferredFrom >= 0) { + console.warn( + `edit pass deferred ${batches.slice(deferredFrom).reduce((n, b) => n + b.length, 0)} PRs due to wall-clock budget`, + ) +} + +// Merge batch summaries. Coverage: every worthy PR gets an entry so the PR +// body accounts for it; failed/deferred batches show up as pending (not skipped). +const merged = [] +const seen = new Set() +for (let i = 0; i < batches.length; i++) { + const file = `${OUT_DIR}/edit-summary-${i}.json` + let entries = [] + try { + entries = JSON.parse(fs.readFileSync(file, "utf8")) + } catch { + continue + } + for (const e of entries) { + const url = String(e?.url ?? "") + if (!url.startsWith("http") || seen.has(url)) continue + seen.add(url) + merged.push({ + pr: Number(e.pr) || 0, + url, + action: String(e.action ?? "skipped"), + reason: String(e.reason ?? ""), + }) + } +} +for (const d of ordered) { + if (seen.has(d.url)) continue + const cause = pendingCauses.get(d.url) || "edit pass failed or timed out for this PR" + merged.push({ pr: d.number, url: d.url, action: "pending", reason: cause }) +} + +// upsert-pr.mjs consumes the merged summary from the repo root; the file is +// removed there before committing so it never lands in the docs PR. +fs.writeFileSync(SUMMARY_FILE, JSON.stringify(merged, null, 2)) +const changed = merged.filter((e) => e.action !== "skipped" && e.action !== "pending").length +const skipped = merged.filter((e) => e.action === "skipped").length +const pending = merged.filter((e) => e.action === "pending").length +console.log(`edit pass complete: ${changed} changed, ${skipped} skipped, ${pending} pending`) diff --git a/.github/docs-sync/extract-json.mjs b/.github/docs-sync/extract-json.mjs new file mode 100644 index 0000000000..c8cdf04ff1 --- /dev/null +++ b/.github/docs-sync/extract-json.mjs @@ -0,0 +1,76 @@ +// kilocode_change - new file + +/** + * Extracts and validates the triage JSON array from raw LLM stdout. + * Usage: extract-json.mjs + * Exit 0 on success, 1 on any failure. Also exports parseTriageEntries for + * the chunked triage runner. + */ + +import fs from "node:fs" +import { pathToFileURL } from "node:url" + +/** Returns validated triage entries, or null when extraction fails. */ +export function parseTriageEntries(raw) { + // `kilo run` prints the assistant message twice (streaming render + final + // summary), so stdout can hold the same array back-to-back. Try each "[" + // from the right and return the first slice that parses — i.e. the last + // (most recent) valid array in the output. + const end = raw.lastIndexOf("]") + if (end < 0) return null + + const starts = [] + for (let i = 0; i <= end; i++) { + if (raw[i] === "[") starts.push(i) + } + + for (let s = starts.length - 1; s >= 0; s--) { + let parsed + try { + parsed = JSON.parse(raw.slice(starts[s], end + 1)) + } catch { + continue + } + if (!Array.isArray(parsed)) continue + const entries = validate(parsed) + if (entries) return entries + } + return null +} + +function validate(parsed) { + const entries = [] + for (const e of parsed) { + const pr = Number(e?.pr) + const url = String(e?.url ?? "") + if (!Number.isInteger(pr) || !url.startsWith("http")) continue + entries.push({ + pr, + url, + docs_worthy: e.docs_worthy === true, + reason: String(e.reason ?? ""), + target_sections: Array.isArray(e.target_sections) ? e.target_sections.map(String) : [], + priority: ["high", "medium", "low"].includes(e.priority) ? e.priority : "medium", + }) + } + return entries.length > 0 ? entries : null +} + +function main() { + const [, , inputPath, outputPath] = process.argv + if (!inputPath || !outputPath) { + console.error("usage: extract-json.mjs ") + process.exit(1) + } + const entries = parseTriageEntries(fs.readFileSync(inputPath, "utf8")) + if (!entries) { + console.error("no valid triage JSON array found in input") + process.exit(1) + } + fs.writeFileSync(outputPath, JSON.stringify(entries, null, 2)) + console.log(`extracted ${entries.length} triage entries (${entries.filter((e) => e.docs_worthy).length} docs-worthy)`) +} + +if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { + main() +} diff --git a/.github/docs-sync/filter-worthy.mjs b/.github/docs-sync/filter-worthy.mjs new file mode 100644 index 0000000000..ea99f3d258 --- /dev/null +++ b/.github/docs-sync/filter-worthy.mjs @@ -0,0 +1,24 @@ +// kilocode_change - new file + +/** + * Filters the full digest down to PRs the triage pass marked docs-worthy. + * Usage: filter-worthy.mjs + * The edit pass consumes the output so its context stays small. + */ + +import fs from "node:fs" + +const [, , digestPath, triagePath, outputPath] = process.argv +if (!digestPath || !triagePath || !outputPath) { + console.error("usage: filter-worthy.mjs ") + process.exit(1) +} + +const digest = JSON.parse(fs.readFileSync(digestPath, "utf8")) +const triage = JSON.parse(fs.readFileSync(triagePath, "utf8")) + +const worthy = new Set(triage.filter((e) => e.docs_worthy).map((e) => e.url)) +const out = digest.filter((d) => worthy.has(d.url)) + +fs.writeFileSync(outputPath, JSON.stringify(out, null, 2)) +console.log(`${out.length} of ${digest.length} digest entries are docs-worthy`) diff --git a/.github/docs-sync/lib.mjs b/.github/docs-sync/lib.mjs new file mode 100644 index 0000000000..6aaf9dc6c3 --- /dev/null +++ b/.github/docs-sync/lib.mjs @@ -0,0 +1,266 @@ +// kilocode_change - new file + +/** + * Shared helpers for the docs-sync bot scripts. Dependency-free (Node 20+ + * global fetch) so the workflow does not rely on runner images shipping the + * gh CLI. + */ + +import { spawnSync } from "node:child_process" +import fs from "node:fs" + +const API = "https://api.github.com" +const MAX_RETRIES = 3 + +export function token() { + const t = process.env.GH_TOKEN || process.env.GITHUB_TOKEN + if (!t) throw new Error("GH_TOKEN (or GITHUB_TOKEN) is required") + return t +} + +export function repo() { + const r = process.env.GITHUB_REPOSITORY + if (!r) throw new Error("GITHUB_REPOSITORY is required") + return r +} + +const sleep = (ms) => new Promise((r) => setTimeout(r, ms)) + +export async function api(path, { method = "GET", body } = {}) { + for (let attempt = 1; attempt <= MAX_RETRIES; attempt++) { + let res + try { + res = await fetch(`${API}${path}`, { + method, + headers: { + authorization: `Bearer ${token()}`, + accept: "application/vnd.github+json", + "x-github-api-version": "2022-11-28", + "user-agent": "kilo-docs-sync-bot", + }, + body: body === undefined ? undefined : JSON.stringify(body), + }) + } catch (err) { + if (attempt < MAX_RETRIES) { + console.warn(`network error (${err.message}), retrying in ${5 * attempt}s`) + await sleep(5000 * attempt) + continue + } + throw err + } + + if (res.status === 403) { + const text = await res.text() + if (text.includes("rate limit") && attempt < MAX_RETRIES) { + const retryAfter = Number(res.headers.get("retry-after")) || 30 + console.warn(`rate limited, retrying in ${retryAfter}s`) + await sleep(retryAfter * 1000) + continue + } + const err = new Error(`${method} ${path} -> 403: ${text}`) + err.status = 403 + throw err + } + + if (res.status >= 500 && attempt < MAX_RETRIES) { + console.warn(`${method} ${path} -> ${res.status}, retrying in ${5 * attempt}s`) + await sleep(5000 * attempt) + continue + } + + if (!res.ok) { + const text = await res.text() + const err = new Error(`${method} ${path} -> ${res.status}: ${text}`) + err.status = res.status + throw err + } + + if (res.status === 204) return null + return res.json() + } + throw new Error(`${method} ${path}: exhausted retries`) +} + +/** Paginated search/issues. Caps at `maxPages` * 100 results. */ +export async function searchIssues(query, { maxPages = 5 } = {}) { + const items = [] + for (let page = 1; page <= maxPages; page++) { + const data = await api(`/search/issues?q=${encodeURIComponent(query)}&per_page=100&page=${page}`) + items.push(...(data.items ?? [])) + if ((data.items ?? []).length < 100) break + } + return items +} + +export async function listPrFiles(fullRepo, number, { maxPages = 3 } = {}) { + const files = [] + for (let page = 1; page <= maxPages; page++) { + const batch = await api(`/repos/${fullRepo}/pulls/${number}/files?per_page=100&page=${page}`) + files.push(...batch) + if (batch.length < 100) break + } + return files +} + +export function appendOutput(name, value) { + const out = process.env.GITHUB_OUTPUT + if (out) fs.appendFileSync(out, `${name}=${value}\n`) + console.log(`output ${name}=${value}`) +} + +export function appendSummary(markdown) { + const summary = process.env.GITHUB_STEP_SUMMARY + if (summary) fs.appendFileSync(summary, markdown + "\n") +} + +/** + * Absolute deadline timestamp (ms since epoch) for a wall-clock budget. + * Used by triage/edit to stop before the job timeout rather than silently + * truncating. + */ +export function deadline(minutes) { + return Date.now() + Number(minutes) * 60 * 1000 +} + +/** Remaining milliseconds until a deadline; never negative. */ +export function remainingMs(deadlineMs) { + return Math.max(0, Number(deadlineMs) - Date.now()) +} + +/** + * Backoff schedule between kilo-run attempts. Production waits 60s then 300s + * (observed outage lasted ~11 min; batch 8 recovered on attempt 2). When + * DOCS_SYNC_BACKOFF_MS is set it replaces EVERY wait (`0` disables waiting); + * the workflow never sets it — only selftests do. + */ +export function backoffMsForAttempt(attempt) { + // attempt is 1-based; wait happens after attempt N before attempt N+1. + const override = process.env.DOCS_SYNC_BACKOFF_MS + if (override !== undefined && override !== "") { + const n = Number(override) + return Number.isFinite(n) && n >= 0 ? n : 0 + } + // After attempt 1 → 60s; after attempt 2 → 300s; nothing after the last. + if (attempt === 1) return 60_000 + if (attempt === 2) return 300_000 + return 0 +} + +/** + * Blocking sleep used between kilo-run retries. Prefer this over async sleep + * so edit/triage stay synchronous around spawnSync. + */ +export function sleepSync(ms) { + const n = Number(ms) + if (!Number.isFinite(n) || n <= 0) return + const end = Date.now() + n + // Atomics.wait is the portable Node sync sleep (no busy loop). + const sab = new SharedArrayBuffer(4) + const view = new Int32Array(sab) + while (Date.now() < end) { + const left = end - Date.now() + if (left <= 0) break + Atomics.wait(view, 0, 0, Math.min(left, 2_147_483_647)) + } +} + +const STDERR_TAIL_LINES = 20 +const STDERR_TAIL_CHARS = 4_000 + +// CSI sequences (colour, cursor moves, erases). kilo renders its TUI to stderr, +// so an unstripped tail lands in the rolling PR's pending table as +// "^[[0m→ ^[[0mRead packages/..." and the cause is unreadable. Stripped before +// the line/char slice so escapes do not eat the budget. The persisted +// docs-sync-out/kilo-stderr-*.log stays raw — that is the debugging record. +// eslint-disable-next-line no-control-regex +const ANSI_CSI = /\u001b\[[0-9;?]*[ -/]*[@-~]/g + +function tailText(text, { lines = STDERR_TAIL_LINES, chars = STDERR_TAIL_CHARS } = {}) { + const s = String(text ?? "") + .replace(ANSI_CSI, "") + .trim() + if (!s) return "" + const lastLines = s.split("\n").slice(-lines).join("\n") + return lastLines.length > chars ? lastLines.slice(-chars) : lastLines +} + +/** + * Artifact files are raw: GitHub masks secret values in log streams only, and the runner + * env holds long-lived secrets (KILO_API_KEY), so exact values of secret-looking env vars + * are redacted before stdout/stderr is persisted or printed. + * Matching is exact-substring and case-sensitive on values — JSON-escaped, base64'd, or + * line-wrapped renderings and values shorter than 8 chars survive (same limitation as + * GitHub's own log masking); this is defense-in-depth, not a guarantee the logs are clean. + */ +export function redactEnvSecrets(text) { + let out = String(text ?? "") + // Also match CREDENTIAL/PASSWORD/ORG_ID/_PAT (e.g. KILO_ORG_ID, GH_PAT) beyond KEY|TOKEN|SECRET. + const nameRe = /KEY|TOKEN|SECRET|CREDENTIAL|PASSWORD|ORG_ID|_PAT$/i + const candidates = [] + for (const [name, value] of Object.entries(process.env)) { + if (!nameRe.test(name)) continue + if (typeof value !== "string" || value.length < 8) continue + candidates.push(value) + } + // Longer values first so a shorter secret that is a prefix of a longer one cannot leave a remainder. + candidates.sort((a, b) => b.length - a.length) + for (const value of candidates) { + if (!out.includes(value)) continue + out = out.split(value).join("***") + } + return out +} + +/** Max bytes of child stderr persisted to docs-sync-out/ (full buffer, not the console tail). */ +const STDERR_LOG_MAX_CHARS = 8 * 1024 * 1024 + +/** + * Run `kilo` via spawnSync so stderr is always recoverable — including when + * the child exits 0 after writing a diagnostic (execFileSync cannot return + * piped stderr on exit 0; that path lost every diagnostic on run 30122603016). + * + * streamStdout:true → inherit fd 1 (edit live log); false → capture stdout + * (triage parses it). stderr is always buffered. + * + * Always writes the full captured stderr to + * docs-sync-out/kilo-stderr-.log (unconditional — success and + * failure). The console return value still uses the short tailText. + */ +export function runKilo({ args, timeoutMs, streamStdout = false, label = "kilo" }) { + const result = spawnSync("kilo", args, { + encoding: "utf8", + maxBuffer: 32 * 1024 * 1024, + timeout: timeoutMs, + stdio: ["ignore", streamStdout ? "inherit" : "pipe", "pipe"], + }) + + const timedOut = Boolean(result.error && result.error.code === "ETIMEDOUT") + const exitCode = + typeof result.status === "number" ? result.status : timedOut ? null : result.status === null ? null : result.status + const stderrRaw = String(result.stderr ?? "") + const stderrSafe = redactEnvSecrets(stderrRaw) + const stderrTail = tailText(stderrSafe) + const stdoutSafe = streamStdout ? "" : redactEnvSecrets(String(result.stdout ?? "")) + // ok is "process finished without OS-level failure". Callers still treat a + // missing summary / unparseable output as failure even when ok is true — + // exit 0 is not success for the docs-sync bot. + const ok = !result.error && result.status === 0 + + // Persist full stderr on every call (not gated on ok/exitCode/summary). Cap is + // generous (megabytes) so long batch dumps keep auto-rejecting lines; console + // still uses the short tail above. + try { + fs.mkdirSync("docs-sync-out", { recursive: true }) + const safe = label.replace(/[^A-Za-z0-9._-]/g, "-") + const body = stderrSafe.length > STDERR_LOG_MAX_CHARS ? stderrSafe.slice(-STDERR_LOG_MAX_CHARS) : stderrSafe + fs.writeFileSync(`docs-sync-out/kilo-stderr-${safe}.log`, body) + } catch (err) { + console.warn(`${label}: failed to write kilo-stderr log: ${err.message}`) + } + + if (result.error && !timedOut) { + console.warn(`${label}: spawn error: ${result.error.message}`) + } + + return { ok, stdout: stdoutSafe, stderrTail, exitCode, timedOut } +} diff --git a/.github/docs-sync/prepare-branch.mjs b/.github/docs-sync/prepare-branch.mjs new file mode 100644 index 0000000000..2710832ccf --- /dev/null +++ b/.github/docs-sync/prepare-branch.mjs @@ -0,0 +1,105 @@ +// kilocode_change - new file + +/** + * Prepares the rolling docs-sync branch before the edit pass: + * - an open auto-docs PR exists -> check out its head branch and merge + * origin/main (preserves any human commits on the branch) + * - otherwise -> fresh branch from origin/main (bot force-pushes later) + * + * Outputs: branch, mode (update|fresh|conflict), pr_number (empty when fresh). + */ + +import { execFileSync } from "node:child_process" +import { pathToFileURL } from "node:url" +import { api, appendOutput, repo, searchIssues } from "./lib.mjs" + +export const DEFAULT_BRANCH = "docs/auto-sync" + +const defaultGit = (args) => execFileSync("git", args, { stdio: ["ignore", "pipe", "inherit"] }).toString().trim() + +/** + * Merge origin/main into the current branch. On a genuine conflict, abort the + * merge, switch to a dated fallback branch from origin/main, and return + * mode=conflict so human commits on the rolling branch stay untouched. Any + * other merge failure (missing identity, corrupt ref, fetch issues) is + * rethrown so the job fails loudly. + */ +export function mergeOrFallback({ branch, git = defaultGit }) { + try { + git(["merge", "origin/main", "--no-edit"]) + return { branch, mode: "update" } + } catch (err) { + // Conflict ⇔ unmerged index entries (or MERGE_HEAD still present). + // Identity failures and similar abort before a merge is started, so + // merge --abort would itself fail — those must rethrow. + let unmerged = "" + try { + unmerged = git(["ls-files", "--unmerged"]) + } catch { + // ls-files itself failing is not a conflict signal + } + let mergeInProgress = false + try { + git(["rev-parse", "-q", "--verify", "MERGE_HEAD"]) + mergeInProgress = true + } catch { + mergeInProgress = false + } + const isConflict = unmerged.length > 0 || mergeInProgress + if (!isConflict) throw err + + console.warn(`merge of origin/main into ${branch} conflicted.`) + console.warn( + "Leaving the conflicted branch untouched so human commits are preserved; continuing on a fresh dated branch.", + ) + git(["merge", "--abort"]) + const fallback = `${DEFAULT_BRANCH}-${new Date().toISOString().slice(0, 10)}` + try { + git(["fetch", "origin", `+refs/heads/${fallback}:refs/remotes/origin/${fallback}`]) + } catch { + console.log(`dated branch ${fallback} does not exist on origin yet; will create it on push`) + } + git(["checkout", "-B", fallback, "origin/main"]) + return { branch: fallback, mode: "conflict" } + } +} + +async function main() { + const git = defaultGit + const prs = await searchIssues(`repo:${repo()} is:pr is:open label:auto-docs sort:created-desc`, { maxPages: 1 }) + + let mode = "fresh" + let prNumber = "" + let branch = DEFAULT_BRANCH + + if (prs.length > 0) { + const pr = await api(`/repos/${repo()}/pulls/${prs[0].number}`) + branch = pr.head?.ref ?? DEFAULT_BRANCH + prNumber = String(pr.number) + git(["fetch", "origin", "main", branch]) + git(["checkout", branch]) + ;({ branch, mode } = mergeOrFallback({ branch, git })) + } else { + // Keep the remote-tracking ref current so the later --force-with-lease + // push (stale branch left over from a merged/closed PR) is safe. + try { + git(["fetch", "origin", `+refs/heads/${branch}:refs/remotes/origin/${branch}`]) + } catch { + console.log(`branch ${branch} does not exist on origin yet; will create it on push`) + } + git(["checkout", "-B", branch, "origin/main"]) + } + + appendOutput("branch", branch) + appendOutput("mode", mode) + appendOutput("pr_number", prNumber) + console.log(`branch ${branch} ready (mode=${mode}, pr=${prNumber || "none"})`) +} + +const isMain = process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href +if (isMain) { + main().catch((err) => { + console.error(err) + process.exit(1) + }) +} diff --git a/.github/docs-sync/redact-stream.mjs b/.github/docs-sync/redact-stream.mjs new file mode 100644 index 0000000000..341aea34ad --- /dev/null +++ b/.github/docs-sync/redact-stream.mjs @@ -0,0 +1,25 @@ +// kilocode_change - new file + +/** + * Line-wise stdin→stdout filter that redacts secret-looking env values. + * Used in the docs-sync workflow so kilo stdout piped to edit-log.txt is safe. + * Env values contain no newlines, so line-wise processing never splits a value. + */ + +import { redactEnvSecrets } from "./lib.mjs" + +let carry = "" + +process.stdin.setEncoding("utf8") +process.stdin.on("data", (chunk) => { + carry += chunk + let idx + while ((idx = carry.indexOf("\n")) !== -1) { + const line = carry.slice(0, idx + 1) + carry = carry.slice(idx + 1) + process.stdout.write(redactEnvSecrets(line)) + } +}) +process.stdin.on("end", () => { + if (carry.length > 0) process.stdout.write(redactEnvSecrets(carry)) +}) diff --git a/.github/docs-sync/reverts.mjs b/.github/docs-sync/reverts.mjs new file mode 100644 index 0000000000..5702fa3743 --- /dev/null +++ b/.github/docs-sync/reverts.mjs @@ -0,0 +1,153 @@ +// kilocode_change - new file + +/** + * Pure helpers for intercepting revert PRs during docs-sync collect. + * No I/O, no imports — offline-testable title/body/annotation logic only. + */ + +/** Detect revert PR titles. Returns "conventional" | "github-native" | null. */ +export function revertTitleKind(title) { + const t = String(title ?? "") + if (/^revert(\(.+\))?!?:/i.test(t)) return "conventional" + if (/^revert\s+["']/i.test(t)) return "github-native" + return null +} + +/** + * Parse revert targets from a PR body. `defaultRepo` ("Kilo-Org/kilocode") resolves bare `#N`. + * Returns [{ repo, number, url }] with url = `https://github.com/${repo}/pull/${number}`. + * Handles the conventional trailer form: a line starting with `Reverts` (case-insensitive), + * e.g. `Reverts #12249 and #12481.`, `Reverts Kilo-Org/cloud#42.`, comma-separated lists, + * several such lines in one body, and bulleted/quoted single-line trailers + * (`- Reverts #12249`, `> Reverts #12249`). + * NOT handled (documented limitation): `This reverts commit .` (no PR number), + * mid-sentence forms (`This reverts #5.`), narrative mentions (`Revert the fix in #99999` + * is prose, not a trailer — must NOT produce a target), `Revertsomething #5` (prose glued + * to the word — `\b` word boundary makes it inert), and multi-line lists + * (`Reverts:\n- #1\n- #2`). + */ +export function parseRevertTargets(body, defaultRepo) { + const text = String(body ?? "") + const repoDefault = String(defaultRepo ?? "") + const seen = new Set() + const out = [] + const lineRe = /^[ \t>*-]*reverts\b[ \t:]*([^\n]*)/gim + let lineMatch + while ((lineMatch = lineRe.exec(text)) !== null) { + const capture = lineMatch[1] ?? "" + const refRe = /(?:([A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+))?#(\d+)/g + let refMatch + while ((refMatch = refRe.exec(capture)) !== null) { + const repo = refMatch[1] || repoDefault + const number = Number(refMatch[2]) + if (!repo || !Number.isInteger(number)) continue + const url = `https://github.com/${repo}/pull/${number}` + if (seen.has(url)) continue + seen.add(url) + out.push({ repo, number, url }) + } + } + return out +} + +/** + * revertSignals: [{ url, merged_at, targets: [{ repo, number, url }] }] + * Returns Map — the annotation for each reverted PR. + * Map keys are lowercased target urls; values keep signal.url as authored. + * Revert-of-revert: a signal whose own url is itself a target of another signal is + * dropped entirely (a re-land: net effect zero — one set lookup, no chain walking). + */ +export function computeRevertAnnotations(revertSignals) { + const signals = Array.isArray(revertSignals) ? revertSignals : [] + const revertedUrls = new Set() + for (const signal of signals) { + for (const t of signal?.targets ?? []) { + if (t?.url) revertedUrls.add(t.url.toLowerCase()) + } + } + const annotations = new Map() + for (const signal of signals) { + if (!signal?.url || revertedUrls.has(signal.url.toLowerCase())) continue + for (const t of signal.targets ?? []) { + if (!t?.url) continue + annotations.set(t.url.toLowerCase(), { url: signal.url, merged_at: signal.merged_at }) + } + } + return annotations +} + +/** + * Applies computeRevertAnnotations to digest entries in place: an entry whose url + * was reverted gains `reverted_by: { url, merged_at }` (the reverter). + * Lookup is case-insensitive; applied pairs still report entry.url (canonical). + * Returns applied [targetUrl, reverterUrl] pairs (digest entries only) for reporting. + */ +export function applyRevertAnnotations(digest, revertSignals) { + const annotations = computeRevertAnnotations(revertSignals) + const applied = [] + for (const entry of digest ?? []) { + if (!entry?.url) continue + const ann = annotations.get(entry.url.toLowerCase()) + if (!ann) continue + entry.reverted_by = { url: ann.url, merged_at: ann.merged_at } + applied.push([entry.url, ann.url]) + } + return applied +} + +/** + * Reports intercepted reverts whose targets received no digest annotation, for the + * step summary. `signals` is the same shape as computeRevertAnnotations takes; + * `appliedPairs` is applyRevertAnnotations' return ([targetUrl, reverterUrl]). + * Returns { missed, unparsed, chains }: + * - missed: [{ url, targets: [targetUrl, ...] }] — one entry per signal with at least + * one unannotated plain target, listing exactly the targets that missed (a partially-covered + * revert still surfaces its uncovered targets). Plain = not itself an intercepted revert. + * - unparsed: [url, ...] — urls of signals with zero targets (they already warn at + * intercept time). + * - chains: [{ url, targets: [targetUrl, ...] }] — signals involved in a revert chain, + * reported for human visibility only; the pipeline never resolves a chain's net effect. + * A signal lands here when EITHER its own url is a target of another signal (cancelled + * by computeRevertAnnotations — lists ALL its targets), OR at least one of its targets + * is itself an intercepted revert (re-land chain link — lists ONLY those chain-link + * targets; plain targets still flow through missed). + * Cancelled signals skip missed/unparsed. Chain-linked (non-cancelled) signals may also + * appear in missed for their unannotated plain targets. Chain-link targets never appear + * in missed. All url comparisons are case-insensitive. + */ +export function unannotatedRevertSignals(signals, appliedPairs) { + const list = Array.isArray(signals) ? signals : [] + const annotated = new Set((appliedPairs ?? []).map(([target]) => String(target ?? "").toLowerCase())) + const signalUrls = new Set(list.map((s) => String(s?.url ?? "").toLowerCase())) + const cancelledUrls = new Set() + for (const s of list) { + for (const t of s?.targets ?? []) { + if (t?.url) cancelledUrls.add(t.url.toLowerCase()) + } + } + const missed = [] + const unparsed = [] + const chains = [] + for (const s of list) { + const url = s?.url + if (!url) continue + const targets = (s.targets ?? []).map((t) => t?.url).filter(Boolean) + const cancelled = cancelledUrls.has(url.toLowerCase()) + const chainTargets = targets.filter((u) => signalUrls.has(u.toLowerCase())) + if (cancelled) { + chains.push({ url, targets }) + continue + } + if (chainTargets.length > 0) { + chains.push({ url, targets: chainTargets }) + } + if (targets.length === 0) { + unparsed.push(url) + continue + } + const plainTargets = targets.filter((u) => !signalUrls.has(u.toLowerCase())) + const missing = plainTargets.filter((u) => !annotated.has(u.toLowerCase())) + if (missing.length > 0) missed.push({ url, targets: missing }) + } + return { missed, unparsed, chains } +} diff --git a/.github/docs-sync/selftest.mjs b/.github/docs-sync/selftest.mjs new file mode 100644 index 0000000000..9af35c58cd --- /dev/null +++ b/.github/docs-sync/selftest.mjs @@ -0,0 +1,1870 @@ +// kilocode_change - new file + +/** + * Offline self-check for the docs-sync failure paths (S4). + * Plain node:assert, no network, no LLM, no new dependency. + * Run: node .github/docs-sync/selftest.mjs + */ + +import assert from "node:assert/strict" +import { execFileSync, spawnSync } from "node:child_process" +import fs from "node:fs" +import os from "node:os" +import path from "node:path" +import { fileURLToPath } from "node:url" + +import { mergeOrFallback, DEFAULT_BRANCH } from "./prepare-branch.mjs" +import { applyCap } from "./watermark.mjs" +import { + computeUncovered, + computeProcessedThrough, + routeRows, + dropLegacySkipped, + noDiffReport, + renderBody, + extractSectionRows, +} from "./upsert-pr.mjs" +import { + revertTitleKind, + parseRevertTargets, + computeRevertAnnotations, + applyRevertAnnotations, + unannotatedRevertSignals, +} from "./reverts.mjs" + +const HERE = path.dirname(fileURLToPath(import.meta.url)) +const EDIT_SCRIPT = path.join(HERE, "edit.mjs") +const TRIAGE_SCRIPT = path.join(HERE, "triage.mjs") +const COLLECT_SCRIPT = path.join(HERE, "collect.mjs") + +const temps = [] + +function mktemp(prefix) { + const dir = fs.mkdtempSync(path.join(os.tmpdir(), prefix)) + temps.push(dir) + return dir +} + +function cleanup() { + for (const dir of temps.splice(0)) { + try { + fs.rmSync(dir, { recursive: true, force: true }) + } catch { + // best-effort + } + } +} + +function writeExecutable(filePath, body) { + fs.writeFileSync(filePath, body, { mode: 0o755 }) +} + +function makeStubKiloDir({ mode, callLog, stderrText = "event stream disconnected" }) { + const dir = mktemp("docs-sync-kilo-") + const kiloPath = path.join(dir, "kilo") + // mode: "stderr-exit0" | "record" | "partial-triage" | "mixed-triage" | "write-edit-summary" + const script = `#!/usr/bin/env node +const fs = require("node:fs"); +const path = require("node:path"); +const mode = ${JSON.stringify(mode)}; +const callLog = ${JSON.stringify(callLog ?? "")}; +const stderrText = ${JSON.stringify(stderrText)}; +if (callLog) { + fs.appendFileSync(callLog, JSON.stringify({ argv: process.argv.slice(2), cwd: process.cwd() }) + "\\n"); +} +if (mode === "stderr-exit0") { + process.stderr.write(stderrText + "\\n"); + process.exit(0); +} +if (mode === "record") { + process.stderr.write("recorded\\n"); + process.exit(0); +} +// Parse -f chunk/batch file from args for triage stubs +const args = process.argv.slice(2); +const fIdx = args.indexOf("-f"); +const fileArg = fIdx >= 0 ? args[fIdx + 1] : null; +let chunk = []; +if (fileArg && fs.existsSync(fileArg)) { + try { chunk = JSON.parse(fs.readFileSync(fileArg, "utf8")); } catch { chunk = []; } +} +if (mode === "write-edit-summary") { + // Success path: write the batch summary so edit.mjs returns true, while still + // emitting stderr so selftest can assert runKilo persisted it unconditionally. + process.stderr.write(stderrText + "\\n"); + const m = fileArg && String(fileArg).match(/edit-batch-(\\d+)\\.json/); + const index = m ? m[1] : "0"; + const summary = chunk.map((d) => ({ + pr: d.number, + url: d.url, + action: "skipped", + reason: "selftest stub", + })); + fs.mkdirSync("docs-sync-out", { recursive: true }); + fs.writeFileSync("docs-sync-out/edit-summary-" + index + ".json", JSON.stringify(summary)); + process.exit(0); +} +if (mode === "partial-triage") { + // Classify only a proper subset (first URL) of the chunk. + const owned = chunk.slice(0, Math.max(0, chunk.length - 1)); + const entries = owned.map((d) => ({ + pr: d.number, + url: d.url, + docs_worthy: false, + reason: "genuine not worthy", + target_sections: [], + priority: "medium", + })); + if (entries.length === 0 && chunk.length > 0) { + // single-PR chunk: still leave one missing by emitting empty-ish foreign-only + process.stdout.write("[]\\n"); + } else { + process.stdout.write(JSON.stringify(entries) + "\\n"); + } + process.exit(0); +} +if (mode === "mixed-triage") { + // Half docs_worthy true, half fail (no output for second half — but we return + // only some entries so backfill marks the rest pending). Actually: return + // docs_worthy:true for first half of chunk URLs so worthy > 0. + const half = Math.ceil(chunk.length / 2); + const entries = chunk.slice(0, half).map((d) => ({ + pr: d.number, + url: d.url, + docs_worthy: true, + reason: "needs docs", + target_sections: ["overview"], + priority: "high", + })); + process.stdout.write(JSON.stringify(entries) + "\\n"); + process.exit(0); +} +if (mode === "triage-embed-env-secret") { + // Valid triage JSON with a secret env value embedded in a string field + // (stdout is persisted to triage-raw-*.txt; must be redacted at capture). + const secret = process.env.KILO_API_KEY || "missing-secret"; + const entries = chunk.map((d) => ({ + pr: d.number, + url: d.url, + docs_worthy: true, + reason: "needs docs; diagnostic=" + secret, + target_sections: ["overview"], + priority: "high", + })); + process.stdout.write(JSON.stringify(entries) + "\\n"); + process.exit(0); +} +process.stderr.write("unknown stub mode\\n"); +process.exit(1); +` + writeExecutable(kiloPath, script) + return dir +} + +function gitIn(cwd, args, env = {}) { + return execFileSync("git", args, { + cwd, + env: { ...process.env, ...env }, + stdio: ["ignore", "pipe", "pipe"], + encoding: "utf8", + }) + .toString() + .trim() +} + +function makeGitRunner(cwd, env = {}) { + return (args) => gitIn(cwd, args, env) +} + +function initRepoWithIdentity(dir) { + gitIn(dir, ["init", "-b", "main"]) + gitIn(dir, ["config", "user.name", "docs-sync-selftest"]) + gitIn(dir, ["config", "user.email", "docs-sync-selftest@example.com"]) + gitIn(dir, ["config", "commit.gpgsign", "false"]) +} + +// --------------------------------------------------------------------------- +// Case 1 — Defect A: mergeOrFallback +// --------------------------------------------------------------------------- +function case1_mergeOrFallback() { + console.log("case 1: Defect A (mergeOrFallback)") + + // 1a — identity configured + clean merge → mode=update + { + const dir = mktemp("docs-sync-merge-clean-") + initRepoWithIdentity(dir) + fs.writeFileSync(path.join(dir, "a.txt"), "base\n") + gitIn(dir, ["add", "a.txt"]) + gitIn(dir, ["commit", "-m", "base"]) + gitIn(dir, ["checkout", "-b", DEFAULT_BRANCH]) + fs.writeFileSync(path.join(dir, "b.txt"), "on branch\n") + gitIn(dir, ["add", "b.txt"]) + gitIn(dir, ["commit", "-m", "branch commit"]) + // Advance main without conflict + gitIn(dir, ["checkout", "main"]) + fs.writeFileSync(path.join(dir, "c.txt"), "on main\n") + gitIn(dir, ["add", "c.txt"]) + gitIn(dir, ["commit", "-m", "main advance"]) + gitIn(dir, ["update-ref", "refs/remotes/origin/main", "main"]) + gitIn(dir, ["checkout", DEFAULT_BRANCH]) + + const result = mergeOrFallback({ branch: DEFAULT_BRANCH, git: makeGitRunner(dir) }) + assert.equal(result.mode, "update") + assert.equal(result.branch, DEFAULT_BRANCH) + // merge brought c.txt in + assert.ok(fs.existsSync(path.join(dir, "c.txt"))) + } + + // 1b — genuine conflict → mode=conflict, abort succeeds, original branch untouched + { + const dir = mktemp("docs-sync-merge-conflict-") + initRepoWithIdentity(dir) + fs.writeFileSync(path.join(dir, "conflict.txt"), "base\n") + gitIn(dir, ["add", "conflict.txt"]) + gitIn(dir, ["commit", "-m", "base"]) + const baseSha = gitIn(dir, ["rev-parse", "HEAD"]) + + gitIn(dir, ["checkout", "-b", DEFAULT_BRANCH]) + fs.writeFileSync(path.join(dir, "conflict.txt"), "branch side\n") + gitIn(dir, ["add", "conflict.txt"]) + gitIn(dir, ["commit", "-m", "branch edit"]) + const branchShaBefore = gitIn(dir, ["rev-parse", "HEAD"]) + + gitIn(dir, ["checkout", "main"]) + fs.writeFileSync(path.join(dir, "conflict.txt"), "main side\n") + gitIn(dir, ["add", "conflict.txt"]) + gitIn(dir, ["commit", "-m", "main edit"]) + gitIn(dir, ["update-ref", "refs/remotes/origin/main", "main"]) + gitIn(dir, ["checkout", DEFAULT_BRANCH]) + + const result = mergeOrFallback({ branch: DEFAULT_BRANCH, git: makeGitRunner(dir) }) + assert.equal(result.mode, "conflict") + assert.ok(result.branch.startsWith(`${DEFAULT_BRANCH}-`)) + // Original rolling branch tip unchanged + const branchShaAfter = gitIn(dir, ["rev-parse", DEFAULT_BRANCH]) + assert.equal(branchShaAfter, branchShaBefore) + // No merge in progress + let mergeHead = true + try { + gitIn(dir, ["rev-parse", "-q", "--verify", "MERGE_HEAD"]) + } catch { + mergeHead = false + } + assert.equal(mergeHead, false) + void baseSha + } + + // 1c — identity-less / non-conflict merge failure → throws (does not fake conflict) + { + const dir = mktemp("docs-sync-merge-noid-") + initRepoWithIdentity(dir) + fs.writeFileSync(path.join(dir, "a.txt"), "base\n") + gitIn(dir, ["add", "a.txt"]) + gitIn(dir, ["commit", "-m", "base"]) + gitIn(dir, ["checkout", "-b", DEFAULT_BRANCH]) + fs.writeFileSync(path.join(dir, "b.txt"), "branch\n") + gitIn(dir, ["add", "b.txt"]) + gitIn(dir, ["commit", "-m", "branch"]) + gitIn(dir, ["checkout", "main"]) + fs.writeFileSync(path.join(dir, "c.txt"), "main\n") + gitIn(dir, ["add", "c.txt"]) + gitIn(dir, ["commit", "-m", "main"]) + gitIn(dir, ["update-ref", "refs/remotes/origin/main", "main"]) + gitIn(dir, ["checkout", DEFAULT_BRANCH]) + + // Strip identity so merge cannot create a commit + gitIn(dir, ["config", "--unset", "user.name"]) + gitIn(dir, ["config", "--unset", "user.email"]) + + const env = { + GIT_CONFIG_GLOBAL: "/dev/null", + GIT_CONFIG_SYSTEM: "/dev/null", + GIT_CONFIG_NOSYSTEM: "1", + } + const git = (args) => + execFileSync("git", ["-c", "user.useConfigOnly=true", ...args], { + cwd: dir, + env: { ...process.env, ...env }, + stdio: ["ignore", "pipe", "pipe"], + encoding: "utf8", + }) + .toString() + .trim() + + assert.throws( + () => mergeOrFallback({ branch: DEFAULT_BRANCH, git }), + (err) => { + // Must throw the original merge error, not a merge --abort failure + const msg = String(err?.stderr ?? err?.message ?? err) + assert.ok(!/no merge to abort/i.test(msg), `should not reach merge --abort: ${msg}`) + return true + }, + ) + } +} + +// --------------------------------------------------------------------------- +// Helpers to run edit.mjs / triage.mjs as child processes +// --------------------------------------------------------------------------- +function setupEditCwd(worthy, triage) { + const cwd = mktemp("docs-sync-edit-") + fs.mkdirSync(path.join(cwd, "docs-sync-out"), { recursive: true }) + fs.writeFileSync(path.join(cwd, "docs-sync-out", "worthy.json"), JSON.stringify(worthy, null, 2)) + fs.writeFileSync(path.join(cwd, "docs-sync-out", "triage.json"), JSON.stringify(triage, null, 2)) + return cwd +} + +function setupTriageCwd(digest) { + const cwd = mktemp("docs-sync-triage-") + fs.mkdirSync(path.join(cwd, "docs-sync-out"), { recursive: true }) + fs.writeFileSync(path.join(cwd, "docs-sync-out", "digest.json"), JSON.stringify(digest, null, 2)) + return cwd +} + +function runNodeScript(scriptPath, { cwd, env = {}, kiloDir }) { + const pathEnv = [kiloDir, process.env.PATH].filter(Boolean).join(path.delimiter) + const result = spawnSync(process.execPath, [scriptPath], { + cwd, + env: { + ...process.env, + ...env, + PATH: pathEnv, + DOCS_SYNC_BACKOFF_MS: env.DOCS_SYNC_BACKOFF_MS ?? "0", + }, + encoding: "utf8", + timeout: 60_000, + }) + return { + status: result.status, + stdout: String(result.stdout ?? ""), + stderr: String(result.stderr ?? ""), + output: `${result.stdout ?? ""}${result.stderr ?? ""}`, + error: result.error, + } +} + +function samplePr(n, { merged_at, repo = "Kilo-Org/cloud" } = {}) { + return { + repo, + number: n, + title: `feat: sample ${n}`, + url: `https://github.com/${repo}/pull/${n}`, + author: "dev", + merged_at: merged_at ?? "2026-07-20T12:00:00.000Z", + labels: [], + body: "body", + files: [], + files_total: 1, + patch_excerpt: "", + } +} + +// --------------------------------------------------------------------------- +// Case 2 — Defect B: edit.mjs with stub kilo (exit 0 + stderr) +// --------------------------------------------------------------------------- +function case2_defectB() { + console.log("case 2: Defect B (edit.mjs stderr-on-exit-0)") + + const prs = [1, 2, 3, 4, 5].map((n) => samplePr(n)) + const worthy = prs + const triage = prs.map((p) => ({ + pr: p.number, + url: p.url, + docs_worthy: true, + reason: "needs docs", + target_sections: ["overview"], + priority: "high", + })) + const cwd = setupEditCwd(worthy, triage) + const stderrText = "event stream disconnected DIAG-CASE2" + const kiloDir = makeStubKiloDir({ mode: "stderr-exit0", stderrText }) + + const started = Date.now() + const result = runNodeScript(EDIT_SCRIPT, { + cwd, + kiloDir, + env: { + EDIT_MODEL: "test/model", + DOCS_SYNC_BACKOFF_MS: "0", + // Enough budget for 3 attempts × tiny timeout + EDIT_BUDGET_MINUTES: "5", + EDIT_BATCH_TIMEOUT_MINUTES: "1", + }, + }) + const elapsed = Date.now() - started + + assert.equal(result.status, 0, `edit.mjs exit: ${result.output}`) + // Backoff collapsed — 3 attempts without 60s+300s waits + assert.ok(elapsed < 15_000, `backoff should collapse with DOCS_SYNC_BACKOFF_MS=0; elapsed=${elapsed}ms`) + + assert.match(result.output, /stderr tail:/) + assert.match(result.output, /DIAG-CASE2|event stream disconnected/) + assert.match(result.output, /attempt 1/) + assert.match(result.output, /attempt 2/) + // 3 attempts + assert.match(result.output, /attempt 3|failed after up to 3 attempts/) + + const summary = JSON.parse(fs.readFileSync(path.join(cwd, ".docs-sync-summary.json"), "utf8")) + assert.equal(summary.length, 5) + for (const e of summary) { + assert.equal(e.action, "pending", `expected pending, got ${JSON.stringify(e)}`) + } + + const uncovered = computeUncovered({ worthy, summary, triage }) + assert.equal(uncovered.length, 5) + for (const u of uncovered) { + assert.ok(u.reason, "uncovered reason present") + } +} + +// --------------------------------------------------------------------------- +// Case 2b — AC4a: every docs-sync kilo run argv carries --auto +// --------------------------------------------------------------------------- +/** Slice `args: [` … matching `]` from source (newlines allowed inside). */ +function extractArgsArraySlice(source) { + const start = source.indexOf("args: [") + assert.ok(start >= 0, "args: [ not found in source") + let i = start + "args: ".length + assert.equal(source[i], "[") + let depth = 0 + for (; i < source.length; i++) { + const ch = source[i] + if (ch === "[") depth++ + else if (ch === "]") { + depth-- + if (depth === 0) return source.slice(start, i + 1) + } + } + throw new assert.AssertionError({ message: "unclosed args: [ array in source" }) +} + +/** Label → kilo-stderr filename rule (must match lib.mjs runKilo). */ +function kiloStderrLogName(label) { + return `kilo-stderr-${String(label).replace(/[^A-Za-z0-9._-]/g, "-")}.log` +} + +function case2b_autoFlag() { + console.log("case 2b: AC4a (--auto on every docs-sync kilo run)") + + // (i) region-scoped static check on triage.mjs / edit.mjs argv arrays + for (const name of ["triage.mjs", "edit.mjs"]) { + const src = fs.readFileSync(path.join(HERE, name), "utf8") + const slice = extractArgsArraySlice(src) + assert.ok(slice.includes('"--auto"'), `${name} args array must contain "--auto"; got:\n${slice}`) + } + + // (ii) Fix verify failures step: join the run: | block and require --auto on kilo run + { + const yml = fs.readFileSync(path.join(HERE, "..", "workflows", "docs-sync.yml"), "utf8") + const stepIdx = yml.indexOf("Fix verify failures") + assert.ok(stepIdx >= 0, "Fix verify failures step missing") + const afterStep = yml.slice(stepIdx) + const runIdx = afterStep.indexOf("run: |") + assert.ok(runIdx >= 0, "run: | missing after Fix verify failures") + const blockStart = stepIdx + runIdx + "run: |".length + const rest = yml.slice(blockStart) + // Block ends at next unindented step key or EOF — collect indented lines + const lines = [] + for (const line of rest.split("\n")) { + if (line === "") { + lines.push(line) + continue + } + // stop at next top-level list item under steps (two-space + "- ") + if (/^ {0,6}- name:/.test(line) || (/^\S/.test(line) && lines.length > 0)) break + lines.push(line) + } + // Join continuation backslashes then collapse whitespace for the kilo run line + const joined = lines + .map((l) => l.replace(/^\s+/, "")) + .join("\n") + .replace(/\\\n/g, " ") + .replace(/\s+/g, " ") + assert.match(joined, /kilo run\b/, `expected kilo run in Fix verify block:\n${joined}`) + const kiloCmd = joined.match(/kilo run\b[^|]*/)?.[0] ?? "" + assert.ok( + /\s--auto\b/.test(kiloCmd) || /kilo run\s+--auto\b/.test(kiloCmd), + `Fix verify kilo run must contain --auto; got: ${kiloCmd}`, + ) + + // The step runs under `set -o pipefail` + the default `bash -e`, so an + // unguarded kilo pipeline aborts the block before verify2.log is written + // once the CLI exits nonzero on a mid-stream error. The rebuild must decide + // this step's outcome, not the agent's exit code. + // Window is the end of the kilo pipeline → the rebuild, so a comment + // elsewhere in the block cannot satisfy the guard assertion. + const teeIdx = joined.indexOf("tee -a docs-sync-out/edit-log.txt") + assert.ok(teeIdx >= 0, `expected the kilo pipeline to tee edit-log.txt:\n${joined}`) + const kiloPipeline = joined.slice(teeIdx, joined.indexOf("bun run", teeIdx)) + assert.match( + kiloPipeline, + /\|\|\s*(echo|true)\b/, + `Fix verify kilo pipeline must be guarded (|| echo/true) so bash -e cannot skip the rebuild; got: ${kiloPipeline}`, + ) + assert.match(joined, /verify2\.log/, "Fix verify block must still write verify2.log") + } + + // (iii) authoritative: real stub invocations with callLog — every argv has --auto + { + const prs = [1, 2, 3, 4, 5].map((n) => samplePr(n)) + const worthy = prs + const triage = prs.map((p) => ({ + pr: p.number, + url: p.url, + docs_worthy: true, + reason: "needs docs", + target_sections: ["overview"], + priority: "high", + })) + const cwd = setupEditCwd(worthy, triage) + const callLog = path.join(cwd, "kilo-calls.log") + const stderrText = "event stream disconnected DIAG-AUTO" + const kiloDir = makeStubKiloDir({ mode: "stderr-exit0", stderrText, callLog }) + + const result = runNodeScript(EDIT_SCRIPT, { + cwd, + kiloDir, + env: { + EDIT_MODEL: "test/model", + DOCS_SYNC_BACKOFF_MS: "0", + EDIT_BUDGET_MINUTES: "5", + EDIT_BATCH_TIMEOUT_MINUTES: "1", + }, + }) + assert.equal(result.status, 0, `edit.mjs exit: ${result.output}`) + + assert.ok(fs.existsSync(callLog), "callLog must be written (stub was invoked)") + const lines = fs.readFileSync(callLog, "utf8").trim().split("\n").filter(Boolean) + assert.ok(lines.length > 0, "callCount > 0 required (vacuous empty log forbidden)") + for (const line of lines) { + const { argv } = JSON.parse(line) + assert.ok( + Array.isArray(argv) && argv.includes("--auto"), + `every kilo argv must include --auto; got ${JSON.stringify(argv)}`, + ) + } + } +} + +// --------------------------------------------------------------------------- +// Case 2c — full child stderr always written (success and failure paths) +// --------------------------------------------------------------------------- +function case2c_stderrLogAlways() { + console.log("case 2c: unconditional kilo-stderr-*.log") + + const prs = [1, 2, 3, 4, 5].map((n) => samplePr(n)) + const worthy = prs + const triage = prs.map((p) => ({ + pr: p.number, + url: p.url, + docs_worthy: true, + reason: "needs docs", + target_sections: ["overview"], + priority: "high", + })) + + // Failure path: stub exits 0 without summary (same mode as case 2) + { + const cwd = setupEditCwd(worthy, triage) + const stderrText = "FAILPATH-STDERR-MARKER" + const kiloDir = makeStubKiloDir({ mode: "stderr-exit0", stderrText }) + const result = runNodeScript(EDIT_SCRIPT, { + cwd, + kiloDir, + env: { + EDIT_MODEL: "test/model", + DOCS_SYNC_BACKOFF_MS: "0", + EDIT_BUDGET_MINUTES: "5", + EDIT_BATCH_TIMEOUT_MINUTES: "1", + }, + }) + assert.equal(result.status, 0, result.output) + const logName = kiloStderrLogName("edit batch 0 attempt 1") + const logPath = path.join(cwd, "docs-sync-out", logName) + assert.equal(logName, "kilo-stderr-edit-batch-0-attempt-1.log") + assert.ok(fs.existsSync(logPath), `expected ${logPath} on failure path`) + assert.match(fs.readFileSync(logPath, "utf8"), /FAILPATH-STDERR-MARKER/) + } + + // Success path: stub writes summary (today's path that discarded stderr) + { + const cwd = setupEditCwd(worthy, triage) + const stderrText = "SUCCESSPATH-STDERR-MARKER" + const kiloDir = makeStubKiloDir({ mode: "write-edit-summary", stderrText }) + const result = runNodeScript(EDIT_SCRIPT, { + cwd, + kiloDir, + env: { + EDIT_MODEL: "test/model", + DOCS_SYNC_BACKOFF_MS: "0", + EDIT_BUDGET_MINUTES: "5", + EDIT_BATCH_TIMEOUT_MINUTES: "1", + }, + }) + assert.equal(result.status, 0, result.output) + assert.ok( + fs.existsSync(path.join(cwd, "docs-sync-out", "edit-summary-0.json")), + "stub must write summary (success path)", + ) + const logName = kiloStderrLogName("edit batch 0 attempt 1") + const logPath = path.join(cwd, "docs-sync-out", logName) + assert.ok(fs.existsSync(logPath), `expected ${logPath} on success path`) + assert.match(fs.readFileSync(logPath, "utf8"), /SUCCESSPATH-STDERR-MARKER/) + } +} + +// --------------------------------------------------------------------------- +// Case 2d — redact secret env values from captured kilo stderr (artifact-safe) +// --------------------------------------------------------------------------- +function case2d_redactEnvSecrets() { + console.log("case 2d: redact env secrets from kilo stderr capture") + + const prs = [1, 2, 3, 4, 5].map((n) => samplePr(n)) + const worthy = prs + const triage = prs.map((p) => ({ + pr: p.number, + url: p.url, + docs_worthy: true, + reason: "needs docs", + target_sections: ["overview"], + priority: "high", + })) + const cwd = setupEditCwd(worthy, triage) + const secret = "selftest-secret-value-12345" + const stderrText = `leak before ${secret} after` + const kiloDir = makeStubKiloDir({ mode: "stderr-exit0", stderrText }) + + const result = runNodeScript(EDIT_SCRIPT, { + cwd, + kiloDir, + env: { + EDIT_MODEL: "test/model", + DOCS_SYNC_BACKOFF_MS: "0", + EDIT_BUDGET_MINUTES: "5", + EDIT_BATCH_TIMEOUT_MINUTES: "1", + KILO_API_KEY: secret, + }, + }) + assert.equal(result.status, 0, `edit.mjs exit: ${result.output}`) + + const logName = kiloStderrLogName("edit batch 0 attempt 1") + const logPath = path.join(cwd, "docs-sync-out", logName) + assert.ok(fs.existsSync(logPath), `expected ${logPath}`) + const logBody = fs.readFileSync(logPath, "utf8") + assert.ok(!logBody.includes(secret), `persisted stderr must not contain secret; got: ${logBody}`) + assert.ok(logBody.includes("leak before *** after"), `persisted stderr must redact to exact line; got: ${logBody}`) + + // Console stderr-tail region must also be redacted (not only the artifact file). + const tailIdx = result.output.indexOf("stderr tail:") + assert.ok(tailIdx >= 0, `expected stderr tail: in output; got: ${result.output}`) + const tailRegion = result.output.slice(tailIdx) + assert.ok(!tailRegion.includes(secret), `console stderr tail must not contain secret; got: ${tailRegion}`) +} + +// --------------------------------------------------------------------------- +// Case 2e — longer secret first when a shorter env value is a prefix +// --------------------------------------------------------------------------- +function case2e_prefixSecretOrdering() { + console.log("case 2e: prefix-secret ordering (longer value redacted first)") + + const prs = [1, 2, 3, 4, 5].map((n) => samplePr(n)) + const worthy = prs + const triage = prs.map((p) => ({ + pr: p.number, + url: p.url, + docs_worthy: true, + reason: "needs docs", + target_sections: ["overview"], + priority: "high", + })) + const cwd = setupEditCwd(worthy, triage) + const shortSecret = "abcdefgh" + const longSecret = "abcdefghIJKL-tail" + const stderrText = `leak: ${longSecret} end` + const kiloDir = makeStubKiloDir({ mode: "stderr-exit0", stderrText }) + + const result = runNodeScript(EDIT_SCRIPT, { + cwd, + kiloDir, + env: { + EDIT_MODEL: "test/model", + DOCS_SYNC_BACKOFF_MS: "0", + EDIT_BUDGET_MINUTES: "5", + EDIT_BATCH_TIMEOUT_MINUTES: "1", + A_KEY: shortSecret, + B_TOKEN: longSecret, + }, + }) + assert.equal(result.status, 0, `edit.mjs exit: ${result.output}`) + + const logName = kiloStderrLogName("edit batch 0 attempt 1") + const logPath = path.join(cwd, "docs-sync-out", logName) + assert.ok(fs.existsSync(logPath), `expected ${logPath}`) + const logBody = fs.readFileSync(logPath, "utf8") + assert.ok(!logBody.includes("IJKL-tail"), `must not leak prefix remainder; got: ${logBody}`) + assert.ok(logBody.includes("leak: *** end"), `expected full long secret redacted; got: ${logBody}`) +} + +// --------------------------------------------------------------------------- +// Case 2f — redact secret values from captured kilo stdout (triage-raw artifact) +// --------------------------------------------------------------------------- +function case2f_redactStdout() { + console.log("case 2f: redact env secrets from kilo stdout (triage-raw)") + + const digest = [samplePr(501), samplePr(502)] + const cwd = setupTriageCwd(digest) + const secret = "selftest-stdout-secret-99999" + const kiloDir = makeStubKiloDir({ mode: "triage-embed-env-secret" }) + const summaryFile = path.join(cwd, "step-summary.md") + fs.writeFileSync(summaryFile, "") + + const result = runNodeScript(TRIAGE_SCRIPT, { + cwd, + kiloDir, + env: { + TRIAGE_MODEL: "test/model", + DOCS_SYNC_BACKOFF_MS: "0", + TRIAGE_BUDGET_MINUTES: "30", + GITHUB_STEP_SUMMARY: summaryFile, + KILO_API_KEY: secret, + }, + }) + assert.equal(result.status, 0, `triage.mjs exit: ${result.output}`) + + const rawFiles = fs.readdirSync(path.join(cwd, "docs-sync-out")).filter((f) => f.startsWith("triage-raw-")) + assert.ok(rawFiles.length > 0, "expected triage-raw-*.txt artifact") + for (const f of rawFiles) { + const body = fs.readFileSync(path.join(cwd, "docs-sync-out", f), "utf8") + assert.ok(!body.includes(secret), `triage-raw must not contain secret; ${f}: ${body}`) + } + + const triage = JSON.parse(fs.readFileSync(path.join(cwd, "docs-sync-out", "triage.json"), "utf8")) + assert.ok(triage.length >= 1, "triage must still parse after redaction") + assert.ok( + triage.some((e) => e.docs_worthy === true || e.pending === true || e.docs_worthy === false), + "triage entries must be structured", + ) +} + +// --------------------------------------------------------------------------- +// Case 2g — redact-stream.mjs line-wise filter (including partial last line) +// --------------------------------------------------------------------------- +function case2g_redactStream() { + console.log("case 2g: redact-stream.mjs stdin filter") + + const secret = "stream-secret-value-xyz" + const filterPath = path.join(HERE, "redact-stream.mjs") + assert.ok(fs.existsSync(filterPath), `expected ${filterPath}`) + + const input = `leak ${secret} after\npartial-${secret}` + const result = spawnSync(process.execPath, [filterPath], { + env: { ...process.env, KILO_API_KEY: secret }, + input, + encoding: "utf8", + timeout: 10_000, + }) + assert.equal(result.status, 0, `redact-stream exit: ${result.stderr || result.error}`) + assert.equal(result.stdout, "leak *** after\npartial-***") +} + +// --------------------------------------------------------------------------- +// Case 2h — pending causes reach the rolling PR free of ANSI escapes +// --------------------------------------------------------------------------- +function case2h_pendingCauseIsReadable() { + console.log("case 2h: pending cause has no ANSI escapes") + + const prs = [1, 2, 3, 4, 5].map((n) => samplePr(n)) + const worthy = prs + const triage = prs.map((p) => ({ + pr: p.number, + url: p.url, + docs_worthy: true, + reason: "needs docs", + target_sections: ["overview"], + priority: "high", + })) + const cwd = setupEditCwd(worthy, triage) + // Verbatim shape of a real kilo TUI stderr line (see PR #12521's pending table). + const ESC = "\u001b" + const stderrText = `${ESC}[0m→ ${ESC}[0mRead packages/kilo-docs/AGENTS.md${ESC}[2K${ESC}[1G done` + const kiloDir = makeStubKiloDir({ mode: "stderr-exit0", stderrText }) + + const result = runNodeScript(EDIT_SCRIPT, { + cwd, + kiloDir, + env: { + EDIT_MODEL: "test/model", + DOCS_SYNC_BACKOFF_MS: "0", + EDIT_BUDGET_MINUTES: "5", + EDIT_BATCH_TIMEOUT_MINUTES: "1", + }, + }) + assert.equal(result.status, 0, `edit.mjs exit: ${result.output}`) + + const summary = JSON.parse(fs.readFileSync(path.join(cwd, ".docs-sync-summary.json"), "utf8")) + assert.equal(summary.length, 5) + for (const e of summary) { + assert.equal(e.action, "pending", `expected pending, got ${JSON.stringify(e)}`) + assert.ok(!e.reason.includes(ESC), `pending reason must not contain ANSI escapes: ${JSON.stringify(e.reason)}`) + // Non-vacuous: the diagnostic text itself must survive the strip. + assert.match(e.reason, /Read packages\/kilo-docs\/AGENTS\.md/) + } + + // The raw artifact log keeps the escapes — it is the debugging record. + const rawLog = fs.readFileSync(path.join(cwd, "docs-sync-out", "kilo-stderr-edit-batch-0-attempt-1.log"), "utf8") + assert.ok(rawLog.includes(ESC), "persisted stderr log must stay raw") +} + +// --------------------------------------------------------------------------- +// Case 2i — wall-clock budgets can actually fit work +// --------------------------------------------------------------------------- +/** + * The pre-unit gates in triage.mjs/edit.mjs refuse to start a chunk/batch unless + * a whole per-unit timeout remains, so a budget below that timeout silently runs + * ZERO units and defers every PR. Run 30306629290 hit the weaker form of this: + * 8 of 11 chunks and 4 of 11 batches ran, the rest deferred untried. Assert the + * workflow sets both budgets and that each fits at least two units. + */ +function case2i_budgetsFitWork() { + console.log("case 2i: triage/edit budgets fit at least two units") + + const yml = fs.readFileSync(path.join(HERE, "..", "workflows", "docs-sync.yml"), "utf8") + const readEnvNumber = (key) => { + const m = yml.match(new RegExp(`^\\s*${key}:\\s*"?(\\d+)"?\\s*$`, "m")) + assert.ok(m, `${key} must be set in docs-sync.yml (default is too small to drain a backlog)`) + return Number(m[1]) + } + + // Per-unit timeouts are script constants, not workflow env; read them from source. + const triageSrc = fs.readFileSync(path.join(HERE, "triage.mjs"), "utf8") + const chunkMin = Number(triageSrc.match(/CHUNK_TIMEOUT_MS = (\d+) \* 60 \* 1000/)?.[1]) + assert.ok(Number.isFinite(chunkMin), "could not read CHUNK_TIMEOUT_MS from triage.mjs") + + const editSrc = fs.readFileSync(path.join(HERE, "edit.mjs"), "utf8") + const batchMin = Number(editSrc.match(/EDIT_BATCH_TIMEOUT_MINUTES\) \|\| (\d+)/)?.[1]) + assert.ok(Number.isFinite(batchMin), "could not read EDIT_BATCH_TIMEOUT_MINUTES default from edit.mjs") + + const triageBudget = readEnvNumber("TRIAGE_BUDGET_MINUTES") + const editBudget = readEnvNumber("EDIT_BUDGET_MINUTES") + assert.ok( + triageBudget >= 2 * chunkMin, + `TRIAGE_BUDGET_MINUTES=${triageBudget} must be >= 2x chunk timeout (${chunkMin}m)`, + ) + assert.ok(editBudget >= 2 * batchMin, `EDIT_BUDGET_MINUTES=${editBudget} must be >= 2x batch timeout (${batchMin}m)`) + + // The job timeout must outlast both budgets plus the non-LLM steps. + const jobTimeout = Number(yml.match(/^\s*timeout-minutes:\s*(\d+)\s*$/m)?.[1]) + assert.ok(Number.isFinite(jobTimeout), "could not read job timeout-minutes") + assert.ok( + jobTimeout > triageBudget + editBudget, + `job timeout-minutes=${jobTimeout} must exceed triage+edit budgets (${triageBudget}+${editBudget})`, + ) +} + +// --------------------------------------------------------------------------- +// Case 3 — watermark invariant +// --------------------------------------------------------------------------- +function case3_watermark() { + console.log("case 3: watermark invariant") + + const now = "2026-07-27T12:00:00.000Z" + const nowMs = Date.parse(now) + + const prA = samplePr(10, { merged_at: "2026-07-20T10:00:00.000Z" }) + const prB = samplePr(11, { merged_at: "2026-07-22T15:30:00.000Z" }) + const prC = samplePr(12, { merged_at: "2026-07-25T08:00:00.000Z" }) + const digest = [prA, prB, prC] + + // all covered → processed-through === now + { + const worthy = [prA, prB] + const summary = [ + { pr: 10, url: prA.url, action: "updated packages/kilo-docs/pages/x.md", reason: "" }, + { pr: 11, url: prB.url, action: "skipped", reason: "already documented" }, + ] + const triage = [ + { pr: 10, url: prA.url, docs_worthy: true, pending: false, reason: "ok" }, + { pr: 11, url: prB.url, docs_worthy: true, pending: false, reason: "ok" }, + ] + const uncovered = computeUncovered({ worthy, summary, triage }) + assert.equal(uncovered.length, 0) + const through = computeProcessedThrough({ uncovered, digest, now }) + assert.equal(through, now) + } + + // one uncovered → merged_at − 1 ms, strictly < now + { + const worthy = [prA, prB] + const summary = [ + { pr: 10, url: prA.url, action: "updated x", reason: "" }, + { pr: 11, url: prB.url, action: "pending", reason: "edit batch 0: exit 0" }, + ] + const uncovered = computeUncovered({ worthy, summary, triage: [] }) + assert.equal(uncovered.length, 1) + assert.equal(uncovered[0].url, prB.url) + const through = computeProcessedThrough({ uncovered, digest, now }) + const expected = new Date(Date.parse(prB.merged_at) - 1).toISOString() + assert.equal(through, expected) + assert.ok(Date.parse(through) < nowMs) + } + + // several uncovered → earliest merge time wins + { + const worthy = [prA, prB, prC] + const summary = [ + { pr: 10, url: prA.url, action: "pending", reason: "fail" }, + { pr: 12, url: prC.url, action: "pending", reason: "fail" }, + ] + // prB missing from summary entirely + const uncovered = computeUncovered({ worthy, summary, triage: [] }) + assert.ok(uncovered.length >= 2) + const through = computeProcessedThrough({ uncovered, digest, now }) + // earliest among A, B, C that are uncovered — A is earliest + const times = uncovered + .map((u) => digest.find((d) => d.url === u.url)?.merged_at) + .filter(Boolean) + .map((t) => Date.parse(t)) + const earliest = Math.min(...times) + assert.equal(through, new Date(earliest - 1).toISOString()) + } + + // summary missing/truncated while worthy non-empty → every worthy URL held back + { + const worthy = [prA, prB] + const uncovered = computeUncovered({ worthy, summary: [], triage: [] }) + assert.equal(uncovered.length, 2) + const through = computeProcessedThrough({ uncovered, digest, now }) + assert.equal(through, new Date(Date.parse(prA.merged_at) - 1).toISOString()) + } + + // noDiffReport three arms + { + const uncovered = [{ url: prA.url, reason: "edit batch failed" }] + const arm1 = noDiffReport({ uncovered, sinceOverride: true }) + assert.ok(arm1.summary.includes(prA.url)) + assert.ok(arm1.warning, "override + uncovered → warning present") + + const arm2 = noDiffReport({ uncovered: [], sinceOverride: true }) + assert.equal(arm2.warning, null, "override + empty uncovered → warning absent") + + const arm3 = noDiffReport({ uncovered, sinceOverride: false }) + assert.equal(arm3.warning, null, "scheduled + uncovered → warning absent") + } + + // triage pending:true backfill rows land in uncovered (consumption) + { + const triage = [ + { + pr: 99, + url: "https://github.com/Kilo-Org/cloud/pull/99", + docs_worthy: false, + pending: true, + reason: "not classified by triage", + }, + ] + const uncovered = computeUncovered({ worthy: [], summary: [], triage }) + assert.equal(uncovered.length, 1) + assert.equal(uncovered[0].url, triage[0].url) + const through = computeProcessedThrough({ + uncovered, + digest: [{ url: triage[0].url, merged_at: "2026-07-21T00:00:00.000Z" }], + now, + }) + assert.equal(through, new Date(Date.parse("2026-07-21T00:00:00.000Z") - 1).toISOString()) + } + + // fallback field (post-plan repair) + { + const uncovered = [{ url: "https://github.com/Kilo-Org/cloud/pull/50", reason: "missing" }] + const fallback = "2026-07-17T00:00:00.000Z" + // unresolved merged_at + parseable fallback → hold at fallback, warn + const prevWarn = console.warn + const warnings = [] + console.warn = (...a) => warnings.push(a.join(" ")) + try { + const through = computeProcessedThrough({ uncovered, digest: [], now, fallback }) + assert.equal(through, new Date(fallback).toISOString()) + assert.ok(Date.parse(through) < nowMs) + assert.ok(warnings.some((w) => w.includes("::warning::"))) + } finally { + console.warn = prevWarn + } + + // unresolved + unparseable/missing fallback → throws + assert.throws(() => computeProcessedThrough({ uncovered, digest: [], now }), /fallback|SINCE|refusing/i) + assert.throws( + () => computeProcessedThrough({ uncovered, digest: [], now, fallback: "not-a-date" }), + /fallback|SINCE|refusing/i, + ) + + // resolved merged_at ignores fallback + const throughResolved = computeProcessedThrough({ + uncovered: [{ url: prA.url, reason: "x" }], + digest: [prA], + now, + fallback: "2020-01-01T00:00:00.000Z", + }) + assert.equal(throughResolved, new Date(Date.parse(prA.merged_at) - 1).toISOString()) + + // empty uncovered ignores fallback + const throughEmpty = computeProcessedThrough({ + uncovered: [], + digest: [], + now, + fallback: "2020-01-01T00:00:00.000Z", + }) + assert.equal(throughEmpty, now) + } +} + +// --------------------------------------------------------------------------- +// Case 4 — routing and round trip +// --------------------------------------------------------------------------- +function case4_routing() { + console.log("case 4: routing and round trip") + + const summary = [ + { pr: 1, url: "https://github.com/Kilo-Org/cloud/pull/1", action: "updated pages/a.md", reason: "" }, + { pr: 2, url: "https://github.com/Kilo-Org/cloud/pull/2", action: "skipped", reason: "already documented" }, + { pr: 3, url: "https://github.com/Kilo-Org/cloud/pull/3", action: "pending", reason: "edit batch 1: exit 0" }, + ] + const triage = [ + { + pr: 4, + url: "https://github.com/Kilo-Org/cloud/pull/4", + docs_worthy: false, + pending: false, + reason: "chore only", + }, + { + pr: 5, + url: "https://github.com/Kilo-Org/cloud/pull/5", + docs_worthy: false, + pending: true, + reason: "triage failed to classify this PR", + }, + ] + const worthy = [ + { number: 1, url: summary[0].url }, + { number: 2, url: summary[1].url }, + { number: 3, url: summary[2].url }, + ] + const uncovered = computeUncovered({ worthy, summary, triage }) + const { changesRows, pendingRows, skippedRows } = routeRows({ summary, triage, uncovered }) + + // pending appears in neither Changes nor Considered + const changesText = changesRows.join("\n") + const skippedText = skippedRows.join("\n") + assert.ok(changesText.includes("pull/1"), "success in Changes") + assert.ok(!changesText.includes("pull/3"), "pending must not be in Changes") + assert.ok(!changesText.includes("pull/5"), "triage-pending must not be in Changes") + assert.ok(skippedText.includes("pull/2"), "genuine skipped in Considered") + assert.ok(skippedText.includes("pull/4"), "genuine not-worthy in Considered") + assert.ok(!skippedText.includes("pull/3"), "pending must not be in Considered") + assert.ok(!skippedText.includes("pull/5"), "triage-pending must not be in Considered") + assert.ok(pendingRows.some((r) => r.includes("pull/3"))) + assert.ok(pendingRows.some((r) => r.includes("pull/5"))) + + // round-trip renderBody → extractSectionRows + const through = "2026-07-20T09:59:59.999Z" + const body = renderBody({ + date: "2026-07-27", + since: "2026-07-17T00:00:00.000Z", + through, + changesRows, + pendingRows, + skippedRows, + verified: true, + draftReasons: [], + note: "", + }) + assert.ok(body.includes(``)) + const extChanges = extractSectionRows(body, "changes") + const extPending = extractSectionRows(body, "pending") + const extSkipped = extractSectionRows(body, "skipped") + assert.deepEqual(extChanges, changesRows) + assert.deepEqual(extPending, pendingRows) + assert.deepEqual(extSkipped, skippedRows) + + // clean() prevents marker forgery in agent-generated row strings + { + const forgedRows = routeRows({ + summary: [ + { + pr: 9, + url: "https://github.com/Kilo-Org/cloud/pull/9", + action: "skipped", + reason: "x injection", + }, + ], + triage: [], + uncovered: [], + }) + assert.ok(!forgedRows.skippedRows[0].includes(""), "clean() must strip --> from reasons") + const forgedBody = renderBody({ + date: "2026-07-27", + since: "s", + through: "t", + changesRows: [], + pendingRows: [], + skippedRows: forgedRows.skippedRows, + verified: true, + draftReasons: [], + note: "", + }) + // Exactly one real section end marker — the forged sequences were stripped + assert.equal((forgedBody.match(//g) || []).length, 1) + const extracted = extractSectionRows(forgedBody, "skipped") + assert.equal(extracted.length, 1) + assert.ok(extracted[0].includes("injection")) + } + + const legacyRows = [ + "| [Kilo-Org/cloud#1](https://github.com/Kilo-Org/cloud/pull/1) | edit pass failed or timed out for this PR |", + "| [Kilo-Org/cloud#2](https://github.com/Kilo-Org/cloud/pull/2) | triage failed to classify this PR |", + "| [Kilo-Org/cloud#3](https://github.com/Kilo-Org/cloud/pull/3) | not classified by triage |", + "| [Kilo-Org/cloud#4](https://github.com/Kilo-Org/cloud/pull/4) | already covered by existing docs |", + ] + const kept = dropLegacySkipped(legacyRows) + assert.equal(kept.length, 1) + assert.ok(kept[0].includes("pull/4")) + assert.ok(!kept.some((r) => r.includes("edit pass failed"))) + assert.ok(!kept.some((r) => r.includes("triage failed to classify"))) + assert.ok(!kept.some((r) => r.includes("not classified by triage"))) +} + +// --------------------------------------------------------------------------- +// Case 5 — re-collection window +// --------------------------------------------------------------------------- +function case5_recollection() { + console.log("case 5: re-collection closes the loop") + + const collectSrc = fs.readFileSync(COLLECT_SCRIPT, "utf8") + // Query template must use merged:>= + assert.ok( + /merged:>=\$\{since\.toISOString\(\)\}/.test(collectSrc) || /merged:>=/.test(collectSrc), + "collect.mjs must search merged:>=since", + ) + assert.match(collectSrc, /merged:>=/) + + const mergedAt = "2026-07-22T15:30:00.000Z" + const uncovered = [{ url: "https://github.com/Kilo-Org/cloud/pull/11", reason: "pending" }] + const digest = [{ url: uncovered[0].url, merged_at: mergedAt }] + const now = "2026-07-27T12:00:00.000Z" + const since = computeProcessedThrough({ uncovered, digest, now }) + // held-back since is strictly before the uncovered PR's merged_at + assert.ok(Date.parse(since) < Date.parse(mergedAt), `since ${since} must be < merged_at ${mergedAt}`) + // And the query window merged:>=since therefore includes that PR + assert.ok(Date.parse(mergedAt) >= Date.parse(since)) +} + +// --------------------------------------------------------------------------- +// Case 6 — budgets +// --------------------------------------------------------------------------- +function case6_budgets() { + console.log("case 6: budgets") + + // --- edit budget --- + { + // 12 PRs = 3 batches of 5; budget too small for even one batch unit + const prs = Array.from({ length: 12 }, (_, i) => samplePr(100 + i)) + const worthy = prs + const triage = prs.map((p) => ({ + pr: p.number, + url: p.url, + docs_worthy: true, + reason: "needs docs", + target_sections: [], + priority: "medium", + })) + const cwd = setupEditCwd(worthy, triage) + const callLog = path.join(cwd, "kilo-calls.log") + const kiloDir = makeStubKiloDir({ mode: "record", callLog }) + + // EDIT_BUDGET_MINUTES must be positive (0 falls through to default 50). + // BATCH_TIMEOUT default would be 15m; set both tiny so left < BATCH_TIMEOUT immediately. + const result = runNodeScript(EDIT_SCRIPT, { + cwd, + kiloDir, + env: { + EDIT_MODEL: "test/model", + DOCS_SYNC_BACKOFF_MS: "0", + EDIT_BUDGET_MINUTES: "0.0001", + EDIT_BATCH_TIMEOUT_MINUTES: "15", + }, + }) + assert.equal(result.status, 0, result.output) + assert.match(result.output, /deferring \d+ PRs/) + assert.match(result.output, /deferred \d+ PRs due to wall-clock budget/) + + const calls = fs.existsSync(callLog) ? fs.readFileSync(callLog, "utf8").trim() : "" + const callCount = calls ? calls.split("\n").filter(Boolean).length : 0 + assert.equal(callCount, 0, `kilo must not be invoked for deferred edit batches; got ${callCount}`) + + const summary = JSON.parse(fs.readFileSync(path.join(cwd, ".docs-sync-summary.json"), "utf8")) + assert.ok(summary.every((e) => e.action === "pending")) + const uncovered = computeUncovered({ worthy, summary, triage }) + assert.equal(uncovered.length, 12) + assert.ok(summary.every((e) => e.action !== "skipped")) + } + + // --- triage budget --- + { + // CHUNK_SIZE=25; 30 PRs = 2 chunks; budget too small for a 10m chunk + const digest = Array.from({ length: 30 }, (_, i) => samplePr(200 + i)) + const cwd = setupTriageCwd(digest) + const callLog = path.join(cwd, "kilo-calls.log") + const kiloDir = makeStubKiloDir({ mode: "record", callLog }) + const summaryFile = path.join(cwd, "step-summary.md") + fs.writeFileSync(summaryFile, "") + + const result = runNodeScript(TRIAGE_SCRIPT, { + cwd, + kiloDir, + env: { + TRIAGE_MODEL: "test/model", + DOCS_SYNC_BACKOFF_MS: "0", + TRIAGE_BUDGET_MINUTES: "0.0001", + GITHUB_STEP_SUMMARY: summaryFile, + }, + }) + assert.equal(result.status, 0, result.output) + assert.match(result.output, /deferring \d+ PRs/) + + const calls = fs.existsSync(callLog) ? fs.readFileSync(callLog, "utf8").trim() : "" + const callCount = calls ? calls.split("\n").filter(Boolean).length : 0 + assert.equal(callCount, 0, `kilo must not be invoked for deferred triage chunks; got ${callCount}`) + + const triage = JSON.parse(fs.readFileSync(path.join(cwd, "docs-sync-out", "triage.json"), "utf8")) + assert.equal(triage.length, 30) + assert.ok(triage.every((e) => e.pending === true)) + assert.ok(triage.every((e) => e.docs_worthy === false)) + const uncovered = computeUncovered({ worthy: [], summary: [], triage }) + assert.equal(uncovered.length, 30) + } +} + +// --------------------------------------------------------------------------- +// Case 7 — applyCap both arms +// --------------------------------------------------------------------------- +function case7_cap() { + console.log("case 7: applyCap") + + const now = new Date("2026-07-27T12:00:00.000Z") + const old = new Date("2026-06-01T00:00:00.000Z") + + const prevLog = console.log + const prevWarn = console.warn + const logs = [] + const warnings = [] + console.log = (...a) => logs.push(a.join(" ")) + console.warn = (...a) => warnings.push(a.join(" ")) + try { + // explicit:false + older than 14 days → clamped AND reported + const a = applyCap(old, now, { explicit: false }) + assert.equal(a.clamped, true) + assert.ok(a.since.getTime() > old.getTime()) + const cap = new Date(now.getTime() - 14 * 24 * 3600 * 1000) + assert.equal(a.since.toISOString(), cap.toISOString()) + assert.ok(warnings.some((w) => w.includes("::warning::") && w.includes("clamped"))) + + // explicit:true + older than 14 days → unchanged, skip reported + logs.length = 0 + warnings.length = 0 + const b = applyCap(old, now, { explicit: true }) + assert.equal(b.clamped, false) + assert.equal(b.since.toISOString(), old.toISOString()) + assert.ok(logs.some((l) => /cap skipped|INPUT_SINCE/i.test(l))) + } finally { + console.log = prevLog + console.warn = prevWarn + } +} + +// --------------------------------------------------------------------------- +// Case 8 — triage.mjs outputs +// --------------------------------------------------------------------------- +function case8_triage() { + console.log("case 8: triage pass outputs") + + // 8a Run A: SINCE_OVERRIDE=true + everything pending → warning present + { + const digest = [samplePr(301), samplePr(302), samplePr(303)] + const cwd = setupTriageCwd(digest) + const kiloDir = makeStubKiloDir({ mode: "stderr-exit0", stderrText: "stream end before idle" }) + const summaryFile = path.join(cwd, "step-summary.md") + fs.writeFileSync(summaryFile, "") + + const result = runNodeScript(TRIAGE_SCRIPT, { + cwd, + kiloDir, + env: { + TRIAGE_MODEL: "test/model", + DOCS_SYNC_BACKOFF_MS: "0", + TRIAGE_BUDGET_MINUTES: "30", + SINCE_OVERRIDE: "true", + GITHUB_STEP_SUMMARY: summaryFile, + }, + }) + assert.equal(result.status, 0, result.output) + const triage = JSON.parse(fs.readFileSync(path.join(cwd, "docs-sync-out", "triage.json"), "utf8")) + assert.equal(triage.length, 3) + assert.ok(triage.every((e) => e.pending === true)) + const summary = fs.readFileSync(summaryFile, "utf8") + assert.match(summary, /triage pending/) + for (const d of digest) { + assert.ok(summary.includes(d.url), `summary lists ${d.url}`) + } + assert.match(result.output, /::warning::.*since-override/) + } + + // 8a Run B: SINCE_OVERRIDE unset → warning absent + { + const digest = [samplePr(311), samplePr(312)] + const cwd = setupTriageCwd(digest) + const kiloDir = makeStubKiloDir({ mode: "stderr-exit0", stderrText: "stream end" }) + const summaryFile = path.join(cwd, "step-summary.md") + fs.writeFileSync(summaryFile, "") + + const result = runNodeScript(TRIAGE_SCRIPT, { + cwd, + kiloDir, + env: { + TRIAGE_MODEL: "test/model", + DOCS_SYNC_BACKOFF_MS: "0", + TRIAGE_BUDGET_MINUTES: "30", + GITHUB_STEP_SUMMARY: summaryFile, + }, + }) + assert.equal(result.status, 0, result.output) + const triage = JSON.parse(fs.readFileSync(path.join(cwd, "docs-sync-out", "triage.json"), "utf8")) + assert.ok(triage.every((e) => e.pending === true)) + assert.ok(fs.readFileSync(summaryFile, "utf8").includes("triage pending")) + assert.ok(!/::warning::.*since-override/.test(result.output), "override warning must be absent when unset") + } + + // 8a Run C: SINCE_OVERRIDE=true with MIXED stub (worthy > 0) → warning ABSENT + { + const digest = [samplePr(321), samplePr(322), samplePr(323), samplePr(324)] + const cwd = setupTriageCwd(digest) + const kiloDir = makeStubKiloDir({ mode: "mixed-triage" }) + const summaryFile = path.join(cwd, "step-summary.md") + fs.writeFileSync(summaryFile, "") + + const result = runNodeScript(TRIAGE_SCRIPT, { + cwd, + kiloDir, + env: { + TRIAGE_MODEL: "test/model", + DOCS_SYNC_BACKOFF_MS: "0", + TRIAGE_BUDGET_MINUTES: "30", + SINCE_OVERRIDE: "true", + GITHUB_STEP_SUMMARY: summaryFile, + }, + }) + assert.equal(result.status, 0, result.output) + const triage = JSON.parse(fs.readFileSync(path.join(cwd, "docs-sync-out", "triage.json"), "utf8")) + const worthy = triage.filter((e) => e.docs_worthy === true).length + const pending = triage.filter((e) => e.pending === true).length + assert.ok(worthy > 0, "mixed stub must produce worthy > 0") + assert.ok(pending > 0, "mixed stub must leave some pending") + assert.ok( + !/::warning::.*since-override/.test(result.output), + "override warning must be ABSENT when worthy > 0 (Upsert will run)", + ) + } + + // 8b — partial classification → missing URLs pending:true + computeUncovered + { + // One chunk of 4 PRs; stub classifies first 3 only + const digest = [samplePr(401), samplePr(402), samplePr(403), samplePr(404)] + const cwd = setupTriageCwd(digest) + const kiloDir = makeStubKiloDir({ mode: "partial-triage" }) + const summaryFile = path.join(cwd, "step-summary.md") + fs.writeFileSync(summaryFile, "") + + const result = runNodeScript(TRIAGE_SCRIPT, { + cwd, + kiloDir, + env: { + TRIAGE_MODEL: "test/model", + DOCS_SYNC_BACKOFF_MS: "0", + TRIAGE_BUDGET_MINUTES: "30", + GITHUB_STEP_SUMMARY: summaryFile, + }, + }) + assert.equal(result.status, 0, result.output) + const triage = JSON.parse(fs.readFileSync(path.join(cwd, "docs-sync-out", "triage.json"), "utf8")) + assert.equal(triage.length, 4) + const missing = triage.filter((e) => e.reason === "not classified by triage") + assert.ok(missing.length >= 1, "backfill must mark unclassified URLs") + assert.ok(missing.every((e) => e.pending === true)) + const uncovered = computeUncovered({ worthy: [], summary: [], triage }) + for (const m of missing) { + assert.ok( + uncovered.some((u) => u.url === m.url), + `${m.url} must appear in computeUncovered`, + ) + } + } +} + +// --------------------------------------------------------------------------- +// Case 9 — revert interception (title/body/annotations + source-order guards) +// --------------------------------------------------------------------------- +function case9_reverts() { + console.log("case 9: revert interception") + + // --- revertTitleKind --- + assert.equal(revertTitleKind('revert(cli): restore opt-in stream idle timeouts'), "conventional") + assert.equal(revertTitleKind('Revert "feat(cli): default stream watchdog"'), "github-native") + assert.equal(revertTitleKind("REVERT: all of it"), "conventional") + assert.equal(revertTitleKind("feat(cli): add x"), null) + assert.equal(revertTitleKind("docs: update y"), null) + assert.equal(revertTitleKind("Reverted behavior docs"), null) + + // --- parseRevertTargets --- + const defaultRepo = "Kilo-Org/kilocode" + const body12497 = `The default stream inactivity watchdog introduced by #12249 aborts requests based only on the absence of normalized AI SDK events. That signal cannot distinguish a dead provider stream from long prompt processing, reasoning, buffering, or transport behavior, and the follow-up in #12481 reduces false positives without resolving that ambiguity. + +Revert both changes and restore the previous opt-in contract: Kilo does not impose a stream idle timeout unless the provider configuration explicitly sets \`chunkTimeout\`. Explicit provider timeouts continue to use the existing AI SDK and SSE timeout paths. This removes the global heuristic while the underlying stalled-stream source and the required transport-level observability are investigated. + +This deliberately restores the possibility that an unconfigured provider stream can remain open indefinitely. A default watchdog should be reintroduced only with evidence that its liveness signal and threshold do not terminate healthy responses. + +Reverts #12249 and #12481. +` + { + const targets = parseRevertTargets(body12497, defaultRepo) + assert.equal(targets.length, 2) + assert.deepEqual( + targets.map((t) => ({ repo: t.repo, number: t.number, url: t.url })), + [ + { + repo: "Kilo-Org/kilocode", + number: 12249, + url: "https://github.com/Kilo-Org/kilocode/pull/12249", + }, + { + repo: "Kilo-Org/kilocode", + number: 12481, + url: "https://github.com/Kilo-Org/kilocode/pull/12481", + }, + ], + ) + } + + { + const narrative = "Revert the mistaken fix in #99999 because it broke streams.\n\nReverts #12249." + const targets = parseRevertTargets(narrative, defaultRepo) + assert.equal(targets.length, 1) + assert.equal(targets[0].number, 12249) + assert.ok(!targets.some((t) => t.number === 99999)) + } + + { + const targets = parseRevertTargets("Reverts Kilo-Org/cloud#42.", defaultRepo) + assert.equal(targets.length, 1) + assert.equal(targets[0].repo, "Kilo-Org/cloud") + assert.equal(targets[0].number, 42) + assert.equal(targets[0].url, "https://github.com/Kilo-Org/cloud/pull/42") + } + + { + const targets = parseRevertTargets("Reverts #1, #2.", defaultRepo) + assert.equal(targets.length, 2) + assert.deepEqual( + targets.map((t) => t.number), + [1, 2], + ) + } + + assert.deepEqual(parseRevertTargets("This reverts commit deadbeefcafe.", defaultRepo), []) + assert.deepEqual(parseRevertTargets("This reverts #5.", defaultRepo), []) + assert.deepEqual(parseRevertTargets("No revert trailer here at all.", defaultRepo), []) + + // bulleted / quoted single-line trailers + { + const targets = parseRevertTargets("- Reverts #7.", defaultRepo) + assert.equal(targets.length, 1) + assert.equal(targets[0].number, 7) + } + { + const targets = parseRevertTargets("> Reverts #8.", defaultRepo) + assert.equal(targets.length, 1) + assert.equal(targets[0].number, 8) + } + // word-boundary: prose glued to "Reverts" is not a trailer + assert.deepEqual(parseRevertTargets("Revertsomething #5", defaultRepo), []) + + // --- computeRevertAnnotations --- + // Map keys are lowercased; lookups must use .toLowerCase() + const fUrl = "https://github.com/Kilo-Org/kilocode/pull/100" + const r1Url = "https://github.com/Kilo-Org/kilocode/pull/200" + const r2Url = "https://github.com/Kilo-Org/kilocode/pull/300" + const f2Url = "https://github.com/Kilo-Org/kilocode/pull/101" + const mergedAt = "2026-07-20T12:00:00.000Z" + const mergedAt2 = "2026-07-21T12:00:00.000Z" + + { + const annotations = computeRevertAnnotations([ + { + url: r1Url, + merged_at: mergedAt, + targets: [{ repo: "Kilo-Org/kilocode", number: 100, url: fUrl }], + }, + ]) + assert.equal(annotations.size, 1) + assert.deepEqual(annotations.get(fUrl.toLowerCase()), { url: r1Url, merged_at: mergedAt }) + } + + { + // two-target signal (#12497-shaped) + const annotations = computeRevertAnnotations([ + { + url: r1Url, + merged_at: mergedAt, + targets: [ + { repo: "Kilo-Org/kilocode", number: 100, url: fUrl }, + { repo: "Kilo-Org/kilocode", number: 101, url: f2Url }, + ], + }, + ]) + assert.equal(annotations.size, 2) + assert.deepEqual(annotations.get(fUrl.toLowerCase()), { url: r1Url, merged_at: mergedAt }) + assert.deepEqual(annotations.get(f2Url.toLowerCase()), { url: r1Url, merged_at: mergedAt }) + } + + { + // revert-of-revert: R1 reverts F, R2 reverts R1 → F not annotated; R1 gets R2 + const annotations = computeRevertAnnotations([ + { + url: r1Url, + merged_at: mergedAt, + targets: [{ repo: "Kilo-Org/kilocode", number: 100, url: fUrl }], + }, + { + url: r2Url, + merged_at: mergedAt2, + targets: [{ repo: "Kilo-Org/kilocode", number: 200, url: r1Url }], + }, + ]) + assert.equal(annotations.has(fUrl.toLowerCase()), false) + assert.deepEqual(annotations.get(r1Url.toLowerCase()), { url: r2Url, merged_at: mergedAt2 }) + } + + { + const annotations = computeRevertAnnotations([{ url: r1Url, merged_at: mergedAt, targets: [] }]) + assert.equal(annotations.size, 0) + } + + // --- applyRevertAnnotations --- + { + const digest = [ + { url: fUrl, title: "feat F" }, + { url: "https://github.com/Kilo-Org/kilocode/pull/999", title: "untouched" }, + ] + const applied = applyRevertAnnotations(digest, [ + { + url: r1Url, + merged_at: mergedAt, + targets: [{ repo: "Kilo-Org/kilocode", number: 100, url: fUrl }], + }, + ]) + assert.deepEqual(digest[0].reverted_by, { url: r1Url, merged_at: mergedAt }) + assert.equal(digest[1].reverted_by, undefined) + assert.deepEqual(applied, [[fUrl, r1Url]]) + } + + { + // end-to-end revert-of-revert: F must not gain reverted_by + const digest = [{ url: fUrl, title: "feat F" }] + const applied = applyRevertAnnotations(digest, [ + { + url: r1Url, + merged_at: mergedAt, + targets: [{ repo: "Kilo-Org/kilocode", number: 100, url: fUrl }], + }, + { + url: r2Url, + merged_at: mergedAt2, + targets: [{ repo: "Kilo-Org/kilocode", number: 200, url: r1Url }], + }, + ]) + assert.equal(digest[0].reverted_by, undefined) + assert.deepEqual(applied, []) + } + + { + // case-insensitive url matching: lowercase signal target vs canonical digest entry + const canonical = "https://github.com/Kilo-Org/kilocode/pull/12249" + const lowerTarget = "https://github.com/kilo-org/kilocode/pull/12249" + const reverter = "https://github.com/Kilo-Org/kilocode/pull/12497" + const digest = [{ url: canonical, title: "feat stream" }] + const applied = applyRevertAnnotations(digest, [ + { + url: reverter, + merged_at: mergedAt, + targets: [{ repo: "kilo-org/kilocode", number: 12249, url: lowerTarget }], + }, + ]) + assert.deepEqual(digest[0].reverted_by, { url: reverter, merged_at: mergedAt }) + assert.deepEqual(applied, [[canonical, reverter]]) + } + + // --- unannotatedRevertSignals --- + { + // partial coverage: F in-digest, G pre-window → only G missed; chains empty + const sUrl = "https://github.com/Kilo-Org/kilocode/pull/500" + const gUrl = "https://github.com/Kilo-Org/kilocode/pull/102" + const signals = [ + { + url: sUrl, + merged_at: mergedAt, + targets: [ + { repo: "Kilo-Org/kilocode", number: 100, url: fUrl }, + { repo: "Kilo-Org/kilocode", number: 102, url: gUrl }, + ], + }, + ] + const result = unannotatedRevertSignals(signals, [[fUrl, sUrl]]) + assert.deepEqual(result, { missed: [{ url: sUrl, targets: [gUrl] }], unparsed: [], chains: [] }) + } + + { + // fully covered signal (no chain) → all three buckets empty + const signals = [ + { + url: r1Url, + merged_at: mergedAt, + targets: [ + { repo: "Kilo-Org/kilocode", number: 100, url: fUrl }, + { repo: "Kilo-Org/kilocode", number: 101, url: f2Url }, + ], + }, + ] + const result = unannotatedRevertSignals(signals, [ + [fUrl, r1Url], + [f2Url, r1Url], + ]) + assert.deepEqual(result, { missed: [], unparsed: [], chains: [] }) + } + + { + // depth-2 chain (#4709/#4759): R1→F, R2→R1 — both in chains; F visible as R1 target + const signals = [ + { + url: r1Url, + merged_at: mergedAt, + targets: [{ repo: "Kilo-Org/kilocode", number: 100, url: fUrl }], + }, + { + url: r2Url, + merged_at: mergedAt2, + targets: [{ repo: "Kilo-Org/kilocode", number: 200, url: r1Url }], + }, + ] + const result = unannotatedRevertSignals(signals, []) + assert.deepEqual(result, { + missed: [], + unparsed: [], + chains: [ + { url: r1Url, targets: [fUrl] }, + { url: r2Url, targets: [r1Url] }, + ], + }) + } + + { + // depth-3 chain: R1→F, R2→R1, R3→R2 — all three in chains; missed/unparsed empty + const r3Url = "https://github.com/Kilo-Org/kilocode/pull/301" + const signals = [ + { + url: r1Url, + merged_at: mergedAt, + targets: [{ repo: "Kilo-Org/kilocode", number: 100, url: fUrl }], + }, + { + url: r2Url, + merged_at: mergedAt2, + targets: [{ repo: "Kilo-Org/kilocode", number: 200, url: r1Url }], + }, + { + url: r3Url, + merged_at: "2026-04-03T00:00:00Z", + targets: [{ repo: "Kilo-Org/kilocode", number: 201, url: r2Url }], + }, + ] + const result = unannotatedRevertSignals(signals, []) + assert.deepEqual(result, { + missed: [], + unparsed: [], + chains: [ + { url: r1Url, targets: [fUrl] }, + { url: r2Url, targets: [r1Url] }, + { url: r3Url, targets: [r2Url] }, + ], + }) + } + + { + // mixed signal: M targets [R1, A, B]; A annotated, B missed; chains lists only R1 + const mUrl = "https://github.com/Kilo-Org/kilocode/pull/800" + const aUrl = "https://github.com/Kilo-Org/kilocode/pull/801" + const bUrl = "https://github.com/Kilo-Org/kilocode/pull/802" + const signals = [ + { + url: r1Url, + merged_at: mergedAt, + targets: [{ repo: "Kilo-Org/kilocode", number: 100, url: fUrl }], + }, + { + url: mUrl, + merged_at: mergedAt2, + targets: [ + { repo: "Kilo-Org/kilocode", number: 200, url: r1Url }, + { repo: "Kilo-Org/kilocode", number: 801, url: aUrl }, + { repo: "Kilo-Org/kilocode", number: 802, url: bUrl }, + ], + }, + ] + const result = unannotatedRevertSignals(signals, [[aUrl, mUrl]]) + assert.deepEqual(result, { + missed: [{ url: mUrl, targets: [bUrl] }], + unparsed: [], + chains: [ + { url: r1Url, targets: [fUrl] }, + { url: mUrl, targets: [r1Url] }, + ], + }) + } + + { + // zero-target signal → unparsed, not missed; chains empty + const emptyUrl = "https://github.com/Kilo-Org/kilocode/pull/400" + const result = unannotatedRevertSignals([{ url: emptyUrl, merged_at: mergedAt, targets: [] }], []) + assert.deepEqual(result, { missed: [], unparsed: [emptyUrl], chains: [] }) + } + + { + // case-insensitivity: annotated set matches target urls differing only by case + const signalUrl = "https://github.com/Kilo-Org/kilocode/pull/600" + const targetMixed = "https://github.com/Kilo-Org/kilocode/pull/700" + const targetLower = "https://github.com/kilo-org/kilocode/pull/700" + const signals = [ + { + url: signalUrl, + merged_at: mergedAt, + targets: [{ repo: "Kilo-Org/kilocode", number: 700, url: targetMixed }], + }, + ] + const result = unannotatedRevertSignals(signals, [[targetLower, signalUrl]]) + assert.deepEqual(result, { missed: [], unparsed: [], chains: [] }) + } + + { + // live-window lock: #12497-shaped signal with both targets covered + const s12497 = "https://github.com/Kilo-Org/kilocode/pull/12497" + const t12249 = "https://github.com/Kilo-Org/kilocode/pull/12249" + const t12481 = "https://github.com/Kilo-Org/kilocode/pull/12481" + const signals = [ + { + url: s12497, + merged_at: mergedAt, + targets: [ + { repo: "Kilo-Org/kilocode", number: 12249, url: t12249 }, + { repo: "Kilo-Org/kilocode", number: 12481, url: t12481 }, + ], + }, + ] + const result = unannotatedRevertSignals(signals, [ + [t12249, s12497], + [t12481, s12497], + ]) + assert.deepEqual(result, { missed: [], unparsed: [], chains: [] }) + } + + // --- source-order guards (case-5 style) --- + { + const collectSrc = fs.readFileSync(COLLECT_SCRIPT, "utf8") + assert.ok(collectSrc.includes("./reverts.mjs"), "collect.mjs must import ./reverts.mjs") + const kindIdx = collectSrc.indexOf("revertTitleKind(item.title") + const dropIdx = collectSrc.indexOf("DROP_TITLE.test") + assert.ok(kindIdx >= 0, "revertTitleKind(item.title call missing") + assert.ok(dropIdx >= 0, "DROP_TITLE.test missing") + assert.ok(kindIdx < dropIdx, "revert interception must run before DROP_TITLE") + + const applyIdx = collectSrc.indexOf("applyRevertAnnotations(digest") + const fullIdx = collectSrc.indexOf("digest-full.json") + assert.ok(applyIdx >= 0, "applyRevertAnnotations(digest call missing") + assert.ok(fullIdx >= 0, "digest-full.json write missing") + assert.ok(applyIdx < fullIdx, "annotations must be applied before digests are written") + + assert.ok( + collectSrc.includes('if (revertTitleKind(item.title ?? "")) {'), + 'collect must use exact intercept line if (revertTitleKind(item.title ?? "")) {', + ) + } + + // --- prompt-text guards --- + { + const triagePrompt = fs.readFileSync(path.join(HERE, "triage-prompt.md"), "utf8") + assert.ok(triagePrompt.includes("reverted_by"), "triage-prompt must mention reverted_by") + assert.ok(triagePrompt.includes("stream-liveness"), "triage-prompt must mention stream-liveness") + assert.ok( + triagePrompt.includes("reverted by https://github.com/Kilo-Org/kilocode/pull/12497"), + "triage-prompt must contain exact cite example", + ) + + const editPrompt = fs.readFileSync(path.join(HERE, "edit-prompt.md"), "utf8") + assert.ok(editPrompt.includes("reverted_by"), "edit-prompt must mention reverted_by") + assert.ok(editPrompt.includes("current source tree"), "edit-prompt must mention current source tree") + assert.ok(editPrompt.includes("Skipping is a normal outcome"), "edit-prompt must mention skipping outcome") + assert.ok(editPrompt.includes("Existence alone is not enough"), "edit-prompt must mention existence guard") + } +} + +// --------------------------------------------------------------------------- +// main +// --------------------------------------------------------------------------- +function main() { + const cases = [ + case1_mergeOrFallback, + case2_defectB, + case2b_autoFlag, + case2c_stderrLogAlways, + case2d_redactEnvSecrets, + case2e_prefixSecretOrdering, + case2f_redactStdout, + case2g_redactStream, + case2h_pendingCauseIsReadable, + case2i_budgetsFitWork, + case3_watermark, + case4_routing, + case5_recollection, + case6_budgets, + case7_cap, + case8_triage, + case9_reverts, + ] + let failed = 0 + for (const fn of cases) { + try { + fn() + console.log(` ok: ${fn.name}`) + } catch (err) { + failed++ + console.error(` FAIL: ${fn.name}`) + console.error(err) + } finally { + cleanup() + } + } + if (failed > 0) { + console.error(`\nselftest: ${failed} case(s) failed`) + process.exit(1) + } + console.log("\nselftest: all cases passed") +} + +main() diff --git a/.github/docs-sync/triage-prompt.md b/.github/docs-sync/triage-prompt.md new file mode 100644 index 0000000000..dbf2341e70 --- /dev/null +++ b/.github/docs-sync/triage-prompt.md @@ -0,0 +1,20 @@ +You are the triage pass of an automated documentation pipeline for Kilo Code. Kilo Code is an open-source agentic engineering platform: VS Code extension, JetBrains plugin, CLI, and the kilo.ai cloud platform (teams, KiloClaw, gateway, code reviews). + +The attached `digest.json` file contains PRs recently merged to Kilo-Org/cloud and Kilo-Org/kilocode. Your only job is to decide which of them require changes to the public product documentation at kilo.ai/docs. + +A PR is docs-worthy ONLY if a user of Kilo Code would need to learn something new or change how they use the product after this PR ships. Examples: new commands, flags, settings, UI workflows, providers, pricing/limits changes, breaking behavior changes, or fixes that change documented behavior. + +A PR is NOT docs-worthy when it is: an internal refactor, infrastructure or CI work, a feature-flag scaffold that is not yet user-visible, test or dependency work, a bug fix that merely restores already-documented behavior, a change only visible to contributors or self-hosters, an internal technical fix or plumbing change with no user-visible behavior or workflow change (for example stream-liveness/watchdog plumbing, internal retry or timeout handling with no user-facing setting), or UI or rendering polish that does not change what a user must do or learn. + +Rules: + +- Include every input PR exactly once, identified by its `number` and `url`. Never invent PRs. +- A digest entry with a `reverted_by` field had its changes reverted by that later PR in the same window. Treat such PRs as not docs-worthy unless the entry's body or file list shows clear evidence the change was re-landed after the revert. When `reverted_by` drives your verdict, the `reason` must cite it, e.g. "reverted by https://github.com/Kilo-Org/kilocode/pull/12497". +- When unsure, set `docs_worthy` to false and explain the doubt in `reason`. +- `target_sections` is only filled for docs-worthy PRs. Use rough docs areas, e.g. `getting-started`, `code-with-ai/platforms/cli`, `code-with-ai/platforms/vscode`, `code-with-ai/agents`, `ai-providers`, `teams`, `enterprise`, `automate`. +- `reason` is one short sentence, written for the human who reviews the final docs PR. +- `priority` reflects user impact: high = most users affected, medium = notable subset, low = edge case. + +Respond with a STRICT JSON array and nothing else: no prose, no markdown fences, no comments. Schema: + +[{"pr": 123, "url": "https://github.com/Kilo-Org/kilocode/pull/123", "docs_worthy": true, "reason": "Adds --variant flag to kilo run", "target_sections": ["code-with-ai/platforms/cli"], "priority": "high"}] diff --git a/.github/docs-sync/triage.mjs b/.github/docs-sync/triage.mjs new file mode 100644 index 0000000000..a01eef0a99 --- /dev/null +++ b/.github/docs-sync/triage.mjs @@ -0,0 +1,194 @@ +// kilocode_change - new file + +/** + * Runs the LLM triage pass over docs-sync-out/digest.json in chunks. + * + * A daily window holds ~30-50 PRs; a replay can hold several hundred. A + * single triage call over that volume truncates its JSON output, so the + * digest is split into chunks of CHUNK_SIZE and each chunk is triaged with + * its own `kilo run` call. A chunk that fails, is only partially classified, + * or is deferred by the wall-clock budget is marked pending:true (still + * docs_worthy:false so filter-worthy excludes it) so the watermark holds + * back and the next run re-collects those PRs. + * + * Env: TRIAGE_MODEL (provider/model), KILO_API_KEY + KILO_ORG_ID (gateway auth, set by + * the workflow; the kilo provider reads them natively). Reads the prompt from triage-prompt.md next to this script. + * Budget: TRIAGE_BUDGET_MINUTES (default 35). Test hook: DOCS_SYNC_BACKOFF_MS. + */ + +import fs from "node:fs" +import path from "node:path" +import { fileURLToPath } from "node:url" +import { parseTriageEntries } from "./extract-json.mjs" +import { appendSummary, backoffMsForAttempt, deadline, remainingMs, runKilo, sleepSync } from "./lib.mjs" + +const CHUNK_SIZE = 25 +const ATTEMPTS = 3 +const OUT_DIR = "docs-sync-out" +const CHUNK_TIMEOUT_MS = 10 * 60 * 1000 + +const HERE = path.dirname(fileURLToPath(import.meta.url)) +const prompt = fs.readFileSync(path.join(HERE, "triage-prompt.md"), "utf8") +const model = process.env.TRIAGE_MODEL +if (!model) throw new Error("TRIAGE_MODEL is required") + +const TRIAGE_BUDGET_MINUTES = Number(process.env.TRIAGE_BUDGET_MINUTES) || 35 + +const digest = JSON.parse(fs.readFileSync(`${OUT_DIR}/digest.json`, "utf8")) + +function formatCause(result) { + const bits = [] + if (result.timedOut) bits.push("timed out") + if (result.exitCode !== null && result.exitCode !== undefined) bits.push(`exit ${result.exitCode}`) + if (result.stderrTail) bits.push(result.stderrTail.replaceAll("\n", " ").slice(0, 200)) + return bits.join("; ") || "no diagnostic" +} + +function pendingEntry(d, reason) { + return { + pr: d.number, + url: d.url, + docs_worthy: false, + pending: true, + reason, + target_sections: [], + priority: "medium", + } +} + +function triageChunk(chunk, index, budgetDeadline) { + const chunkFile = `${OUT_DIR}/triage-chunk-${index}.json` + fs.writeFileSync(chunkFile, JSON.stringify(chunk, null, 2)) + + let lastCause = "triage failed to classify this PR" + for (let attempt = 1; attempt <= ATTEMPTS; attempt++) { + const left = remainingMs(budgetDeadline) + if (left < CHUNK_TIMEOUT_MS) { + lastCause = `triage budget exhausted before chunk ${index} attempt ${attempt}` + console.warn( + `chunk ${index}: stopping retries — remaining budget cannot fit another ${CHUNK_TIMEOUT_MS / 60000}m attempt`, + ) + break + } + + // Headless `kilo run` auto-rejects every permission ask; without --auto the + // agent cannot run shell commands. SECURITY: --auto grants unrestricted bash + // to an agent steered by external PR content. Hardening deferred: a scoped + // permission.bash map via KILO_CONFIG_CONTENT should replace --auto once the + // required shell patterns are stable (see PR #12605 review thread). + const result = runKilo({ + args: ["run", "--auto", prompt, "-m", model, "--dir", process.cwd(), "-f", chunkFile], + timeoutMs: Math.min(CHUNK_TIMEOUT_MS, left), + streamStdout: false, + label: `triage chunk ${index} attempt ${attempt}`, + }) + + const raw = result.stdout + if (raw) fs.writeFileSync(`${OUT_DIR}/triage-raw-${index}.txt`, raw) + + const entries = raw ? parseTriageEntries(raw) : null + if (entries) { + // An entry for a PR outside this chunk must not win the shared dedupe + // against the chunk that actually owns it — drop foreign entries. + const allowed = new Set(chunk.map((d) => d.url)) + const owned = entries.filter((e) => allowed.has(e.url)) + if (owned.length !== entries.length) { + console.warn(`chunk ${index}: dropped ${entries.length - owned.length} entries for PRs outside the chunk`) + } + if (owned.length > 0) return owned + } + + // Exit 0 is not success: unparseable output is a failure logged WITH + // the captured stderrTail and exit code on every attempt. + const cause = formatCause(result) + lastCause = `triage chunk ${index}: ${cause}` + console.warn( + `chunk ${index} attempt ${attempt}: no valid JSON in output` + + ` (exit ${result.exitCode}${result.timedOut ? ", timed out" : ""})` + + (result.stderrTail ? `\nstderr tail:\n${result.stderrTail}` : "\nstderr tail: (empty)"), + ) + + if (attempt < ATTEMPTS) { + const wait = backoffMsForAttempt(attempt) + const afterWait = remainingMs(budgetDeadline) - wait + if (wait > 0 && afterWait >= CHUNK_TIMEOUT_MS) { + console.warn(`chunk ${index}: backing off ${wait / 1000}s before attempt ${attempt + 1}`) + sleepSync(wait) + } else if (wait > 0) { + console.warn( + `chunk ${index}: skipping backoff — remaining budget cannot fit attempt ${attempt + 1} after wait`, + ) + } + } + } + + console.warn( + `::warning::chunk ${index} failed triage after up to ${ATTEMPTS} attempts; marking ${chunk.length} PRs pending`, + ) + return chunk.map((d) => pendingEntry(d, lastCause.includes("triage failed") ? lastCause : `triage failed to classify this PR (${lastCause})`)) +} + +const chunks = [] +for (let i = 0; i < digest.length; i += CHUNK_SIZE) { + chunks.push(digest.slice(i, i + CHUNK_SIZE)) +} +console.log(`triaging ${digest.length} PRs in ${chunks.length} chunks of up to ${CHUNK_SIZE}`) + +const budgetDeadline = deadline(TRIAGE_BUDGET_MINUTES) +const merged = [] +const seen = new Set() + +for (let i = 0; i < chunks.length; i++) { + const left = remainingMs(budgetDeadline) + if (left < CHUNK_TIMEOUT_MS) { + const deferredPrs = chunks.slice(i).reduce((n, c) => n + c.length, 0) + console.warn( + `stopping triage before chunk ${i}: remaining budget (${Math.ceil(left / 1000)}s) cannot fit a ${CHUNK_TIMEOUT_MS / 60000}m chunk; deferring ${deferredPrs} PRs`, + ) + const cause = `triage budget exhausted before chunk ${i} (${Math.ceil(left / 1000)}s left)` + for (let j = i; j < chunks.length; j++) { + for (const d of chunks[j]) { + if (seen.has(d.url)) continue + seen.add(d.url) + merged.push(pendingEntry(d, cause)) + } + } + break + } + + for (const e of triageChunk(chunks[i], i, budgetDeadline)) { + if (seen.has(e.url)) continue + seen.add(e.url) + merged.push(e) + } +} + +// Coverage: every digest PR gets a triage entry. Partial-chunk backfill and +// any other missing URL are pending:true — not a genuine "not worthy" verdict. +for (const d of digest) { + if (seen.has(d.url)) continue + merged.push(pendingEntry(d, "not classified by triage")) +} + +fs.writeFileSync(`${OUT_DIR}/triage.json`, JSON.stringify(merged, null, 2)) +const worthy = merged.filter((e) => e.docs_worthy).length +const pending = merged.filter((e) => e.pending === true) +console.log(`triage complete: ${merged.length} entries, ${worthy} docs-worthy, ${pending.length} pending`) + +// Upsert is gated off when worthy == 0, so triage emits its own Step Summary +// listing every PR it marked pending:true and why. +if (pending.length > 0) { + const lines = pending.map((e) => `- [${e.url}] ${e.reason}`) + appendSummary( + `### docs-sync: triage pending (will retry)\n\n${pending.length} PR(s) were not classified and will be re-collected on the next run:\n\n${lines.join("\n")}`, + ) +} + +// Replay warning (S2j): warn IFF since-override AND something pending AND +// docs-worthy count is 0 (Upsert is gated off, so noDiffReport never runs). +const sinceOverride = process.env.SINCE_OVERRIDE === "true" +if (sinceOverride && pending.length > 0 && worthy === 0) { + console.warn( + "::warning::docs-sync since-override replay left uncovered PRs and wrote no PR body (worthy=0); re-run the override — the watermark was not held back in the body", + ) +} diff --git a/.github/docs-sync/upsert-pr.mjs b/.github/docs-sync/upsert-pr.mjs new file mode 100644 index 0000000000..1ef25b7596 --- /dev/null +++ b/.github/docs-sync/upsert-pr.mjs @@ -0,0 +1,471 @@ +// kilocode_change - new file + +/** + * Commits the agent's packages/kilo-docs changes, pushes the rolling branch, + * and creates or updates the rolling auto-docs PR. + * + * No-op when the agent produced no docs changes. PRs become drafts when the + * diff exceeds the file cap or verification failed. The PR body carries + * marker-delimited sections so later runs can append rows, plus a + * machine-readable processed-through watermark. + * + * Watermark invariant: processed-through never moves past a PR that has no + * terminal outcome. Terminal := action !== "pending" (a deliberate agent + * "skipped" IS terminal). Uncovered PRs hold the marker at earliest + * merged_at − 1 ms so collect's merged:>=since re-collects them next run. + * Three review rounds found four independent defects in a queue-based + * alternative (unreachable gate, empty-PR creation, cap-overflow loss, + * draft-state corruption); a held-back watermark has none of those modes. + */ + +import { execFileSync } from "node:child_process" +import fs from "node:fs" +import { pathToFileURL } from "node:url" + +const BRANCH = process.env.BRANCH || "docs/auto-sync" +const FILE_CAP = 15 +const ROW_CAP = 150 +const PENDING_DISPLAY_CAP = 60 +const SUMMARY_FILE = ".docs-sync-summary.json" +const DOCS_PATH = "packages/kilo-docs" + +const git = (args) => execFileSync("git", args, { stdio: ["ignore", "pipe", "inherit"] }).toString().trim() + +// Agent-generated strings land in the PR body next to machine-read markers. +// Strip HTML-comment sequences so a crafted/adversarial value cannot forge +// section boundaries or the processed-through watermark. +function clean(value) { + return String(value ?? "").replaceAll("", "") +} + +function shortRef(url) { + return clean(url).replace("https://github.com/", "").replace("/pull/", "#") +} + +function changeRow(e) { + return `| ${clean(e.action).replaceAll("|", "\\|")} | [${shortRef(e.url)}](${clean(e.url)}) |` +} + +function skippedRow(e) { + const reason = clean(e.reason).replaceAll("|", "\\|").replaceAll("\n", " ") + return `| [${shortRef(e.url)}](${clean(e.url)}) | ${reason} |` +} + +function pendingRow(e) { + const reason = clean(e.reason ?? e.cause ?? "").replaceAll("|", "\\|").replaceAll("\n", " ") + return `| [${shortRef(e.url)}](${clean(e.url)}) | ${reason} |` +} + +export function extractSectionRows(body, name) { + const m = String(body ?? "").match( + new RegExp(`([\\s\\S]*?)`), + ) + if (!m) return [] + return m[1] + .split("\n") + .map((l) => l.trim()) + .filter( + (l) => + l.startsWith("|") && + !l.startsWith("| ---") && + !/^\|\s*Docs change/.test(l) && + !/^\|\s*PR\s*\|/.test(l) && + !/^\|\s*Why\s*\|/.test(l), + ) +} + +function section(name, header, rows) { + const body = rows.length > 0 ? [header, "| --- | --- |", ...rows].join("\n") : "_None._" + return `\n${body}\n` +} + +export function renderBody({ date, since, through, changesRows, pendingRows, skippedRows, verified, draftReasons, note }) { + const pendingDisplay = + pendingRows.length > PENDING_DISPLAY_CAP + ? [...pendingRows.slice(0, PENDING_DISPLAY_CAP), `| +${pendingRows.length - PENDING_DISPLAY_CAP} more | |`] + : pendingRows + + return `## Automated docs sync — ${date} + +This PR keeps kilo.ai/docs in sync with features merged to [Kilo-Org/cloud](https://github.com/Kilo-Org/cloud) and [Kilo-Org/kilocode](https://github.com/Kilo-Org/kilocode). Every change below links to the merged PR it documents. + +- Window: \`${since}\` → \`${through}\` +- Verification (docs build + tests): **${verified ? "passing" : "FAILING — needs a human look"}** +${note ? `- ${note}\n` : ""}${draftReasons.length > 0 ? `- Draft because: ${draftReasons.join("; ")}\n` : ""} +### Changes + +${section("changes", "| Docs change | Source |", changesRows)} + +### Pending — will retry + +${section("pending", "| PR | Why |", pendingDisplay)} + +### Considered, no docs change needed + +${section("skipped", "| PR | Reason |", skippedRows)} + +--- + +(bot) Generated by the docs-sync workflow. Humans review and merge; while this PR stays open, the next daily run appends new changes here. Branch: \`${BRANCH}\`. + +` +} + +function mergeRows(oldRows, newRows) { + const seen = new Set() + const out = [] + for (const row of [...oldRows, ...newRows]) { + if (seen.has(row)) continue + seen.add(row) + out.push(row) + } + return out.slice(-ROW_CAP) +} + +function readJson(path, fallback) { + try { + return JSON.parse(fs.readFileSync(path, "utf8")) + } catch { + return fallback + } +} + +/** + * Uncovered = (worthy URLs with no summary row) ∪ (summary action "pending") + * ∪ (triage entries with pending: true). A worthy PR is covered iff it has a + * summary row whose action !== "pending" and carries no triage pending flag. + */ +export function computeUncovered({ worthy, summary, triage }) { + const worthyList = Array.isArray(worthy) ? worthy : [] + const summaryList = Array.isArray(summary) ? summary : [] + const triageList = Array.isArray(triage) ? triage : [] + + const summaryByUrl = new Map() + for (const e of summaryList) { + if (e?.url) summaryByUrl.set(e.url, e) + } + + const triagePendingByUrl = new Map() + for (const e of triageList) { + if (e?.url && e.pending === true) triagePendingByUrl.set(e.url, e) + } + + /** @type {Map} */ + const out = new Map() + + for (const w of worthyList) { + const url = w?.url + if (!url) continue + const row = summaryByUrl.get(url) + if (!row) { + out.set(url, { + url, + pr: w.number ?? w.pr, + reason: "no edit summary row (edit pass did not cover this PR)", + }) + continue + } + if (row.action === "pending") { + out.set(url, { + url, + pr: row.pr ?? w.number ?? w.pr, + reason: row.reason || "edit pass pending", + }) + } + } + + // Summary pending rows for URLs not in worthy (defensive). + for (const row of summaryList) { + if (row?.action === "pending" && row.url && !out.has(row.url)) { + out.set(row.url, { + url: row.url, + pr: row.pr, + reason: row.reason || "edit pass pending", + }) + } + } + + for (const [url, e] of triagePendingByUrl) { + if (out.has(url)) continue + out.set(url, { + url, + pr: e.pr, + reason: e.reason || "triage pending", + }) + } + + return [...out.values()] +} + +/** + * processed-through = now when uncovered is empty; otherwise earliest + * merged_at among uncovered PRs minus 1 ms (from digest-full.json). + * When uncovered is non-empty but no merged_at resolves, hold at + * `fallback` (the run's window start / SINCE): every uncovered PR was + * collected via merged:>=since, so holding there re-collects all of them. + * Never advance past unresolved uncovered PRs (Defect-B permanent-loss). + */ +export function computeProcessedThrough({ uncovered, digest, now, fallback }) { + const nowIso = typeof now === "string" ? now : new Date(now).toISOString() + if (!uncovered || uncovered.length === 0) return nowIso + + const digestList = Array.isArray(digest) ? digest : [] + const byUrl = new Map(digestList.filter((d) => d?.url).map((d) => [d.url, d])) + + let earliest = null + for (const u of uncovered) { + const d = byUrl.get(u.url) + const mergedAt = d?.merged_at + if (!mergedAt) continue + const t = Date.parse(mergedAt) + if (!Number.isFinite(t)) continue + if (earliest === null || t < earliest) earliest = t + } + + if (earliest === null) { + // digest-full missing/corrupt while uncovered is non-empty: hold at + // window start so collect's merged:>=since re-collects every PR. + // Never use now−1ms — that strands uncovered PRs permanently. + const fallbackMs = fallback == null ? NaN : Date.parse(fallback) + if (!Number.isFinite(fallbackMs)) { + throw new Error( + `docs-sync: cannot resolve merged_at for ${uncovered.length} uncovered PR(s) and fallback/SINCE is missing or unparseable; refusing to advance processed-through`, + ) + } + const fallbackIso = new Date(fallbackMs).toISOString() + console.warn( + `::warning::docs-sync: merge times for ${uncovered.length} uncovered PR(s) could not be resolved; holding watermark at window start ${fallbackIso}`, + ) + return fallbackIso + } + + return new Date(earliest - 1).toISOString() +} + +/** + * Route summary + triage into the three body sections. + * changesRows = action neither skipped nor pending + * pendingRows = uncovered from computeUncovered + * skippedRows = action === "skipped" ∪ triage docs_worthy false && !pending + */ +export function routeRows({ summary, triage, uncovered }) { + const summaryList = Array.isArray(summary) ? summary : [] + const triageList = Array.isArray(triage) ? triage : [] + const uncoveredList = Array.isArray(uncovered) ? uncovered : [] + + const changesEntries = summaryList.filter((e) => e.action !== "skipped" && e.action !== "pending") + const skippedEntries = [ + ...triageList.filter((e) => e.docs_worthy === false && e.pending !== true), + ...summaryList.filter((e) => e.action === "skipped"), + ] + + return { + changesRows: changesEntries.map(changeRow), + pendingRows: uncoveredList.map(pendingRow), + skippedRows: skippedEntries.map(skippedRow), + } +} + +/** + * Drop pre-existing Considered rows whose reason contains any of the three + * legacy failure literals (substring match — live rows carry longer strings). + * Genuine no-doc-needed rows are untouched. + */ +export function dropLegacySkipped(rows) { + const list = Array.isArray(rows) ? rows : [] + const needles = ["edit pass failed or timed out", "triage failed to classify", "not classified by triage"] + return list.filter((row) => { + const s = String(row ?? "") + return !needles.some((n) => s.includes(n)) + }) +} + +/** + * No-diff early-return report. Returns summary markdown and an optional + * replay warning. Warns IFF sinceOverride && uncovered non-empty (no commit + * happened — that is the caller's situation). + */ +export function noDiffReport({ uncovered, sinceOverride }) { + const list = Array.isArray(uncovered) ? uncovered : [] + const lines = + list.length === 0 + ? ["The agent found nothing worth documenting in this window."] + : [ + `No packages/kilo-docs diff was produced, but ${list.length} PR(s) remain uncovered and will be re-collected on the next scheduled run:`, + "", + ...list.map((u) => `- [${u.url}] ${u.reason || "uncovered"}`), + ] + + const summary = `### docs-sync: no docs changes\n\n${lines.join("\n")}` + + let warning = null + if (sinceOverride && list.length > 0) { + warning = + "docs-sync since-override replay left uncovered PRs and wrote no PR body (no docs commit); re-run the override — the watermark was not held back in the body" + } + + return { summary, warning } +} + +async function main() { + const { api, appendOutput, appendSummary, repo } = await import("./lib.mjs") + + const now = process.env.PROCESSED_THROUGH ?? new Date().toISOString() + const since = process.env.SINCE ?? "unknown" + const sinceOverride = process.env.SINCE_OVERRIDE === "true" + const mode = ["update", "conflict"].includes(process.env.PREP_MODE) ? process.env.PREP_MODE : "fresh" + const existingPr = process.env.PR_NUMBER || "" + const verified = process.env.VERIFIED === "true" + const date = now.slice(0, 10) + + // The agent's run summary is consumed here and never committed. + const agentSummary = readJson(SUMMARY_FILE, []) + fs.rmSync(SUMMARY_FILE, { force: true }) + const triage = readJson("docs-sync-out/triage.json", []) + const worthy = readJson("docs-sync-out/worthy.json", []) + const digest = readJson("docs-sync-out/digest-full.json", []) + + // Order matters: compute uncovered BEFORE the no-diff early return so + // noDiffReport can name every held-back PR. + const uncovered = computeUncovered({ worthy, summary: agentSummary, triage }) + + if (git(["status", "--porcelain", "--", DOCS_PATH]) === "") { + console.log("no packages/kilo-docs changes produced; nothing to commit") + const { summary, warning } = noDiffReport({ uncovered, sinceOverride }) + appendSummary(summary) + if (warning) console.warn(`::warning::${warning}`) + return + } + + // Git identity is configured once in docs-sync.yml (Configure git identity) + // before any commit-creating step, including prepare-branch's merge. + git(["add", DOCS_PATH]) + git(["commit", "-m", `docs: sync with merged PRs (${date})`]) + + // Watermark: now when fully covered; else earliest uncovered merged_at − 1ms. + // Pass SINCE as fallback so missing digest-full cannot strand uncovered PRs. + const through = computeProcessedThrough({ uncovered, digest, now, fallback: since }) + + // The draft cap bounds the cumulative PR diff, not just this run's commit. + const changedFiles = git(["diff", "--name-only", "origin/main...HEAD", "--", DOCS_PATH]) + .split("\n") + .filter(Boolean) + const draftReasons = [] + if (changedFiles.length > FILE_CAP) draftReasons.push(`diff exceeds ${FILE_CAP} files (${changedFiles.length})`) + if (!verified) draftReasons.push("docs build/tests not passing") + // Content gate: legitimate bot edits are docs pages and nav files. Anything + // else in the docs package (build config, components, tests) executes + // during the verify build, so force human review before merge. + const nonContent = changedFiles.filter( + (f) => !f.startsWith("packages/kilo-docs/pages/") && !f.startsWith("packages/kilo-docs/lib/nav/"), + ) + if (nonContent.length > 0) { + // File paths are agent-chosen; sanitize before they land in the PR body. + const listed = nonContent + .slice(0, 5) + .map((f) => clean(f).replaceAll("|", "\\|")) + .join(", ") + draftReasons.push(`touches non-content files outside pages/ and lib/nav/: ${listed}`) + } + const draft = draftReasons.length > 0 + + git(mode === "update" ? ["push", "origin", `HEAD:${BRANCH}`] : ["push", "--force-with-lease", "origin", `HEAD:${BRANCH}`]) + + const { changesRows: changesNew, pendingRows: pendingNew, skippedRows: skippedNew } = routeRows({ + summary: agentSummary, + triage, + uncovered, + }) + + let oldChanges = [] + let oldSkipped = [] + let oldPending = [] + if (mode === "update" && existingPr) { + const pr = await api(`/repos/${repo()}/pulls/${existingPr}`) + oldChanges = extractSectionRows(pr.body, "changes") + oldSkipped = dropLegacySkipped(extractSectionRows(pr.body, "skipped")) + oldPending = extractSectionRows(pr.body, "pending") + } + + // Pending is replaced each run (informational only); do not merge legacy + // pending rows — uncovered is recomputed fresh. oldPending is read only so + // extractSectionRows stays exercised; discarded deliberately. + void oldPending + + const body = renderBody({ + date, + since, + through, + changesRows: mergeRows(oldChanges, changesNew), + pendingRows: pendingNew, + skippedRows: mergeRows(oldSkipped, skippedNew), + verified, + draftReasons, + note: + mode === "conflict" && existingPr + ? `Continues from #${existingPr}, whose branch conflicted with \`main\` (its commits are preserved there).` + : "", + }) + + try { + await api(`/repos/${repo()}/labels`, { + method: "POST", + body: { name: "auto-docs", color: "1d76db", description: "Automated docs-sync PRs" }, + }) + } catch (err) { + if (err.status !== 422) throw err // 422 = label already exists + } + + let prNumber + let prUrl + if (mode === "update" && existingPr) { + const pr = await api(`/repos/${repo()}/pulls/${existingPr}`, { + method: "PATCH", + body: { title: `docs: auto-sync with merged PRs (through ${date})`, body }, + }) + prNumber = pr.number + prUrl = pr.html_url + await api(`/repos/${repo()}/issues/${prNumber}/comments`, { + method: "POST", + body: { + body: `(bot) Appended changes processed through \`${through}\`. Verification: **${verified ? "passing" : "failing"}**.${draft ? ` Draft because: ${draftReasons.join("; ")}.` : ""}`, + }, + }) + } else { + const pr = await api(`/repos/${repo()}/pulls`, { + method: "POST", + body: { + title: `docs: auto-sync with merged PRs (through ${date})`, + head: BRANCH, + base: "main", + body, + draft, + }, + }) + prNumber = pr.number + prUrl = pr.html_url + await api(`/repos/${repo()}/issues/${prNumber}/labels`, { method: "POST", body: { labels: ["auto-docs"] } }) + if (mode === "conflict" && existingPr) { + await api(`/repos/${repo()}/issues/${existingPr}/comments`, { + method: "POST", + body: { + body: `(bot) This branch conflicted with \`main\`, so the sync continues in ${prUrl}. Commits on this branch are preserved — please close this PR after the new one is reviewed.`, + }, + }) + } + } + + appendOutput("pr_url", prUrl) + appendSummary( + `### docs-sync PR\n\n- ${prUrl}\n- changed files: ${changedFiles.length}\n- draft: ${draft}\n- uncovered: ${uncovered.length}\n- processed-through: ${through}\n`, + ) + console.log(`PR ${prNumber}: ${prUrl} (draft=${draft}, files=${changedFiles.length}, uncovered=${uncovered.length}, through=${through})`) +} + +const isMain = process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href +if (isMain) { + main().catch((err) => { + console.error(err) + process.exit(1) + }) +} diff --git a/.github/docs-sync/watermark.mjs b/.github/docs-sync/watermark.mjs new file mode 100644 index 0000000000..32986fef67 --- /dev/null +++ b/.github/docs-sync/watermark.mjs @@ -0,0 +1,107 @@ +// kilocode_change - new file + +/** + * Resolves the docs-sync watermark: the timestamp of the newest source PR the + * bot has already processed. Derived from the bot's own PRs (marker in the PR + * body), so there is no external state to keep consistent. + * + * Priority: workflow_dispatch input `since` > latest open bot PR marker > + * last merged bot PR marker > 72h ago. Hard cap: never look back more than + * 14 days — unless the human explicitly requested a window via INPUT_SINCE. + */ + +import { pathToFileURL } from "node:url" +import { appendOutput, appendSummary, repo, searchIssues } from "./lib.mjs" + +const FALLBACK_HOURS = 72 +const CAP_DAYS = 14 +const MARKER = // + +function extractMarker(body) { + const m = (body ?? "").match(MARKER) + if (!m) return null + const d = new Date(m[1]) + return Number.isNaN(d.getTime()) ? null : d +} + +async function findWatermark() { + const r = repo() + for (const state of ["open", "merged"]) { + const query = `repo:${r} is:pr label:auto-docs sort:created-desc ${state === "open" ? "is:open" : "is:merged"}` + const prs = await searchIssues(query, { maxPages: 1 }) + for (const pr of prs) { + // Only trust markers on PRs authored by the bot itself: bodies are + // editable and the label can be applied by anyone with triage access. + if (pr.user?.login !== "github-actions[bot]") continue + const marker = extractMarker(pr.body) + if (marker) { + console.log(`watermark from ${state} PR #${pr.number}: ${marker.toISOString()}`) + return marker + } + } + } + return null +} + +/** + * Apply the 14-day lookback cap. When `explicit` is true (dispatch override), + * the cap is skipped so a human-requested recovery window is not silently + * shortened. Returns `{ since, clamped }`. + */ +export function applyCap(since, now, { explicit = false } = {}) { + if (explicit) { + console.log(`14-day cap skipped: INPUT_SINCE was set explicitly (${since.toISOString()})`) + return { since, clamped: false } + } + const cap = new Date(now.getTime() - CAP_DAYS * 24 * 3600 * 1000) + if (since < cap) { + const from = since.toISOString() + const to = cap.toISOString() + console.warn( + `::warning::docs-sync watermark clamped from ${from} to ${to} (${CAP_DAYS}-day cap). ` + + `Anything still uncovered before ${to} is abandoned and needs a human.`, + ) + return { since: cap, clamped: true } + } + return { since, clamped: false } +} + +async function main() { + const now = new Date() + let since + let explicit = false + + const input = (process.env.INPUT_SINCE ?? "").trim() + if (input) { + since = new Date(input) + if (Number.isNaN(since.getTime())) { + throw new Error(`Invalid INPUT_SINCE: ${input}`) + } + explicit = true + console.log(`watermark from dispatch input: ${since.toISOString()}`) + } else { + since = (await findWatermark()) ?? new Date(now.getTime() - FALLBACK_HOURS * 3600 * 1000) + } + + // A forged, edited, or malformed marker in the future would silently match + // nothing in the merged:>= search; clamp it loudly. + if (since > now) { + console.warn(`watermark ${since.toISOString()} is in the future, clamping to now`) + since = now + } + + ;({ since } = applyCap(since, now, { explicit })) + + appendOutput("since", since.toISOString()) + appendOutput("now", now.toISOString()) + appendOutput("since_override", explicit ? "true" : "false") + appendSummary(`### docs-sync watermark\n\n- since: \`${since.toISOString()}\`\n- now: \`${now.toISOString()}\`\n`) +} + +const isMain = process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href +if (isMain) { + main().catch((err) => { + console.error(err) + process.exit(1) + }) +} diff --git a/.github/workflows/auto-docs.yml b/.github/workflows/auto-docs.yml index 5f84be47f3..2e7db5814c 100644 --- a/.github/workflows/auto-docs.yml +++ b/.github/workflows/auto-docs.yml @@ -26,15 +26,18 @@ concurrency: jobs: call-valtown: + # kilocode_change start if: > github.event_name == 'workflow_dispatch' || ( + github.repository == 'Kilo-Org/kilocode' && github.event.pull_request.merged == true && ( startsWith(github.event.pull_request.title, 'feat:') || startsWith(github.event.pull_request.title, 'feat(') ) ) + # kilocode_change end runs-on: ubuntu-latest timeout-minutes: 5 diff --git a/.github/workflows/check-opencode-annotations.yml b/.github/workflows/check-opencode-annotations.yml index 1de166dde2..81536eccd2 100644 --- a/.github/workflows/check-opencode-annotations.yml +++ b/.github/workflows/check-opencode-annotations.yml @@ -48,6 +48,9 @@ jobs: - name: Check Effect Promise facade allowlist run: bun run script/check-opencode-promise-facades.ts + - name: Check model tool network boundary + run: bun run script/check-model-tool-network.ts + - name: Check workflow allowlist run: bun run script/check-workflows.ts # kilocode_change end diff --git a/.github/workflows/check-org-member.yml b/.github/workflows/check-org-member.yml index e059f8bb0f..b0fcaf5f7a 100644 --- a/.github/workflows/check-org-member.yml +++ b/.github/workflows/check-org-member.yml @@ -18,7 +18,7 @@ on: jobs: check: - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: blacksmith-2vcpu-ubuntu-2404 # kilocode_change outputs: is-member: ${{ steps.check.outputs['is-member'] }} steps: diff --git a/.github/workflows/close-issues.yml b/.github/workflows/close-issues.yml deleted file mode 100644 index c071fd5bc8..0000000000 --- a/.github/workflows/close-issues.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: close-issues - -on: - schedule: - - cron: "0 2 * * *" # Daily at 2:00 AM - workflow_dispatch: - -jobs: - close: - if: github.repository == 'anomalyco/opencode' # kilocode_change - Kilo uses kilo-auto-close.yml - runs-on: ubuntu-latest - permissions: - contents: read - issues: write - steps: - - uses: actions/checkout@v6 # kilocode_change - - - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 - with: - bun-version: latest - - - name: Close stale issues - env: - GITHUB_TOKEN: ${{ github.token }} - run: bun script/github/close-issues.ts diff --git a/.github/workflows/close-stale-prs.yml b/.github/workflows/close-stale-prs.yml deleted file mode 100644 index 3e7b1db14b..0000000000 --- a/.github/workflows/close-stale-prs.yml +++ /dev/null @@ -1,236 +0,0 @@ -name: close-stale-prs # kilocode_change - -on: - workflow_dispatch: - inputs: - dryRun: - description: "Log actions without closing PRs" - type: boolean - default: false - schedule: - - cron: "0 6 * * *" - -permissions: - contents: read - issues: write - pull-requests: write - -jobs: - close-stale-prs: - if: github.repository == 'anomalyco/opencode' # kilocode_change - Kilo uses kilo-auto-close.yml - runs-on: blacksmith-2vcpu-ubuntu-2404 # kilocode_change - timeout-minutes: 15 - steps: - - name: Close inactive PRs - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const DAYS_INACTIVE = 60 - const MAX_RETRIES = 3 - - // Adaptive delay: fast for small batches, slower for large to respect - // GitHub's 80 content-generating requests/minute limit - const SMALL_BATCH_THRESHOLD = 10 - const SMALL_BATCH_DELAY_MS = 1000 // 1s for daily operations (≤10 PRs) - const LARGE_BATCH_DELAY_MS = 2000 // 2s for backlog (>10 PRs) = ~30 ops/min, well under 80 limit - - const startTime = Date.now() - const cutoff = new Date(Date.now() - DAYS_INACTIVE * 24 * 60 * 60 * 1000) - const { owner, repo } = context.repo - const dryRun = context.payload.inputs?.dryRun === "true" - - core.info(`Dry run mode: ${dryRun}`) - core.info(`Cutoff date: ${cutoff.toISOString()}`) - - function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)) - } - - async function withRetry(fn, description = 'API call') { - let lastError - for (let attempt = 0; attempt < MAX_RETRIES; attempt++) { - try { - const result = await fn() - return result - } catch (error) { - lastError = error - const isRateLimited = error.status === 403 && - (error.message?.includes('rate limit') || error.message?.includes('secondary')) - - if (!isRateLimited) { - throw error - } - - // Parse retry-after header, default to 60 seconds - const retryAfter = error.response?.headers?.['retry-after'] - ? parseInt(error.response.headers['retry-after']) - : 60 - - // Exponential backoff: retryAfter * 2^attempt - const backoffMs = retryAfter * 1000 * Math.pow(2, attempt) - - core.warning(`${description}: Rate limited (attempt ${attempt + 1}/${MAX_RETRIES}). Waiting ${backoffMs / 1000}s before retry...`) - - await sleep(backoffMs) - } - } - core.error(`${description}: Max retries (${MAX_RETRIES}) exceeded`) - throw lastError - } - - const query = ` - query($owner: String!, $repo: String!, $cursor: String) { - repository(owner: $owner, name: $repo) { - pullRequests(first: 100, states: OPEN, after: $cursor) { - pageInfo { - hasNextPage - endCursor - } - nodes { - number - title - author { - login - } - createdAt - commits(last: 1) { - nodes { - commit { - committedDate - } - } - } - comments(last: 1) { - nodes { - createdAt - } - } - reviews(last: 1) { - nodes { - createdAt - } - } - } - } - } - } - ` - - const allPrs = [] - let cursor = null - let hasNextPage = true - let pageCount = 0 - - while (hasNextPage) { - pageCount++ - core.info(`Fetching page ${pageCount} of open PRs...`) - - const result = await withRetry( - () => github.graphql(query, { owner, repo, cursor }), - `GraphQL page ${pageCount}` - ) - - allPrs.push(...result.repository.pullRequests.nodes) - hasNextPage = result.repository.pullRequests.pageInfo.hasNextPage - cursor = result.repository.pullRequests.pageInfo.endCursor - - core.info(`Page ${pageCount}: fetched ${result.repository.pullRequests.nodes.length} PRs (total: ${allPrs.length})`) - - // Delay between pagination requests (use small batch delay for reads) - if (hasNextPage) { - await sleep(SMALL_BATCH_DELAY_MS) - } - } - - core.info(`Found ${allPrs.length} open pull requests`) - - const stalePrs = allPrs.filter((pr) => { - const dates = [ - new Date(pr.createdAt), - pr.commits.nodes[0] ? new Date(pr.commits.nodes[0].commit.committedDate) : null, - pr.comments.nodes[0] ? new Date(pr.comments.nodes[0].createdAt) : null, - pr.reviews.nodes[0] ? new Date(pr.reviews.nodes[0].createdAt) : null, - ].filter((d) => d !== null) - - const lastActivity = dates.sort((a, b) => b.getTime() - a.getTime())[0] - - if (!lastActivity || lastActivity > cutoff) { - core.info(`PR #${pr.number} is fresh (last activity: ${lastActivity?.toISOString() || "unknown"})`) - return false - } - - core.info(`PR #${pr.number} is STALE (last activity: ${lastActivity.toISOString()})`) - return true - }) - - if (!stalePrs.length) { - core.info("No stale pull requests found.") - return - } - - core.info(`Found ${stalePrs.length} stale pull requests`) - - // ============================================ - // Close stale PRs - // ============================================ - const requestDelayMs = stalePrs.length > SMALL_BATCH_THRESHOLD - ? LARGE_BATCH_DELAY_MS - : SMALL_BATCH_DELAY_MS - - core.info(`Using ${requestDelayMs}ms delay between operations (${stalePrs.length > SMALL_BATCH_THRESHOLD ? 'large' : 'small'} batch mode)`) - - let closedCount = 0 - let skippedCount = 0 - - for (const pr of stalePrs) { - const issue_number = pr.number - const closeComment = `Closing this pull request because it has had no updates for more than ${DAYS_INACTIVE} days. If you plan to continue working on it, feel free to reopen or open a new PR.` - - if (dryRun) { - core.info(`[dry-run] Would close PR #${issue_number} from ${pr.author?.login || 'unknown'}: ${pr.title}`) - continue - } - - try { - // Add comment - await withRetry( - () => github.rest.issues.createComment({ - owner, - repo, - issue_number, - body: closeComment, - }), - `Comment on PR #${issue_number}` - ) - - // Close PR - await withRetry( - () => github.rest.pulls.update({ - owner, - repo, - pull_number: issue_number, - state: "closed", - }), - `Close PR #${issue_number}` - ) - - closedCount++ - core.info(`Closed PR #${issue_number} from ${pr.author?.login || 'unknown'}: ${pr.title}`) - - // Delay before processing next PR - await sleep(requestDelayMs) - } catch (error) { - skippedCount++ - core.error(`Failed to close PR #${issue_number}: ${error.message}`) - } - } - - const elapsed = Math.round((Date.now() - startTime) / 1000) - core.info(`\n========== Summary ==========`) - core.info(`Total open PRs found: ${allPrs.length}`) - core.info(`Stale PRs identified: ${stalePrs.length}`) - core.info(`PRs closed: ${closedCount}`) - core.info(`PRs skipped (errors): ${skippedCount}`) - core.info(`Elapsed time: ${elapsed}s`) - core.info(`=============================`) diff --git a/.github/workflows/codeql-kotlin.yml b/.github/workflows/codeql-kotlin.yml index 5f0cec56c8..8ac284fcec 100644 --- a/.github/workflows/codeql-kotlin.yml +++ b/.github/workflows/codeql-kotlin.yml @@ -19,6 +19,7 @@ on: jobs: analyze: name: Analyze (java-kotlin) + if: github.event_name == 'workflow_dispatch' || github.repository == 'Kilo-Org/kilocode' runs-on: ubuntu-latest permissions: security-events: write @@ -39,6 +40,12 @@ jobs: distribution: temurin java-version: "21" + - name: Free disk space for CodeQL + shell: bash + run: | + sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/boost + docker system prune --all --force || true + - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 with: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 86b7a69a05..af3851afcb 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -24,6 +24,7 @@ on: jobs: analyze: name: Analyze (${{ matrix.language }}) + if: github.event_name == 'workflow_dispatch' || github.repository == 'Kilo-Org/kilocode' # Runner size impacts CodeQL analysis time. To learn more, please see: # - https://gh.io/recommended-hardware-resources-for-running-codeql # - https://gh.io/supported-runners-and-hardware-resources diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 797252b7fd..8d3ca8877b 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -3,7 +3,7 @@ name: containers on: push: branches: - - dev + - main # kilocode_change paths: - packages/containers/** - .github/workflows/containers.yml @@ -16,6 +16,7 @@ permissions: jobs: build: + if: github.event_name == 'workflow_dispatch' || github.repository == 'Kilo-Org/kilocode' # kilocode_change runs-on: blacksmith-4vcpu-ubuntu-2404 steps: # kilocode_change start diff --git a/.github/workflows/disabled/close-issues.yml.disabled b/.github/workflows/disabled/close-issues.yml.disabled new file mode 100644 index 0000000000..b8a2e3f575 --- /dev/null +++ b/.github/workflows/disabled/close-issues.yml.disabled @@ -0,0 +1,24 @@ +name: close-issues + +on: + schedule: + - cron: "0 2 * * *" # Daily at 2:00 AM + workflow_dispatch: + +jobs: + close: + runs-on: ubuntu-latest + permissions: + contents: read + issues: write + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + + - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 + with: + bun-version: latest + + - name: Close stale issues + env: + GITHUB_TOKEN: ${{ github.token }} + run: bun script/github/close-issues.ts diff --git a/.github/workflows/disabled/duplicate-issues.yml.disabled b/.github/workflows/disabled/duplicate-issues.yml.disabled new file mode 100644 index 0000000000..c90320bd45 --- /dev/null +++ b/.github/workflows/disabled/duplicate-issues.yml.disabled @@ -0,0 +1,177 @@ +name: duplicate-issues + +on: + issues: + types: [opened, edited] + +jobs: + check-duplicates: + if: github.event.action == 'opened' + runs-on: blacksmith-4vcpu-ubuntu-2404 + permissions: + contents: read + issues: write + steps: + - name: Checkout repository + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + fetch-depth: 1 + + - uses: ./.github/actions/setup-bun + + - name: Install opencode + run: curl -fsSL https://kilo.ai/install | bash + + - name: Check duplicates and compliance + env: + OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + KILO_PERMISSION: | + { + "bash": { + "*": "deny", + "gh issue*": "allow" + }, + "webfetch": "deny" + } + run: | + opencode run -m opencode/claude-sonnet-4-6 "A new issue has been created: + + Issue number: ${{ github.event.issue.number }} + + Lookup this issue with gh issue view ${{ github.event.issue.number }}. + + You have TWO tasks. Perform both, then post a SINGLE comment (if needed). + + --- + + TASK 1: CONTRIBUTING GUIDELINES COMPLIANCE CHECK + + Check whether the issue follows our contributing guidelines and issue templates. + + This project has three issue templates that every issue MUST use one of: + + 1. Bug Report - requires a Description field with real content + 2. Feature Request - requires a verification checkbox and description, title should start with [FEATURE]: + 3. Question - requires the Question field with real content + + Additionally check: + - No AI-generated walls of text (long, AI-generated descriptions are not acceptable) + - The issue has real content, not just template placeholder text left unchanged + - Bug reports should include some context about how to reproduce + - Feature requests should explain the problem or need + - We want to push for having the user provide system description & information + + Do NOT be nitpicky about optional fields. Only flag real problems like: no template used, required fields empty or placeholder text only, obviously AI-generated walls of text, or completely empty/nonsensical content. + + --- + + TASK 2: DUPLICATE CHECK + + Search through existing issues (excluding #${{ github.event.issue.number }}) to find potential duplicates. + Consider: + 1. Similar titles or descriptions + 2. Same error messages or symptoms + 3. Related functionality or components + 4. Similar feature requests + + Additionally, if the issue mentions keybinds, keyboard shortcuts, or key bindings, note the pinned keybinds issue #4997. + + --- + + POSTING YOUR COMMENT: + + Based on your findings, post a SINGLE comment on issue #${{ github.event.issue.number }}. Build the comment as follows: + + If the issue is NOT compliant, start the comment with: + + Then explain what needs to be fixed and that they have 2 hours to edit the issue before it is automatically closed. Also add the label needs:compliance to the issue using: gh issue edit ${{ github.event.issue.number }} --add-label needs:compliance + + If duplicates were found, include a section about potential duplicates with links. + + If the issue mentions keybinds/keyboard shortcuts, include a note about #4997. + + If the issue IS compliant AND no duplicates were found AND no keybind reference, do NOT comment at all. + + Use this format for the comment: + + [If not compliant:] + + This issue doesn't fully meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md). + + **What needs to be fixed:** + - [specific reasons] + + Please edit this issue to address the above within **2 hours**, or it will be automatically closed. + + [If duplicates found, add:] + --- + This issue might be a duplicate of existing issues. Please check: + - #[issue_number]: [brief description of similarity] + + [If keybind-related, add:] + For keybind-related issues, please also check our pinned keybinds documentation: #4997 + + [End with if not compliant:] + If you believe this was flagged incorrectly, please let a maintainer know. + + Remember: post at most ONE comment combining all findings. If everything is fine, post nothing." + + recheck-compliance: + if: github.event.action == 'edited' && contains(github.event.issue.labels.*.name, 'needs:compliance') # kilocode_change + runs-on: blacksmith-4vcpu-ubuntu-2404 + permissions: + contents: read + issues: write + steps: + - name: Checkout repository + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + fetch-depth: 1 + + - uses: ./.github/actions/setup-bun + + - name: Install opencode + run: curl -fsSL https://kilo.ai/install | bash + + - name: Recheck compliance + env: + OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + KILO_PERMISSION: | + { + "bash": { + "*": "deny", + "gh issue*": "allow" + }, + "webfetch": "deny" + } + run: | + opencode run -m opencode/claude-sonnet-4-6 "Issue #${{ github.event.issue.number }} was previously flagged as non-compliant and has been edited. + + Lookup this issue with gh issue view ${{ github.event.issue.number }}. + + Re-check whether the issue now follows our contributing guidelines and issue templates. + + This project has three issue templates that every issue MUST use one of: + + 1. Bug Report - requires a Description field with real content + 2. Feature Request - requires a verification checkbox and description, title should start with [FEATURE]: + 3. Question - requires the Question field with real content + + Additionally check: + - No AI-generated walls of text (long, AI-generated descriptions are not acceptable) + - The issue has real content, not just template placeholder text left unchanged + - Bug reports should include some context about how to reproduce + - Feature requests should explain the problem or need + - We want to push for having the user provide system description & information + + Do NOT be nitpicky about optional fields. Only flag real problems like: no template used, required fields empty or placeholder text only, obviously AI-generated walls of text, or completely empty/nonsensical content. + + If the issue is NOW compliant: + 1. Remove the needs:compliance label: gh issue edit ${{ github.event.issue.number }} --remove-label needs:compliance + 2. Find and delete the previous compliance comment (the one containing ) using: gh api repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments --jq '.[] | select(.body | contains(\"\")) | .id' then delete it with: gh api -X DELETE repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments/{id} + 3. Post a short comment thanking them for updating the issue. + + If the issue is STILL not compliant: + Post a comment explaining what still needs to be fixed. Keep the needs:compliance label." diff --git a/.github/workflows/disabled/triage.yml.disabled b/.github/workflows/disabled/triage.yml.disabled new file mode 100644 index 0000000000..0b2c9d89a1 --- /dev/null +++ b/.github/workflows/disabled/triage.yml.disabled @@ -0,0 +1,37 @@ +name: triage + +on: + issues: + types: [opened] + +jobs: + triage: + runs-on: blacksmith-4vcpu-ubuntu-2404 + permissions: + contents: read + issues: write + steps: + - name: Checkout repository + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + fetch-depth: 1 + + - name: Setup Bun + uses: ./.github/actions/setup-bun + + - name: Install opencode + run: curl -fsSL https://kilo.ai/install | bash + + - name: Triage issue + env: + OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE_NUMBER: ${{ github.event.issue.number }} + ISSUE_TITLE: ${{ github.event.issue.title }} + ISSUE_BODY: ${{ github.event.issue.body }} + run: | + opencode run --agent triage "The following issue was just opened, triage it: + + Title: $ISSUE_TITLE + + $ISSUE_BODY" diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml index 316fa74838..cf25f78470 100644 --- a/.github/workflows/docs-build.yml +++ b/.github/workflows/docs-build.yml @@ -13,7 +13,7 @@ on: jobs: build: name: Build docs site - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: blacksmith-4vcpu-ubuntu-2404 # kilocode_change steps: - name: Checkout repository uses: actions/checkout@v6 # kilocode_change diff --git a/.github/workflows/docs-sync.yml b/.github/workflows/docs-sync.yml new file mode 100644 index 0000000000..147cde8a47 --- /dev/null +++ b/.github/workflows/docs-sync.yml @@ -0,0 +1,238 @@ +# kilocode_change - new file +name: docs-sync + +# Daily bot: collects PRs merged to Kilo-Org/cloud and Kilo-Org/kilocode, +# triages them for docs relevance, runs Kilo CLI headless to update +# packages/kilo-docs, and maintains one rolling PR for human review. +# +# Security posture: scheduled/manual runs check out the dispatched ref and may +# push/comment with write permissions and org secrets. PR runs (paths-limited to +# this workflow and .github/docs-sync/**) execute branch code only in a +# read-only, secretless `selftest` job that never pushes, comments, or calls an +# LLM. `pull_request` (not `pull_request_target`) keeps fork tokens read-only. +# State is derived from the bot's own PRs (watermark marker in the PR body), so +# missed or failed runs self-heal on the next run. + +on: + schedule: + - cron: "0 7 * * *" # 07:00 UTC daily + workflow_dispatch: + inputs: + since: + description: "Override watermark (ISO date, e.g. 2026-07-20). Default: last processed-through marker, 72h fallback, 14d cap." + required: false + type: string + dry_run: + description: "Collect + triage only, no edits, no PR" + type: boolean + default: false + pull_request: + paths: + - ".github/docs-sync/**" + - ".github/workflows/docs-sync.yml" + +permissions: + contents: write # push the rolling branch, create the auto-docs label + pull-requests: write # create/update the rolling PR + issues: write # comment on the rolling PR + +concurrency: + group: ${{ github.event_name == 'pull_request' && format('docs-sync-pr-{0}', github.event.pull_request.number) || 'docs-sync' }} + cancel-in-progress: false + +env: + TRIAGE_MODEL: ${{ vars.DOCS_SYNC_TRIAGE_MODEL || 'kilo/moonshotai/kimi-k3' }} + EDIT_MODEL: ${{ vars.DOCS_SYNC_EDIT_MODEL || 'kilo/moonshotai/kimi-k3' }} + +jobs: + selftest: + if: github.repository == 'Kilo-Org/kilocode' + runs-on: blacksmith-4vcpu-ubuntu-2404 + permissions: + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Setup Node + uses: actions/setup-node@v6 + with: + node-version: "24" + package-manager-cache: false + + - name: Run docs-sync selftest + run: node .github/docs-sync/selftest.mjs + + sync: + if: github.repository == 'Kilo-Org/kilocode' && github.event_name != 'pull_request' + runs-on: blacksmith-4vcpu-ubuntu-2404 + # Budget: 4 setup/collect + 90 triage + 120 edit + 2 verify + 10 fix + 2 upsert = 228 min, 12-minute reserve. + # These are ceilings, not costs: a caught-up run triages ~2 chunks and edits + # ~1 batch and finishes in ~25 min. The old 35/50 pair was the binding + # constraint on backlog drain — run 30306629290 deferred 54 PRs untriaged and + # 31 unedited purely on budget, with no attempt made. See the throughput note + # in the PR description for the arithmetic. + timeout-minutes: 240 + env: + # Both are required: without KILO_ORG_ID the gateway bills the key + # owner's personal balance (402 "Add credits") instead of the org. + KILO_API_KEY: ${{ secrets.KILO_API_KEY }} + KILO_ORG_ID: ${{ secrets.KILO_ORG_ID }} + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 0 # prepare-branch merges main into the rolling branch + + - name: Configure git identity + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + - name: Setup Node + uses: actions/setup-node@v6 + with: + node-version: "24" + package-manager-cache: false + + - name: Run docs-sync selftest + run: node .github/docs-sync/selftest.mjs + + - name: Install Kilo CLI + run: | + npm install -g @kilocode/cli + kilo --version + + - name: Resolve watermark + id: wm + env: + GH_TOKEN: ${{ github.token }} + INPUT_SINCE: ${{ inputs.since }} + run: node .github/docs-sync/watermark.mjs + + - name: Collect merged PRs + id: collect + env: + GH_TOKEN: ${{ github.token }} + run: node .github/docs-sync/collect.mjs --since "${{ steps.wm.outputs.since }}" + + - name: Triage merged PRs (LLM, chunked) + id: triage + if: steps.collect.outputs.count != '0' + env: + SINCE_OVERRIDE: ${{ steps.wm.outputs.since_override }} + # Default 35 fit only 8 of 11 chunks on a 254-PR window. Headroom for + # --auto making chunks slower now that the agent really runs commands. + TRIAGE_BUDGET_MINUTES: "90" + run: node .github/docs-sync/triage.mjs + + - name: Filter docs-worthy PRs + id: worthy + if: steps.collect.outputs.count != '0' + run: | + node .github/docs-sync/filter-worthy.mjs \ + docs-sync-out/digest-full.json docs-sync-out/triage.json docs-sync-out/worthy.json + count=$(node -p "require('./docs-sync-out/worthy.json').length") + echo "count=$count" >> "$GITHUB_OUTPUT" + if [ "$count" = "0" ]; then + echo "No docs-worthy PRs in this window; skipping edit/verify/PR." + fi + + - name: Setup Bun + if: (steps.worthy.outputs.count || '0') != '0' && inputs.dry_run != true + uses: ./.github/actions/setup-bun + + - name: Prepare rolling branch + id: prep + if: (steps.worthy.outputs.count || '0') != '0' && inputs.dry_run != true + env: + GH_TOKEN: ${{ github.token }} + run: node .github/docs-sync/prepare-branch.mjs + + # After prepare-branch checks out the rolling branch and merges main, the + # worktree holds main's scripts. Restore the dispatched ref's copies so a + # branch-dispatch AC9 run actually exercises the fixed code. git restore + # (not checkout) leaves them unstaged so upsert-pr's bare commit won't + # include them in the docs PR. + - name: Restore docs-sync scripts from the dispatched ref + if: (steps.worthy.outputs.count || '0') != '0' && inputs.dry_run != true + run: git restore --source=${{ github.sha }} -- .github/docs-sync + + - name: Update docs (Kilo CLI, batched) + if: (steps.worthy.outputs.count || '0') != '0' && inputs.dry_run != true + continue-on-error: true + env: + # Default 50 fit only 4 of 11 batches. A healthy --auto batch is ~8 min, + # and edit.mjs will not start a batch without EDIT_BATCH_TIMEOUT_MINUTES + # (15) left, so 120 covers 14 batches = 70 PRs against ~5 worthy/day. + EDIT_BUDGET_MINUTES: "120" + run: node .github/docs-sync/edit.mjs + + - name: Verify docs build and tests + id: verify + if: (steps.worthy.outputs.count || '0') != '0' && inputs.dry_run != true + continue-on-error: true + env: + NEXT_PUBLIC_POSTHOG_KEY: ${{ secrets.POSTHOG_API_KEY }} + run: | + set -o pipefail + { bun run --filter @kilocode/kilo-docs build && bun run --filter @kilocode/kilo-docs test; } 2>&1 | tee docs-sync-out/verify.log + + - name: Fix verify failures (one pass) + id: fix + if: steps.verify.outcome == 'failure' + continue-on-error: true + timeout-minutes: 10 + env: + NEXT_PUBLIC_POSTHOG_KEY: ${{ secrets.POSTHOG_API_KEY }} + run: | + set -o pipefail + # Headless kilo run auto-rejects every permission ask; the runner has no + # user config granting bash, so without --auto the agent cannot run ordinary + # shell commands against the repository. + kilo run --auto "The docs build or tests failed. Read the attached docs-sync-out/verify.log and fix the packages/kilo-docs changes so they pass. Do not revert doc edits; fix them. Do not modify anything outside packages/kilo-docs." \ + -m "$EDIT_MODEL" --dir "$GITHUB_WORKSPACE" -f docs-sync-out/verify.log \ + | node .github/docs-sync/redact-stream.mjs \ + | tee -a docs-sync-out/edit-log.txt \ + || echo "::warning::kilo fix pass exited nonzero; re-verifying anyway" + # The rebuild below decides this step's outcome, not the agent's exit code. + # Without the guard above, `set -o pipefail` + the default `bash -e` would + # abort here once the CLI half of this PR ships: a mid-stream session error + # (or an auto-rejected ask) exits 1, verify2.log is never written, and + # `Re-verify status` reports VERIFIED=false even when the docs build fine. + { bun run --filter @kilocode/kilo-docs build && bun run --filter @kilocode/kilo-docs test; } 2>&1 | tee docs-sync-out/verify2.log + + - name: Re-verify status + id: verified + if: (steps.worthy.outputs.count || '0') != '0' && inputs.dry_run != true + env: + VERIFY_OUTCOME: ${{ steps.verify.outcome }} + FIX_OUTCOME: ${{ steps.fix.outcome }} + run: | + if [ "$VERIFY_OUTCOME" = "success" ] || [ "$FIX_OUTCOME" = "success" ]; then + echo "ok=true" >> "$GITHUB_OUTPUT" + else + echo "ok=false" >> "$GITHUB_OUTPUT" + fi + + - name: Upsert rolling PR + if: (steps.worthy.outputs.count || '0') != '0' && inputs.dry_run != true + env: + GH_TOKEN: ${{ github.token }} + PROCESSED_THROUGH: ${{ steps.wm.outputs.now }} + SINCE: ${{ steps.wm.outputs.since }} + SINCE_OVERRIDE: ${{ steps.wm.outputs.since_override }} + BRANCH: ${{ steps.prep.outputs.branch }} + PREP_MODE: ${{ steps.prep.outputs.mode }} + PR_NUMBER: ${{ steps.prep.outputs.pr_number }} + VERIFIED: ${{ steps.verified.outputs.ok }} + run: node .github/docs-sync/upsert-pr.mjs + + - name: Upload run artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: docs-sync-out + path: docs-sync-out/ + retention-days: 14 + if-no-files-found: ignore diff --git a/.github/workflows/duplicate-issues.yml b/.github/workflows/duplicate-issues.yml deleted file mode 100644 index cf02d8e0a4..0000000000 --- a/.github/workflows/duplicate-issues.yml +++ /dev/null @@ -1,185 +0,0 @@ -name: duplicate-issues - -on: - issues: - types: [opened, edited] - -jobs: - check-duplicates: - if: false # kilocode_change - disabled: not needed in kilocode repo - runs-on: blacksmith-4vcpu-ubuntu-2404 - permissions: - contents: read - issues: write - steps: - - name: Checkout repository - uses: actions/checkout@v6 # kilocode_change - with: - fetch-depth: 1 - - - uses: ./.github/actions/setup-bun - - # kilocode_change start - - name: Setup Kilo - uses: ./.github/actions/setup-kilo - # kilocode_change end - - - name: Check duplicates and compliance - env: - KILO_API_KEY: ${{ secrets.KILO_API_KEY }} - KILO_ORG_ID: ${{ secrets.KILO_ORG_ID }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - KILO_PERMISSION: | - { - "bash": { - "*": "deny", - "gh issue*": "allow" - }, - "webfetch": "deny" - } - run: | - kilo run -m "kilo/anthropic/claude-haiku-4.5" "A new issue has been created: - - Issue number: ${{ github.event.issue.number }} - - Lookup this issue with gh issue view ${{ github.event.issue.number }}. - - You have TWO tasks. Perform both, then post a SINGLE comment (if needed). - - --- - - TASK 1: CONTRIBUTING GUIDELINES COMPLIANCE CHECK - - Check whether the issue follows our contributing guidelines and issue templates. - - This project has three issue templates that every issue MUST use one of: - - 1. Bug Report - requires a Description field with real content - 2. Feature Request - requires a verification checkbox and description, title should start with [FEATURE]: - 3. Question - requires the Question field with real content - - Additionally check: - - No AI-generated walls of text (long, AI-generated descriptions are not acceptable) - - The issue has real content, not just template placeholder text left unchanged - - Bug reports should include some context about how to reproduce - - Feature requests should explain the problem or need - - We want to push for having the user provide system description & information - - Do NOT be nitpicky about optional fields. Only flag real problems like: no template used, required fields empty or placeholder text only, obviously AI-generated walls of text, or completely empty/nonsensical content. - - --- - - TASK 2: DUPLICATE CHECK - - Search through existing issues (excluding #${{ github.event.issue.number }}) to find potential duplicates. - Consider: - 1. Similar titles or descriptions - 2. Same error messages or symptoms - 3. Related functionality or components - 4. Similar feature requests - - Additionally, if the issue mentions keybinds, keyboard shortcuts, or key bindings, note the pinned keybinds issue #4997. - - --- - - POSTING YOUR COMMENT: - - Based on your findings, post a SINGLE comment on issue #${{ github.event.issue.number }}. Build the comment as follows: - - If the issue is NOT compliant, start the comment with: - - Then explain what needs to be fixed and that they have 2 hours to edit the issue before it is automatically closed. Also add the label needs:compliance to the issue using: gh issue edit ${{ github.event.issue.number }} --add-label needs:compliance - - If duplicates were found, include a section about potential duplicates with links. - - If the issue mentions keybinds/keyboard shortcuts, include a note about #4997. - - If the issue IS compliant AND no duplicates were found AND no keybind reference, do NOT comment at all. - - Use this format for the comment: - - [If not compliant:] - - This issue doesn't fully meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md). - - **What needs to be fixed:** - - [specific reasons] - - Please edit this issue to address the above within **2 hours**, or it will be automatically closed. - - [If duplicates found, add:] - --- - This issue might be a duplicate of existing issues. Please check: - - #[issue_number]: [brief description of similarity] - - [If keybind-related, add:] - For keybind-related issues, please also check our pinned keybinds documentation: #4997 - - [End with if not compliant:] - If you believe this was flagged incorrectly, please let a maintainer know. - - Remember: post at most ONE comment combining all findings. If everything is fine, post nothing." - - recheck-compliance: - if: github.event.action == 'edited' && contains(github.event.issue.labels.*.name, 'needs:compliance') - runs-on: blacksmith-4vcpu-ubuntu-2404 - permissions: - contents: read - issues: write - steps: - - name: Checkout repository - uses: actions/checkout@v6 # kilocode_change - with: - fetch-depth: 1 - - - uses: ./.github/actions/setup-bun - - # kilocode_change start - - name: Setup Kilo - uses: ./.github/actions/setup-kilo - # kilocode_change end - - - name: Recheck compliance - env: - # kilocode_change start - KILO_API_KEY: ${{ secrets.KILO_API_KEY }} - KILO_ORG_ID: ${{ secrets.KILO_ORG_ID }} - # kilocode_change end - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - KILO_PERMISSION: | - { - "bash": { - "*": "deny", - "gh issue*": "allow" - }, - "webfetch": "deny" - } - run: | - kilo run -m "kilo/anthropic/claude-haiku-4.5" "Issue #${{ github.event.issue.number }} was previously flagged as non-compliant and has been edited. - - Lookup this issue with gh issue view ${{ github.event.issue.number }}. - - Re-check whether the issue now follows our contributing guidelines and issue templates. - - This project has three issue templates that every issue MUST use one of: - - 1. Bug Report - requires a Description field with real content - 2. Feature Request - requires a verification checkbox and description, title should start with [FEATURE]: - 3. Question - requires the Question field with real content - - Additionally check: - - No AI-generated walls of text (long, AI-generated descriptions are not acceptable) - - The issue has real content, not just template placeholder text left unchanged - - Bug reports should include some context about how to reproduce - - Feature requests should explain the problem or need - - We want to push for having the user provide system description & information - - Do NOT be nitpicky about optional fields. Only flag real problems like: no template used, required fields empty or placeholder text only, obviously AI-generated walls of text, or completely empty/nonsensical content. - - If the issue is NOW compliant: - 1. Remove the needs:compliance label: gh issue edit ${{ github.event.issue.number }} --remove-label needs:compliance - 2. Find and delete the previous compliance comment (the one containing ) using: gh api repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments --jq '.[] | select(.body | contains(\"\")) | .id' then delete it with: gh api -X DELETE repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments/{id} - 3. Post a short comment thanking them for updating the issue. - - If the issue is STILL not compliant: - Post a comment explaining what still needs to be fixed. Keep the needs:compliance label." diff --git a/.github/workflows/nix-hashes.yml b/.github/workflows/nix-hashes.yml index 8d9980049f..701957c36e 100644 --- a/.github/workflows/nix-hashes.yml +++ b/.github/workflows/nix-hashes.yml @@ -57,14 +57,24 @@ jobs: BUILD_LOG=$(mktemp) trap 'rm -f "$BUILD_LOG"' EXIT - # Build with fakeHash to trigger hash mismatch and reveal correct hash - nix build ".#packages.${SYSTEM}.node_modules_updater" --no-link 2>&1 | tee "$BUILD_LOG" || true + HASH="" + MAX_ATTEMPTS=3 + for ((ATTEMPT = 1; ATTEMPT <= MAX_ATTEMPTS; ATTEMPT++)); do + # Build with fakeHash to trigger hash mismatch and reveal correct hash + nix build ".#packages.${SYSTEM}.node_modules_updater" --no-link 2>&1 | tee "$BUILD_LOG" || true - # Extract hash from build log with portability - HASH="$(nix run --inputs-from . nixpkgs#gnugrep -- -oP 'got:\s*\Ksha256-[A-Za-z0-9+/=]+' "$BUILD_LOG" | tail -n1 || true)" + HASH="$(nix run --inputs-from . nixpkgs#gnugrep -- -oP 'got:\s*\Ksha256-[A-Za-z0-9+/=]+' "$BUILD_LOG" | tail -n1 || true)" + + [ -n "$HASH" ] && break + + if [ "$ATTEMPT" -lt "$MAX_ATTEMPTS" ]; then + echo "::warning::Attempt ${ATTEMPT}/${MAX_ATTEMPTS} produced no hash for ${SYSTEM}; retrying in $((ATTEMPT * 10))s" + sleep $((ATTEMPT * 10)) + fi + done if [ -z "$HASH" ]; then - echo "::error::Failed to compute hash for ${SYSTEM}" + echo "::error::Failed to compute hash for ${SYSTEM} after ${MAX_ATTEMPTS} attempts" cat "$BUILD_LOG" exit 1 fi diff --git a/.github/workflows/publish-jetbrains-bundled.yml b/.github/workflows/publish-jetbrains-bundled.yml new file mode 100644 index 0000000000..5908b25e73 --- /dev/null +++ b/.github/workflows/publish-jetbrains-bundled.yml @@ -0,0 +1,341 @@ +# kilocode_change - new file +name: publish-jetbrains-bundled + +on: + workflow_dispatch: + inputs: + pr: + description: Merged JetBrains release PR number to bundle + required: true + type: string + merge_commit: + description: Merge commit SHA from the reviewed release PR + required: true + type: string + +concurrency: + group: publish-jetbrains-bundled-pr-${{ inputs.pr }} + cancel-in-progress: false + +permissions: + contents: read + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + +jobs: + validate: + if: github.repository == 'Kilo-Org/kilocode' + runs-on: blacksmith-4vcpu-ubuntu-2404 + permissions: + contents: read + pull-requests: read + outputs: + version: ${{ steps.release.outputs.version }} + kind: ${{ steps.release.outputs.kind }} + tag: ${{ steps.release.outputs.tag }} + channel: ${{ steps.release.outputs.marketplace_channel }} + steps: + - name: Checkout trusted validation scripts + uses: actions/checkout@v6 + with: + fetch-depth: 0 + ref: main + + - name: Setup Bun for validation + uses: ./.github/actions/setup-bun + + - name: Checkout merged release PR for validation + uses: actions/checkout@v6 + with: + fetch-depth: 0 + path: release + persist-credentials: false + ref: ${{ inputs.merge_commit }} + + - name: Validate release PR and tag + id: release + working-directory: release + run: bun ../script/jetbrains-release-validate.ts --pr "$PR_NUMBER" + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + PR_NUMBER: ${{ inputs.pr }} + + bundle: + needs: validate + if: github.repository == 'Kilo-Org/kilocode' + runs-on: blacksmith-8vcpu-ubuntu-2404 + permissions: + actions: read + contents: write + outputs: + version: ${{ needs.validate.outputs.version }} + kind: ${{ needs.validate.outputs.kind }} + steps: + - name: Checkout merged release PR metadata + uses: actions/checkout@v6 + with: + fetch-depth: 0 + persist-credentials: false + ref: ${{ inputs.merge_commit }} + + - name: Save reviewed release metadata + run: | + cp packages/kilo-jetbrains/CHANGELOG.md "$RUNNER_TEMP/jetbrains-CHANGELOG.md" + cp packages/kilo-jetbrains/gradle.properties "$RUNNER_TEMP/jetbrains-gradle.properties" + + - name: Checkout release tag + uses: actions/checkout@v6 + with: + fetch-depth: 0 + ref: ${{ needs.validate.outputs.tag }} + + - name: Restore reviewed release metadata + run: | + cp "$RUNNER_TEMP/jetbrains-CHANGELOG.md" packages/kilo-jetbrains/CHANGELOG.md + cp "$RUNNER_TEMP/jetbrains-gradle.properties" packages/kilo-jetbrains/gradle.properties + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "24" + + - name: Setup Bun + uses: ./.github/actions/setup-bun + + - name: Install dependencies + run: bun install + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "21" + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Install build tools + run: | + sudo apt-get update + sudo apt-get install -y patchelf zip unzip + curl --fail --location \ + https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz \ + --output "$RUNNER_TEMP/zig.tar.xz" + echo "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982 $RUNNER_TEMP/zig.tar.xz" | sha256sum --check --status + tar -xJf "$RUNNER_TEMP/zig.tar.xz" -C "$RUNNER_TEMP" + echo "$RUNNER_TEMP/zig-linux-x86_64-0.14.0" >> "$GITHUB_PATH" + + - name: Validate signing secrets + run: | + missing=0 + for name in JETBRAINS_CERTIFICATE_CHAIN JETBRAINS_PRIVATE_KEY JETBRAINS_PRIVATE_KEY_PASSWORD; do + if [[ -z "${!name}" ]]; then + echo "Missing required secret: $name" >&2 + missing=1 + fi + done + exit "$missing" + env: + JETBRAINS_CERTIFICATE_CHAIN: ${{ secrets.JETBRAINS_CERTIFICATE_CHAIN }} + JETBRAINS_PRIVATE_KEY: ${{ secrets.JETBRAINS_PRIVATE_KEY }} + JETBRAINS_PRIVATE_KEY_PASSWORD: ${{ secrets.JETBRAINS_PRIVATE_KEY_PASSWORD }} + + - name: Write signing secrets to temp files + run: | + dir="$RUNNER_TEMP/jetbrains-signing" + mkdir -m 700 -p "$dir" + chain="$dir/certificate-chain.pem" + key="$dir/private-key.pem" + umask 077 + printf '%s' "$JETBRAINS_CERTIFICATE_CHAIN" > "$chain" + printf '%s' "$JETBRAINS_PRIVATE_KEY" > "$key" + chmod 600 "$chain" "$key" + echo "JETBRAINS_CERTIFICATE_CHAIN_FILE=$chain" >> "$GITHUB_ENV" + echo "JETBRAINS_PRIVATE_KEY_FILE=$key" >> "$GITHUB_ENV" + env: + JETBRAINS_CERTIFICATE_CHAIN: ${{ secrets.JETBRAINS_CERTIFICATE_CHAIN }} + JETBRAINS_PRIVATE_KEY: ${{ secrets.JETBRAINS_PRIVATE_KEY }} + + - name: Build signed bundled plugin + working-directory: packages/kilo-jetbrains + run: | + args=( + -Pproduction=true + -Pkilo.version="$VERSION" + -Pkilo.channel="$CHANNEL" + -Pkilo.cli.bundled=true + ) + ./gradlew clean buildPlugin signPlugin verifyPluginSignature verifyPlugin "${args[@]}" + env: + GH_TOKEN: ${{ github.token }} + GITHUB_TOKEN: ${{ github.token }} + VERSION: ${{ needs.validate.outputs.version }} + CHANNEL: ${{ needs.validate.outputs.channel }} + JETBRAINS_PRIVATE_KEY_PASSWORD: ${{ secrets.JETBRAINS_PRIVATE_KEY_PASSWORD }} + + - name: Remove signing secret temp files + if: always() + run: rm -rf "$RUNNER_TEMP/jetbrains-signing" + + - name: Resolve bundled archive + id: archive + run: | + mapfile -t signed < <(compgen -G "packages/kilo-jetbrains/build/distributions/*-signed.zip") + if [[ "${#signed[@]}" -ne 1 ]]; then + echo "Expected exactly one signed bundled JetBrains plugin ZIP, found ${#signed[@]}." >&2 + printf '%s\n' "${signed[@]}" >&2 + exit 1 + fi + asset="kilo-code-${VERSION}-bundled.zip" + dest="packages/kilo-jetbrains/build/release/$asset" + mkdir -p "$(dirname "$dest")" + cp "${signed[0]}" "$dest" + echo "asset=$asset" >> "$GITHUB_OUTPUT" + echo "path=$dest" >> "$GITHUB_OUTPUT" + env: + VERSION: ${{ needs.validate.outputs.version }} + + - name: Upload bundled ZIP to GitHub Release + run: gh release upload "$TAG" "$ARCHIVE" --clobber --repo "$GITHUB_REPOSITORY" + env: + GH_TOKEN: ${{ github.token }} + TAG: ${{ needs.validate.outputs.tag }} + ARCHIVE: ${{ steps.archive.outputs.path }} + + - name: Resolve bundled asset URL + id: asset + run: | + url="$(gh release view "$TAG" --json assets --jq '.assets[] | select(.name == env.ASSET) | .url' --repo "$GITHUB_REPOSITORY")" + if [[ -z "$url" ]]; then + echo "Could not resolve GitHub Release URL for $ASSET" >&2 + exit 1 + fi + echo "url=$url" >> "$GITHUB_OUTPUT" + env: + GH_TOKEN: ${{ github.token }} + TAG: ${{ needs.validate.outputs.tag }} + ASSET: ${{ steps.archive.outputs.asset }} + + - name: Generate stable plugin repository XML + if: needs.validate.outputs.kind == 'stable' + run: | + mkdir -p pages/jetbrains + python3 <<'PY' + import html + import io + import os + import zipfile + import xml.etree.ElementTree as ET + + archive = os.environ["ARCHIVE"] + asset = os.environ["ASSET_URL"] + version = os.environ["VERSION"] + + def plugin_xml(path): + with zipfile.ZipFile(path) as zip: + for name in zip.namelist(): + if name.endswith("META-INF/plugin.xml"): + return zip.read(name) + for name in zip.namelist(): + if not name.endswith(".jar"): + continue + with zipfile.ZipFile(io.BytesIO(zip.read(name))) as jar: + for item in jar.namelist(): + if item.endswith("META-INF/plugin.xml"): + return jar.read(item) + raise SystemExit("bundled plugin ZIP did not contain META-INF/plugin.xml") + + root = ET.fromstring(plugin_xml(archive)) + + def text(name, default=""): + item = root.find(name) + return item.text.strip() if item is not None and item.text else default + + def cdata(value): + return "", "]]]]>") + "]]>" + + plugin = text("id", "ai.kilocode.jetbrains") + name = text("name", "Kilo Code") + vendor = text("vendor", "Kilo Code") + desc = text("description") + notes = text("change-notes") + idea = root.find("idea-version") + attrs = "" + if idea is not None: + since = idea.attrib.get("since-build") + until = idea.attrib.get("until-build") + if since: + attrs += f' since-build="{html.escape(since)}"' + if until: + attrs += f' until-build="{html.escape(until)}"' + + xml = [ + '', + '', + f' ', + f' {html.escape(name)}', + f' {html.escape(vendor)}', + f' ', + ] + if desc: + xml.append(f' {cdata(desc)}') + if notes: + xml.append(f' {cdata(notes)}') + xml.extend([' ', '', '']) + with open("pages/jetbrains/updatePlugins.xml", "w", encoding="utf-8") as file: + file.write("\n".join(xml)) + PY + env: + ARCHIVE: ${{ steps.archive.outputs.path }} + ASSET_URL: ${{ steps.asset.outputs.url }} + VERSION: ${{ needs.validate.outputs.version }} + + - name: Upload stable Pages source + if: needs.validate.outputs.kind == 'stable' + uses: actions/upload-artifact@v4 + with: + name: jetbrains-pages-${{ needs.validate.outputs.version }} + path: pages + if-no-files-found: error + + - name: Upload workflow artifact + if: always() + uses: actions/upload-artifact@v4 + with: + name: kilo-jetbrains-bundled-${{ needs.validate.outputs.version }} + path: | + packages/kilo-jetbrains/build/release/*.zip + pages/jetbrains/updatePlugins.xml + if-no-files-found: ignore + + pages: + needs: bundle + if: needs.bundle.outputs.kind == 'stable' + runs-on: blacksmith-4vcpu-ubuntu-2404 + permissions: + actions: read + id-token: write + pages: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Download stable Pages source + uses: actions/download-artifact@v4 + with: + name: jetbrains-pages-${{ needs.bundle.outputs.version }} + path: pages + + - name: Configure Pages + uses: actions/configure-pages@v5 + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v4 + with: + path: pages + + - name: Deploy Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/publish-jetbrains.yml b/.github/workflows/publish-jetbrains.yml index 0b0f924444..cb976193ac 100644 --- a/.github/workflows/publish-jetbrains.yml +++ b/.github/workflows/publish-jetbrains.yml @@ -7,12 +7,23 @@ on: - closed branches: - main + workflow_dispatch: + inputs: + pr: + description: Merged JetBrains release PR number to publish + required: true + type: string + merge_commit: + description: Merge commit SHA from the reviewed release PR + required: true + type: string concurrency: - group: publish-jetbrains-pr-${{ github.event.pull_request.number }} + group: publish-jetbrains-pr-${{ github.event.pull_request.number || inputs.pr }} cancel-in-progress: false permissions: + actions: write contents: write pull-requests: read @@ -23,17 +34,23 @@ jobs: publish: if: >- github.repository == 'Kilo-Org/kilocode' && - github.event.pull_request.merged == true && - startsWith(github.event.pull_request.head.ref, 'jetbrains/release/') && - contains(github.event.pull_request.labels.*.name, 'jetbrains-release') && - github.event.pull_request.head.repo.full_name == github.repository + ( + ( + github.event_name == 'pull_request' && + github.event.pull_request.merged == true && + startsWith(github.event.pull_request.head.ref, 'jetbrains/release/') && + contains(github.event.pull_request.labels.*.name, 'jetbrains-release') && + github.event.pull_request.head.repo.full_name == github.repository + ) || + github.event_name == 'workflow_dispatch' + ) runs-on: blacksmith-8vcpu-ubuntu-2404 steps: - name: Checkout merged release PR uses: actions/checkout@v6 with: fetch-depth: 0 - ref: ${{ github.event.pull_request.merge_commit_sha }} + ref: ${{ github.event.pull_request.merge_commit_sha || inputs.merge_commit }} - name: Setup Bun for validation uses: ./.github/actions/setup-bun @@ -44,7 +61,7 @@ jobs: env: GH_TOKEN: ${{ github.token }} GH_REPO: ${{ github.repository }} - PR_NUMBER: ${{ github.event.pull_request.number }} + PR_NUMBER: ${{ github.event.pull_request.number || inputs.pr }} - name: Save reviewed release metadata run: | @@ -70,6 +87,9 @@ jobs: - name: Setup Bun uses: ./.github/actions/setup-bun + - name: Install dependencies + run: bun install + - name: Setup Java uses: actions/setup-java@v4 with: @@ -83,6 +103,12 @@ jobs: run: | sudo apt-get update sudo apt-get install -y patchelf zip + curl --fail --location \ + https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz \ + --output "$RUNNER_TEMP/zig.tar.xz" + echo "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982 $RUNNER_TEMP/zig.tar.xz" | sha256sum --check --status + tar -xJf "$RUNNER_TEMP/zig.tar.xz" -C "$RUNNER_TEMP" + echo "$RUNNER_TEMP/zig-linux-x86_64-0.14.0" >> "$GITHUB_PATH" - name: Validate publishing secrets run: | @@ -100,19 +126,11 @@ jobs: JETBRAINS_PRIVATE_KEY: ${{ secrets.JETBRAINS_PRIVATE_KEY }} JETBRAINS_PRIVATE_KEY_PASSWORD: ${{ secrets.JETBRAINS_PRIVATE_KEY_PASSWORD }} - - name: Prepare CLI resources - working-directory: packages/kilo-jetbrains - run: bun script/build.ts --production --prepare-cli - env: - KILO_VERSION: ${{ steps.release.outputs.version }} - KILO_CHANNEL: ${{ steps.release.outputs.cli_channel }} - GH_TOKEN: ${{ github.token }} - GH_REPO: ${{ github.repository }} - - name: Verify plugin working-directory: packages/kilo-jetbrains run: ./gradlew verifyPlugin -Pproduction=true -Pkilo.channel="$CHANNEL" env: + GH_TOKEN: ${{ github.token }} VERSION: ${{ steps.release.outputs.version }} CHANNEL: ${{ steps.release.outputs.marketplace_channel }} @@ -182,6 +200,19 @@ jobs: ARCHIVE: ${{ steps.archive.outputs.path }} NOTES: packages/kilo-jetbrains/build/release-notes.md + - name: Dispatch bundled GitHub release build + continue-on-error: true + run: | + gh workflow run publish-jetbrains-bundled.yml \ + --repo "$GITHUB_REPOSITORY" \ + --ref main \ + -f pr="$PR_NUMBER" \ + -f merge_commit="$MERGE_COMMIT" + env: + GH_TOKEN: ${{ github.token }} + PR_NUMBER: ${{ github.event.pull_request.number || inputs.pr }} + MERGE_COMMIT: ${{ github.event.pull_request.merge_commit_sha || inputs.merge_commit }} + - name: Upload workflow artifact if: always() uses: actions/upload-artifact@v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e937c9a36f..9d8ad01d2f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,7 +35,9 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.version || inpu permissions: id-token: write contents: write + issues: write # kilocode_change - label automated JetBrains CLI pin bump PRs packages: write + pull-requests: write # kilocode_change - create automated JetBrains CLI pin bump PRs jobs: version: @@ -84,6 +86,16 @@ jobs: - uses: ./.github/actions/setup-bun + # kilocode_change start + - name: Setup Zig for Linux sandbox helpers + run: | + curl --fail --location --retry 3 \ + https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz \ + --output "$RUNNER_TEMP/zig.tar.xz" + echo "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982 $RUNNER_TEMP/zig.tar.xz" | sha256sum --check --status + tar -xJf "$RUNNER_TEMP/zig.tar.xz" -C "$RUNNER_TEMP" + echo "$RUNNER_TEMP/zig-linux-x86_64-0.14.0" >> "$GITHUB_PATH" + # kilocode_change end - name: Build id: build run: | @@ -179,6 +191,18 @@ jobs: smoke_host() { binary="$1" "$binary" --version + helper="$(dirname "$binary")/bwrap" + if [[ "${{ matrix.target }}" == linux-* ]]; then + test -x "$helper" + grep -q '^SPDX-License-Identifier: LGPL-2.0-or-later$' "$(dirname "$binary")/licenses/bubblewrap/NOTICE" + "$helper" --version + # The live user-namespace bootstrap depends on the runner's kernel/AppArmor policy + # (GitHub-hosted Ubuntu 24.04 sets kernel.apparmor_restrict_unprivileged_userns=1), not on + # the shipped artifact. The runtime probe degrades gracefully, so keep this check non-fatal. + "$helper" --unshare-user --disable-userns --unshare-pid --die-with-parent --new-session \ + --ro-bind / / --dev /dev --proc /proc -- "$helper" --version \ + || echo "unprivileged user namespaces unavailable on this runner; skipping live sandbox check" + fi root="$(mktemp -d)" trap 'rm -rf "$root"' RETURN ( @@ -212,8 +236,10 @@ jobs: # as optional packages and must be installed for any Bun-compiled musl binary to run. apk add --no-cache libstdc++ libgcc # kilocode_change end - binary="/dist/$PACKAGE/bin/kilo" - "$binary" --version + binary="/dist/$PACKAGE/bin/kilo" # kilocode_change + "$binary" --version # kilocode_change + "/dist/$PACKAGE/bin/bwrap" --version # kilocode_change + grep -q '\''^SPDX-License-Identifier: LGPL-2.0-or-later$'\'' "/dist/$PACKAGE/bin/licenses/bubblewrap/NOTICE" # kilocode_change root="$(mktemp -d)" trap '\''rm -rf "$root"'\'' EXIT unset KILO_MODELS_PATH KILO_MODELS_URL KILO_CONFIG KILO_CONFIG_DIR @@ -232,7 +258,7 @@ jobs: name: Validate CLI (windows-${{ matrix.arch }}) needs: build-cli runs-on: ${{ matrix.runner }} - timeout-minutes: 20 + timeout-minutes: 20 # kilocode_change strategy: fail-fast: false matrix: @@ -288,7 +314,7 @@ jobs: $output = & $binary --pure models anthropic if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } if (-not ($output -match "(?m)^anthropic/")) { - throw "Compiled Windows binary did not list Anthropic models from the sidecar snapshot" + throw "Compiled Windows binary did not list Anthropic models from the embedded snapshot" } } finally { Remove-Item -Recurse -Force $root -ErrorAction SilentlyContinue diff --git a/.github/workflows/test-jetbrains.yml b/.github/workflows/test-jetbrains.yml new file mode 100644 index 0000000000..cec4ca2dbd --- /dev/null +++ b/.github/workflows/test-jetbrains.yml @@ -0,0 +1,117 @@ +# kilocode_change - new file +name: test-jetbrains + +on: + workflow_call: + workflow_dispatch: + +permissions: + contents: read + checks: write + pull-requests: read + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + +jobs: + changes: + name: detect JetBrains changes + runs-on: blacksmith-4vcpu-ubuntu-2404 + outputs: + jetbrains: ${{ github.event_name == 'workflow_dispatch' && 'true' || steps.filter.outputs.jetbrains }} + steps: + - name: Checkout repository + if: github.event_name != 'workflow_dispatch' + uses: actions/checkout@v6 + + - name: Detect JetBrains changes + if: github.event_name != 'workflow_dispatch' + id: filter + uses: Kilo-Org/paths-filter@668c092af3649c4b664c54e4b704aa46782f6f7c # v3 + with: + predicate-quantifier: every + filters: | + jetbrains: + - '**' + - '!.changeset/**' + - '!packages/kilo-vscode/**' + - '!packages/kilo-docs/**' + + unit: + name: jetbrains + needs: changes + if: github.event_name == 'workflow_dispatch' || needs.changes.outputs.jetbrains == 'true' + runs-on: blacksmith-4vcpu-ubuntu-2404 + defaults: + run: + shell: bash + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Mark workspace as git-safe + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" + + - name: Setup Bun + uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 + with: + bun-version-file: package.json + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "21" + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + with: + cache-read-only: ${{ github.ref != 'refs/heads/main' }} + + - name: Run JetBrains unit tests + run: bun script/test-ci.ts + working-directory: packages/kilo-jetbrains + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish JetBrains unit reports + if: always() + uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v6.4.0 + with: + report_paths: packages/kilo-jetbrains/.artifacts/unit/junit.xml + check_name: "unit results (jetbrains)" + detailed_summary: true + include_time_in_summary: true + fail_on_failure: false + + - name: Upload JetBrains unit artifacts + if: always() + uses: actions/upload-artifact@v7 + with: + name: unit-jetbrains-${{ github.run_attempt }} + include-hidden-files: true + if-no-files-found: ignore + retention-days: 7 + path: packages/kilo-jetbrains/.artifacts/unit/junit.xml + + required: + name: result + needs: + - changes + - unit + if: always() + runs-on: blacksmith-4vcpu-ubuntu-2404 + steps: + - name: Verify JetBrains jobs passed + run: | + echo "changes=${{ needs.changes.result }}" + echo "jetbrains=${{ needs.unit.result }}" + test "${{ needs.changes.result }}" = "success" + if [ "${{ needs.changes.outputs.jetbrains }}" = "true" ]; then + test "${{ needs.unit.result }}" = "success" + else + test "${{ needs.changes.outputs.jetbrains }}" = "false" + test "${{ needs.unit.result }}" = "skipped" + fi diff --git a/.github/workflows/test-vscode.yml b/.github/workflows/test-vscode.yml index 6056958584..a19617ef32 100644 --- a/.github/workflows/test-vscode.yml +++ b/.github/workflows/test-vscode.yml @@ -21,7 +21,7 @@ on: jobs: unit: name: unit tests - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: blacksmith-4vcpu-ubuntu-2404 # kilocode_change defaults: run: shell: bash diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 76e7f06d2c..2e02e5b705 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,14 +3,14 @@ name: test on: push: branches: - - main + - main # kilocode_change pull_request: workflow_dispatch: concurrency: - # Keep every run on main so cancelled checks do not pollute the default branch + # Keep every run on main so cancelled checks do not pollute the default branch # kilocode_change # commit history. PRs and other branches still share a group and cancel stale runs. - group: ${{ case(github.ref == 'refs/heads/main', format('{0}-{1}', github.workflow, github.run_id), format('{0}-{1}', github.workflow, github.event.pull_request.number || github.ref)) }} + group: ${{ case(github.ref == 'refs/heads/main', format('{0}-{1}', github.workflow, github.run_id), format('{0}-{1}', github.workflow, github.event.pull_request.number || github.ref)) }} # kilocode_change cancel-in-progress: true permissions: @@ -21,152 +21,258 @@ env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true jobs: + # kilocode_change start + changes: + name: detect general unit test changes + runs-on: blacksmith-4vcpu-ubuntu-2404 + permissions: + contents: read + pull-requests: read + outputs: + settings: ${{ steps.matrix.outputs.settings }} + general: ${{ steps.matrix.outputs.general }} + steps: + - name: Checkout repository + if: github.event_name != 'workflow_dispatch' + uses: actions/checkout@v6 + + - name: Detect general unit test changes + if: github.event_name != 'workflow_dispatch' + id: filter + uses: Kilo-Org/paths-filter@668c092af3649c4b664c54e4b704aa46782f6f7c # v3 + with: + predicate-quantifier: every + filters: | + general: + - '**' + - '!.changeset/**' + - '!packages/kilo-jetbrains/**' + - '!packages/kilo-vscode/**' + - '!packages/kilo-docs/**' + - '!packages/extensions/zed/**' + - '!specs/**' + - '!perf/**' + + - name: Configure unit matrix + id: matrix + env: + GENERAL: ${{ github.event_name != 'pull_request' || steps.filter.outputs.general == 'true' }} + run: | + if [ "$GENERAL" != "true" ]; then + echo 'general=false' >> "$GITHUB_OUTPUT" + echo 'settings=[{"os":"linux","index":1,"total":1,"host":"blacksmith-4vcpu-ubuntu-2404","run":false,"packages":false}]' >> "$GITHUB_OUTPUT" + exit 0 + fi + echo 'general=true' >> "$GITHUB_OUTPUT" + echo 'settings=[{"os":"linux","index":1,"total":2,"host":"blacksmith-4vcpu-ubuntu-2404","run":true,"packages":true},{"os":"linux","index":2,"total":2,"host":"blacksmith-4vcpu-ubuntu-2404","run":true,"packages":false},{"os":"macos","index":1,"total":1,"host":"macos-15","run":true,"packages":true},{"os":"windows","index":1,"total":4,"host":"blacksmith-4vcpu-windows-2025","run":true,"packages":true},{"os":"windows","index":2,"total":4,"host":"blacksmith-4vcpu-windows-2025","run":true,"packages":false},{"os":"windows","index":3,"total":4,"host":"blacksmith-4vcpu-windows-2025","run":true,"packages":false},{"os":"windows","index":4,"total":4,"host":"blacksmith-4vcpu-windows-2025","run":true,"packages":false}]' >> "$GITHUB_OUTPUT" + # kilocode_change end + unit: - name: unit (${{ matrix.settings.name }}) + # kilocode_change start + name: ${{ !matrix.settings.run && 'unit (unchanged)' || matrix.settings.total > 1 && format('unit ({0}, {1}/{2})', matrix.settings.os, matrix.settings.index, matrix.settings.total) || format('unit ({0})', matrix.settings.os) }} + needs: changes + # kilocode_change end strategy: fail-fast: false matrix: - settings: - - name: linux - host: blacksmith-4vcpu-ubuntu-2404 # kilocode_change - - name: windows - host: blacksmith-4vcpu-windows-2025 # kilocode_change + settings: ${{ fromJSON(needs.changes.outputs.settings) }} # kilocode_change runs-on: ${{ matrix.settings.host }} timeout-minutes: 45 # kilocode_change defaults: run: shell: bash steps: + # kilocode_change start + - name: Skip unchanged general unit tests + if: ${{ !matrix.settings.run }} + run: echo "Only isolated product, documentation, or metadata files changed; general unit tests are unchanged." + # kilocode_change end + - name: Checkout repository + if: matrix.settings.run # kilocode_change uses: actions/checkout@v6 # kilocode_change with: token: ${{ secrets.GITHUB_TOKEN }} # kilocode_change start - name: Setup Node + if: matrix.settings.run id: setup-node continue-on-error: ${{ runner.os == 'Windows' }} - uses: actions/setup-node@v6 # kilocode_change + uses: actions/setup-node@v6 with: node-version: "24" + # kilocode_change end + # kilocode_change start - name: Retry Setup Node on Windows - if: runner.os == 'Windows' && steps.setup-node.outcome == 'failure' + if: matrix.settings.run && runner.os == 'Windows' && steps.setup-node.outcome == 'failure' uses: actions/setup-node@v6 with: node-version: "24" # kilocode_change end - name: Setup Bun + if: matrix.settings.run # kilocode_change uses: ./.github/actions/setup-bun + # kilocode_change start + - name: Setup Linux sandbox helper + if: matrix.settings.run && runner.os == 'Linux' + uses: ./.github/actions/setup-linux-sandbox + # kilocode_change end - name: Configure git identity + if: matrix.settings.run # kilocode_change + # kilocode_change start run: | git config --global user.email "kilo-maintainer[bot]@users.noreply.github.com" git config --global user.name "kilo-maintainer[bot]" + # kilocode_change end - name: Cache Turbo + if: matrix.settings.run # kilocode_change uses: actions/cache@v5 # kilocode_change with: - path: node_modules/.cache/turbo - key: turbo-${{ runner.os }}-${{ hashFiles('turbo.json', '**/package.json') }}-${{ github.sha }} + path: .turbo/cache # kilocode_change + key: turbo-${{ runner.os }}-${{ hashFiles('turbo.json', 'bun.lock') }}-${{ matrix.settings.os }}-${{ matrix.settings.index }}-${{ github.sha }} # kilocode_change + # kilocode_change start restore-keys: | - turbo-${{ runner.os }}-${{ hashFiles('turbo.json', '**/package.json') }}- + turbo-${{ runner.os }}-${{ hashFiles('turbo.json', 'bun.lock') }}-${{ matrix.settings.os }}-${{ matrix.settings.index }}- + turbo-${{ runner.os }}-${{ hashFiles('turbo.json', 'bun.lock') }}- turbo-${{ runner.os }}- + # kilocode_change end - - name: Run unit tests - run: bun turbo test:ci --filter='!@kilocode/kilo-jetbrains' - env: - KILO_EXPERIMENTAL_DISABLE_FILEWATCHER: ${{ runner.os == 'Windows' && 'true' || 'false' }} + # kilocode_change start - test non-CLI packages separately from sharded CLI tests + - name: Run non-CLI unit tests + if: matrix.settings.run && matrix.settings.packages + run: bun turbo test:ci --output-logs=errors-only --log-order=grouped --log-prefix=task --filter='!@kilocode/cli' --filter='!@kilocode/kilo-jetbrains' + # kilocode_change end - - name: Run HttpApi exerciser gates - if: runner.os == 'Linux' + # kilocode_change start - ensure the Darwin profile cannot suppress its own validation + - name: Validate Darwin CLI test profile + if: matrix.settings.run && matrix.settings.os == 'macos' working-directory: packages/opencode - run: bun run test:httpapi + run: bun test test/kilocode/test-profile.test.ts + # kilocode_change end + + # kilocode_change start - run Kilo CLI tests through platform-specific shards + - name: Run CLI unit tests + if: matrix.settings.run + run: bun turbo test:ci --output-logs=errors-only --log-order=grouped --log-prefix=task --filter='@kilocode/cli' + env: + KILO_EXPERIMENTAL_DISABLE_FILEWATCHER: "true" # kilocode_change - was Windows-only; the CLI now starts a watcher per instance, too heavy/racy for unit tests. Watcher tests opt back in. + KILO_TEST_PROFILE: ${{ matrix.settings.os == 'macos' && 'darwin' || '' }} + KILO_TEST_SHARD: ${{ format('{0}/{1}', matrix.settings.index, matrix.settings.total) }} + # kilocode_change end + # kilocode_change start - name: Publish unit reports - if: always() + if: always() && matrix.settings.run uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v6.4.0 with: report_paths: packages/*/.artifacts/unit/junit.xml - check_name: "unit results (${{ matrix.settings.name }})" + annotate_only: true detailed_summary: true include_time_in_summary: true fail_on_failure: false - name: Upload unit artifacts - if: always() - uses: actions/upload-artifact@v7 # kilocode_change + if: always() && matrix.settings.run + uses: actions/upload-artifact@v7 with: - name: unit-${{ matrix.settings.name }}-${{ github.run_attempt }} + name: unit-${{ matrix.settings.os }}-${{ matrix.settings.index }}-${{ github.run_attempt }} include-hidden-files: true if-no-files-found: ignore retention-days: 7 path: packages/*/.artifacts/unit/junit.xml + # kilocode_change end # kilocode_change start - jetbrains: - name: jetbrains + httpapi: + name: HttpApi exerciser + needs: changes + if: needs.changes.outputs.general == 'true' runs-on: blacksmith-4vcpu-ubuntu-2404 + timeout-minutes: 15 defaults: run: shell: bash steps: - name: Checkout repository uses: actions/checkout@v6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Bun uses: ./.github/actions/setup-bun - - name: Setup Java - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: "21" + - name: Setup Linux sandbox helper + uses: ./.github/actions/setup-linux-sandbox - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4 + - name: Configure git identity + run: | + git config --global user.email "kilo-maintainer[bot]@users.noreply.github.com" + git config --global user.name "kilo-maintainer[bot]" + + - name: Cache Turbo + uses: actions/cache@v5 with: - cache-read-only: ${{ github.ref != 'refs/heads/main' }} + path: .turbo/cache + key: turbo-${{ runner.os }}-${{ hashFiles('turbo.json', 'bun.lock') }}-httpapi-${{ github.sha }} + restore-keys: | + turbo-${{ runner.os }}-${{ hashFiles('turbo.json', 'bun.lock') }}-httpapi- + turbo-${{ runner.os }}-${{ hashFiles('turbo.json', 'bun.lock') }}- + turbo-${{ runner.os }}- - - name: Run JetBrains unit tests - run: bun script/test-ci.ts - working-directory: packages/kilo-jetbrains + - name: Run HttpApi exerciser gates + run: bun turbo test:httpapi --filter='@kilocode/cli' + env: + KILO_EXPERIMENTAL_DISABLE_FILEWATCHER: "true" # kilocode_change - same rationale as the CLI unit step: a watcher per scenario instance is too heavy for the exerciser + # kilocode_change end - - name: Publish JetBrains unit reports - if: always() - uses: mikepenz/action-junit-report@v6 - with: - report_paths: packages/kilo-jetbrains/.artifacts/unit/junit.xml - check_name: "unit results (jetbrains)" - detailed_summary: true - include_time_in_summary: true - fail_on_failure: false + # kilocode_change start + jetbrains: + name: jetbrains + permissions: + contents: read + checks: write + pull-requests: read + uses: ./.github/workflows/test-jetbrains.yml + # kilocode_change end - - name: Upload JetBrains unit artifacts - if: always() - uses: actions/upload-artifact@v7 - with: - name: unit-jetbrains-${{ github.run_attempt }} - include-hidden-files: true - if-no-files-found: ignore - retention-days: 7 - path: packages/kilo-jetbrains/.artifacts/unit/junit.xml + # kilocode_change start + unit-required: + name: unit (linux) + runs-on: blacksmith-4vcpu-ubuntu-2404 + needs: + - unit + if: always() + steps: + - name: Verify unit matrix passed + run: | + echo "unit=${{ needs.unit.result }}" + test "${{ needs.unit.result }}" = "success" # kilocode_change end + # kilocode_change start required: name: test (linux) runs-on: blacksmith-4vcpu-ubuntu-2404 needs: + - changes - unit + - httpapi - jetbrains if: always() steps: - - name: Verify upstream test jobs passed + - name: Verify upstream test jobs passed # kilocode_change run: | echo "unit=${{ needs.unit.result }}" + echo "httpapi=${{ needs.httpapi.result }}" echo "jetbrains=${{ needs.jetbrains.result }}" test "${{ needs.unit.result }}" = "success" + if [ "${{ needs.changes.outputs.general }}" = "true" ]; then + test "${{ needs.httpapi.result }}" = "success" + else + test "${{ needs.httpapi.result }}" = "skipped" + fi test "${{ needs.jetbrains.result }}" = "success" + # kilocode_change end diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml deleted file mode 100644 index b467817c71..0000000000 --- a/.github/workflows/triage.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: triage - -on: - issues: - types: [opened] - -jobs: - triage: - if: github.repository == 'Kilo-Org/kilocode' - runs-on: blacksmith-4vcpu-ubuntu-2404 - permissions: - contents: read - issues: write - steps: - - name: Checkout repository - uses: actions/checkout@v6 # kilocode_change - with: - fetch-depth: 1 - - - name: Setup Bun - uses: ./.github/actions/setup-bun - - - name: Setup Kilo - uses: ./.github/actions/setup-kilo - - - name: Triage issue - env: - KILO_API_KEY: ${{ secrets.KILO_API_KEY }} - KILO_ORG_ID: ${{ secrets.KILO_ORG_ID }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ISSUE_NUMBER: ${{ github.event.issue.number }} - ISSUE_TITLE: ${{ github.event.issue.title }} - ISSUE_BODY: ${{ github.event.issue.body }} - run: | - kilo run --agent triage "The following issue was just opened, triage it: - - Title: $ISSUE_TITLE - - $ISSUE_BODY" diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index f0c55ddbc3..e309225701 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -11,7 +11,7 @@ on: jobs: typecheck-js: name: typecheck-js - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: blacksmith-4vcpu-ubuntu-2404 # kilocode_change steps: - name: Checkout repository uses: actions/checkout@v6 # kilocode_change @@ -22,11 +22,39 @@ jobs: # kilocode_change start - name: Run TypeScript typecheck run: bun turbo typecheck --filter='!@kilocode/kilo-jetbrains' + + - name: Build Kilo Console + run: bun turbo build --filter=@kilocode/kilo-console # kilocode_change end # kilocode_change start + jetbrains-changes: + name: detect JetBrains changes + runs-on: blacksmith-4vcpu-ubuntu-2404 + outputs: + jetbrains: ${{ github.event_name == 'workflow_dispatch' && 'true' || steps.filter.outputs.jetbrains }} + steps: + - name: Checkout repository + if: github.event_name != 'workflow_dispatch' + uses: actions/checkout@v6 + + - name: Detect JetBrains changes + if: github.event_name != 'workflow_dispatch' + id: filter + uses: Kilo-Org/paths-filter@668c092af3649c4b664c54e4b704aa46782f6f7c # v3 + with: + predicate-quantifier: every + filters: | + jetbrains: + - '**' + - '!.changeset/**' + - '!packages/kilo-vscode/**' + - '!packages/kilo-docs/**' + typecheck-jetbrains: name: typecheck-jetbrains + needs: jetbrains-changes + if: github.event_name == 'workflow_dispatch' || needs.jetbrains-changes.outputs.jetbrains == 'true' runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: Checkout repository @@ -55,13 +83,21 @@ jobs: runs-on: blacksmith-4vcpu-ubuntu-2404 needs: - typecheck-js + - jetbrains-changes - typecheck-jetbrains if: always() steps: - name: Verify typecheck jobs passed run: | echo "typecheck-js=${{ needs.typecheck-js.result }}" + echo "jetbrains-changes=${{ needs.jetbrains-changes.result }}" echo "typecheck-jetbrains=${{ needs.typecheck-jetbrains.result }}" test "${{ needs.typecheck-js.result }}" = "success" - test "${{ needs.typecheck-jetbrains.result }}" = "success" + test "${{ needs.jetbrains-changes.result }}" = "success" + if [ "${{ needs.jetbrains-changes.outputs.jetbrains }}" = "true" ]; then + test "${{ needs.typecheck-jetbrains.result }}" = "success" + else + test "${{ needs.jetbrains-changes.outputs.jetbrains }}" = "false" + test "${{ needs.typecheck-jetbrains.result }}" = "skipped" + fi # kilocode_change end diff --git a/.github/workflows/visual-regression.yml b/.github/workflows/visual-regression.yml index 69ebd6a17a..dbe2a07c24 100644 --- a/.github/workflows/visual-regression.yml +++ b/.github/workflows/visual-regression.yml @@ -1,19 +1,23 @@ +# kilocode_change - new file name: Visual Regression Tests on: pull_request: types: [opened, synchronize, reopened] +permissions: + contents: read + pull-requests: read + jobs: check-paths: name: Check changed paths - runs-on: ubuntu-latest + runs-on: ubuntu-latest # kilocode_change outputs: matched: ${{ steps.filter.outputs.matched }} - is_fork: ${{ steps.fork-check.outputs.is_fork }} + can_autocommit: ${{ steps.autocommit-check.outputs.can_autocommit }} steps: - - uses: actions/checkout@v6 # kilocode_change - # kilocode_change start + - uses: actions/checkout@v6 - name: Check changed files id: filter env: @@ -23,7 +27,7 @@ jobs: matched=false while IFS= read -r file; do case "$file" in - packages/kilo-ui/*|packages/ui/*|packages/util/*|packages/sdk/js/*|packages/kilo-vscode/webview-ui/*|packages/kilo-vscode/.storybook/*|packages/kilo-vscode/tests/visual-regression*|packages/kilo-vscode/tests/permission-dock-dropdown*|packages/kilo-vscode/tests/accessibility*|packages/kilo-docs/public/img/screenshot-tests/*|.github/workflows/visual-regression.yml) + packages/kilo-ui/*|packages/ui/*|packages/util/*|packages/sdk/js/*|packages/kilo-vscode/webview-ui/*|packages/kilo-vscode/.storybook/*|packages/kilo-vscode/tests/visual-regression*|packages/kilo-vscode/tests/permission-dock-dropdown*|packages/kilo-vscode/tests/accessibility*|packages/kilo-docs/public/img/screenshot-tests/*|.github/actions/setup-bun/*|.github/workflows/visual-regression.yml) matched=true break ;; @@ -31,7 +35,6 @@ jobs: done < <(gh api --paginate "repos/${GITHUB_REPOSITORY}/pulls/${PR}/files" --jq '.[].filename') echo "matched=$matched" >> "$GITHUB_OUTPUT" echo "matched=$matched" - # kilocode_change end - name: Check if PR is from a fork id: fork-check run: | @@ -40,31 +43,43 @@ jobs: else echo "is_fork=false" >> "$GITHUB_OUTPUT" fi + - name: Check baseline auto-commit permissions + id: autocommit-check + env: + MAINTAINER_APP_ID: ${{ secrets.KILO_MAINTAINER_APP_ID }} + MAINTAINER_APP_SECRET: ${{ secrets.KILO_MAINTAINER_APP_SECRET }} + run: | + if [ "${{ steps.fork-check.outputs.is_fork }}" != "true" ] && [ -n "$MAINTAINER_APP_ID" ] && [ -n "$MAINTAINER_APP_SECRET" ]; then + echo "can_autocommit=true" >> "$GITHUB_OUTPUT" + else + echo "can_autocommit=false" >> "$GITHUB_OUTPUT" + fi visual-regression: needs: check-paths if: needs.check-paths.outputs.matched == 'true' - name: Visual Regression (kilo-ui) + name: Visual Regression (kilo-ui) # kilocode_change runs-on: blacksmith-4vcpu-ubuntu-2404 timeout-minutes: 15 steps: - name: Checkout (internal) - if: needs.check-paths.outputs.is_fork != 'true' - uses: actions/checkout@v6 # kilocode_change + if: needs.check-paths.outputs.can_autocommit == 'true' + uses: actions/checkout@v6 with: lfs: true - token: ${{ secrets.BOT_PAT }} + # Use github.token for LFS access. The maintainer app is used only for generated commits. + token: ${{ github.token }} ref: ${{ github.head_ref }} - - name: Checkout (fork) - if: needs.check-paths.outputs.is_fork == 'true' - uses: actions/checkout@v6 # kilocode_change + - name: Checkout (read-only) + if: needs.check-paths.outputs.can_autocommit != 'true' + uses: actions/checkout@v6 with: lfs: true - name: Check if HEAD is a baseline update commit - if: needs.check-paths.outputs.is_fork != 'true' + if: needs.check-paths.outputs.can_autocommit == 'true' id: check-baseline-commit run: | COMMIT_MSG=$(git log -1 --format=%s) @@ -76,22 +91,11 @@ jobs: fi - name: Setup Bun - uses: oven-sh/setup-bun@v2 - with: - bun-version: latest - - - name: Cache Bun modules - uses: actions/cache@v5 # kilocode_change - with: - path: ~/.bun/install/cache - key: bun-${{ hashFiles('bun.lock') }} - - - name: Install dependencies - run: bun install + uses: ./.github/actions/setup-bun # kilocode_change - name: Cache Playwright browsers id: playwright-cache - uses: actions/cache@v5 # kilocode_change + uses: actions/cache@v5 with: path: ~/.cache/ms-playwright key: playwright-${{ hashFiles('packages/kilo-ui/package.json') }} @@ -107,7 +111,7 @@ jobs: - name: Cache Storybook build id: storybook-cache - uses: actions/cache@v5 # kilocode_change + uses: actions/cache@v5 with: path: packages/kilo-ui/storybook-static key: storybook-${{ hashFiles('packages/kilo-ui/src/**', 'packages/kilo-ui/.storybook/**', 'packages/ui/src/**', 'packages/kilo-ui/package.json') }} @@ -144,22 +148,22 @@ jobs: " working-directory: packages/kilo-ui - - name: Check for baseline changes (fork PRs) - if: needs.check-paths.outputs.is_fork == 'true' + - name: Check for baseline changes (read-only PRs) + if: needs.check-paths.outputs.can_autocommit != 'true' run: | git add packages/kilo-docs/public/img/screenshot-tests/kilo-ui/ if git diff --cached --quiet; then echo "No visual regression detected." else echo "::error::Visual regression detected. Screenshot baselines have changed." - echo "::error::Since this PR is from a fork, updated screenshots cannot be committed automatically." + echo "::error::Since this PR cannot receive baseline commits automatically, updated screenshots cannot be committed." echo "::error::Please ask a Kilo developer for help updating the screenshots." git diff --cached --stat exit 1 fi - name: Fail if baselines still changing after auto-update - if: needs.check-paths.outputs.is_fork != 'true' && steps.check-baseline-commit.outputs.is_baseline_update == 'true' + if: needs.check-paths.outputs.can_autocommit == 'true' && steps.check-baseline-commit.outputs.is_baseline_update == 'true' run: | git add packages/kilo-docs/public/img/screenshot-tests/kilo-ui/ if git diff --cached --quiet; then @@ -172,34 +176,42 @@ jobs: exit 1 fi - - name: Commit and push new baselines (if any) - if: needs.check-paths.outputs.is_fork != 'true' && steps.check-baseline-commit.outputs.is_baseline_update != 'true' - id: commit-baselines - env: - GH_TOKEN: ${{ secrets.BOT_PAT }} + - name: Check for baseline updates + if: needs.check-paths.outputs.can_autocommit == 'true' && steps.check-baseline-commit.outputs.is_baseline_update != 'true' + id: baseline-changes run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" git add packages/kilo-docs/public/img/screenshot-tests/kilo-ui/ if git diff --cached --quiet; then - echo "No new baselines — nothing to commit." echo "changed=false" >> "$GITHUB_OUTPUT" else - git commit -m "chore: update visual regression baselines" - git lfs push --all origin - git push --no-verify echo "changed=true" >> "$GITHUB_OUTPUT" fi + - name: Setup Git Committer + if: steps.baseline-changes.outputs.changed == 'true' + uses: ./.github/actions/setup-git-committer + with: + kilo-maintainer-app-id: ${{ secrets.KILO_MAINTAINER_APP_ID }} + kilo-maintainer-app-secret: ${{ secrets.KILO_MAINTAINER_APP_SECRET }} + + - name: Commit and push new baselines (if any) + if: steps.baseline-changes.outputs.changed == 'true' + id: commit-baselines + run: | + git commit -m "chore: update visual regression baselines" + git lfs push --all origin + git push --no-verify origin "HEAD:${GITHUB_HEAD_REF}" + echo "changed=true" >> "$GITHUB_OUTPUT" + - name: Fail if baselines changed - if: needs.check-paths.outputs.is_fork != 'true' && steps.commit-baselines.outputs.changed == 'true' + if: needs.check-paths.outputs.can_autocommit == 'true' && steps.commit-baselines.outputs.changed == 'true' run: | echo "::error::Visual regression baselines changed. New baselines have been committed to the branch. Please pull and review." exit 1 - name: Upload test results on failure if: failure() - uses: actions/upload-artifact@v7 # kilocode_change + uses: actions/upload-artifact@v7 with: name: visual-regression-results path: packages/kilo-ui/test-results/ @@ -208,31 +220,30 @@ jobs: visual-regression-vscode: needs: check-paths if: needs.check-paths.outputs.matched == 'true' - name: Visual Regression (kilo-vscode webview) + name: Visual Regression (kilo-vscode webview) # kilocode_change runs-on: blacksmith-4vcpu-ubuntu-2404 timeout-minutes: 15 - # kilocode_change start env: NODE_OPTIONS: --max-old-space-size=4096 - # kilocode_change end steps: - name: Checkout (internal) - if: needs.check-paths.outputs.is_fork != 'true' - uses: actions/checkout@v6 # kilocode_change + if: needs.check-paths.outputs.can_autocommit == 'true' + uses: actions/checkout@v6 with: lfs: true - token: ${{ secrets.BOT_PAT }} + # Use github.token for LFS access. The maintainer app is used only for generated commits. + token: ${{ github.token }} ref: ${{ github.head_ref }} - - name: Checkout (fork) - if: needs.check-paths.outputs.is_fork == 'true' - uses: actions/checkout@v6 # kilocode_change + - name: Checkout (read-only) + if: needs.check-paths.outputs.can_autocommit != 'true' + uses: actions/checkout@v6 with: lfs: true - name: Check if HEAD is a baseline update commit - if: needs.check-paths.outputs.is_fork != 'true' + if: needs.check-paths.outputs.can_autocommit == 'true' id: check-baseline-commit-vscode run: | COMMIT_MSG=$(git log -1 --format=%s) @@ -244,22 +255,11 @@ jobs: fi - name: Setup Bun - uses: oven-sh/setup-bun@v2 - with: - bun-version: latest - - - name: Cache Bun modules - uses: actions/cache@v5 # kilocode_change - with: - path: ~/.bun/install/cache - key: bun-${{ hashFiles('bun.lock') }} - - - name: Install dependencies - run: bun install + uses: ./.github/actions/setup-bun # kilocode_change - name: Cache Playwright browsers id: playwright-cache-vscode - uses: actions/cache@v5 # kilocode_change + uses: actions/cache@v5 with: path: ~/.cache/ms-playwright key: playwright-vscode-${{ hashFiles('packages/kilo-vscode/package.json') }} @@ -275,7 +275,7 @@ jobs: - name: Cache Storybook build id: storybook-cache-vscode - uses: actions/cache@v5 # kilocode_change + uses: actions/cache@v5 with: path: packages/kilo-vscode/storybook-static key: storybook-vscode-${{ hashFiles('packages/kilo-vscode/webview-ui/src/**', 'packages/kilo-vscode/.storybook/**', 'packages/kilo-ui/src/**', 'packages/ui/src/**', 'packages/kilo-vscode/package.json') }} @@ -284,18 +284,16 @@ jobs: if: steps.storybook-cache-vscode.outputs.cache-hit != 'true' run: bun run build-storybook working-directory: packages/kilo-vscode - # kilocode_change start env: NODE_OPTIONS: --max-old-space-size=4096 - # kilocode_change end - - name: Generate baselines and enforce webview accessibility checks # kilocode_change + - name: Generate baselines and enforce webview accessibility checks run: bun run test:visual:update working-directory: packages/kilo-vscode env: CI: true PLAYWRIGHT_WORKERS: "4" - NODE_OPTIONS: --max-old-space-size=4096 # kilocode_change + NODE_OPTIONS: --max-old-space-size=4096 - name: Remove stale baselines for deleted stories run: | @@ -344,22 +342,22 @@ jobs: " working-directory: packages/kilo-vscode - - name: Check for baseline changes (fork PRs) - if: needs.check-paths.outputs.is_fork == 'true' + - name: Check for baseline changes (read-only PRs) + if: needs.check-paths.outputs.can_autocommit != 'true' run: | git add packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/ if git diff --cached --quiet; then echo "No visual regression detected." else echo "::error::Visual regression detected. Screenshot baselines have changed." - echo "::error::Since this PR is from a fork, updated screenshots cannot be committed automatically." + echo "::error::Since this PR cannot receive baseline commits automatically, updated screenshots cannot be committed." echo "::error::Please ask a Kilo developer for help updating the screenshots." git diff --cached --stat exit 1 fi - name: Fail if baselines still changing after auto-update - if: needs.check-paths.outputs.is_fork != 'true' && steps.check-baseline-commit-vscode.outputs.is_baseline_update == 'true' + if: needs.check-paths.outputs.can_autocommit == 'true' && steps.check-baseline-commit-vscode.outputs.is_baseline_update == 'true' run: | git add packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/ if git diff --cached --quiet; then @@ -372,34 +370,42 @@ jobs: exit 1 fi - - name: Commit and push new baselines (if any) - if: needs.check-paths.outputs.is_fork != 'true' && steps.check-baseline-commit-vscode.outputs.is_baseline_update != 'true' - id: commit-baselines-vscode - env: - GH_TOKEN: ${{ secrets.BOT_PAT }} + - name: Check for baseline updates + if: needs.check-paths.outputs.can_autocommit == 'true' && steps.check-baseline-commit-vscode.outputs.is_baseline_update != 'true' + id: baseline-changes-vscode run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" git add packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/ if git diff --cached --quiet; then - echo "No new baselines — nothing to commit." echo "changed=false" >> "$GITHUB_OUTPUT" else - git commit -m "chore: update kilo-vscode visual regression baselines" - git lfs push --all origin - git push --no-verify echo "changed=true" >> "$GITHUB_OUTPUT" fi + - name: Setup Git Committer + if: steps.baseline-changes-vscode.outputs.changed == 'true' + uses: ./.github/actions/setup-git-committer + with: + kilo-maintainer-app-id: ${{ secrets.KILO_MAINTAINER_APP_ID }} + kilo-maintainer-app-secret: ${{ secrets.KILO_MAINTAINER_APP_SECRET }} + + - name: Commit and push new baselines (if any) + if: steps.baseline-changes-vscode.outputs.changed == 'true' + id: commit-baselines-vscode + run: | + git commit -m "chore: update kilo-vscode visual regression baselines" + git lfs push --all origin + git push --no-verify origin "HEAD:${GITHUB_HEAD_REF}" + echo "changed=true" >> "$GITHUB_OUTPUT" + - name: Fail if baselines changed - if: needs.check-paths.outputs.is_fork != 'true' && steps.commit-baselines-vscode.outputs.changed == 'true' + if: needs.check-paths.outputs.can_autocommit == 'true' && steps.commit-baselines-vscode.outputs.changed == 'true' run: | echo "::error::Visual regression baselines changed. New baselines have been committed to the branch. Please pull and review." exit 1 - name: Upload test results on failure if: failure() - uses: actions/upload-artifact@v7 # kilocode_change + uses: actions/upload-artifact@v7 with: name: visual-regression-vscode-results path: packages/kilo-vscode/test-results/ diff --git a/.gitignore b/.gitignore index 5611c39a76..ad3b43d63d 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,8 @@ storybook-static .turbo **/.serena .serena/ +**/.omo +.omo/ /result refs Session.vim diff --git a/.husky/pre-push b/.husky/pre-push index 5d3cc53411..efe6a35a75 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -17,4 +17,34 @@ if (process.versions.bun !== expectedBunVersion) { console.warn(`Warning: Bun version ${process.versions.bun} differs from expected ${expectedBunVersion}`); } ' -bun typecheck + +# kilocode_change start +jetbrains=0 +zero=0000000000000000000000000000000000000000 + +while read -r local_ref local_oid remote_ref remote_oid; do + if [ "$local_oid" = "$zero" ]; then + continue + fi + + base="$remote_oid" + if [ "$remote_oid" = "$zero" ]; then + base=$(git merge-base "$local_oid" "$1/main" 2>/dev/null || git hash-object -t tree /dev/null) + fi + + if ! git diff --quiet "$base" "$local_oid" -- . \ + ':(exclude).changeset/**' \ + ':(exclude)packages/kilo-vscode/**' \ + ':(exclude)packages/kilo-docs/**'; then + jetbrains=1 + fi +done + +bun typecheck --filter='!@kilocode/kilo-jetbrains' + +if [ "$jetbrains" -eq 1 ]; then + bun typecheck --filter='@kilocode/kilo-jetbrains' +else + echo "Skipping JetBrains typecheck (no relevant changes)" +fi +# kilocode_change end diff --git a/.kilo/command/review-upstream-merge.md b/.kilo/command/review-upstream-merge.md index 36237d81c1..ce2625a711 100644 --- a/.kilo/command/review-upstream-merge.md +++ b/.kilo/command/review-upstream-merge.md @@ -62,6 +62,18 @@ Pay special attention to: When in doubt, add a finding. A human will verify it. Compiling code is not proof the chain is intact. +## CONFIG_REGRESSION.md + +Check whether this PR introduces or re-introduces fallback logic for `opencode` config files, or accidentally breaks code that now correctly expects only `.kilo`-based configuration. + +Kilo removed fallback support for `opencode` config directories. Look for: + +- Any new or restored code that reads from `opencode` config paths. +- Upstream additions to config discovery, loading, or path resolution that add `opencode` fallback candidates we stripped. +- Changes that break `.kilo`-only config lookup by removing or reordering it in a multi-path search. + +When in doubt, add a finding. A human should verify config path changes manually. + ## TESTS.md Check whether this PR removed any Kilo-specific tests. diff --git a/.kilo/plans/1782926865817-jetbrains-model-picker-details-plan.md b/.kilo/plans/1782926865817-jetbrains-model-picker-details-plan.md new file mode 100644 index 0000000000..ac6d9d6ec5 --- /dev/null +++ b/.kilo/plans/1782926865817-jetbrains-model-picker-details-plan.md @@ -0,0 +1,84 @@ +# JetBrains Model Picker Details Plan + +## Goal +Add a JetBrains model picker maximize/minimize affordance that expands the popup to roughly double width and shows model details comparable to VS Code's `ModelPreview`. Persist the last expanded/collapsed state in IntelliJ `PropertiesComponent`. First-time default is collapsed. + +## Decisions +- Scope is full VS Code parity where JetBrains can receive the same model metadata: pricing, release date, descriptions, modalities/capabilities, terminal-bench, auto-routing details, context limits, badges, and provider/model identity. +- Default state is collapsed for users without a saved property. +- Expanded state is app-level UI state stored in `PropertiesComponent`, not backend/session state. +- Use Swing/IntelliJ platform components only. Do not introduce Compose, JCEF, or UI DSL. +- Keep existing compact list behavior when collapsed. In expanded mode, show a retained details panel beside the list. + +## Affected Areas +- `packages/kilo-jetbrains/shared/src/main/kotlin/ai/kilocode/rpc/dto/ProviderDto.kt` +- `packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/workspace/KiloWorkspaceState.kt` +- `packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/cli/KiloCliDataParser.kt` +- `packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/rpc/KiloWorkspaceDtoMapper.kt` +- `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/model/SessionModel.kt` +- `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/SessionUi.kt` +- `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/models/ModelsSettingsUi.kt` +- `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/model/ModelPicker*.kt` +- `packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle*.properties` +- Existing tests under `packages/kilo-jetbrains/frontend/src/test/...` and `backend/src/test/...` + +## Implementation Steps +1. Extend model metadata DTOs. + - Add serializable nested DTOs to `ProviderDto.kt` for preview metadata matching VS Code provider types where practical: cost/cache cost, capabilities/input modalities, options/description, auto-routing model ids, terminal-bench score/cost. + - Extend `ModelDto` with nullable fields such as `inputPrice`, `outputPrice`, `contextLength`, `releaseDate`, `latest`, `cost`, `capabilities`, `options`, `autoRouting`, and `terminalBench`. + - Preserve existing fields (`limit`, `variants`, `free`, `byok`, `mayTrainOnYourPrompts`) to avoid breaking callers. + +2. Parse and map the extra metadata in the JetBrains backend. + - Extend `ModelInfo` in `KiloWorkspaceState.kt` with matching nullable metadata fields. + - Update `KiloCliDataParser.parseModel` and `parseModelDto` to read the fields currently used by VS Code: `inputPrice`, `outputPrice`, `contextLength`, `releaseDate`, `latest`, `cost`, `capabilities.input`, `options.description`, `autoRouting.models`, and `terminalBench`. + - Keep permissive parsing: missing or malformed optional fields should result in `null` or empty data, not provider load failure. + - Update `KiloWorkspaceDtoMapper.model` to copy all new fields to `ModelDto`. + +3. Carry metadata through the frontend session/settings model flow. + - Extend session `ModelItem` and picker `ModelPicker.Item` to hold the preview metadata. + - Update `SessionController` -> `SessionModel`, `SessionUi`, and `ModelsSettingsUi.items()` mappings so metadata survives into the picker. + - Pass `limit` through to `ModelPicker.Item`; it is already available in `ModelItem` but currently dropped in `SessionUi`. + +4. Add a retained Swing details panel. + - Create a small `ModelDetailsPanel` near `session/ui/model/` or inside `ModelPicker.kt` if compact enough. + - Use `JBLabel`, `SimpleColoredComponent`, `JBHtmlPane` or safe HTML helpers, `Stack`, and `JBUI` spacing. + - Render VS Code-equivalent sections where data exists: header name/provider/star, free/BYOK/training badges, pricing, context window, release date, capabilities/modalities, terminal-bench, description, auto-routing candidates, and ids. + - Sanitize/escape model descriptions. Use `HtmlChunk`/`HtmlBuilder` or platform escaping helpers; do not concatenate unescaped HTML. + - Details panel should update from the currently previewed row in expanded mode and fall back to the active selected model when no preview row is set. + +5. Rework popup layout and size behavior. + - Add an expand/minimize button to the search/header row in `ModelPicker.showPopup()`. + - Use pointer cursor on the button and localized tooltips/accessibility names: `Maximize model details` and `Minimize model details` or equivalent. + - Persist state under a key such as `kilo.model.picker.expanded` using `PropertiesComponent.getInstance().getBoolean(key, false)` and `setValue(key, value.toString())`. + - Collapsed mode keeps the current list-only width behavior. + - Expanded mode lays out list and details side-by-side with a splitter/separator and sets preferred width to approximately double the collapsed width, clamped to available screen bounds. Keep `setLocateWithinScreenBounds(true)`. + - Make `JBPopup` resizable only if the implementation can keep the retained layout stable; otherwise keep non-resizable and compute deterministic sizes. + +6. Match VS Code interaction semantics where useful. + - Collapsed mode: clicking a model selects it immediately, preserving current behavior. + - Expanded mode: clicking/hovering or keyboard navigation updates the preview; Enter selects; double-click selects; Escape closes. + - Favorite star behavior remains unchanged and updates the details panel favorite state when toggled. + - When collapsing from expanded, clear transient preview state and show selected/active model on next expansion. + +7. Add localization strings. + - Add base `KiloBundle.properties` entries for maximize/minimize tooltips, detail labels, pricing labels, context, capabilities, terminal-bench, description, auto-routing choices, and unavailable values. + - If existing localized files require key completeness, add English fallback values there too; otherwise rely on base bundle fallback consistent with project practice. + +8. Add tests. + - Backend parser tests: ensure all new metadata fields parse from representative provider JSON and missing optional fields are tolerated. + - Mapper/serialization tests: ensure new DTO fields survive backend -> shared DTO serialization. + - `ModelPickerTest`: verify expanded property default is collapsed, toggle persists true/false, tooltip/icon state switches maximize/minimize, expanded width is greater than collapsed width, preview panel displays selected/hovered model metadata, and pointer cursor is set on the expand control. + - Renderer/details tests should exercise actual Swing components on the EDT using existing `BasePlatformTestCase` patterns. + - Update existing tests/helpers that construct `ModelPicker.Item`, `ModelItem`, or `ModelDto` as needed using default values to keep changes minimal. + +## Risks And Constraints +- Full parity depends on metadata already present in CLI provider JSON. If a field is absent from the backend response for a provider, the details panel should omit that row rather than showing placeholders everywhere. +- Adding fields to shared serializable DTOs affects split-mode RPC compatibility. Keep new fields nullable/defaulted for safe deserialization. +- Avoid making provider loading fragile: optional preview metadata parsing must not throw on unexpected types. +- The popup is a lightweight `JBPopup`; changing size after showing may require recreating/repacking carefully. Prefer computing expanded/collapsed preferred size before show and updating the content with `revalidate()`/`repaint()` on toggle. +- Keep all Swing mutation on the EDT. + +## Validation +- From `packages/kilo-jetbrains/`: run `./gradlew typecheck` or `bun run typecheck`. +- From `packages/kilo-jetbrains/`: run targeted tests for backend parser/serialization and frontend model picker tests, or `./gradlew test` if targeted Gradle filters are not straightforward. +- Manually verify in sandbox if feasible: `./gradlew runIde`, open model picker, confirm first open is collapsed, maximize doubles width and shows details, minimize returns to compact width, tooltip/cursor are correct, and the last state persists after closing/reopening the popup. diff --git a/.kilo/plans/1783518847053-prompt-rollback-redo-jetbrains-parity.md b/.kilo/plans/1783518847053-prompt-rollback-redo-jetbrains-parity.md new file mode 100644 index 0000000000..dd71fdffc7 --- /dev/null +++ b/.kilo/plans/1783518847053-prompt-rollback-redo-jetbrains-parity.md @@ -0,0 +1,111 @@ +# Prompt Rollback + Redo — JetBrains Parity + +Bring the VS Code "rollback / redo" (CLI `revert` / `unrevert`) feature to the JetBrains plugin, and fix the misleading VS Code hint string. Implementation-capable agent required — this plan touches source and tests. + +## Context (verified) + +- CLI already exposes everything needed; no CLI release or SDK regen required. Pinned CLI version is `7.4.1` (`packages/kilo-jetbrains/package.json`). + - `POST /session/{id}/revert` body `{ messageID, partID? }`, `POST /session/{id}/unrevert`. + - `Session.revert?: { messageID, partID?, snapshot?, diff? }` — `packages/sdk/js/src/gen/types.gen.ts:554`. Pushed via `session.updated` SSE. +- VS Code entry points: `RevertBanner.tsx`, `VscodeSessionTurn.tsx`, `session.tsx` context. Per-user-message rollback restores reverted prompt text into the input; redo banner shows count + per-file diff stats + Redo / Redo All + hint; reverted messages/parts hidden (`id >= revert.messageID`, partID partial-turn boundary). +- JetBrains split-mode packages differ from AGENTS.md's stated `ai.kilocode.jetbrains`; actual source roots are: + - shared → `packages/kilo-jetbrains/shared/src/main/kotlin/ai/kilocode/rpc/` + - backend → `packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/` + - frontend → `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/` +- All target files confirmed to exist: `SessionDto.kt`, `KiloSessionRpcApi.kt`, `KiloBackendChatManager.kt`, `KiloSessionRpcApiImpl.kt`, `KiloSessionService.kt`, `SessionController.kt`, `SessionModel.kt`, `SessionModelEvent.kt`, `SessionView.kt`, `MessageView.kt`, `MessageToolbar.kt`, `PromptPanel.kt`, `PromptEditorTextField.kt`, plus reuse targets `DiffStatBadge.kt`, `HoverIcon.kt`, `PermissionDiffView.kt`. + +## Decisions + +- **Reuse `DiffStatBadge`** (already the shared per-file +/- renderer used by `PermissionDiffView`) for the banner's per-file diff rows. No new diff-stat component. +- **Reuse the existing user-prompt hover toolbar (`MessageToolbar`)** for the per-message rollback control. +- **Reuse the existing `session.updated → model.setSession(...)` pipeline** for the revert boundary; no new SSE handling. +- **Stale non-English hint strings: reset all to the new English value** and flag for re-translation (applies to VS Code locales; JetBrains base bundle only, others fall back). + +## Part A — VS Code string fix + +File: `packages/kilo-vscode/webview-ui/src/i18n/en.ts:138` + +- Change `revert.banner.hint` from `"Send a new message to make this permanent"` to `"You can redo these changes until you send a new message"`. +- In the 19 non-English locale files under `packages/kilo-vscode/webview-ui/src/i18n/` (ar, br, bs, da, de, es, fr, it, ja, ko, nl, no, pl, ru, th, tr, uk, zh, zht), overwrite `revert.banner.hint` with the identical new English string; leave a note that these need re-translation. +- Do not touch the other revert keys (`revert.banner.count_one`, `revert.banner.count_other`, `revert.banner.redo`, `revert.banner.redo.all`, `revert.disabled.agentBusy`) — only the hint changes meaning. + +## Part B — JetBrains implementation + +### 1. Shared (DTO + RPC contract) + +- `shared/.../rpc/dto/SessionDto.kt`: add `val revert: SessionRevertDto? = null`; add `@Serializable data class SessionRevertDto(val messageID: String, val partID: String? = null, val snapshot: String? = null, val diff: String? = null)`. Field names must match CLI JSON for kotlinx auto-mapping through `session.updated`. +- `shared/.../rpc/KiloSessionRpcApi.kt`: add + - `suspend fun revert(id: String, directory: String, messageID: String, partID: String?)` + - `suspend fun unrevert(id: String, directory: String)` + +### 2. Backend (RPC impl + HTTP) + +- `backend/.../app/KiloBackendChatManager.kt`: add `revert(id, dir, messageID, partID?)` → `POST /session/$id/revert?directory=…` with `{messageID, partID?}` body, and `unrevert(id, dir)` → `POST /session/$id/unrevert?directory=…`. Mirror the existing `compact()` OkHttp pattern; add JSON body builders to `KiloCliDataParser`. +- `backend/.../rpc/KiloSessionRpcApiImpl.kt`: implement both, resolve worktree dir via `sessions.getDirectory(id, directory)`, wrap in `ready { }` like `compact`/`abort`. + +### 3. Frontend service + +- `frontend/.../app/KiloSessionService.kt`: add `suspend revert(...)` / `unrevert(...)` wrappers over the RPC, using `durable {}` per split-mode rules. + +### 4. Frontend controller (`session/controller/SessionController.kt`) + +- Add EDT-entry actions dispatched to the coroutine scope: + - `revert(messageID, partID?)` + - `unrevert()` + - `redo()` — mirror `RevertBanner.handleRedo`: find the next user message after the boundary and revert to it; `unrevert()` if none. + - `redoAll()` → `unrevert()`. +- Revert boundary already arrives via `is ChatEventDto.SessionUpdated -> model.setSession(...)` — no new SSE handling. +- On revert, restore the reverted user prompt text into the input (`session/ui/prompt/PromptPanel.kt` / `PromptEditorTextField`); on full redo (`redoAll` / final `unrevert`), clear it — matching VS Code and TUI. + +### 5. Frontend model (`session/model/SessionModel.kt`, `SessionModelEvent.kt`) + +- Add `SessionModelEvent.RevertChanged(revert: SessionRevertDto?)` with a stable `toString()`, fired from `setSession()` when the revert value changes. Reset in `loadHistory()` and `clear()`. +- Add derived helpers: `revert(): SessionRevertDto?` and `revertedCount()` (count of user messages with `id >= boundary`, mirroring `session.tsx`). +- Transcript hiding: expose whether a message id is hidden by the boundary (`id >= revert.messageID`, with partID partial-turn handling), applied both to newly-arriving messages and on `RevertChanged`. +- Follow the AGENTS.md "Adding a New Event" checklist (event subclass → model field + mutation + resets → controller handling → `-> Unit` stubs in exhaustive `when` blocks). + +### 6. Frontend views + +- New `session/ui/RevertBanner.kt` Swing view, built once and mutated via `update()` per retained-Swing rules. Listens to `RevertChanged` + `DiffUpdated`. Contents: + - arrow-left icon + count label (localized count.one/other), + - per-file diff rows reusing `ai.kilocode.client.ui.DiffStatBadge` fed from `model.diff` (`DiffFileDto.additions/deletions`), + - Redo button → `controller.redo()`, Redo All (only when count > 1) → `controller.redoAll()`, + - hint label (same new wording as Part A). + - Placed in `session/ui/SessionView.kt` at the bottom of the transcript, above the prompt input; shown only when `revert != null`. +- Per-user-message rollback control in `session/views/MessageView.kt`: user prompt bubbles already carry a hover `promptToolbar` (`MessageToolbar` with copy) + `promptHover` state. Add a rollback `HoverIcon` (arrow-left) alongside copy for user messages, wired through `SessionView → controller.revert(msgId)`. Disable/hide while the agent is busy or when there are no assistant messages after it, with the `revert.disabled.agentBusy` tooltip — mirroring `VscodeSessionTurn` `onRevert` + `data-revert-disabled`. Extend `MessageToolbar.kt` to host the extra action (or add a sibling control). +- Apply transcript hiding: `SessionView`/`TurnView` toggle `MessageView` visibility on `RevertChanged` (prefer visibility toggle over rebuild, per Swing lifecycle guidance). + +### 7. i18n (`frontend/src/main/resources/messages/KiloBundle*.properties`) + +- Add to base `KiloBundle.properties`: `revert.banner.count.one`, `revert.banner.count.other`, `revert.banner.redo`, `revert.banner.redo.all`, `revert.banner.hint` (new wording), `revert.disabled.agentBusy`. +- Other locale bundles fall back to base until translated; do not add stale translations. + +### 8. Tests + +- Backend: extend `KiloSessionRpcApiImplTest` / a `KiloBackendChatManager` test against `MockCliServer` asserting the exact HTTP path + JSON body for `revert`/`unrevert`, and that a session carrying `revert` deserializes into `SessionRevertDto`. +- Frontend controller (`SessionControllerTestBase` + `FakeSessionRpcApi`, add revert/unrevert call tracking): `revert()`/`unrevert()`/`redo()`/`redoAll()` hit the right RPC; `RevertChanged` fires; count logic; reverted messages hidden and restored; prompt-text restore on revert / clear on full redo. +- Frontend views (`BasePlatformTestCase`): `RevertBanner` renders count + per-file `DiffStatBadge` + redo buttons (Redo All only when count > 1); `MessageView` shows the rollback control on user messages and disables it while busy; retained-component assertions (`assertSame`, bounded count) per Swing lifecycle rules. + +## Deliverables + +| Area | Files | +|---|---| +| VS Code string | `webview-ui/src/i18n/en.ts` + 19 non-English locale hints reset | +| Shared | `SessionDto.kt` (+`SessionRevertDto`), `KiloSessionRpcApi.kt` | +| Backend | `KiloBackendChatManager.kt`, `KiloCliDataParser`, `KiloSessionRpcApiImpl.kt` | +| Frontend service/controller/model | `KiloSessionService.kt`, `SessionController.kt`, `SessionModel.kt`, `SessionModelEvent.kt` | +| Frontend views | new `RevertBanner.kt` (reusing `DiffStatBadge`), `MessageView.kt`, `MessageToolbar.kt`, `SessionView.kt`, `PromptPanel.kt` | +| i18n | `KiloBundle.properties` | +| Tests | backend RPC/chat-manager, frontend controller + view tests, `FakeSessionRpcApi` | + +## Validation + +- VS Code string change: `bun run typecheck` from repo root (or from `packages/kilo-vscode/`). +- JetBrains: `./gradlew typecheck` and `./gradlew test` from `packages/kilo-jetbrains/` (Java 21). +- Manual: `./gradlew runIde` (or split mode) to exercise rollback → redo → redo-all and reverted-transcript hiding. + +## Risks / Notes + +- Confirm no `kilocode_change` markers are needed for the VS Code i18n edits (Kilo-owned webview path — none required). +- Reset (not delete) is chosen for VS Code locale hints, so the fallback path is not relied upon; flag the 19 files for re-translation. +- Keep new Kotlin identifiers single-word per repo style; annotate EDT/model-touching methods with `@RequiresEdt`; wrap frontend RPC in `durable {}`. diff --git a/.kilo/plans/1783550396285-jetbrains-rollback-hardening.md b/.kilo/plans/1783550396285-jetbrains-rollback-hardening.md new file mode 100644 index 0000000000..fe9efd4915 --- /dev/null +++ b/.kilo/plans/1783550396285-jetbrains-rollback-hardening.md @@ -0,0 +1,199 @@ +# JetBrains Rollback Feature — Hardening Plan + +Harden the new JetBrains rollback/redo feature: (1) communicate when only messages were +reverted because snapshots are disabled, and (2–4) close the code-duplication, testing, +end-to-end, and AGENTS-conformance gaps. + +All work is inside `packages/kilo-jetbrains/`. No shared `packages/opencode/` files change, +so no `kilocode_change` markers are needed. + +## Context an implementer needs + +- Revert flow: user clicks the per-message Rollback button (`MessageToolbar`/`MessageView`) + → `SessionController.revert()` aborts a busy turn then POSTs `/session/:id/revert` + → CLI sets a revert marker → `SessionUpdated` event → `SessionModel.setRevert()` → + `RevertBanner` shows + reverted messages hidden. `redo()`/`redoAll()` drive + `/session/:id/revert` (next user msg) and `/session/:id/unrevert`. +- Snapshot signal: `SessionRevertDto.snapshot` (`shared/.../rpc/dto/SessionDto.kt:22`) is + `null` exactly when the server did NOT restore files (snapshots disabled: `config.snapshot + === false`, non-git worktree, or ACP). It is already parsed and reaches the frontend via + `SessionModel.revert()`. When `snapshot == null` the diff is also empty, so the banner shows + no file rows today. This is the reliable, no-new-API signal for "history only". +- Test harnesses already exist: frontend `SessionControllerTestBase` + `FakeSessionRpcApi` + (already tracks `rpc.reverts` and `rpc.unreverts`); backend `MockCliServer` + + `KiloBackendChatManagerTest`. Banner tests instantiate `RevertBanner(model, redo, redoAll)` + and read components via `components(banner)`. + +## Key files + +- `frontend/.../session/ui/RevertBanner.kt` +- `frontend/.../session/controller/SessionController.kt` (`revert`, `unrevert`, `redo`, `redoAll`, `capture`, `sessionProps`) +- `frontend/.../session/model/SessionModel.kt` (`revert()`, `revertedCount()`, `isRevertedMessage()`) +- `frontend/src/main/resources/messages/KiloBundle.properties` (+ translated `KiloBundle_*.properties`) +- `backend/.../app/KiloBackendChatManager.kt` (`revert`/`unrevert`), `backend/.../cli/KiloCliDataParser.kt` (`buildRevertJson`) +- `backend/.../app/KiloBackendSessionManager.kt` (`revertDto` duplication) +- Tests: `frontend/.../session/controller/TurnLifecycleTest.kt` (or new `RevertFlowTest.kt`), + `frontend/.../session/ui/SessionMessageListPanelTest.kt`, + `frontend/.../session/model/SessionModelTest.kt`, + `backend/.../testing/MockCliServer.kt`, `backend/.../app/KiloBackendChatManagerTest.kt`, + `backend/.../cli/KiloCliDataParserTest.kt` + +## Resolved decisions + +- **Do NOT hide/disable the Rollback button when snapshots are off.** This matches VS Code and + keeps history-only revert usable. We only add messaging. +- **Detect "files not restored" via `model.revert()?.snapshot == null`.** No new config/API, + no shared-code change. +- **Message it in the `RevertBanner`** with a distinct localized line, shown only when + `snapshot == null`. +- Proactively warning on the button before a revert (needs `config.snapshot`/`vcs` exposed to + the frontend) is **out of scope**. + +--- + +## Phase 1 — Communicate history-only revert (snapshots disabled) + +1. Add bundle key in `KiloBundle.properties` (place near the other `revert.banner.*` keys): + - `revert.banner.filesNotRestored=Snapshots are off — only the conversation was reverted; your files were not changed.` + - Add the same key to every translated `KiloBundle_*.properties` file. If translations are + not available, copy the English value (mirror how the other `revert.banner.*` keys were + seeded across bundles) so no key is missing. +2. In `RevertBanner.kt`: + - Add a retained `JBLabel` field `notice` styled like `hint` (`JBFont.small()`), created + once in `init` and added to `body` after `hint`. + - In `update()`, after computing `revert`, set + `notice.isVisible = revert.snapshot == null` and its text to + `KiloBundle.message("revert.banner.filesNotRestored")`. + - Color it via a theme API in `applyStyle` (use `UIUtil.getContextHelpForeground()` to match + the secondary `hint`; do not hardcode a color). Re-evaluate in `applyStyle` alongside + `hint.foreground`. + - Keep the existing empty-diff behavior (no file rows) — the notice replaces the missing + information rather than adding chrome. +3. Remove the redundant `isOpaque = false` on the `body` and `files` `Stack`s (see Phase 4); + do this while editing the file. + +## Phase 2 — Close code-duplication gaps + +4. In `KiloBackendSessionManager.kt`, collapse the two identical `revertDto(...)` overloads + (`SessionRevert` and `GlobalSessionRevert`) into a single private helper that maps the four + fields (`messageID`, `partID`, `snapshot`, `diff`) from a small shared shape. Simplest + approach: one private `fun revertDto(messageID: String?, partID: String?, snapshot: String?, + diff: String?)` returning `SessionRevertDto?` (null when `messageID` is null), and have both + call sites extract fields from their respective model type. Keep behavior identical; this is + a pure refactor covered by existing `KiloBackendSessionManagerTest` parsing assertions. + +## Phase 3 — Fill testing + end-to-end gaps + +### Frontend controller/model logic + +5. `SessionModelTest.kt` — add direct model tests: + - `revertedCount()` returns the number of user messages from the marker to the end + (build entries `u1,a1,u2,a2`; marker at `u1` → 2; marker at `u2` → 1; marker id absent → 0). + - `isRevertedMessage()` true for the marker message and everything after, false before. + - `snapshot`-null marker still yields a non-zero `revertedCount()` (history-only case). +6. `TurnLifecycleTest.kt` (or new `RevertFlowTest.kt`) — add controller tests using `prompted()`: + - `redo()` reverts to the NEXT user message: seed `u1,a1,u2,a2`, apply marker at `u1`, + `edt { m.redo() }`, flush → assert `rpc.reverts` last call targets `u2`. + - `redo()` at the last user message calls unrevert: marker at `u2` → `redo()` → assert + `rpc.unreverts` recorded and no new revert call. + - `redoAll()` calls unrevert: assert `rpc.unreverts` contains `("ses_test","/test")`. + - `unrevert()` clears via RPC: assert `rpc.unreverts` populated. + +### Frontend banner → controller wiring (end-to-end within the UI layer) + +7. `SessionMessageListPanelTest.kt` — add wiring + history-only tests: + - Redo button click invokes the controller: build `RevertBanner(model, redo = { redo++ }, + redoAll = { all++ })`, set a marker, `banner...first { text == redo }.doClick()` → assert + the redo lambda fired; same for Redo All when `revertedCount > 1`. + - History-only notice: marker with `SessionRevertDto("u1", snapshot = null)` → assert the + `revert.banner.filesNotRestored` label is visible and no file rows are present. + - Snapshot-present: marker with `snapshot = "snap1"` → assert the notice label is hidden. + +### Full round-trip end-to-end (frontend) + +8. Add one `RevertFlowTest` case that exercises the whole loop through `SessionControllerTestBase`: + - Seed a multi-turn session, `edt { m.revert(userMsgId) }`, flush → assert busy-abort + ordering + `rpc.reverts`. + - `emit(SessionUpdated(..., revert = SessionRevertDto(userMsgId, snapshot = "s1")))` → + assert `model.isRevertedMessage(userMsgId)` and reverted views hidden. + - Drive Redo All via `m.redoAll()`; `emit(SessionUpdated(..., revert = null))` → assert + messages restored (`isRevertedMessage` false) and marker cleared. + Use existing `emit`/`flush` helpers; no timeouts. + +### Backend HTTP contract + +9. `MockCliServer.kt` — add routing + capture fields (the current generic `/session/ses_*` + regexes are full-match and won't catch the `/revert` suffix, so new cases are safe): + - Fields: `lastRevertPath`, `lastRevertBody`, `lastUnrevertPath`, `lastUnrevertBody` + (`@Volatile var ... : String? = null`). + - Cases (place beside the `summarize`/`prompt_async` cases): + - `bare.matches(Regex("/session/ses_[^/]+/revert")) && method == "POST"` → store path+body, + `respond(output, 200, sessionCreate)`. + - `bare.matches(Regex("/session/ses_[^/]+/unrevert")) && method == "POST"` → store path+body, + `respond(output, 200, sessionCreate)`. +10. `KiloBackendChatManagerTest.kt` — mirror the existing `compact posts summarize request` test: + - `revert posts messageID and partID to revert endpoint`: call + `chat.revert("ses_abc", "/test/project", "msg1", "prt1")`; assert + `requestCount("/session/ses_abc/revert") == 1`, path starts with + `/session/ses_abc/revert?directory=`, body == `{"messageID":"msg1","partID":"prt1"}`. + - `revert omits partID when null`: body == `{"messageID":"msg1"}`. + - `unrevert posts empty body to unrevert endpoint`: body == `{}` and path prefix asserted. +11. `KiloCliDataParserTest.kt` — add `buildRevertJson` unit tests: + - `buildRevertJson("m1", null) == {"messageID":"m1"}`. + - `buildRevertJson("m1", "p1") == {"messageID":"m1","partID":"p1"}`. + - Escaping: an id containing a quote/backslash is JSON-escaped (reuse the parser's `escape`). + +## Phase 4 — AGENTS conformance cleanup + +12. Remove the unused bundle key `revert.disabled.agentBusy` from `KiloBundle.properties` and all + translated bundles (grep confirms it is referenced nowhere in Kotlin). Alternatively, if the + team wants VS Code parity, wire it as a disabled-state tooltip on the Rollback button — but + the recommended, lower-risk action is removal, since JetBrains intentionally aborts the busy + turn instead of disabling the button. +13. Remove redundant `isOpaque = false` on the transparent `Stack`s in `RevertBanner.kt` + (`body`, `files`) — `Stack` is already a no-color panel. Keep `isOpaque = false` on the + `BorderLayoutPanel` root only if it visibly overlays the session surface; otherwise remove it + too and rely on the default. +14. Add usage metrics for the new user-facing actions in `SessionController.kt`, using the + existing `capture(event, props)` + `sessionProps(id)` helpers: + - In `revert()` (on the success path, after `sessions.revert`): `capture("Session Rollback", + sessionProps(id))`. + - In `redo()`/`redoAll()`/`unrevert()`: `capture("Session Redo", sessionProps(id))` / + `capture("Session Redo All", ...)` as appropriate. Keep names consistent with existing + event naming; do not add PII. + +## Out of scope + +- Exposing `config.snapshot`/`vcs` to the frontend to proactively warn before a revert. +- Changing the retained-vs-rebuild strategy of `RevertBanner.files` (low-frequency update; + acceptable as-is). +- Replacing the full-project `ACTION_SYNCHRONIZE` in `synchronizeFromDisk` with a scoped VFS + refresh (only revisit if it shows up as a perf problem). +- Any VS Code webview parity changes beyond the shared i18n strings already present. + +## Validation + +Run from `packages/kilo-jetbrains/`: + +- `./gradlew typecheck` — compiles all Kotlin including generated client. +- `./gradlew test` — runs frontend + backend suites, including the new tests. Requires Java 21; + only check Java if Gradle reports a Java error. +- Targeted while iterating: run the touched test classes (`TurnLifecycleTest`/`RevertFlowTest`, + `SessionMessageListPanelTest`, `SessionModelTest`, `KiloBackendChatManagerTest`, + `KiloCliDataParserTest`). + +Manual smoke (optional, `./gradlew runIde`): trigger a rollback in a non-git directory (or with +`snapshot: false`) and confirm the banner shows the "files not changed" notice with no file rows; +trigger one in a git repo and confirm the notice is hidden and file rows appear. + +## Changeset + +Add `.changeset/.md` (`"@kilocode/kilo-jetbrains": patch`) describing the user-facing +change, e.g. "Clarify in JetBrains rollback that only the conversation was reverted when +snapshots are disabled." Test-only and refactor tasks do not need their own changeset. + +## Suggested order + +Phase 3 backend tests (9–11) and model tests (5) are independent and can be done first to lock +behavior. Then Phase 1 (user-facing messaging) with its banner tests (7). Then Phase 2 refactor, +Phase 4 cleanups, controller tests (6, 8), and the changeset last. diff --git a/.kilo/plans/1784057744472-jetbrains-custom-provider-dialog.md b/.kilo/plans/1784057744472-jetbrains-custom-provider-dialog.md new file mode 100644 index 0000000000..e3d9eee31a --- /dev/null +++ b/.kilo/plans/1784057744472-jetbrains-custom-provider-dialog.md @@ -0,0 +1,341 @@ +# JetBrains custom provider: close on OK, select, edit, edit/disconnect buttons + +## Goal + +Fix the JetBrains "Add custom provider" flow and add edit support: + +1. Confirming the dialog closes it (OK label "Add" for add, "Save" for edit). +2. The added/edited provider becomes the selected row in the list. +3. Double-clicking an editable custom provider opens it for editing instead of disconnecting it. +4. Editable custom providers show both **Edit** and **Disconnect** action buttons. + +All work is in `packages/kilo-jetbrains/frontend/`. No backend, RPC, or DTO changes. `saveCustom` already upserts, and `ProviderSettingsDto.config[id]` already carries the fields needed to prefill an edit. No `kilocode_change` markers are needed (all files are under Kilo-owned `packages/kilo-jetbrains/`). + +## Root causes (verified in code) + +- **Dialog does not close**: `CustomProviderDialog.syncActions()` sets `isOKActionEnabled = !saving && !fetching && modelIds().isNotEmpty()` (ProvidersSettingsUi.kt:957). On save success `doOKAction()` sets `outcome` and calls `closeOk()` → `super.doOKAction()` (line 966), which only closes when `getOKAction().isEnabled()` is true. `saving` stays `true`, so OK is disabled and nothing closes even though the log prints "closing dialog". +- **Double-click deletes**: `SettingsListView.mouseClicked` fires `primary(item)` on non-button double-clicks (SettingsListView.kt:65-72), and `primary` runs the first enabled cell. A configured custom provider only exposes `DISCONNECT` (ProviderListRows.kt:90), so double-click disconnects. +- **Edit feasibility**: `KiloBackendProviderSettingsManager.saveCustom` patches config as an upsert and only touches auth when a key/env is supplied (lines 154-166); a blank key on edit preserves the stored secret. Prefill source is `state.config[id]`: `name`, `options["baseURL"]`, `env` (first entry), `models` (model ids). The API key is a secret and is never returned, so the key field starts blank on edit. +- OK label is already `settings.providers.customAdd=Add`; edit mode needs a new "Save" label. + +## Exact edits + +### 1. `packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle.properties` + +Add `settings.providers.edit=Edit` right after line 456 (`settings.providers.disconnect=Disconnect`): + +``` +settings.providers.edit=Edit +``` + +Add two keys in the custom block (after line 470 `customTitle` / line 471 `customAdd`): + +``` +settings.providers.customEditTitle=Edit OpenAI-Compatible Provider +settings.providers.customSave=Save +``` + +Only edit the base `KiloBundle.properties`; other locale files fall back to base for missing keys. + +### 2. `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/providers/ProviderCatalog.kt` + +Add a helper at the end of the file (after `configured(...)`, line 99): + +```kotlin +internal fun customEditable(provider: ProviderSettingsProviderDto, state: ProviderSettingsDto) = + state.config[provider.id]?.npm == CUSTOM_PROVIDER_PACKAGE +``` + +`CUSTOM_PROVIDER_PACKAGE` (`"@ai-sdk/openai-compatible"`) is already defined at line 19 and is the same signal the backend disconnect path uses. + +### 3. `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/providers/ProviderListRows.kt` + +Add `EDIT` to the enum (line 12-17): + +```kotlin +internal enum class ProviderListAction { + CONNECT, + OAUTH, + EDIT, + DISCONNECT, + ENABLE, +} +``` + +Update `cells` (lines 35-43) to mark EDIT primary and keep both EDIT and DISCONNECT visible when connected: + +```kotlin + override val cells: List + get() = actions.map { action -> + SettingsListCell( + action.name, + providerListActionText(action), + enabled(action), + alwaysVisible = (action == ProviderListAction.DISCONNECT || action == ProviderListAction.EDIT) && connected, + primary = action == ProviderListAction.EDIT, + ) + } +``` + +`enabled(action)` (line 45) already returns true for EDIT (`action != DISCONNECT`), no change. + +Add the EDIT label to `providerListActionText` (lines 48-53): + +```kotlin + ProviderListAction.EDIT -> KiloBundle.message("settings.providers.edit") +``` + +Update `providerActions` (lines 83-96) so configured editable custom providers expose EDIT + DISCONNECT: + +```kotlin +internal fun providerActions( + provider: ProviderSettingsProviderDto, + state: ProviderSettingsDto, + disabled: Set = state.disabled.toSet(), +): List { + if (provider.id in disabled) return listOf(ProviderListAction.ENABLE) + if (provider.id == KILO_PROVIDER_ID && configured(provider, state, state.connected.toSet())) return emptyList() + if (configured(provider, state, state.connected.toSet())) { + return if (customEditable(provider, state)) { + listOf(ProviderListAction.EDIT, ProviderListAction.DISCONNECT) + } else { + listOf(ProviderListAction.DISCONNECT) + } + } + val methods = providerMethods(provider, state) + return buildList { + if (methods.any { it.type == "oauth" }) add(ProviderListAction.OAUTH) + if (methods.any { it.type == "api" }) add(ProviderListAction.CONNECT) + } +} +``` + +### 4. `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/providers/ProvidersSettingsUi.kt` + +**4a. Import.** Add to the settings.base imports (near line 7): + +```kotlin +import ai.kilocode.client.settings.base.SettingsListSelection +``` + +**4b. `view` field (line 196).** Pass the new edit callback: + +```kotlin + private val view = ProvidersContent(::connect, ::oauth, ::disconnect, ::enable, ::edit) +``` + +**4c. Replace `custom()` (lines 314-330)** with add + edit + shared open: + +```kotlin + @RequiresEdt + private fun custom() { + checkEdt() + openCustomDialog(null) + } + + @RequiresEdt + private fun edit(provider: ProviderSettingsProviderDto) { + checkEdt() + val cfg = state.config[provider.id] ?: return + openCustomDialog( + CustomProviderEdit( + id = provider.id, + name = cfg.name ?: provider.name, + baseUrl = cfg.options["baseURL"].orEmpty(), + envVar = cfg.env.firstOrNull(), + models = cfg.models.values.map { it.id }, + ), + ) + } + + // The dialog performs the save itself so failures can be shown inline and the user can + // correct their input without re-typing. It only closes on a verified success. + @RequiresEdt + private fun openCustomDialog(existing: CustomProviderEdit?) { + checkEdt() + val dialog = CustomProviderDialog( + cs, + directory, + { service().fetchCustomModels(it) }, + { service().saveCustom(it) }, + existing, + ) + if (!dialog.showAndGet()) return + val next = dialog.outcome ?: return + state = next + view.update(next, dialog.savedId) + clearProgress() + } +``` + +**4d. `ProvidersContent` (lines 520-591).** Add the `edit` callback and handle EDIT + selection. + +Constructor (lines 520-525): + +```kotlin +internal class ProvidersContent( + private val connect: (ProviderSettingsProviderDto) -> Unit, + private val oauth: (ProviderSettingsProviderDto) -> Unit, + private val disconnect: (ProviderSettingsProviderDto) -> Unit, + private val enable: (ProviderSettingsProviderDto) -> Unit, + private val edit: (ProviderSettingsProviderDto) -> Unit, +) : BaseContentPanel() { +``` + +`update` (lines 536-545) — add optional `select`: + +```kotlin + @RequiresEdt + fun update(state: ProviderSettingsDto, select: String? = null) { + checkEdt() + val notes = state.providers.count { providerDescription(it).isNotBlank() } + ProvidersSettingsUi.LOG.info("provider settings content update: start providers=${state.providers.size} connected=${state.connected.size} disabled=${state.disabled.size} descriptions=$notes") + this.state = state + val rows = providerListRows(state, "", disabledRows = busy) + if (select != null) view.update(rows, SettingsListSelection.Key(select)) else view.update(rows) + ProvidersSettingsUi.LOG.info("provider settings content update: completed rows=${rows.size}") + } +``` + +`activate` `when` block (lines 580-585) — add EDIT: + +```kotlin + when (action) { + ProviderListAction.CONNECT -> connect(row.provider) + ProviderListAction.OAUTH -> oauth(row.provider) + ProviderListAction.DISCONNECT -> disconnect(row.provider) + ProviderListAction.ENABLE -> enable(row.provider) + ProviderListAction.EDIT -> edit(row.provider) + } +``` + +**4e. `CustomProviderDialog`.** Add the edit-prefill data class, constructor param, prefill, `savedId`, edit-aware title/button, and the close fix. + +Add near the dialog (e.g. above `internal class CustomProviderDialog`): + +```kotlin +internal data class CustomProviderEdit( + val id: String, + val name: String, + val baseUrl: String, + val envVar: String?, + val models: List, +) +``` + +Constructor (lines 645-650) — add `existing` as the last param (keeps existing positional test calls valid): + +```kotlin +internal class CustomProviderDialog( + private val cs: CoroutineScope, + private val directory: String, + private val fetch: suspend (CustomModelFetchDto) -> CustomModelFetchResultDto, + private val save: suspend (CustomProviderSaveDto) -> ProviderActionResultDto, + private val existing: CustomProviderEdit? = null, +) : DialogWrapper(true) { +``` + +Add the `savedId` property next to `outcome` (lines 667-669): + +```kotlin + // Set once the save succeeds; the panel reads it after the dialog closes to update the list. + var outcome: ProviderSettingsDto? = null + private set + + // Id of the provider the save persisted; used to select the row after the dialog closes. + var savedId: String? = null + private set +``` + +`init` (lines 671-686) — edit-aware title/button and prefill: + +```kotlin + init { + title = if (existing != null) { + KiloBundle.message("settings.providers.customEditTitle") + } else { + KiloBundle.message("settings.providers.customTitle") + } + setOKButtonText( + if (existing != null) KiloBundle.message("settings.providers.customSave") + else KiloBundle.message("settings.providers.customAdd"), + ) + init() + initValidation() + existing?.let { prefill(it) } + models.document.addDocumentListener(object : DocumentAdapter() { + override fun textChanged(e: DocumentEvent) { + syncActions() + } + }) + pick.addActionListener { + if (fetching) cancelFetch() + else selectModels() + } + syncActions() + } + + @RequiresEdt + private fun prefill(edit: CustomProviderEdit) { + id.text = edit.id + id.isEditable = false + name.text = edit.name + url.text = edit.baseUrl + env.text = edit.envVar.orEmpty() + models.text = edit.models.joinToString(", ") + } +``` + +Save-success branch in `doOKAction` (lines 767-769) — reset `saving`, re-enable OK, record id, close unconditionally: + +```kotlin + ProvidersSettingsUi.LOG.info("custom provider add: save succeeded id='${input.id}', closing dialog") + outcome = result.state + savedId = input.id + saving = false + syncActions() + close(OK_EXIT_CODE) +``` + +Remove the now-unused `closeOk()` helper (line 966), or replace its body with `close(OK_EXIT_CODE)`; do not leave `super.doOKAction()` in the success path. `OK_EXIT_CODE` is a `DialogWrapper` constant available to the subclass without an import. + +## Tests — `packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/settings/providers/ProvidersSettingsUiTest.kt` + +Run against the real EDT/component tree with `FakeProviderRpcApi` (no mocks). + +**Update existing tests broken by the new EDIT action / callback:** + +- `content()` helper (line 965): change to `edt { ProvidersContent({}, {}, {}, {}, {}) }` (5 lambdas). +- `test configured custom provider exposes only disconnect` (lines 306-324): rename to reflect edit + disconnect and assert `assertEquals(listOf(ProviderListAction.EDIT, ProviderListAction.DISCONNECT), row.actions)`. +- `test source custom catalog providers remain visible while configured custom providers are connected` (line 412): change the `rows[0].actions` assertion to `listOf(ProviderListAction.EDIT, ProviderListAction.DISCONNECT)`. + +**Add new tests:** + +- Dialog closes on save success: reuse the `submit` + `flushUntil { edt { dialog.outcome != null } }` pattern; after success assert `dialog.savedId == "my-openai"` and `edt { dialog.isOKActionEnabled }` is `true` (proves the disabled-OK regression is fixed). +- Edit prefill: build `CustomProviderDialog(cs, "/tmp", { CustomModelFetchResultDto(listOf("gpt-4o")) }, { ProviderActionResultDto(...) }, CustomProviderEdit("my-openai", "My OpenAI", "https://example.com/v1", null, listOf("gpt-4o")))`. Assert the text fields (indices 0/1/2/4/5 for id/name/url/env/models) are populated, the key field (index 3) is blank, `id` field `isEditable == false`, and the OK button text equals `KiloBundle.message("settings.providers.customSave")`. (Field order via `filterIsInstance()`: 0=id, 1=name, 2=url, 3=key, 4=env, 5=models — `JBPasswordField` is a `JTextField`.) +- `providerActions` editable: given a provider with `config[id].npm == "@ai-sdk/openai-compatible"` and configured, assert `[EDIT, DISCONNECT]`, and that the EDIT cell has `primary == true` (via `row.cells.first { it.id == "EDIT" }.primary`). +- Non-editable connected provider unchanged: a connected non-custom provider (e.g. `anthropic`, connected) still yields `[DISCONNECT]`. +- Edit callback fires instead of disconnect on primary: construct `ProvidersContent` with recording lambdas (capture which provider each callback got), update with a configured editable provider, trigger the primary path, and assert the edit lambda ran and disconnect did not. +- Selection after update: `content.update(state, select = "local-openai")` then assert the list's selected row key is `"local-openai"`. + +## Validation + +Run from `packages/kilo-jetbrains/`: + +- `bun run typecheck` (or `./gradlew typecheck`). +- `./gradlew test` (target `ProvidersSettingsUiTest` first if iterating). +- Manual smoke via `./gradlew runIde`: add a custom provider → dialog closes and the new row is selected; double-click the row → edit dialog opens prefilled with the id field locked and "Save" button; the connected custom row shows both Edit and Disconnect. + +Java 21 is required for Gradle; only check `java -version` if a Gradle command fails with a Java error. + +## Notes / risks + +- API key is intentionally not prefilled on edit (secret). Blank key preserves the stored key; a new value updates it — matches `saveCustom` behavior. +- The id field is locked on edit because the id is the config key; renaming would create a second provider. +- Double-click on a visible action button (Edit/Disconnect) still routes through the single-cell click path, not `primary`; only double-clicks on the non-button row area trigger the primary (EDIT) action. +- Keep new identifiers single-word where clear (`existing`, `cfg`, `select`, `edit`, `prefill`, `savedId`). + +## Out of scope + +- Editing headers, per-model capabilities (reasoning), or config scope (global vs workspace) beyond the current add dialog. +- Any changes to shared `packages/opencode/` code, RPC contracts, or DTOs. diff --git a/.kilo/plans/1784058434633-consolidate-jetbrains-model-pickers.md b/.kilo/plans/1784058434633-consolidate-jetbrains-model-pickers.md new file mode 100644 index 0000000000..a807f0ed63 --- /dev/null +++ b/.kilo/plans/1784058434633-consolidate-jetbrains-model-pickers.md @@ -0,0 +1,198 @@ +# Consolidate JetBrains model pickers into a shared PickerPopup base + +## Goal + +Remove duplication between the two list-picker popups in the JetBrains frontend by +extracting a generic base, and make both consume it: + +1. Prompt model picker — `session/ui/model/ModelPicker.kt` (`showPopup`) — single-select + commit, search field, expand/collapse details panel, sections, per-row favorite (star) + toggle. +2. Custom provider model picker — `settings/providers/ProvidersSettingsUi.kt` + (`showModelPopup` inside `CustomProviderDialog`) — multi-select toggle, no search, no + details, selection stored in the `models` text field. + +The base must expose configurable options; the provider picker enables: multi-select, no +expanded/details view, and extra header toolbar buttons ("Select All" / "Deselect All"). + +All work is under `packages/kilo-jetbrains/frontend/`. No backend/RPC/DTO changes. Files are +Kilo-owned (no `kilocode_change` markers). + +## Resolved decisions + +- **Approach**: Extract a generic `PickerPopup` base; both pickers become thin configs. +- **Selection state**: Caller owns it. Base is selection-stateless: it calls `checked(row)` + to render check state and `onPrimary(row)` on activation. Provider keeps the `models` text + field as source of truth; prompt keeps its favorites callbacks. +- **Select All / Deselect All**: Two caller-supplied header toolbar buttons. Remove the + in-list `CustomModelRow.selectAll` row entirely. +- **Renderer**: Extract a base renderer skeleton too; `ModelPickerRenderer` and the provider + renderer extend it. Generalize the favorite hit-zone into a trailing click-zone helper. +- **Location**: New package `ai/kilocode/client/ui/picker/` with `PickerPopup` and + `PickerListRenderer`. `PickerRow` and `ModelSearch` stay where they are and are reused. + +## Base design + +### `ui/picker/PickerPopup.kt` — generic popup + +Owns: `JBList` + `CollectionListModel`, `createComponentPopupBuilder` with the shared +flags (requestFocus/focusable/cancelOnClickOutside/cancelKeyEnabled/cancelOnWindowDeactivation/ +locateWithinScreenBounds, non-resizable, non-movable), `popupBackground` helper (move the +duplicated `NewUI -> Popup.BACKGROUND else getListBackground()` here), header assembly, +mouse hit-testing, keyboard bindings, auto-select-on-move + scrolling install, and size +computation. + +Config (constructor params / vars, defaults match current behavior): + +- `anchor: JComponent`, `placement: Placement` (`ABOVE` / `BELOW` / `UNDERNEATH`). Prompt uses + `PopupShowOptions.aboveComponent` / `showUnderneathOf`; provider uses `showUnderneathOf(pick)`. +- `rows: (query: String) -> List` — rebuilt when the search text changes. Provider passes a + function that ignores `query`. +- `renderer: PickerListRenderer`. +- `checked: (T) -> Boolean` — drives the row check icon (single: `row.key == active`; multi: + `isSelected(row)`). +- `sectionTitle: (rows: List, index: Int) -> String?` — optional; prompt supplies + `modelPickerSectionTitle`, provider passes `{ _, _ -> null }`. +- `mode: Mode` = `Single` | `Multi`. + - Single: on primary click/ENTER call `onPrimary(row)` then `popup.closeOk(null)`. + - Multi: on primary click/SPACE/ENTER call `onPrimary(row)`, repaint, stay open. +- `onPrimary: (T) -> Unit`. (Prompt decides activate-vs-clear inside based on `row.item == null`; + provider toggles membership in the text field.) +- Optional trailing toggle: `trailingHit: (list, bounds, point) -> Boolean` and + `onTrailing: (T) -> Unit`. Prompt supplies favorite hit-zone + favorite toggle; provider omits. + Keyboard: in Single mode `Shift+SPACE` triggers trailing when present. +- `search: Boolean` — show `SearchTextField` in header CENTER. Prompt true; provider false. +- `toolbar: List` — extra header buttons placed in header WEST. Provider passes + Select All / Deselect All; prompt passes empty. +- Optional details/expand: `details: JComponent?` + `onPreview: (T?) -> Unit` + + `expandStateKey: String?`. When non-null, base shows the expand `HoverIcon`, EAST details + panel, persists expanded state via `PropertiesComponent`, reserves details width when + expanded, and `Disposer.register(popup, details)` if `details is Disposable`. Provider passes + null (no expand toggle, no details). +- Sizing: `minWidth`, `maxWidth`, `maxVisibleRows`, `emptyListHeight` (defaults = current + ModelPicker constants 420/760/10/120). Provider passes `minWidth = 320` and a `maxWidth` + that preserves today's look. Reuse the existing `computeInitialPopupSize` / + `computeListPreferredWidth` / `computeListPreferredHeight` logic, moved into the base and + parameterized by these constants + optional details width. + +Header layout: `BorderLayout` with `toolbar` row WEST, `search` CENTER (empty when +`search=false`), expand `HoverIcon` EAST (only when details present). Preserve +`AbstractPopup.customizeSearchFieldLook` and background wiring. + +Keyboard (registered on both the list and, when present, the search editor): + +- `UP`/`DOWN` → move selection (search field only; list uses `ScrollingUtil`). +- `ENTER` → primary on selected row. +- `ESC` → `popup.cancel()`. +- Single + trailing present → `Shift+SPACE` → trailing on selected row. +- Multi → `SPACE` → primary (toggle) on selected row. + +Mouse (`mouseReleased`, `UIUtil.isActionClick`): resolve row via `locationToIndex` + +`getCellBounds`/`contains`; if trailing present and `trailingHit` → `onTrailing` + consume; +else `onPrimary` (Single closes, Multi consumes + repaints). + +### `ui/picker/PickerListRenderer.kt` — renderer skeleton + +Abstract `ListCellRenderer` base: `PickerRow` wrap + optional top `GroupHeaderSeparator` +(driven by `sectionTitle`) + `[check icon | content | trailing]` layout with the shared +transparent row + `UiStyle.Gap.md/lg/md/pad` insets. Provides: + +- `check` icon column (`AllIcons.Actions.Checked` / `EmptyIcon`), set from `checked(row)`. +- protected `content: JComponent` slot and optional `trailing: JComponent` slot. +- section separator top panel wiring (`top`/`sep` from `ModelPickerRenderer`). +- a companion `trailingClickZone(list, bounds, point, width)` generalizing + `ModelPickerRenderer.isFavoriteClick` (keep `FAVORITE_CLICK_AREA_WIDTH` behavior). + +## Ordered implementation tasks + +1. **Create `ui/picker/PickerListRenderer.kt`**: base renderer skeleton with check column, + `PickerRow` wrap, top section separator, content/trailing slots, transparent row + insets, + and the `trailingClickZone` helper (moved/generalized from `ModelPickerRenderer.isFavoriteClick` + / `favoriteInset`). +2. **Create `ui/picker/PickerPopup.kt`**: generic popup per the design above, including the + moved `popupBackground` helper and the sizing helpers (parameterized). +3. **Refactor `ModelPickerRenderer`** to extend `PickerListRenderer`: content = title + (`SimpleColoredComponent`) + warn + free/BYOK badges + provider label; trailing = favorite + star; check via `checked`. Keep existing internal test accessors (`starIcon`, + `badgeVisible`, `badgeText`, `byokVisible`, `warningVisible`, `warningTooltip`) and the + `DATA_COLLECTED`/`checked`/`empty` companion members so `ModelPickerTest` compiles unchanged. +4. **Refactor `ModelPicker.showPopup`** to build a `PickerPopup` configured + as: Single mode; `rows = { q -> modelPickerRows(items, favorites(), q, allowEmpty, emptyText, includeSmall) }`; + `checked = { it.key == selected?.key }`; `sectionTitle = ::modelPickerSectionTitle`; + `onPrimary = { row -> row.item?.let(::activate) ?: clear() }`; trailing = favorite hit-zone + + `onFavoriteToggle`; `search = true`; details = `ModelDetailsPanel` with `expandStateKey = + MODEL_PICKER_EXPANDED_KEY`; placement from `placement`; sizing constants = current values. + Keep `ModelPicker`'s public API (`setItems`, `select`, `clearSelection`, `open`, callbacks, + `Placement`, `Item`) and test hooks (`selectedForTest`, `selectionKeyForTest`, + `expandedForTest`) unchanged so `PromptPanel`, `settings/models`, and `settings/agents` + consumers are unaffected. +5. **Add provider picker renderer** (small subclass of `PickerListRenderer` in + `settings/providers/`, or a shared simple text renderer): content = a `JBLabel` showing the + model id; no trailing; check via `checked`. +6. **Rewrite `CustomProviderDialog.showModelPopup(ids)`** to build a `PickerPopup`: + Multi mode; `rows = { _ -> ids }` (raw model ids, no select-all row); `checked = { it in modelIds().toSet() }`; + `onPrimary = { toggleModel(it) }`; `sectionTitle = { _, _ -> null }`; `search = false`; + `toolbar = listOf(selectAllButton, deselectAllButton)`; details = null; `minWidth = 320`; + anchor = `pick`, placement `UNDERNEATH`. +7. **Extract provider selection mutations into testable helpers** on/near `CustomProviderDialog` + operating on the `models` text field: `toggleModel(id)`, `selectAllModels(ids)`, + `clearModels()` (reuse existing `modelIds()` / `setModelIds()`). Wire the two toolbar buttons + to `selectAllModels(ids)` and `clearModels()`. +8. **Remove dead code**: `CustomModelRow`, `customModelRows`, `CustomModelRowRenderer`, + `CUSTOM_MODEL_POPUP_MIN_WIDTH`/`CUSTOM_MODEL_POPUP_MAX_ROWS` (fold into base config), and the + now-duplicated inline `popupBackground` in `ProvidersSettingsUi.kt`. +9. **Strings**: add a "Deselect All" key to `KiloBundle.properties` (e.g. + `settings.providers.customModelsDeselectAll=Deselect All`); reuse existing + `settings.providers.customModelsSelectAll` for "Select All". + +## Tests + +- **Keep passing unchanged**: `ModelPickerTest.kt` (row builder + renderer + `ModelSearch` + + favorite hit-zone). Because `ModelPickerRenderer` keeps its accessors and companion members and + `modelPickerRows`/`ModelPickerRow` are untouched, these should compile and pass as-is. Verify + the favorite hit-zone tests still reference a working symbol (either keep + `ModelPickerRenderer.isFavoriteClick` delegating to `PickerListRenderer.trailingClickZone`, or + update the 3 call sites in `ModelPickerTest.kt` to the new helper). +- **Update** `ProvidersSettingsUiTest.kt`: + - Replace `test custom model rows start with select all` (there is no select-all row anymore) + with tests for the extracted helpers: `toggleModel` adds/removes an id in the text field; + `selectAllModels(ids)` sets all; `clearModels()` empties it. + - Keep existing add/edit/delete and dialog-close tests working. +- **New**: a small `PickerListRenderer`/`PickerPopup` unit test where feasible without a live + popup — e.g. `trailingClickZone` geometry (mirroring the current `isFavoriteClick` tests) and + the provider text renderer check-state. Avoid asserting live-popup internals; follow the + existing pattern of testing renderers/row-builders/pure helpers directly (per package AGENTS + "test the real implementation, no mocks"). + +## Validation + +From `packages/kilo-jetbrains/`: + +- `./gradlew typecheck` +- `./gradlew test` (iterate with `--tests ai.kilocode.client.session.ui.model.ModelPickerTest` + and `--tests ai.kilocode.client.settings.providers.ProvidersSettingsUiTest`). +- Manual smoke via `./gradlew runIde`: + - Prompt model picker: search, arrow/enter select, favorite star toggle, expand/collapse + details, placement — all unchanged. + - Add custom provider → fetch models → popup shows model list with "Select All"/"Deselect All" + toolbar buttons, per-row multi-select toggles, no details/expand, selection reflected in the + Model IDs field; Save persists selected models. + +## Risks / notes + +- `ModelPicker`'s public API and test hooks must stay stable — several settings screens depend on + it. Only the popup internals move. +- The details/expand panel is `Disposable`; the base must register it with the popup exactly as + today to avoid leaks. +- Sizing differs (prompt 420/760 dynamic + details; provider fixed 320). Parameterize rather than + hard-code; keep provider width visually equivalent to current. +- Popups are hard to unit test; keep coverage on pure helpers/renderers, not live-popup behavior. +- Keyboard/mouse semantics differ by mode (single-commit-close vs multi-toggle-stay-open) and by + presence of a trailing toggle — encode these in the base mode, don't special-case callers. + +## Out of scope + +- The other picker popups (`ModePicker`, `ReasoningPicker`, `SessionAccountOverlay`) — not part + of this consolidation. +- Adding search to the provider picker (kept off to match current behavior; base supports it). +- Any backend/RPC/DTO or CLI changes. diff --git a/.kilo/plans/agent-manager-multi-project-configuration.md b/.kilo/plans/agent-manager-multi-project-configuration.md new file mode 100644 index 0000000000..340082fbb6 --- /dev/null +++ b/.kilo/plans/agent-manager-multi-project-configuration.md @@ -0,0 +1,262 @@ +# Agent Manager multi-project configuration architecture + +**Status:** Blocking architecture for multi-project release + +**Date:** 2026-07-22 + +This document is the canonical configuration specification for Agent Manager multi-project support. The main UI/runtime plan references it and must not duplicate or contradict it. + +The executable sequence from the current branch is [`agent-manager-multi-project-implementation-handoff.md`](./agent-manager-multi-project-implementation-handoff.md). + +## Decision + +Keep the useful current split between user and project settings, but make every Settings read and write target explicit, immutable, revisioned, and independent from Agent Manager activation. + +Multi-project must not ship broadly while Settings can load a draft for project A and resolve its save target from the mutable active project B. + +## Current behavior + +Kilo has four configuration stores: + +| Store | Example | Owner | +|---|---|---| +| VS Code preferences | VS Code `settings.json` | This VS Code user/installation | +| Kilo user config | `~/.config/kilo/kilo.json` | User defaults across projects and Kilo clients | +| Kilo project config | `/.kilo/kilo.jsonc` | Repository behavior and overrides | +| Runtime/session state | In-memory, directory-qualified | One project, worktree, or session | + +The shared Settings save currently calls `splitConfigByScope()`: + +- `commit_message` is written to project config; +- `indexing.enabled` is written to project config; +- all other generic Settings fields are written to user config. + +The Indexing tab also has an explicit Global/Project selector and can write the entire `indexing` object to either layer. This is too broad because project config can receive provider/model/vector-store credentials and infrastructure settings. + +Several controls are VS Code preferences and bypass Kilo config entirely, including autocomplete UI, browser automation, notifications, max auto-approve cost, commit-message output language, and indexing button visibility. + +## Confirmed blocking failure + +The current protocol does not bind a draft to the config target it was loaded from: + +1. `KiloProvider.fetchAndSendConfig()` resolves a mutable current directory and sends unqualified `configLoaded` state. +2. The webview owns one global/project/effective draft. +3. Agent Manager changes the active project from A to B. +4. The webview sends an unqualified `updateConfig`. +5. `KiloProvider.handleUpdateConfig()` resolves the current directory again at save time and may write A's draft to B. + +Reads are directory-scoped, but writes are not bound to the read target. This is the release blocker. + +The backend also lacks an expected target/revision precondition, so external editors or another window can overwrite a config between read and save. + +## Ownership policy + +### VS Code preferences + +These remain in VS Code settings and do not participate in project config: + +- extension language and presentation preferences; +- autocomplete enablement, keybindings, provider, and model; +- browser automation enablement/system Chrome/headless mode; +- notification enablement and sound; +- maximum automatic approval cost; +- commit-message output language; +- indexing button visibility while indexing is disabled; +- multi-project feature enablement. + +### Kilo user config + +These are personal defaults or security policy and should be edited in User scope: + +- default, small, and subagent models and variants; +- provider enablement, custom providers, credentials, and endpoints; +- user/global agents and default agent; +- permission defaults and user tool defaults; +- sandbox policy, network access, writable paths, and allowed hosts; +- compaction, checkpoint/snapshot, and tool-output defaults; +- username and display behavior; +- sharing, remote control, telemetry, and experimental features; +- user/global formatter, LSP, MCP, skills, instructions, commands, and workflows; +- indexing provider, model, credentials, vector storage, and global tuning defaults. + +A trusted project may override many of these at runtime, but editing User scope never writes those overrides. + +### Kilo project config + +These describe repository behavior and are valid project settings: + +- commit-message prompt; +- repository indexing file extensions, include/ignore rules, and deliberate project tuning overrides; +- repository instructions; +- repository skill paths; +- repository commands/workflows; +- trusted project agents; +- trusted project MCP servers; +- repository formatter/LSP overrides; +- repository watcher ignores; +- repository-specific tool restrictions and permission requests. + +Project configuration may override user model/agent/tool defaults, but provider credentials and security-policy weakening must not be silently authored into a repository. + +### Machine-local project consent + +Indexing enablement is privacy consent, not repository configuration. Store it outside the repository, keyed by canonical `ProjectId` in machine-local extension state: + +- newly observed projects default to indexing disabled; +- users explicitly enable indexing for one project on this machine; +- repository config cannot enable indexing; +- repository config may describe what to index, but consent gates whether indexing starts; +- canonical project identity prevents a symlink or alternate path from bypassing consent. + +Effective indexing requires both valid user-global indexing configuration and machine-local consent for that project. + +### Current tabs + +| Settings tab | Correct editable target | +|---|---| +| Models | User by default; explicit Project scope may override models/agents | +| Providers | User only for credentials/endpoints; project-provided entries are source-labelled | +| Agent Behaviour | User or explicit trusted Project scope | +| Auto Approve | User Kilo config; max cost remains VS Code preference | +| Browser | VS Code preferences | +| Checkpoints | User default or explicit Project override | +| Display | User config | +| Autocomplete | VS Code preferences | +| Notifications | VS Code preferences | +| Context | User defaults; repository watcher/instruction rules in explicit Project scope | +| Commit Message | Project scope for prompt; language remains VS Code preference | +| Indexing | User for provider/model/credentials/storage; machine-local project consent for enablement; Project for repository rules | +| Experimental | User config; multi-project also mirrors to VS Code preference | +| Sandboxing | User config only | +| Language | VS Code preference | +| MCP/Commands/Skills | User defaults or explicit trusted Project scope | + +No field silently chooses a file during save. The UI must display its scope. + +## Settings UX + +Use explicit scope and project controls: + +```text +Scope: User | Project + +Project: backend +Target: /projects/backend/.kilo/kilo.jsonc +``` + +- User scope always targets user config. +- Project scope requires an explicit trusted project selector. +- The Settings selector is separate from Agent Manager's active project. +- Opening Settings may initialize the project selector once from the current project, but later Agent Manager switches never change it. +- A dirty project draft cannot move to another project. Selector changes require Save, Discard, or Stay. +- Inherited values show source badges such as User, Project: backend, and Managed. +- Project scope offers Override and Reset to inherited. +- Project-sourced providers cannot be silently deleted from project config through User scope. + +Runtime config still follows the exact session directory. Settings Project scope targets the registered project root, not the active worktree. Worktree-config editing is a separate future feature requiring an explicit `WorktreeRef`. + +## Immutable binding contract + +A Settings read returns an opaque binding: + +```ts +interface SettingsBinding { + id: string + connectionGeneration: number + scope: "global" | "project" + project?: { + projectId: string + root: string + generation: number + } + directory: string + target: { + scope: "global" | "project" + path: string + revision: string + exists: boolean + writable: boolean + } +} +``` + +The write contains only the opaque binding and patch: + +```ts +interface WriteSettingsConfig { + type: "settingsConfig.write" + requestId: string + bindingId: string + set: Record + unset: string[][] +} +``` + +The extension stores the authoritative binding. On write it must: + +1. reject unknown/expired bindings; +2. verify project existence, generation, and trust; +3. capture the binding before the first await; +4. use the binding's stored directory and scope; +5. never call `getWorkspaceDirectory()`, `contexts.active()`, or use a worktree/session fallback; +6. clear a draft only from the matching `{ requestId, bindingId }` response. + +Bindings expire after save, reconnect, trust revocation, project removal, or context generation change. + +## Backend revision contract + +`GET /config/overlay` must return the exact global/project target path, parsed raw target config, effective config/source metadata, and a revision. + +The revision is a SHA-256 fingerprint of canonical target path, existence marker, and exact file bytes. This catches content changes, JSONC comment-only edits, and target changes. + +`PATCH /config/overlay` accepts one scope and requires: + +```ts +{ + scope: "global" | "project" + set: Record + unset: string[][] + expected: { + path: string + revision: string + } +} +``` + +The backend must re-resolve the authoritative target, verify path/revision under a target lock, patch the raw target layer, validate it, atomically replace the file, and return a fresh snapshot. It never accepts an arbitrary client path. + +Expected failures include expired binding, unknown/untrusted project, changed target, revision conflict, invalid config, non-writable target, and I/O failure. Every failure preserves the draft. + +## Required implementation + +1. Add revisioned target descriptors and compare-and-swap writes to the Kilo config overlay API. +2. Split activation-bound runtime config state from binding-keyed Settings editor state. +3. Replace unqualified `configLoaded`/`updateConfig` with settings read/write messages carrying request and binding IDs. +4. Replace hidden `splitConfigByScope` saves with explicit scope on every editable control. +5. Restrict Indexing Project scope to repository rules; keep provider/model/credentials/storage in User scope. +6. Move indexing enablement from project config to machine-local consent keyed by canonical `ProjectId`, default off. +7. Audit direct config mutators outside the save bar, especially provider disconnect, imports/resets, custom providers, work styles, permission rules, and indexing actions. +8. Make Open Project Config take a `ProjectRef`, resolve the immutable registered root, and verify trust. +9. Partition config caches/events by scope, directory, target, revision, and activation generation. + +## Blocking tests + +- Load Settings for A, switch Agent Manager to B, save: only A's bound target changes. +- Same test while selecting A/B worktrees and sessions. +- User-scope save always changes only user config. +- Project-scope save requires the explicit trusted project and changes only its registered root config. +- Dirty drafts survive Agent Manager switches and cannot migrate between Settings projects. +- Out-of-order reads and writes update only the matching request/binding. +- External file change causes a revision conflict without losing the draft. +- A changed config target path causes a target conflict. +- Project removal, generation change, or trust revocation expires its binding. +- Indexing provider/model/credentials/storage never enter project config through the form. +- A repository file containing `indexing.enabled: true` cannot grant indexing consent. +- New projects default to indexing disabled until explicitly enabled on this machine. +- Consent follows canonical project identity across symlink/path aliases and never leaks to another project. +- `commit_message.prompt` and repository indexing rules still support explicit project writes. +- Runtime worktree config uses the worktree directory while Project Settings remains bound to the registered project root. + +## Release gate + +Keep multi-project disabled by default until the immutable binding/revision contract and the blocking tests above are implemented. The useful existing project-local behavior should be preserved, not removed; its write target must become explicit and immutable. diff --git a/.kilo/plans/agent-manager-multi-project-implementation-handoff.md b/.kilo/plans/agent-manager-multi-project-implementation-handoff.md new file mode 100644 index 0000000000..510a5e1c38 --- /dev/null +++ b/.kilo/plans/agent-manager-multi-project-implementation-handoff.md @@ -0,0 +1,459 @@ +# Agent Manager multi-project implementation handoff + +**Status:** Implementation-ready handoff from the current branch + +**Date:** 2026-07-22 + +This document tells the next implementation model exactly how to continue from branch `abalone-bactrosaurus` at commit `8f48da2278` plus the uncommitted plan files. It is the execution checklist. Detailed decisions live in: + +- [`agent-manager-multi-project-configuration.md`](./agent-manager-multi-project-configuration.md) for configuration ownership, bindings, revisions, indexing consent, and settings tests; +- [`agent-manager-multi-project-uniform-ui.md`](./agent-manager-multi-project-uniform-ui.md) for runtime, routing, lifecycle, uniform sidebar UI, and acceptance criteria. + +If this handoff conflicts with either architecture document, stop and resolve the contradiction before coding. + +## Goal + +Finish the current prototype into a safe, complete multi-project Agent Manager behind a default-off VS Code experimental flag. + +The feature is done only when: + +- multiple expanded projects show the same full Agent Manager sidebar behavior; +- every action uses explicit project/worktree/session ownership; +- Settings cannot write the wrong project's config; +- indexing requires machine-local consent per canonical project; +- project identity is canonical, Git-root-aware, common-dir-safe, and remote-authority-aware; +- single-project behavior remains unchanged when the flag is off. + +## Current branch baseline + +### Implemented and worth keeping + +- persistent additional-project registry with serialized/re-read mutations; +- separate `ProjectContext` objects and per-project Agent Manager state files; +- project-stamped state, stats, PR, and session payloads; +- canonical worktree presence comparison for symlink/`/tmp` aliases; +- per-project session listing from project root and worktree directories; +- partial production `ProjectRouteService` integration and raw-session ambiguity rejection; +- project-qualified sidebar DOM IDs and cross-project previous/next navigation; +- atomic selection validation and same-project activation fast path; +- flag-off return to pinned project; +- Experimental Settings toggle and translations; +- focused unit tests for registry, contexts, paths, pollers, routing, sessions, selection, and navigation. + +### Not implemented or incomplete + +- immutable/revisioned Settings bindings; +- machine-local indexing consent; +- canonical pinned Git toplevel, `commonGitDir`, URI scheme/authority identity; +- strict project envelopes for all Agent Manager operations; +- complete route-service use for every session/terminal/diff/share/permission operation; +- one full sidebar body shared by single- and multi-project modes; +- uniform per-context poller and stale-state ownership; +- all repository mutations through `ProjectContext.run()`; +- complete real two-project E2E verification. + +### Known diff cleanup + +- remove unrelated `packages/opencode/package.json` ordering/dependency drift; +- restore unrelated `bun.lock` ordering/version drift unless required by a retained change; +- remove `experimental.multi_project` from the CLI config schema and generated SDK once the VS Code flag is the sole source of truth; +- rewrite the changeset after final behavior is complete. + +Do not reset or discard unrelated user changes. Inspect every cleanup diff before applying it. + +## Non-negotiable invariants + +1. Agent Manager activation is not a Settings write target. +2. No identified operation falls back to the active project or workspace root in multi-project mode. +3. A project config write targets the explicitly selected registered project root, never an active worktree. +4. Runtime config remains directory-correct: project Local uses root, worktree sessions use exact worktree directory. +5. Repository config cannot grant indexing consent. +6. New projects default to indexing disabled on this machine. +7. Provider/API credentials and indexing infrastructure never enter project config through Settings. +8. Raw session/worktree IDs are never sufficient UI/runtime identity when multiple projects are exposed. +9. The full existing sidebar behavior is reused; do not maintain a simplified multi-project copy. +10. Do not raise `AgentManagerProvider.ts` or `AgentManagerApp.tsx` line caps. + +## Work order + +Complete slices in order. Do not start the next slice while the current slice's tests or checks fail. + +## Slice 0A: consolidate the feature flag + +### Required result + +Use one source of truth: VS Code application setting `kilo-code.new.experimental.multiProject`. + +### Required changes + +1. Remove `experimental.multi_project` from: + - `packages/core/src/v1/config/config.ts`; + - `packages/sdk/js/src/v2/gen/types.gen.ts` by regenerating the SDK after schema removal; + - `packages/kilo-vscode/webview-ui/src/types/messages/config.ts`. +2. Do not hand-edit generated SDK files. Run `./script/generate.ts` from repository root after endpoint/schema changes. +3. Change `ExperimentalTab.tsx` so the toggle reads the VS Code setting delivered in `configLoaded.settings`, not `config().experimental`. +4. Add `multiProject` to the extension settings payload sent by `KiloProvider.fetchAndSendConfig()`. +5. Toggling it sends only `updateSetting("experimental.multiProject", checked)`. +6. Keep `VscodeHost.multiProject()` and its change listener reading the same VS Code setting. + +### Tests + +- toggle initial state reflects VS Code setting when CLI config disagrees; +- toggling updates the VS Code setting and Agent Manager reacts; +- no CLI/project config file gains `experimental.multi_project`. + +### Stop gate + +Run from `packages/kilo-vscode/`: + +```sh +bun run format +bun run format:check +bun run typecheck +bun run lint +bun run test:unit +``` + +Do not continue if any command fails. + +## Slice 0B: machine-local indexing consent + +### Required result + +Indexing enablement is explicit machine-local consent keyed by canonical `ProjectId`, default false. Project config controls indexing rules but cannot enable indexing. + +### Required changes + +1. Add a versioned machine-local consent store in the extension, not repository config and not synced across machines. +2. Use canonical project identity as the key. The pinned project and registered projects use the same identity resolver. +3. Remove hidden routing of `indexing.enabled` to project config from `webview-ui/src/utils/config-scope.ts`. +4. Remove project/global inheritance logic for `indexing.enabled` from `indexing-tab-state.ts`. +5. The Indexing UI requires an explicit project selector for enablement and reads/writes consent through dedicated messages. +6. Keep these in User config only: + - provider; + - model and dimension; + - credentials/API keys/base URLs; + - vector-store type and connection/storage settings; + - machine/infrastructure tuning defaults. +7. Keep these available in explicit Project scope: + - file extensions; + - repository include/ignore rules; + - deliberate repository chunking/tuning overrides. +8. Indexing startup/status must require both valid User indexing configuration and consent for the routed project. +9. A repository containing `indexing.enabled: true` must not enable indexing. + +### Suggested files + +- new VS Code-free consent store under `src/indexing/` or `src/agent-manager/`; +- `src/KiloProvider.ts` only as a thin protocol adapter; +- `webview-ui/src/components/settings/IndexingTab.tsx`; +- `webview-ui/src/components/settings/indexing-tab-state.ts`; +- `webview-ui/src/context/config.tsx` only if necessary; +- focused tests beside existing indexing tests. + +### Tests + +- unknown project defaults off; +- A enabled does not enable B; +- symlink/path alias resolves to the same consent; +- repository config cannot grant consent; +- removing/re-adding behavior follows the documented store policy; +- no credentials/storage settings are emitted in a Project-scope patch. + +## Slice 0C: revisioned config overlay backend + +### Required result + +Config reads return authoritative target descriptors and revisions. Writes use compare-and-swap and cannot overwrite external changes or a changed target. + +### Required changes + +1. Extend Kilo-owned config overlay code: + - `packages/opencode/src/kilocode/config/overlay.ts`; + - a new Kilo-owned writer under `packages/opencode/src/kilocode/config/`; + - `packages/opencode/src/kilocode/server/httpapi/groups/config-console.ts`; + - `packages/opencode/src/kilocode/server/httpapi/handlers/config-console.ts`. +2. Read response includes for global and project targets: + - canonical path; + - scope; + - exists/writable; + - SHA-256 revision of canonical path, existence marker, and exact bytes; + - raw parsed target layer; + - effective config and source metadata. +3. Write request accepts exactly one scope, `set`, `unset`, and expected path/revision. +4. Server re-resolves the authoritative target. Never trust client path as a destination. +5. Lock by canonical target path, re-read inside lock, compare revision, patch raw JSONC, validate, and atomically replace. +6. Return a fresh authoritative snapshot. +7. Return typed 409 conflicts for target/revision changes; preserve drafts client-side. +8. Keep Kilo logic in `packages/opencode/src/kilocode/`. Shared upstream files get minimal marked delegation only when unavoidable. +9. Regenerate the SDK after endpoint changes. + +### Tests + +Add/extend: + +- `packages/opencode/test/kilocode/server/config-overlay.test.ts`; +- `packages/opencode/test/kilocode/project-config-update.test.ts`. + +Cover: + +- exact raw target layer; +- comment-only external edit conflict; +- missing-file target revision; +- newly created higher-priority target conflict; +- concurrent writers: one success, one 409; +- symlink escape rejection; +- global and project writes remain separate; +- atomic write failure never exposes partial content. + +### Stop gate + +From `packages/opencode/`: + +```sh +bun run typecheck +bun test test/kilocode/server/config-overlay.test.ts +bun test test/kilocode/project-config-update.test.ts +``` + +From repository root: + +```sh +./script/generate.ts +bun run script/check-opencode-annotations.ts +bun run script/check-opencode-promise-facades.ts +``` + +## Slice 0D: immutable Settings bindings + +### Required result + +Settings has explicit `User | Project` scope. Project scope requires an explicit trusted project selector. Drafts and saves never follow Agent Manager activation. + +### Required changes + +1. Split runtime-effective config from Settings editor config. +2. Add a binding controller under `packages/kilo-vscode/src/kilo-provider/`; keep `KiloProvider.ts` as a thin adapter. +3. Replace unqualified config protocol with: + - read request carrying request ID, scope, and optional project ID; + - snapshot carrying opaque binding ID and source/target metadata; + - write request carrying request ID, binding ID, set, and unset. +4. The extension stores authoritative bindings. The webview never supplies a writable path. +5. Project binding resolution: + - resolve registered `ProjectContext.root`; + - require project existence, matching generation, and trust; + - never use active worktree/session or `getWorkspaceDirectory()` after binding creation. +6. Bindings expire on successful save, reconnect, project removal, generation change, or trust revocation. +7. Separate drafts by scope/project binding. +8. Dirty selector changes prompt Save, Discard, or Stay. +9. Out-of-order reads/writes update only matching request/binding. +10. External config events refresh clean drafts and mark dirty drafts stale without overwriting them. +11. Remove `splitConfigByScope()` after all controls declare scope explicitly. +12. Audit direct config mutators outside the save bar, including provider disconnect, imports/resets, custom providers, work styles, Permission Dock, MCP actions, and indexing. +13. Open Project Config takes explicit `ProjectRef`, checks trust, and resolves the registered root. + +### UI scope policy + +Use the table in `agent-manager-multi-project-configuration.md`. Do not invent another policy. + +### Blocking tests + +- load A, activate B, save A: only A target changes; +- same while selecting worktrees/sessions; +- User save changes only user config; +- Project save changes only selected trusted project's root config; +- dirty draft cannot migrate to another project; +- project removal/trust revocation expires binding; +- external edit returns conflict and preserves draft; +- no save-time active-directory lookup occurs. + +## Slice 1: canonical project identity + +### Required result + +Every project is a canonical Git repository root with URI authority and common Git directory identity. + +### Required changes + +1. Replace path-only project descriptors with: + +```ts +{ + id, + uri, + scheme, + authority, + root, + commonGitDir, + label, + order, + trusted, + addedAt +} +``` + +2. Pinned and added projects use the same resolver: + - validate URI host scope; + - `git rev-parse --show-toplevel`; + - `git rev-parse --path-format=absolute --git-common-dir`; + - realpath/normalize both; + - derive ID from scheme, authority, and canonical root. +3. Opening VS Code in a repository subdirectory still uses the Git toplevel and root state file. +4. Reject another exposed project sharing canonical `commonGitDir`. +5. Key Git mutation locks by common Git directory. +6. Preserve remote URI scheme/authority in picker, storage, and open-folder operations. +7. Migrate or safely read the current registry version without dropping valid entries. + +### Tests + +- workspace subdirectory resolves to repository root; +- symlink aliases dedupe; +- linked worktree/common-dir duplicate rejected; +- other remote authority hidden but preserved; +- missing/non-Git entry remains removable and never falls back to pinned root. + +## Slice 2: strict routing and lifecycle + +### Required result + +Every repository-bound operation is explicitly project-qualified once multiple projects are exposed. + +### Required changes + +1. Introduce one project envelope at the Agent Manager boundary with project ID and generation. +2. Compatibility adapter injects pinned identity only in single-project mode. +3. Multi-project mode rejects missing/mismatched identity with typed errors. +4. Wire `ProjectRouteService` into every existing-session operation: + - transcript/messages; + - prompt/abort; + - share/unshare; + - fork/continuation; + - permission/question responses; + - terminal; + - file/context operations; + - diff/apply/revert. +5. Route global SSE events once by exact directory/session ownership. +6. Preserve non-Agent-Manager KiloProvider behavior. +7. Execute repository mutations through `ctx.run()` and generation-check commits. +8. Removal waits for mutation queue, stops pollers/watchers, flushes state, detaches routes, then removes registry entry. +9. Flag-off activates pinned Local and suspends secondaries without aborting sessions. + +### Tests + +- same raw session ID across projects is ambiguous without qualifier; +- B Local/share/unshare/permission never routes through A; +- unknown IDs produce no terminal/file/diff operation; +- project switch during mutation cannot change operation ownership; +- late completion after removal cannot mutate replacement context. + +## Slice 3: uniform context-owned state and polling + +### Required result + +Every initialized expanded project owns the same live-state services. Active selection changes cadence/detail only, not ownership. + +### Required changes + +1. Move stats and PR pollers into `ProjectContext`; remove active singleton/background split. +2. Each context owns stale/presence state, cached stats, local stats, PR state, run/setup state, and generation. +3. Background presence updates project stale state rather than emitting empty arrays. +4. All project outputs include project ID and generation; webview discards stale generations. +5. Session-created/deleted/updated events refresh the owning project store without active-project filtering. +6. Panel visibility and expansion uniformly control polling. + +### Tests + +- two expanded projects both receive stats/presence/PR updates; +- collapse stops only that project's pollers; +- stale late poll result is dropped; +- background session deletion updates only its project. + +## Slice 4: one full sidebar body + +### Required result + +Single- and multi-project modes render the same full `ProjectSidebarBody` implementation. + +### Required changes + +1. Extract the current full `renderBody()` from `AgentManagerApp.tsx` intact. +2. Parameterize it with one project store and project-qualified actions. +3. Preserve: + - busy state; + - drag/drop and grouping; + - section actions; + - search and keyboard hints; + - run/setup state; + - New Worktree dialog; + - worktree menus and PR actions; + - complete managed/unassigned session behavior. +4. Delete the simplified duplicate body path. +5. Render project rows keyed by stable project ID and keep bodies mounted across active changes. +6. New Worktree receives explicit target project, defaulting to Settings/detail selection policy as specified. + +### Tests + +- single-project behavior unchanged with flag off; +- two expanded projects render two full bodies; +- active selection changes no body mount identity; +- drag/drop, sections, worktree actions, sessions, and keyboard navigation work across projects. + +## Slice 5: cleanup and release validation + +1. Remove unrelated manifest/lockfile drift. +2. Update changeset to final user-visible behavior. +3. Run all extension and affected CLI checks. +4. Build/package the extension. +5. Use the VS Code self-test fixture with two repositories and multiple worktrees/sessions. +6. Keep feature default off until every blocking test passes. + +### Required extension checks + +From `packages/kilo-vscode/`: + +```sh +bun run format +bun run format:check +bun run typecheck +bun run lint +bun run test:unit +bun run knip +bun run check-kilocode-change +bun run compile +``` + +From repository root: + +```sh +bun run script/check-opencode-annotations.ts +bun run script/check-opencode-promise-facades.ts +bun run script/check-md-table-padding.ts +``` + +### Manual scenarios + +1. Flag off: current single-project Agent Manager is unchanged. +2. Enable flag in Experimental Settings; restart; value persists without CLI/project config changes. +3. Add/trust/expand two repositories; restart; pinned remains first. +4. Both projects show Local, worktrees, sessions, stats, PR state, and full actions. +5. Navigate previous/next across projects. +6. Create/delete/rename worktrees in both projects. +7. Send prompts and answer permission/question requests in both projects. +8. Share/unshare B while A is active; exact B directory is used. +9. Load Project Settings A, activate B, save A; B is unchanged. +10. Modify A config externally while draft is dirty; conflict preserves draft. +11. Indexing defaults off for a new project; enabling A does not enable B; repo config cannot enable either. +12. Disable flag while B is active; pinned Local becomes active and B remains registered/suspended. +13. Repeat key routing and identity checks in a remote VS Code window. + +## Rules for the implementation model + +- Work on one slice at a time. +- Read the referenced architecture section before editing. +- Add focused tests before or with behavior changes. +- Use `apply_patch` for manual edits. +- Do not hand-edit generated SDK files. +- Do not raise file-size caps. +- Do not add fallback compatibility code unless the plan explicitly requires the single-project adapter. +- Do not claim a slice complete until its stop gate passes. +- If a required API or ownership decision is missing, stop and update this plan instead of guessing. diff --git a/.kilo/plans/agent-manager-multi-project-runtime.md b/.kilo/plans/agent-manager-multi-project-runtime.md new file mode 100644 index 0000000000..25bb0d9e07 --- /dev/null +++ b/.kilo/plans/agent-manager-multi-project-runtime.md @@ -0,0 +1,351 @@ +# Agent Manager multi-project runtime + +> UI architecture update: the active-body plus background-summary model in this document is superseded by `agent-manager-multi-project-uniform-ui.md`. The runtime findings remain useful, but the final UI renders one permanent real interactive body for every expanded project and requires strict project-qualified routing before background actions are enabled. + +**Status:** Runtime foundation implemented (this worktree); accordion UI pending + +## Implementation status (2026-07-20) + +Landed in this worktree, all covered by unit tests (`tests/unit/agent-project-*.test.ts`): + +- `src/agent-manager/project-paths.ts` — canonical root resolution (`realpath` + `normalizePath`), case-aware `samePath`, deterministic `projectIdFor(root)` (sha1, stable across restarts), `resolveGitRoot`. +- `src/agent-manager/project-registry.ts` — versioned global catalog of **additional** projects (storage-injected, corrupt-safe, dedupe by id, trust/label/order). The pinned workspace project is never persisted. +- `src/agent-manager/project-context.ts` — immutable `ProjectContext` (owns WorktreeStateManager/WorktreeManager/SetupScriptService/stale set per canonical root, lazy creation, peek accessors) and `ProjectContexts` coordinator (pinned derivation, active/expanded lifecycle, trust+flag gating, `syncPinned()` for workspace changes, webview `ProjectSnapshot`s). +- `src/agent-manager/project-messages.ts` — vscode-free handlers: `requestProjects`, `addProject` (folder picker → git root resolve → dedupe), `removeProject`, `selectProject`, `setProjectExpanded`, `trustProject`. All fail closed when the flag is off. +- `src/agent-manager/project-wiring.ts` — factory assembling registry/contexts/deps/host listeners (extracted to keep `AgentManagerProvider.ts` under its 2000-line cap). +- `AgentManagerProvider` — fields `state/worktrees/setupScript/staleWorktreeIds` replaced by context-backed getters; every existing handler now operates on the active project with zero per-handler changes. `onMessage` consumes project messages first and drops messages whose `projectId` mismatches the active project (stale-pane protection). `activateProject` re-runs `initializeState` for the new context; pollers/importer/run/terminal follow the active context through the existing getters. `agentManager.state` now carries `projectId`. +- Protocol — `agentManager.projects` out-message (`multiProject` flag + `ProjectSnapshot[]`); new in-messages listed above; `projectId?` on `agentManager.state` and `createWorktree`. Webview type mirrors updated (`webview-ui/src/types/messages/{extension,webview}-messages.ts`). +- Host — `pickFolder`, `multiProject`, `readProjects`/`writeProjects` (globalState key `agentManager.projects`), `onDidChangeWorkspaceFolders`, `onDidChangeMultiProject`. +- Setting — `kilo-code.new.agentManager.multiProject` (boolean, default false, application scope). +- Changeset — `.changeset/agent-manager-multi-project.md`. + +Behavior with flag off: only the pinned workspace project exists; snapshots contain exactly one project; all registry data is preserved but hidden; no UI change. + +## Remaining for the UI session (accordion) + +- Project accordion rendering from `agentManager.projects`: header-only rows for collapsed/uninitialized projects (registry metadata only), full existing Local/worktree body for the active project, expanded non-active bodies from per-context state (extension must push per-context state with that context's `projectId` — currently `pushState` only pushes the active context). +- Add-project entry point, trust CTA (sends `agentManager.trustProject` then expand/select), remove/rename in project menu. +- `selectProject` before any repo action in a non-active project; send `projectId` on `createWorktree` (extension drops mismatches). +- New Worktree dialog project selector (defaults to active project). +- Extension follow-ups: hidden-cadence polling for expanded projects; session-owner index so Local sessions of project B open/share correctly even while A is active (currently Local sessions resolve through the active root — acceptable only while the UI activates before opening). +- Implemented: per-context `pushState` for expanded non-active projects; per-project git stats/PR pollers (`ProjectPollers` in `project-pollers.ts`) so every expanded accordion receives live stats/PR data tagged with its projectId; webview `project-live.ts` store routing per-project payloads into per-project summary stores; `activate()` keeps the previously active project expanded. +- Known boundary: `KiloProvider.projectID` and session refresh remain single-project; cross-project SSE filtering by session→directory owner is a follow-up (see "Verified findings" below). + +## Objective (original) + +Build the project-aware Agent Manager runtime before changing the UI. The eventual UI is a pinned current-project view plus lazily initialized additional project accordions, with one shared tab/detail area. The first backend slice must be mergeable with the flag disabled and must route today's single project through the same project-aware contracts that secondary projects will use. + +The implementation must preserve these invariants: + +- The first project is always the canonical Git root of the first VS Code workspace folder in the current window. It is derived at runtime, is always first, and cannot be removed or replaced by persisted state. +- Global extension storage contains only the catalog of additional projects and project-list UI metadata. Each repository remains authoritative for its own `.kilo/agent-manager.json`. +- A collapsed, never-opened additional project causes no `.kilo/agent-manager.json` read, Git mutation, setup/run initialization, terminal creation, or poller subscription. +- Every session/worktree/draft operation has a project identity internally. Once secondary-project activation is enabled and more than one project is exposed, missing or mismatched identity is rejected rather than routed to the current workspace. +- The feature flag gates catalog exposure, secondary activation, and multi-project wire/UI behavior. It does not select a separate legacy implementation. + +## Verified findings + +- `AgentManagerProvider` currently owns the panel and all repository-bound resources in one 1,941-line singleton. Its root is always `Host.workspacePath()` and its state/managers are lazily cached against that root (`packages/kilo-vscode/src/agent-manager/AgentManagerProvider.ts:56-212`, `1654-1695`). The architecture test caps this file at 2,000 lines and explicitly forbids raising the cap (`packages/kilo-vscode/tests/unit/agent-manager-arch.test.ts:793-854`). +- Opening the panel immediately initializes the current repository, performs `ensureGitExclude`, loads `.kilo/agent-manager.json`, discovers/restores worktrees, registers sessions, starts state-dependent behavior, and recovers prompts (`AgentManagerProvider.ts:267-360`). This whole sequence cannot run for a collapsed catalog entry. +- `WorktreeStateManager` is correctly repository-scoped by constructor root and writes only `/.kilo/agent-manager.json` (`WorktreeStateManager.ts:100-124`, `632-656`, `797-847`). Its save queue and `flush()` are suitable for a context shutdown barrier, but it has no cancellation/dispose primitive (`755-795`). +- The embedded Agent Manager `KiloProvider` is one provider attached to the one panel/webview (`agent-manager/vscode-host.ts:67-169`). It already routes many SDK calls through a session-to-directory map, but local sessions are allowed to fall back to `workspaceFolders[0]` (`KiloProvider.ts:4343-4378`; `kilo-provider-utils.ts:319-345`). That fallback becomes a cross-project write risk. +- `KiloProvider` has singleton project state (`projectID`, `currentSession`, project-scoped caches, one active project directory) and current session refresh treats all extra directories as worktrees of one canonical project (`KiloProvider.ts:344-359`, `1984-2029`; `kilo-provider-utils.ts:230-295`). It is not multi-project-correct without refactoring. +- The shared backend and generated SDK support an explicit `directory` on session share and unshare (`packages/sdk/js/src/v2/gen/sdk.gen.ts:4733-4795`). Sharing must therefore use the same project/session route as prompts and transcript reads. +- Backend session IDs are high-entropy process-global IDs (`packages/opencode/src/id/id.ts:1-17`, `23-33`, `42-49`). Raw IDs can remain the SDK/server identifier, but the UI/runtime identity still needs a project-qualified reference, and route registration must reject an observed cross-project collision. +- `session.status` currently discards the SSE directory before invoking branch naming (`AgentManagerProvider.ts:204-220`). The orchestration bridge subscribes globally and rejects requests outside its root (`orchestration-bridge.ts:175-203`). Creating one unchanged bridge per project would let the wrong bridge reject a valid request before the correct project handles it. +- Multiple `SessionTerminalManager` instances would each register the same global VS Code commands and terminal listeners (`SessionTerminalManager.ts:35-81`). It must remain panel/coordinator-owned, with project-qualified keys and explicit CWDs. Also, `TerminalRouter` currently falls back from an unknown worktree ID to the repository root (`terminal-routing.ts:120-130`), which must be removed in strict routing. +- `VscodeHost.workspacePath()` uses `workspaceFolders[0]` (`vscode-host.ts:172-174`; `review-utils.ts:12-15`). It loses URI scheme/authority, and `openFolder` recreates paths with `Uri.file`. A catalog containing only path strings would be unsafe across local, SSH, container, and other remote extension hosts. +- Existing Kilo experimental config is CLI/project config, not an application feature-flag service (`features.ts`; `webview-ui/src/types/messages/config.ts`). A multi-project bootstrap flag cannot be project-scoped because choosing which project config to read is the behavior being gated. + +## Architecture decisions + +### 1. Project identity and registry semantics + +Add a VS Code-free `ProjectRegistry` backed by an injected storage and resolver interface. `vscode-host.ts` implements those interfaces using `ExtensionContext.globalState`, workspace/open-dialog URIs, filesystem canonicalization, and Git. + +Use these core types in `src/agent-manager/project.ts`: + +```ts +type ProjectId = string + +interface ProjectLocation { + uri: string + scheme: string + authority: string + root: string + commonGitDir: string +} + +interface ProjectDescriptor extends ProjectLocation { + id: ProjectId + name: string + pinned: boolean + collapsed: boolean + order: number + status: "unverified" | "ready" | "missing" | "notGit" | "wrongAuthority" +} +``` + +`root` is the canonical filesystem Git toplevel. Resolve it only when deriving the pinned project, adding a project, or expanding an unverified project: + +1. Start from the selected workspace/folder URI. +2. Reject a URI whose scheme/authority is not the current extension-host scope. +3. Run `git -C rev-parse --show-toplevel` through the existing hidden-window process wrapper. +4. Resolve the result with `fs.promises.realpath`; normalize separators, trailing separators, and Windows case for identity comparison. +5. Resolve and canonicalize `git rev-parse --path-format=absolute --git-common-dir` as `commonGitDir`. +6. Derive `ProjectId` deterministically as a versioned SHA-256/base64url hash of `scheme + NUL + authority + NUL + normalized canonical root`. Do not expose a path-concatenated ID on the wire. + +Different linked worktree roots have different project IDs, but the first iteration must reject adding a project whose canonical `commonGitDir` matches any project already exposed in the window. Two Agent Manager contexts mutating the same Git common directory would bypass the current root-keyed worktree lock and could manage the same branches twice. This is a product-valid restriction to distinct Git projects, not a path workaround. Also change `WorktreeManager`'s write-lock key to canonical `commonGitDir` so future relaxation does not reintroduce `index.lock` races. + +Persist one unsynced global-state value under `kilo.agentManager.projects.v1`: + +```ts +interface StoredProjectCatalogV1 { + version: 1 + projects: Array<{ + id: ProjectId + uri: string + scheme: string + authority: string + root: string + commonGitDir: string + name?: string + collapsed: boolean + order: number + addedAt: string + }> +} +``` + +Do not call `setKeysForSync`; machine/remote paths must not sync to other machines. Serialize mutations in-process. Each mutation re-reads the latest value, validates it, applies add/remove/reorder/metadata changes, and performs one `globalState.update`. + +Registry behavior is exact: + +- `snapshot(flag)` derives the pinned current project fresh. It never reads a persisted active project. +- The pinned descriptor is first, has `pinned: true`, and defaults to expanded. It is not written into the catalog. +- Persisted entries matching the pinned project ID are suppressed, not deleted. They reappear as additional projects when another window has a different pinned project. +- Additional entries are filtered to the current URI scheme/authority before exposure. Entries for other authorities remain untouched in storage. +- Reading the catalog does not stat, realpath, run Git, or open per-repository state. Persisted additional entries start as `unverified`. +- Adding validates/canonicalizes the chosen folder, rejects the pinned project, duplicate IDs, duplicate common Git directories, and authority mismatches, then persists it. A newly added project may be marked expanded and explicitly activated by the caller; listing alone never initializes it. +- A missing or no-longer-Git root is marked unavailable only when expansion validates it. Keep the entry and its metadata. Do not prune it automatically and do not create a `ProjectContext`. +- Removing is allowed only for non-pinned projects. It removes only the catalog entry after the context is idle/disposed; it never deletes `.kilo`, worktrees, sessions, branches, or shares. +- On every extension/panel restart, the active selection is the pinned project's Local context. Persisted additional projects and collapse/order/name metadata survive, but a stale secondary active session does not override the current VS Code window. + +For a multi-root VS Code workspace, preserve current behavior by deriving the pinned project from `workspaceFolders[0]`, then canonicalize that folder to its Git toplevel. Do not silently select another workspace folder if the first is not a Git repository. + +### 2. Coordinator and immutable lazy ProjectContext + +Turn `AgentManagerProvider` into the panel-level coordinator and extract repository behavior into `project-context.ts`. Do not instantiate one current `AgentManagerProvider` per project. + +The coordinator owns: + +- the one panel and embedded `KiloProvider`/`SessionProvider`; +- `ProjectRegistry`, active `ProjectId`, exposed descriptors, and `Map`; +- a shared `Semaphore(3)` for Git/network polling across all projects; +- the one project/session router; +- one project-aware `AgentManagerVisiblePresence`; +- one `SessionTerminalManager` and one project-aware `TerminalRouter`; +- one global orchestration ingress and the global SSE/tool/status subscriptions; +- project and activation generations used to discard stale async results. + +Each `ProjectContext` is constructed once with an immutable descriptor/root/common Git directory and owns only repository-bound resources: + +- `WorktreeStateManager`, `WorktreeManager`, `SetupScriptService`, and repository `GitOps`; +- local diff functions, `WorktreeDiffController`, `WorktreeImporter`, and `RunController`; +- `GitStatsPoller`, `PRStatusBridge`/poller, and `BranchNamingController`; +- per-project cached state/stats/stale IDs, managed/open session refs, and initialization promise; +- project-specific message handlers currently embedded in `AgentManagerProvider`. + +It does not own a webview, `KiloProvider`, VS Code terminal command registrations, global connection subscriptions, or a global orchestration subscription. + +Lifecycle: + +1. `cold`: descriptor only. No state manager, manager, poller, watcher, or per-repo read exists. +2. `initializing`: one shared promise validates the location, constructs resources, performs the existing `ensureGitExclude -> state.load -> recoverWorktrees -> register routes` sequence, and captures a context generation. +3. `ready/expanded`: posts project-stamped state and permits project actions. Pollers run only when both the panel is visible and this project is expanded. Multiple expanded contexts may be ready concurrently. +4. `suspended/collapsed`: if active, the coordinator first activates pinned Local (or another explicit target). Stop stats/PR/diff polling and watchers, stop accepting new project mutations, wait for the current mutation barrier, flush state, and detach project-specific event side effects such as automatic branch naming. Keep validated session routes/tracking so a running backend session can still surface status and permission/question events without a repository read. Do not abort agents merely because an accordion collapsed. +5. `disposed`: increment generation first, stop/dispose resources, await terminal-router/run/mutation cleanup and state flush, detach routes, then remove the exact context object from the map. Late completions may neither post nor mutate a replacement context. + +Expansion of a suspended context resumes its existing in-memory state and pollers; expansion of a cold context initializes. Concurrent expansions share the same promise. Collapse during initialization records the desired collapsed state, allows non-cancellable Git/state work to finish, suppresses stale posts, then immediately suspends. + +The coordinator routes global events by canonical event directory before invoking a context. `session.status` must retain its directory. A single orchestration ingress determines the one owning context and delegates there; it rejects an unknown directory once, globally. It must never create one rejecting bridge per project. A collapsed project does not auto-initialize in response to an unsolicited orchestration event; return a typed `project_inactive` result. + +Panel close keeps existing semantics for sessions actually opened/created by that panel, but aggregates their project-qualified routes before aborting. Project collapse and flag-off transitions do not abort them. Removing a project is refused while one of its tracked sessions or Agent Manager run/mutation is busy, rather than orphaning an interaction prompt. + +### 3. One embedded KiloProvider, made project-aware + +Use one embedded `KiloProvider`. Multiple providers are not safe or useful here: + +- there is one webview and one message handler; +- each provider would own conflicting current-session/cached UI state and duplicate SSE handling; +- multiple terminal/visibility registrations would be ambiguous; +- it would not solve session identity at the shared webview boundary. + +Refactor its Agent Manager adapter around an injected project/session route service while leaving sidebar and standalone providers unchanged. The route service supplies: + +```ts +interface ProjectSessionRef { + projectId: ProjectId + sessionId: string +} + +interface SessionRoute extends ProjectSessionRef { + directory: string + generation: number +} +``` + +Internally key UI maps by `projectId + NUL + sessionId`; never use that concatenation on the wire. Keep the raw `sessionId` for SDK calls and backend presence. Maintain a reverse raw-ID index only to process backend events. If the same raw ID is observed in two projects, mark it ambiguous and reject/drop operations and events that cannot also be disambiguated by event directory. + +Required routing changes: + +- Register an explicit route for every Agent Manager session, including Local sessions at a project root. Do not omit a map entry merely because it equals the first workspace root. +- New/draft operations resolve from the outer project envelope and an explicit Local/worktree context. Unknown worktree IDs are errors; remove `TerminalRouter`'s fallback to root. +- Existing session operations resolve only from `ProjectSessionRef`. In strict multi-project mode, an unknown session never falls back to `workspaceFolders[0]` or the currently active project. +- Child/subagent sessions inherit the parent's project and directory. A directory-bearing event must also pass the owning-context check before registration. +- Session list refresh runs per project root plus that project's worktree directories. It emits sessions stamped with that project; it does not infer one canonical `projectID` from the first root and merge all projects into it. +- Replace singleton Agent Manager use of `KiloProvider.projectID` with the route table/directory ownership check. Keep existing project filtering for non-Agent-Manager provider instances. +- On active-project/session change, call one `activateProject(projectId, root)` path. It updates `projectDirectory`, invalidates/refetches project-scoped config, providers, agents, commands, skills, MCP, indexing, sandbox, and Git status for that root. Guard every async refresh with activation generation so project A cannot populate caches after switching to B. +- Every session create, continuation, prompt, permission/question response, terminal operation, diff operation, file/context operation, and share/unshare SDK call receives the resolved explicit directory. + +This picks up each secondary project's config naturally through the CLI's directory-scoped instance/config resolution. Do not copy provider/config/settings data into global storage. + +### 4. Project-qualified protocol and share semantics + +Define an internal/wire envelope in `agent-manager/types.ts` and mirror it in `webview-ui/src/types/messages/agent-manager.ts`: + +```ts +interface ProjectStamp { + projectId: ProjectId + generation: number +} + +interface ProjectEnvelope { + type: "agentManager.projectMessage" + project: ProjectStamp + payload: T +} +``` + +Use project-qualified references for sessions, worktrees, and drafts: + +```ts +interface SessionRef { projectId: ProjectId; sessionId: string } +interface WorktreeRef { projectId: ProjectId; worktreeId: string } +interface DraftRef { projectId: ProjectId; draftId: string } +``` + +Raw IDs remain in each repository's existing state file. The repository/context supplies the project identity when state is loaded. Do not migrate session IDs into global state and do not permit moving an existing session record between projects. A future cross-project continuation must explicitly fork/create in the target project; relabeling a raw session is invalid. + +Protocol rules: + +- The coordinator is the only component that unwraps inbound envelopes and wraps context output. +- Global catalog/route errors are global messages. Repository state, stats, session metadata, diff, run, PR, terminal, and chat messages are project envelopes. +- Preserve `requestId` inside the payload. Return a typed route error (`project_required`, `project_unknown`, `project_inactive`, `project_mismatch`, `session_unknown`, or `session_ambiguous`) without forwarding the original message. +- Validate the envelope project against the context, persisted session/worktree ownership, session route, and event/request directory. A valid raw ID in the wrong envelope is still rejected. +- Outbound generation lets the webview/coordinator discard messages from a collapsed/disposed/replaced context. +- While the flag is off, or while only the pinned project is exposed, a compatibility adapter wraps today's unqualified webview messages with the pinned project and unwraps pinned output to the existing shape. The core handlers still receive envelopes. +- Once the flag is on and a second project is exposed, unqualified project/session/worktree messages fail closed. The multi-project UI must send/consume envelopes and use composite refs as tab/store keys. + +Sharing is an operation on `SessionRef`, not on a bare session ID: + +- Manual share calls `client.session.share({ sessionID, directory })`; unshare uses the exact same resolved route. +- Automatic sharing remains a project config behavior because session creation is sent with the target project's directory. +- Store no share URL or share state in the project catalog. Session list/get/update data remains authoritative and is enriched with `projectId` on output. +- Removing/collapsing a project never unshares its sessions. A share URL is externally usable, but reopening or mutating the local session still requires its local project route. +- A mismatched or missing project cannot share/unshare, even if the raw session ID happens to resolve elsewhere. + +### 5. Feature flag, restart, and migration behavior + +Contribute an application-scoped VS Code setting, default false, for example `kilo-code.new.agentManager.multiProject`, with `scope: "application"`. Read it in the host/coordinator; do not put it in CLI `experimental` config. + +- Flag off: derive and initialize only pinned current project, use the compatibility wire adapter, and preserve the exact current view. Read but do not expose, validate, initialize, rewrite, or delete additional catalog entries. +- Flag on: publish lightweight descriptors. Only explicit expansion initializes an additional project. Selecting Local/worktree also expands and initializes its owner before activation. +- Runtime on -> off: increment activation generation, activate pinned Local, suspend all secondary contexts, switch to compatibility protocol, and preserve catalog/per-repo state. Do not abort backend sessions. +- Runtime off -> on: expose stored descriptors as cold/unverified. Do not eagerly restore a persisted secondary active project. + +No `.kilo/agent-manager.json` schema migration is needed. Existing state is loaded unchanged by the pinned context, and additional contexts load their own existing files only when expanded. An absent catalog means no additional projects. Invalid catalog entries are ignored in the snapshot and logged, but a successful write must preserve valid entries from other authorities. Never scan the filesystem to discover projects as migration. + +On restored legacy panel/webview state, unqualified tabs are accepted only in compatibility single-project mode. When multi-project mode exposes a second project, send a protocol reset and rebuild tabs/session lists from project envelopes instead of guessing which project owns a restored raw session ID. + +Remote behavior: + +- Scope catalog exposure and identity by full URI scheme + authority, not `vscode.env.remoteName` alone. +- Run Git and filesystem operations in the current extension host against `fsPath`; preserve the original URI for `openFolder` and picker operations. +- Reject selection from another authority. Keep such stored entries for their matching window/host. +- Unsupported virtual filesystems, missing roots, permission failures, and non-Git directories become unavailable descriptors after explicit validation. They do not fall back to the pinned root. + +## Ordered implementation plan + +### Slice A: mergeable routing foundation before multi-project UI + +This is the narrow first PR. It produces no secondary-project UI, but the current pinned project runs through the durable identity/routing contracts and the registry is fully tested. + +1. Add `src/agent-manager/project.ts` with IDs, locations, descriptors, stamps, envelopes, and ref types. Add `src/agent-manager/project-registry.ts` with injected storage/resolver, v1 schema validation, pinned merge, authority filtering, dedupe, and serialized mutations. +2. Extend `Host` in `src/agent-manager/host.ts`; implement global-state storage, canonical Git/URI resolution, pinned project resolution, and the application flag in `src/agent-manager/vscode-host.ts`. Preserve URIs in `openFolder`. Add the setting contribution in `packages/kilo-vscode/package.json`. +3. Add `src/agent-manager/project-session-router.ts`. It must register Local and worktree routes, resolve refs/directories, inherit child routes, validate directory ownership, detect raw-ID ambiguity, and implement compatibility versus strict mode. +4. Add envelope/route errors to `src/agent-manager/types.ts` and the mirrored webview type file. Add a coordinator adapter in `AgentManagerProvider` that derives the pinned project at panel attach, wraps all legacy inbound messages, stamps context output, and switches strictness based on exposed-project count. In this slice only the pinned context is activated, so rendered behavior remains unchanged. +5. Extend the `SessionProvider` adapter (`host.ts`, `vscode-host.ts`) with project-aware `setSessionRoute`, `trackSession`, `getSessionInfo`, `loadMessages`, `share`, and `unshare` methods. Retain temporary legacy methods only as single-project adapters, not as a second implementation. +6. Modify `KiloProvider`, `kilo-provider/options.ts`, and the extracted helpers in `kilo-provider-utils.ts` so Agent Manager Local sessions also have explicit routes, unknown strict routes fail closed, child routes inherit project identity, and project activation invalidates project-scoped cache work by generation. Keep non-Agent-Manager provider behavior unchanged. +7. Update `extension.ts` auto-approve/session-directory lookup to ask the router/coordinator for the active or unique `SessionRef`; do not merge raw ID maps and choose the first match. +8. Remove unknown-worktree-to-root fallback in `terminal-routing.ts`, and inject the pinned project root into `createTerminalHost` instead of reading `workspaceFolders[0]` internally. + +Slice A is complete when the flag-disabled Agent Manager is visually and behaviorally unchanged, every current project session has an explicit project route, and unit tests prove a second registered route cannot be accidentally handled through pinned-root fallback. Do not expose Add Project until Slice B is complete. + +### Slice B: lazy multi-context runtime, still before UI rendering + +1. Add `src/agent-manager/project-context.ts` and move root-bound state/managers/handlers out of `AgentManagerProvider`. Keep context code VS Code-free. Reduce the provider cap to the new rounded-up line count instead of raising it. +2. Make `AgentManagerProvider` the coordinator described above. Add cold/initializing/ready/suspended/disposed state, generation guards, expansion/activation APIs, shared semaphore, and per-project message dispatch. +3. Refactor status/tool/orchestration subscriptions so the coordinator routes once by project/directory. Do not retain per-context global subscriptions that can reject each other's requests. +4. Make terminal management panel-global and key mappings by composite session/worktree refs. A context supplies only an already-validated CWD. Ensure context collapse cannot switch to another project's terminal by raw ID. +5. Refactor session refresh to accept one project at a time and emit project-stamped results. Register routes for discovered Local sessions before they can be opened. Preserve failed-directory session IDs only within the affected project. +6. Change `WorktreeManager`'s mutation lock key to canonical common Git directory and reject adding another exposed context with the same common directory. +7. Add backend catalog commands (`requestProjects`, `addProject`, `removeProject`, `expandProject`, `collapseProject`, `activateProject`) behind the flag. These are testable protocol endpoints but need not yet have visible controls. + +### Slice C: first usable flagged UI + +After A and B are green, implement project accordions and the project selector in the New Worktree modal. Keep the current markup/layout when only the pinned project exists. Use composite refs in webview stores/tabs, one shared tab bar/detail pane, and clearly show the project name on cross-project session tabs and share actions. This UI slice is intentionally outside the backend-first scope. + +## Exact tests + +Add or update these focused tests under `packages/kilo-vscode/tests/unit/`: + +- `agent-manager-project-registry.test.ts`: pinned project is always first/fresh; persisted active cannot replace it; additional roots survive restart; pinned duplicate is suppressed; add canonicalizes subdirectories/symlinks; duplicate root/common Git dir and wrong authority are rejected; flag-off snapshot exposes only pinned without mutating catalog; catalog listing performs no resolver/filesystem calls; missing entries remain stored. +- `agent-manager-project-router.test.ts`: every Local/worktree session has a route; matching refs resolve; wrong project, unknown session, unknown worktree, missing project, and raw-ID collision fail closed; child inherits parent project/directory; compatibility inference works only for one exposed project; share and unshare use the same explicit directory. +- `agent-manager-project-context.test.ts`: collapsed cold projects construct/read nothing; concurrent expand initializes once; two expanded contexts use separate state roots and share the concurrency gate; collapse stops pollers and flushes; collapse during init suppresses posts; disposed-generation results cannot update a replacement context; remove is blocked while busy. +- Extend `kilo-provider-session-refresh.test.ts`: lists per project instead of merging project roots; outputs project stamps; failed worktree listing preserves only that project's sessions; activation generation drops stale config/session results. +- Extend `kilo-provider-worktree-context.test.ts`: strict unknown session/worktree has no workspace fallback; Local routes explicitly resolve to their own project root; a secondary Local session cannot resolve to pinned root. +- Extend `AgentManagerProvider.spec.ts`: single-project legacy messages are wrapped pinned; two-project unqualified messages return `project_required`; mismatched session/project returns `project_mismatch`; status/tool events dispatch by directory; restart selects pinned Local. +- Add terminal routing coverage: unknown project/worktree produces an error and no PTY/VS Code terminal; identical raw session IDs in different projects cannot select the wrong terminal. +- Extend `agent-manager-arch.test.ts`: new domain modules do not import `vscode`; lower `AgentManagerProvider.ts` maxLines after extraction. + +Run from `packages/kilo-vscode/` after each slice: + +```sh +bun test tests/unit/agent-manager-project-registry.test.ts tests/unit/agent-manager-project-router.test.ts tests/unit/kilo-provider-session-refresh.test.ts tests/unit/kilo-provider-worktree-context.test.ts +bun run typecheck +bun run lint +bun run test:unit +bun run knip +bun run check-kilocode-change +``` + +For Slice B, add the context/provider/terminal tests to the focused first command. No CLI/SDK regeneration is required because this architecture uses existing explicit-directory SDK parameters and adds only extension/webview protocol types. + +## Manual validation after the UI slice + +1. With the flag off and a non-empty stored catalog, restart VS Code. Agent Manager must look and behave exactly as today and use only the current window's Git root. +2. Turn the flag on, add a second repository, restart, and verify its header persists while the pinned current project remains first and active. Confirm the collapsed second project creates no output/state access/poll traffic until expanded. +3. Expand both projects, open Local and worktree sessions from each, switch rapidly, send prompts, answer permission/question requests, open terminals/diffs, and share then unshare. Verify every operation affects the displayed project's repository and config. +4. Disable the flag while a secondary project is active. Verify pinned Local becomes active, secondary state remains on disk/catalog, and re-enabling restores the descriptor without eager initialization. +5. Rename/remove a cataloged directory and restart. Verify the project remains as unavailable, cannot route actions to pinned root, and can be removed without touching its repository state. +6. Repeat in a remote window. Verify local/other-authority catalog entries are hidden but preserved and folder opening retains the remote URI authority. + +## Risks and rollback + +- The largest correctness risk is a hidden workspace-root fallback in `KiloProvider` or a helper. Treat every Agent Manager method that accepts `sessionID`, `worktreeId`, `draftID`, `requestID`, or directory as part of the routing audit. Tests should fail if strict mode calls `workspaceFolders[0]` for an identified operation. +- Project-scoped KiloProvider caches can show stale settings after a rapid project switch. Activation generation checks are required before posting and before replacing caches; merely cancelling transcript load is insufficient. +- Global event consumers can race. There must be exactly one ownership decision for orchestration/tool events, and directory must be retained for status/permission/question handling. +- Multiple contexts increase polling/process pressure. Share the concurrency semaphore, gate all pollers by panel visibility and expansion, and suspend on collapse/flag-off. +- Global-state updates from separate VS Code windows do not provide a transactional CAS. The first iteration should re-read before each serialized mutation and tolerate another window appearing after reload; do not build a filesystem lock or custom database for this feature. +- Rollback is safe: turn off the application flag. The pinned path and existing `.kilo/agent-manager.json` format remain intact, while the unused global catalog is preserved for a later re-enable. diff --git a/.kilo/plans/agent-manager-multi-project-shipping-gaps.md b/.kilo/plans/agent-manager-multi-project-shipping-gaps.md new file mode 100644 index 0000000000..8301929bbd --- /dev/null +++ b/.kilo/plans/agent-manager-multi-project-shipping-gaps.md @@ -0,0 +1,210 @@ +# Agent Manager Multi-Project — Shipping Gaps + +Status as of 2026-07-27. The multi-project sidebar renders and works end to end in the +self-test harness (both projects list worktrees/sessions/sections, section creation +persists, worktree delete works, project switching restores selection, live session +upsert verified). Full unit suite green (3444 pass / 0 fail), typecheck, lint, knip, +arch caps all pass. Everything is uncommitted in the worktree. + +This document lists what is still missing, ranked by whether it should block shipping. + +Two audiences matter for the blocking decision: + +- **All users**: the branch changes shared surfaces (legacy sidebar refactor, config + write path, indexing consent, pollers). Regressions here ship to everyone, flag off + or not. +- **Experimental users**: multi-project mode is gated behind + `kilo-code.new.experimental.multiProject`, default off. Rough edges here are + acceptable if they cannot corrupt data. + +--- + +## 1. Blocks shipping (all-user surfaces) + +### 1.0 Empty-state skeleton regression (fixed, must stay fixed) + +`initializeState` and `onRequestState` only called `refreshSessions()` when the +managed state contained at least one session. With zero managed sessions the +backend listing never ran, `sessionsLoaded` never reached the webview, and both +the WORKTREES and SESSIONS sections stayed on skeletons forever (the worktree +gate requires `worktreesLoaded() && sessionsLoaded()`). Any user whose state file +lost its sessions — exactly what the earlier session-persist bugs caused — hit a +permanently empty-looking sidebar. Reproduced in the harness on a worktree-root +workspace and fixed by making both refreshes unconditional. Root-caused via +stage-by-stage init logging on 2026-07-27; do not reintroduce a content-based +guard here. + +### 1.1 Config write path can fail or wipe drafts for existing callers — P0-6 / P1-7 + +The config binding rework requires every `updateConfig` sender to carry a binding id, +and `configUpdateFailed` currently wipes the draft for the failed scope. Any existing +sender without a binding (permission dock, model picker, auto-approve, onboarding) +now fails or loses the user's unsaved edits. + +- Backend half is done: `expected` is optional in the overlay schema, writer, and + handler, so a client without a binding writes unconditionally again instead of + getting a 400. The webview half (draft retention on `configUpdateFailed`, and the + audit of every `updateConfig` sender) is still open. +- Work: the code change is small; the real work is auditing every webview + `updateConfig` sender and classifying it. +- Also: this change is orthogonal to multi-project. Split it into its own commit + (`feat(vscode): config write revision bindings`) so it can be reverted alone. + +### 1.2 Indexing status read silently revokes consent — P0-3 / P0-4 + +Partially addressed: untrusted projects are now filtered out of the consent list +(P0-4), and config scope switching plus project-scoped `indexing.enabled` writes +were restored after the rework had hardcoded the tab to global scope (the earlier +P1-8 gap). The remaining blocker is the read path below. + + +`fetchAndSendIndexingStatus` issues `PUT /indexing/consent` (a write) on a plain +status refresh, defaulting to `enabled: false` for any project not in local +`globalState`. On a fresh machine/profile, the first status read turns indexing off +for users who had it on. A refresh can also target the wrong project +(`requestIndexingStatus` resolves from the current session's directory). Separately, +the Indexing tab lists untrusted projects and would let a user enable indexing for a +repo the trust system has not approved. + +- Fix: read status with a GET; PUT only from the explicit setter; seed consent from + the effective config on first read instead of defaulting false; require an explicit + project on refresh; filter the project list to trusted projects. +- Dependency: needs a read-only status endpoint. If none exists, this escapes into + `packages/opencode` (shared upstream code, needs `kilocode_change` markers) or the + cloud repo. +- Also orthogonal to multi-project; split into its own commit + (`feat(vscode): per-project indexing consent`). + +### 1.3 Land the current work as separate, revertable commits + +Everything currently sits uncommitted in one worktree. The review's recommendation +stands: `git reset --soft origin/main` and stage by path into three commits — +multi-project, config bindings, indexing consent. The multi-project commit message +must not promise per-project config/indexing behavior that lands in the other two. + +--- + +## 2. Should fix soon after (experimental surface, data-integrity relevant) + +### 2.1 Same repo can register twice — P0-5 + +`projectIdFor` hashes the canonical path verbatim while `samePath` folds case, so two +casings of one repo produce two project ids, two contexts, and two state managers +racing to write the same `.kilo/agent-manager.json` (last write wins, worktrees and +sessions vanish). + +- Fix: fold case inside `projectIdFor` on darwin/win32; reject `addProject` when + `samePath` matches any registered root. +- Migration: existing registry keys were built from the old hash, so re-key them on + load or dual-lookup on read. Note `canonicalizePath` already realpaths existing + paths; the fallback branch must fold case too. +- Why not blocking: requires an unusual casing mismatch at registration time, and the + feature is flag-gated. + +### 2.2 Route service is shared across panels but versioned per context — P0-7 + +Two VS Code windows each have their own `ProjectContexts` with independent generation +counters feeding one shared `ProjectRouteService`. Panel B registering a project at +generation 0 while panel A is at 2 unregisters panel A's routes; closing one panel +drops routes the other still needs. + +- Fix: panel-qualified keys (`panelId + projectId + sessionId`), generations issued + by the service, ambiguity computed across all panels. +- Why not blocking: needs two windows running Agent Manager against the same repos. + The fallback already refuses ambiguous raw ids instead of resolving them wrong. +- Note: no two-panel test harness exists today; this fix should create one. + +### 2.3 `gh pr` noise in repos without remotes — Bug 5 + +`gh pr view` fails every 15s per worktree forever, logs before the dedupe, and +`pollOnce` rejections are unhandled. + +- Fix: log after the `lastHash` dedupe; `void this.pollOnce().catch(log)` in + `schedule`; per-root remote probe with a single error emission; skip PR pollers for + remote-less projects in `ProjectPollers.sync`. + +--- + +## 3. UX papercuts in experimental mode (fix opportunistically) + +- **Legacy tabs orphaned on upgrade** (P1-1): `createLocalTabs` migrates persisted + `localSessionIDs` into a `single` bucket that `tabKey()` never reads once the + catalog arrives. Migrate `single` to the pinned project id on first state apply. +- **`restoreProjectTarget` skips tab bookkeeping** (P1-3): a restored session has no + tab. Call `selectLocal()` first, add the tab, then select. +- **`ensurePendingTab` runs before restore** (P1-4): switch adds a "New Session" + draft that restore may contradict. Move it after restore. +- **Per-keystroke state saves**: `setActiveTarget` writes + `.kilo/agent-manager.json` on every selection change. Debounce or persist on + deactivation/dispose only. +- **Untranslated Indexing tab strings** (P1-9), **unused-ish composite id schemes** + (P1-12), **stats messages tagged at emit time** (P1-14), **no presence sync for + background projects** (P1-15), **registry read cache** (P1-16/17), **realpath + syscall churn** (P1-18), **`resolveProjectRoot` process spawning** (P1-19). + +--- + +## 4. Structural debt (schedule, don't block) + +### 4.1 Two sidebar implementations — Arch 1.1 + +Tracked as #12685 (section parity) and #12686 (sidebar drag-and-drop). + +`AgentManagerApp` keeps the legacy `renderBody` (now `SidebarBody.tsx`) and +`ProjectSidebarBody.tsx` as a reduced reimplementation. The reimplementation already +caused one full outage of multi-project mode (missing `DragDropProvider` crashed the +webview render). Missing versus legacy: worktree ordering, drag-and-drop reorder and +move-to-section, grouping, busy/navHint/shortcut badges, section auto-rename, stats +skeletons. + +- Direction: single-project becomes the degenerate case of multi-project (one + implicit pinned project, header row hidden), `SidebarBody.tsx` is deleted. +- Do this last: it churns the same message-stamping code as 2.2, needs per-project + DnD state, and must keep legacy pixel-identical for the default-off population. + Use the visual-regression skill to cover both modes before merging it. + +### 4.2 Ambient project scope via AsyncLocalStorage — Arch 1.3 + +`ProjectScope` plus the `this.state`/`this.context` getters make the target project +invisible at call sites; any continuation escaping ALS silently falls back to the +active project. `provider-lifecycle.ts` shows the intended end state (explicit deps). +Keep threading `ctx` explicitly into the remaining handler groups; add a dev-mode log +in the `context` getter when a project-stamped message resolves without a scope. + +### 4.3 Per-project webview store — Arch 1.2 + +`worktrees()`, `managedSessions()`, `selection()` etc. are single-valued with +`memKey()`/`tabKey()` and two "current project" accessors that disagree during the +switch window. Long-term: one `createProjectStore(projectId)` per project. For now +the gating added to the remember effect contains the known race. + +--- + +## 5. Verification gaps to close before the PR + +- **SSE session upsert** is unit-tested (`upsertSession`, `byDirectory`, fresh-skip + re-post) but not E2E-verified: the harness backend's basic-auth credentials could + not be re-extracted after a window reload, so external session creation was not + exercised live. Verify manually: `kilo` a new session in a registered repo from a + terminal and watch it appear in that project's sidebar. +- **Tab isolation across projects** (per-project buckets) is unit-tested but not + E2E-verified with real sessions open in two projects. +- **Legacy mode parity**: legacy sidebar and tab bar were smoke-tested (render, + select, section create + inline rename), but not the full matrix (delete, DnD + reorder, move-to-section, review tab, terminals). The extraction moved ~700 lines + of JSX; a visual-regression pass over `SidebarBody`/`TabBar` stories is the + cheapest safety net. +- **Harness instability**: the isolated VS Code window crashed repeatedly during this + work. If it keeps failing on the next pass, say so in the PR rather than claiming + coverage that does not exist. + +--- + +## Proposed landing sequence + +1. Quick independent fixes: 2.3 (gh noise), P0-4 (trust filter), 1.1's audit + 1.2's + fallback (config), 1.2's indexing read/write split if the GET endpoint exists. +2. 2.1 (case-fold + registry migration). +3. 2.2 (route service, with a two-panel test harness). +4. 1.1's config/indexing commits split out and merged separately. +5. Arch 1.1 (sidebar collapse) with visual-regression coverage; then the P1 batch. diff --git a/.kilo/plans/agent-manager-multi-project-uniform-ui.md b/.kilo/plans/agent-manager-multi-project-uniform-ui.md new file mode 100644 index 0000000000..5beb0e3ef2 --- /dev/null +++ b/.kilo/plans/agent-manager-multi-project-uniform-ui.md @@ -0,0 +1,740 @@ +# Agent Manager multi-project uniform UI architecture + +**Status:** Ready, corrected architecture; implementation pending + +**Date:** 2026-07-22 + +This plan supersedes the active-body plus background-summary UI described in `agent-manager-multi-project-runtime.md`. The existing project registry, immutable project-root concept, per-project state payloads, and project-tagged stats work are useful foundations. The current read-only `ProjectSummary` and active-project dynamic getter routing are not the target architecture. + +Configuration reads, writes, scopes, drafts, trust, revisions, and release-blocking tests are specified canonically in [`agent-manager-multi-project-configuration.md`](./agent-manager-multi-project-configuration.md). If this plan and that document differ on configuration behavior, the configuration document wins. + +The step-by-step implementation sequence from the current branch is [`agent-manager-multi-project-implementation-handoff.md`](./agent-manager-multi-project-implementation-handoff.md). Implementers should follow that handoff slice by slice rather than treating this architecture document as an unordered task list. + +## Product requirement + +Every expanded project permanently renders the real existing Agent Manager sidebar UI: + +- the real Local card; +- the real worktree cards, including their current menus and actions; +- the real session list, which may initially use a simplified layout but must contain real live session data; +- live git stats, PR state, run/setup state, stale state, and session state owned by that project. + +Selecting or interacting with a project may change the shared detail pane and top toolbar. It must not remove, replace, downgrade, or remount any expanded project body. There is no active-body versus background-summary rendering mode. + +The shared detail pane remains singular. The sidebar displays all expanded projects concurrently; the detail pane displays one selected project/local/worktree/session target at a time. + +## Architecture verdict on the current worktree + +The current implementation is a valid partial runtime foundation, but it is not safe to extend directly into fully interactive background cards. + +Keep and evolve: + +- `ProjectRegistry` and the pinned-workspace project concept; +- immutable root ownership in `ProjectContext`; +- `initContextState` extraction; +- project-stamped state/stats/PR messages; +- per-project webview stores; +- reusable `WorktreeItem`, `SectionHeader`, `WorktreeSectionActions`, and `UnassignedSessionsSection` components; +- the application-scoped feature flag. + +Replace or refactor before exposing interactive multi-project UI: + +- delete `ProjectSummary`; do not add more behavior to it; +- remove the rule that only `project.active` renders `renderBody()`; +- stop routing normal actions through `contexts.active()` and optional `projectId`; +- replace raw session/worktree/local UI keys with project-qualified references; +- replace the active singleton poller plus background poller split with uniform context-owned polling; +- make context initialization, mutation, suspension, and disposal explicit and generation-guarded; +- make the one embedded `KiloProvider` project/session-route aware. +- separate activation-bound runtime config from the Settings editor's immutable read/write binding. + +## Core model + +### Project identity + +A project is one canonical Git repository root in the current extension host. + +```ts +type ProjectId = string + +interface ProjectRef { + projectId: ProjectId +} + +interface WorktreeRef extends ProjectRef { + worktreeId: string +} + +interface SessionRef extends ProjectRef { + sessionId: string +} + +type SidebarTarget = + | { projectId: ProjectId; kind: "local" } + | { projectId: ProjectId; kind: "worktree"; worktreeId: string } + | { projectId: ProjectId; kind: "session"; sessionId: string } +``` + +Raw backend and repository-local IDs remain unchanged. Composite references are required at every panel/runtime boundary so identical local sentinels, worktree IDs, section IDs, or session IDs cannot cross projects. + +Project identity must include the extension-host URI scheme and authority in addition to the canonical root. Adding a project must also resolve canonical `git-common-dir` and reject another exposed project sharing that common Git directory. Linked worktrees of one repository cannot be registered as independent projects in the first release. + +### Active project means detail selection only + +`activeProjectId` is not a rendering mode and not an implicit mutation target. + +It means: + +- which project owns the current shared detail/chat/diff/terminal pane; +- which project the global top toolbar and global New Session/Run buttons target; +- which project/worktree directory supplies runtime-effective Kilo configuration in the one embedded `KiloProvider`. + +It never selects a Settings write target. Settings bindings are explicit and remain unchanged when detail selection changes. + +Project expansion controls rendering. Every `project.expanded` project renders one stable `ProjectSidebarBody` keyed by `projectId`, regardless of active status. + +### Atomic selection + +Do not send `selectProject` followed by an unqualified worktree/session action. VS Code message handlers are asynchronous and are not a transaction queue. + +Use one atomic selection intent: + +```ts +interface ActivateSelectionMessage { + type: "agentManager.activateSelection" + target: SidebarTarget +} +``` + +The coordinator validates the project and target, ensures the context is ready, activates the project-specific Kilo route, then emits one project-qualified activation result. The sidebar body stays mounted; only shared detail state changes. + +Mutations that do not need the detail pane, such as rename, delete, section edits, run, setup, open window, PR actions, or worktree creation, execute directly against their explicit `ProjectRef` or `WorktreeRef`. They do not activate another project as a side effect. + +## Configuration architecture + +See [`agent-manager-multi-project-configuration.md`](./agent-manager-multi-project-configuration.md) for the complete contract. + +### Verified blocking failure + +The current config protocol is unsafe for multi-project use: + +- `KiloProvider.fetchAndSendConfig()` resolves a mutable current directory and emits one unqualified `configLoaded` value (`packages/kilo-vscode/src/KiloProvider.ts:2513`). +- `ConfigProvider` owns one global/project/effective draft and sends an unqualified `updateConfig` (`packages/kilo-vscode/webview-ui/src/context/config.tsx:54`, `:243`). +- `KiloProvider.handleUpdateConfig()` resolves `getWorkspaceDirectory()` again at save time (`packages/kilo-vscode/src/KiloProvider.ts:2982`). A draft loaded for project A can therefore be written to project B after detail activation changes. +- The backend derives the project target from request directory and has no target or revision precondition (`packages/opencode/src/config/config.ts:944`, `packages/opencode/src/kilocode/config/config.ts:67`). Concurrent editors can overwrite one another, and a newly created higher-priority config file can redirect a pending write. +- Hidden scope splitting currently writes `commit_message` and `indexing.enabled` to the project while most fields go global (`packages/kilo-vscode/webview-ui/src/utils/config-scope.ts:3`). The UI does not make this target choice explicit. +- Project config writes also exist outside the save bar. In particular, provider disconnect can call `saveProject()` using the mutable provider workspace directory (`packages/kilo-vscode/src/provider-actions.ts:252`). Disabling only `handleUpdateConfig()` is insufficient. + +This is a release blocker, not a follow-up cleanup. + +### Product decision and staged order + +Preserve useful project-local editing such as `commit_message.prompt` and repository indexing rules. Indexing enablement is machine-local project consent, default off, and cannot be granted by repository config. Replace hidden active-directory targeting with explicit `User | Project` scope, a required Settings project selector for Project scope, an opaque immutable binding, and optimistic concurrency by target revision. + +Do not maintain one write model for flag-off mode and another for multi-project mode. Single-project mode uses the same explicit protocol, with a narrow adapter that injects the pinned `ProjectRef` for reads and open-file actions. + +### Separate runtime config from Settings editor config + +The current `ConfigProvider` conflates two different state machines. Split them: + +- **Runtime config** is read-only UI state for the selected detail/session route. It is keyed by `{ projectId, directory, activationGeneration }`, follows atomic detail activation, and drives chat, providers, agents, features, display, MCP, indexing, and sandbox behavior. +- **Settings editor config** is a scoped layer editor keyed by an immutable binding. It never follows detail activation and its draft is never applied optimistically to runtime config. + +Use distinct messages. Names may follow repository conventions, but the fields and invariants are mandatory: + +```ts +interface RuntimeConfigLoaded { + type: "runtimeConfigLoaded" + route: { + projectId: ProjectId + directory: string + activationGeneration: number + } + config: Config + features: FeatureFlags +} + +type ConfigScope = "global" | "project" + +interface ConfigTarget { + scope: ConfigScope + path: string + revision: string + exists: boolean + writable: boolean +} + +interface SettingsBinding { + id: string + connectionGeneration: number + scope: ConfigScope + project?: { + projectId: ProjectId + root: string + generation: number + } + directory: string + target: ConfigTarget +} + +interface ReadSettingsConfig { + type: "settingsConfig.read" + requestId: string + scope: ConfigScope + projectId?: ProjectId +} + +interface SettingsConfigSnapshot { + type: "settingsConfig.snapshot" + requestId: string + binding: SettingsBinding + preview?: { + projectId: ProjectId + root: string + generation: number + directory: string + } + targetConfig: Config + effective: Config + global: Config + project: Config + fields: Record + collections: Record +} + +interface WriteSettingsConfig { + type: "settingsConfig.write" + requestId: string + bindingId: string + set: Partial + unset: string[][] +} +``` + +For a global read, `projectId` is optional preview context used only to explain project shadowing. It never changes the global target. A project read requires `projectId` and always resolves the immutable `ProjectContext.root`, not the active worktree or session. + +For User scope, preview identity is presentation state, not part of the editable target identity. The controller keeps the global target binding and draft separate from the latest project preview. A clean preview change may replace both from one fresh snapshot. A dirty preview change updates only `preview`, effective/source metadata, and project raw data. It retains the original global target revision; if the fresh read reports a different global path or revision, mark the draft stale instead of silently rebasing it. + +`targetConfig` is the parsed raw content of the one file the API will patch. It is not the aggregate `global` or `project` layer. The form edits this raw target value so it never copies values inherited from another file into the target. The aggregate values remain in the snapshot solely for source, inheritance, and effective-preview UI. Existing JSONC comments remain server-side raw text and are preserved by patching; the webview does not round-trip serialized file contents. + +Parse `targetConfig` from raw JSONC without expanding `{env:}` or `{file:}` variables, so the Settings protocol never turns placeholders into secret values. If the exact target is syntactically or structurally invalid, return diagnostics and `writable: false` for form editing rather than treating it as `{}` and overwriting it. The recovery action is **Open file**. Source metadata must cover every path rendered by Settings, not only the current hand-maintained overlay field list. + +The extension owns an in-memory binding registry. Binding IDs are opaque, unpredictable, and scoped to one provider/webview lifecycle. The webview returns only `bindingId`, not a client-authoritative path or project envelope. On write the extension must: + +1. look up `bindingId` and reject unknown or expired bindings; +2. verify that the project still exists, has the same context generation, and remains trusted; +3. capture the stored binding before the first `await`; +4. send the stored directory and expected target to the backend without calling `getWorkspaceDirectory()`, `contexts.active()`, or any fallback; +5. route success or failure by `{ requestId, binding.id }` only. + +A binding expires after a successful save, backend reconnect, trust revocation, project removal, or context generation change. Success returns a new snapshot and binding. Cached snapshots are keyed by binding/scope/project identity; there is no singleton `cachedConfigMessage` for Settings. + +### Backend read/write and optimistic concurrency contract + +Evolve the Kilo-owned `/config/overlay` API rather than adding project identity to generic `Config.update`. The backend does not know Agent Manager `projectId`; it enforces the routed directory and filesystem target while the extension enforces project identity. + +`GET /config/overlay` continues to take explicit `directory` and `scope`, but returns: + +```ts +interface ConfigOverlaySnapshot { + context: { directory: string; worktree?: string } + scope: ConfigScope + targetConfig: Config + effective: Config + global: Config + project: Config + sources: ConfigSource[] + targets: { + global: ConfigTarget + project: ConfigTarget + active: ConfigTarget + } + fields: Record + collections: Record +} +``` + +The revision is a SHA-256 fingerprint of scope, canonical target path, existence marker, and exact file bytes. It is not an mtime. Exact bytes are required so comment-only JSONC edits and delete/recreate cycles with different content cause conflicts. The missing-file revision includes the intended canonical path. An ABA delete/recreate with identical bytes may retain the same revision; that state is content-equivalent and does not lose a user edit. + +`PATCH /config/overlay?directory=...` accepts exactly one scope per request: + +```ts +interface ConfigOverlayWrite { + scope: ConfigScope + set?: Record + unset?: string[][] + expected: { + path: string + revision: string + } +} + +interface ConfigOverlayWriteResult { + outcome: "applied" | "applied_but_overridden" + changed: boolean + overriddenPaths: string[][] + snapshot: ConfigOverlaySnapshot +} +``` + +The server performs the following transaction: + +1. Resolve the authoritative target from the routed instance directory and requested scope. Never accept `expected.path` as an arbitrary destination. +2. Canonicalize and compare the resolved and expected paths. Reject a changed target, including a newly created higher-priority config file. +3. Acquire a cross-process lock keyed by canonical target path. Project writes must use the same locking discipline already used for global config. +4. Inside the lock, re-resolve the target, read exact bytes, recompute the revision, and reject a mismatch. +5. Apply `set`/`unset` to the raw target layer, preserve JSONC comments where supported, validate the result, and atomically replace the target using a temporary file in the same directory. Do not expose a partially written config. +6. Invalidate the affected config instances, reload the overlay, and return the authoritative post-write snapshot. Do not fabricate optimistic config if refresh fails. +7. Emit a config event containing `scope`, routed `directory`, canonical `target`, and new `revision`. Global changes invalidate all runtime config caches; project changes invalidate only matching directory/project caches. + +`applied_but_overridden` is success. For each `set` leaf, the refreshed overlay identifies whether a higher layer still wins, such as project config shadowing a user value or managed/runtime config shadowing a project value. The UI keeps the saved value and explains why effective behavior did not change. + +Do not send global and project patches in one webview message or pretend that two files save atomically. User and Project scope maintain independent drafts and save independently. VS Code extension preferences such as autocomplete settings are a third, visibly separate store with their own request acknowledgements. + +Domain actions outside Settings must not perform client-side read-modify-write against a mutable effective config. Provider/custom-provider/work-style actions are User-global operations and should call either the same revision-aware User endpoint or a narrow backend mutation that merges named fields under the target lock. Permission Dock "always" rules remain a narrow global rule mutation tied to the exact pending request/session route; that session directory validates the request but does not select a project config target. All such mutations emit the revisioned config event, so a dirty Settings editor becomes stale rather than being overwritten. + +Expected typed failures are: + +- `unknown_project` or `stale_project_generation` from the extension; +- `untrusted_project` or `workspace_untrusted` from the extension; +- `binding_mismatch` or `binding_expired` from the extension; +- HTTP 409 `config_target_changed` with the current target descriptor; +- HTTP 409 `config_revision_conflict` with the current target descriptor and fresh snapshot when available; +- HTTP 403 `config_target_not_writable` or project target escaping its trusted root; +- HTTP 422 `config_invalid` with schema/parse details; +- an I/O failure with no success acknowledgement. + +Every failure preserves the draft and names the scope/project/path. A config event is never treated as confirmation of the user's save; only a matching write response may clear that draft. + +### Draft and project-switch behavior + +- Detail activation from project A to B does not change the Settings selector, binding, values, draft, save state, or target. +- A User Settings draft is global and survives all detail-project switches. +- Project scope uses an explicit trusted project selector that never follows detail activation automatically. +- On first open, the selector may initialize once from the pinned/selected project for convenience, but that choice is immediately captured as Settings state. +- Choosing another Settings project with a dirty draft prompts `Save`, `Discard`, or `Stay`. Drafts are never carried to a different project. +- Clean selector changes issue a new request and ignore out-of-order responses by `requestId`. +- A save captures one binding. Switching visible settings while it is in flight does not redirect it; the result updates only the original binding store and identifies that target in its notification. +- External config events refresh a clean binding. For a dirty or saving binding they mark it stale and show a changed-on-disk banner without replacing local edits. +- A 409 preserves the draft and disables blind retry. The first version offers `Reload`, `Open file`, and `Discard`; it does not auto-merge or force overwrite. A future three-way merge may use the original snapshot, fresh snapshot, and draft. + +### Scope UX + +The first release presents explicit `User | Project` scope, a required selector in Project scope, source badges, and separate binding-keyed drafts. The selected scope applies to the entire operation. Remove hidden `splitConfigByScope`; no setting silently chooses a different file. Inherited user values remain visible in Project scope with `Override`/`Reset to inherited` affordances backed by `set`/`unset`. + +### Project root, worktree, and trust semantics + +- A Project Settings binding targets the registered checkout root held by `ProjectContext.root`. It never targets the last selected Local/worktree/session card. +- Runtime config remains directory-correct: Local uses the project root, and a worktree session uses its exact routed worktree directory. Branch-specific config in a managed worktree can therefore differ at runtime. +- Editing a project's root config does not claim to update already-created worktree checkouts. Editing a worktree config from Settings is out of scope for the first Project Settings release. A future worktree editor must use an explicit `WorktreeRef` and its own immutable binding. +- The backend resolver may choose an existing root or `.kilo`/`.kilocode` config according to current precedence, but the expected target must remain within the trusted project checkout after canonical/symlink resolution. A symlink escape is read-only and must not be patched through the API. +- For an existing target, canonicalize the file with `realpath`. For a missing target, canonicalize its nearest existing ancestor and append the remaining path components before checking containment. Global writes must similarly remain under the canonical `Global.Path.config` root. Do not rely on a lexical prefix check. +- Additional Agent Manager projects must be registry-trusted before project overlay evaluation, opening/creating project config, or project writes. Global User Settings remain editable without trusting a project. +- The pinned project is trusted for config evaluation only when the VS Code workspace is trusted. Do not treat `pinned` as an unconditional trust grant. +- Trust is stored outside the repository in the extension registry/global state. A project config file cannot grant its own trust. Revoking trust invalidates all bindings and project runtime caches. + +### Concrete implementation sequence for config safety + +1. In `packages/opencode/src/kilocode/config/overlay.ts`, replace path-only targets with revisioned target descriptors and add generic changed-path source resolution. +2. Add a Kilo-owned compare-and-swap writer under `packages/opencode/src/kilocode/config/` that resolves, confines, locks, fingerprints, patches, validates, and atomically replaces one target. Keep shared `packages/opencode/src/config/config.ts` changes to minimal marked delegation/invalidation hooks. +3. Update `packages/opencode/src/kilocode/server/httpapi/groups/config-console.ts` and `handlers/config-console.ts` with the write precondition, result, and typed error contracts. Regenerate `packages/sdk/js/`. +4. Extract a config binding controller under `packages/kilo-vscode/src/kilo-provider/` and have `KiloProvider.ts` delegate reads/writes to it. The controller receives explicit project-route resolution; it never reads mutable active workspace state during a bound operation. +5. Replace `configLoaded`, `configUpdated`, and unqualified `updateConfig` in `webview-ui/src/types/messages/` with runtime and Settings message families. Keep a temporary single-project adapter only at the protocol edge. +6. Split `webview-ui/src/context/config.tsx` into activation-bound runtime state and binding-keyed Settings editor state. Settings components consume the editor context; non-settings consumers continue to use runtime-effective config. +7. Remove `webview-ui/src/utils/config-scope.ts` after migrating every control to explicit scope. Preserve explicit project editing for commit messages and repository indexing rules; move indexing enablement to machine-local project consent. +8. Audit all extension config mutators and route user-config imports, resets, custom providers, work-style writes, project writes, and save-bar writes through a revision-aware endpoint or backend atomic field-level mutation. A project-sourced item must never fall back to an active directory write. +9. Make open-file actions take `ProjectRef`, resolve `ProjectContext.root`, verify trust, and show the exact path. For a missing target, open an unsaved document at that explicit path or require an explicit create action; never create it merely by visiting Settings. +10. Update config events and cache invalidation so scope/directory/revision are retained end to end. + +Focused tests belong in: + +- `packages/opencode/test/kilocode/server/config-overlay.test.ts` for raw target snapshots, target changes, 409 revisions, source shadowing, locks, symlink confinement, and response outcomes; +- `packages/opencode/test/kilocode/project-config-update.test.ts` for target selection and atomic writes from repository roots/nested directories; +- a new Kilo-owned backend unit test beside those files only if the compare-and-swap writer needs direct fault-injection coverage; +- `packages/kilo-vscode/tests/unit/config-utils.test.ts`, replacing singleton `ConfigState` assumptions with binding/request-aware draft tests; +- `packages/kilo-vscode/tests/unit/config-scope.test.ts`, deleted when `splitConfigByScope` is removed and replaced by tests proving one explicit scope per save; +- Agent Manager route/context tests for immutable project-root resolution, trust revocation, removal, and generation changes; +- KiloProvider protocol tests for A-to-B activation during reads and writes, out-of-order responses, cache partitioning, and auditing non-save-bar mutators. + +## One `.kilo/agent-manager.json` per project + +Yes, every project has its own repository-local state file: + +```text +project-a/.kilo/agent-manager.json +project-b/.kilo/agent-manager.json +project-c/.kilo/agent-manager.json +``` + +This is already structurally supported because `WorktreeStateManager` derives its file from its immutable constructor root. The final architecture makes this ownership explicit and safe. + +### Ownership rules + +Each `ProjectContext` owns exactly one: + +- canonical repository root and canonical Git common directory; +- `WorktreeStateManager(root)` writing only `/.kilo/agent-manager.json`; +- `WorktreeManager(root)`; +- `SetupScriptService(root)` and project run service; +- diff/import/branch-naming services; +- git stats and PR pollers; +- worktree/session/section/order/run/stale caches; +- mutation queue and initialization promise. + +The global project registry stores descriptors only. It never stores worktrees, sections, sessions, tab order, or repository behavior. The pinned project is derived from the current workspace and remains outside the registry. + +### Initialization + +The first explicit expansion of a trusted project calls one single-flight `ensureReady()` promise: + +1. validate root and Git common directory; +2. construct project-owned services; +3. update that repository's local Git exclude; +4. load only that repository's `.kilo/agent-manager.json`; +5. discover and reconcile only that repository's worktrees; +6. register Local and worktree session routes for that project; +7. start context-owned polling if the project is expanded and the panel is visible; +8. post one generation-stamped project snapshot. + +Repeated expansion must reuse the same initialization promise. Collapse/removal during initialization records the desired lifecycle transition and prevents late completion from posting or mutating a replacement context. + +### Writes and disposal + +All mutations for one project execute through that context's serialized mutation queue. An operation captures the context and generation before its first await and never re-resolves through `contexts.active()` afterward. + +Collapse: + +- leaves the project registered; +- stops pollers/watchers after current operations reach a safe boundary; +- flushes its own state file; +- retains session routes required for already-running backend sessions; +- never aborts a session merely because the UI collapsed. + +Removal: + +- never deletes `.kilo/agent-manager.json`, worktrees, branches, or sessions; +- refuses removal while a project mutation/run requires ownership, unless an explicit coordinated shutdown is implemented; +- awaits context disposal and state flush before deleting the registry descriptor; +- invalidates context generation before awaits so late callbacks are ignored. + +Panel disposal awaits all initialized contexts before shared services are disposed. + +Two VS Code windows writing the same repository state file remain the same pre-existing concurrency boundary as today's single-project Agent Manager. This plan prevents one panel from creating two contexts for the same Git common directory; cross-window file coordination is not expanded in this feature. + +## ProjectContext lifecycle + +`ProjectContext` becomes a lifecycle owner rather than only a lazy service container. + +```ts +type ProjectLifecycle = + | "cold" + | "initializing" + | "ready" + | "suspended" + | "disposing" + | "disposed" + +interface ProjectContext { + readonly id: ProjectId + readonly root: string + readonly commonGitDir: string + readonly generation: number + ensureReady(): Promise + run(operation: (ctx: ReadyProjectContext) => Promise): Promise + suspend(): Promise + dispose(): Promise +} +``` + +Every async init, poll, mutation, diff, run, import, setup, PR update, branch naming, and session operation checks context identity and generation before committing state or posting to the webview. + +## Strict project-qualified protocol + +When multi-project mode exposes more than one project, every repository operation requires project identity. + +Required project qualification includes: + +- worktree create/delete/rename/import/order/section/open/PR actions; +- Local and worktree session create/open/close/fork/promote/share/unshare actions; +- prompt, abort, permission, question, command, sandbox, and context actions; +- terminal create/input/resize/close/show actions; +- diff/watch/apply/revert actions; +- run/setup/configuration actions; +- all state/session/diff/run/terminal/setup/PR output messages. + +Missing, unknown, mismatched, inactive-when-required, or ambiguous identities return a typed route error. They never fall back to the current project or `workspaceFolders[0]`. + +Single-project mode retains a narrow compatibility adapter that injects the pinned project identity. Core handlers always operate on explicit references. + +## One KiloProvider with a project/session route service + +Keep one embedded `KiloProvider`. Multiple providers would duplicate event handling, terminal registrations, caches, and current-session state for one webview. + +Add an Agent Manager route service: + +```ts +interface SessionRoute extends SessionRef { + directory: string + generation: number +} +``` + +It must: + +- register explicit routes for every Local session at its project root; +- register every worktree session at its worktree path; +- let child sessions inherit the parent route; +- validate directory ownership; +- detect ambiguous raw session IDs; +- supply the exact directory to every SDK operation, including share/unshare; +- remove current-root and workspace-root fallback for identified Agent Manager sessions; +- refresh sessions independently for every initialized project and emit real project-stamped `SessionInfo` records. + +The shared detail pane consumes the selected `SessionRef`. Every sidebar body consumes its project's real session store. Background session UI may initially be visually simpler, but it must not display fabricated titles or placeholder session objects. + +Project activation in `KiloProvider` must invalidate and refresh project-scoped config, providers, agents, commands, skills, MCP state, indexing, sandbox state, and Git status under an activation generation guard. + +## Global services with composite keys + +Some services remain panel-global to avoid duplicate VS Code registrations, but all associations use composite references. + +- terminal mappings: `ProjectId + SessionId` or `ProjectId + WorktreeId`; +- run state: keyed by `WorktreeRef`, including project Local; +- visible/presence state: keyed by `SessionRef`; +- tabs and sidebar selection: keyed by `SidebarTarget`; +- diff/apply/revert state: keyed by `ProjectRef` and target; +- pending setup/create/delete state: keyed by project-qualified resource refs. + +Remove unknown-worktree-to-current-root terminal fallback. A context supplies a validated CWD to the global terminal manager. + +Global backend events are routed once by event directory and registered session route. Status, tool, orchestration, permission, and question events retain their directory and enter exactly one owning project context. A cold/collapsed context is not initialized by an unsolicited event. + +## Uniform project sidebar UI + +### One body implementation + +Extract the existing real `renderBody()` from `AgentManagerApp.tsx` into `ProjectSidebarBody`. Do not maintain active and background implementations. + +`ProjectSidebarBody` receives a stable project-scoped store and project-qualified action callbacks. It reuses: + +- the existing Local card markup; +- `WorktreeSectionActions`; +- `WorktreeItem`; +- `SectionHeader` and current drag/drop behavior; +- `UnassignedSessionsSection`; +- existing rename/delete/open/PR/run/setup/session affordances. + +Render it for every expanded project: + +```tsx + + {(project) => ( + + + + + + )} + +``` + +The body is keyed by `projectId`, not active status. Changing detail selection cannot remount it. + +### Per-project webview stores + +Replace active-only shared sidebar signals with `Map` or an equivalent Solid store registry. + +Each store owns: + +- state/worktrees/sections/order/stale state; +- real `SessionInfo` and managed-session state; +- git stats and local stats; +- PR and run/setup state; +- pending delete/rename/create state; +- sidebar search/order/collapse state where repository-owned; +- generation for dropping stale output. + +Only shared detail/chat/terminal state remains global. The top toolbar reads the selected detail target's project store. + +`project-live.ts` may be evolved into this complete store registry. It must stop mirroring active payloads into a separate sidebar signal set. + +### Scrolling and layout + +The project list becomes the sidebar scroll container. Individual project bodies must not use a global `50vh` cap that makes two projects fight for viewport height. Section and project collapse state controls density; normal browser scrolling exposes all expanded worktrees. + +### UI behavior + +- Clicking a Local/worktree/session card emits one atomic project-qualified selection. +- Rename/delete/run/open/section/PR actions execute against the clicked card's project without changing sidebar structure. +- The active project may receive an emphasis style, but no different markup. +- Active project chevrons are not disabled; expansion and detail selection are separate concepts. +- Global New Session/Run buttons target the last selected detail project. +- New Worktree accepts an explicit target project, defaulting to the selected detail project. + +## Uniform polling and live state + +Every ready expanded context owns the same poller set. There is no active singleton poller plus background poller split. + +Pollers emit `{ projectId, generation }` and update only their owning context/store. Stop/suspend increments generation before clearing timers so in-flight Git/PR results are dropped. + +Context state is pushed after every project mutation, not only initial expansion or active-project changes. This includes worktree/session/section/order/run/setup changes in background projects. + +Panel visibility changes poll cadence uniformly across all expanded contexts. + +## Registry correctness + +Registry mutations use one in-process queue. Each mutation re-reads persisted storage, validates it, applies one mutation, writes once, then updates memory. Trust/remove persistence failures are user-visible and do not leave UI state ahead of storage. + +Registry descriptors include canonical root, canonical Git common directory, URI scheme/authority, order, label, trust, and added time. They do not contain Agent Manager repository state. + +## Implementation order + +### Slice 0: configuration safety blocker + +1. Introduce revisioned `/config/overlay` reads and compare-and-swap writes, first for User scope and with the same generic implementation covered for Project scope. +2. Separate runtime-effective config messages/state from immutable Settings bindings and drafts. +3. Add explicit `User | Project` Settings scope and an immutable trusted project selector/binding for Project writes. +4. Remove hidden `splitConfigByScope` persistence and audit every direct/indirect config mutation, including provider disconnect, import/reset, custom providers, work-style presets, Permission Dock, and indexing. +5. Make config events scope/directory/target/revision aware and generation-guard runtime activation refreshes. +6. Add target-switch, stale-binding, revision-conflict, trust, and draft-preservation tests. + +Do not enable multi-project broadly before this slice passes. + +### Slice 1: routing and identity blockers + +1. Add project-qualified refs and strict protocol types. +2. Add the project/session route service and explicit Local routes. +3. Remove Agent Manager current/workspace-root fallback for identified operations. +4. Add atomic project-qualified selection. +5. Convert panel-global maps to composite keys. +6. Add strict routing and raw-ID collision tests. + +Do not expose interactive background controls before this slice passes. + +### Slice 2: context lifecycle and service ownership + +1. Add single-flight initialization, lifecycle state, generation, and mutation queue to `ProjectContext`. +2. Move root-bound diff/import/run/setup/branch-naming/poller ownership behind context APIs. +3. Replace dynamic active getters inside async mutations with captured contexts. +4. Add suspend/remove/dispose coordination. +5. Reject duplicate Git common directories and serialize registry writes. +6. Route global backend events by directory. + +### Slice 3: complete per-project stores + +1. Refresh and store real sessions per project. +2. Emit all relevant output with project and generation. +3. Evolve `project-live.ts` into a complete project sidebar store registry. +4. Make polling uniform and generation-safe. +5. Add background mutation/state propagation tests. + +### Slice 4: uniform real UI + +1. Extract the current `renderBody()` intact into `ProjectSidebarBody`. +2. Parameterize it by one project store and project-qualified callbacks. +3. Render one body per expanded project. +4. Delete `ProjectSummary` and its CSS. +5. Separate project expansion from detail activation. +6. Add project-aware New Worktree targeting. +7. Add component/visual tests proving no body remount or structural change on selection. + +### Slice 5: validation and release gating + +1. Run focused lifecycle/router/context tests after each slice. +2. From `packages/opencode/`, run the focused config overlay/project-update tests and CLI typecheck. Run the opencode annotation and Promise-facade guards for shared-file hooks. +3. Regenerate the JS SDK after endpoint schema changes and verify generated consumers compile; never hand-edit generated sources. +4. From `packages/kilo-vscode/`, run typecheck, lint, focused/unit tests, knip, compile/package, and architecture guards. +5. Manually exercise two repositories with multiple worktrees and sessions in both, including a dirty User draft during project activation, an external config edit conflict, project trust revocation, project removal, and project-config open targeting. +6. Keep the feature flag default off until all acceptance criteria pass. + +## Blocking tests + +The feature is not complete until tests prove: + +1. Two concurrent expands initialize one context once. +2. Collapse/remove during initialization produces no late state or poller posts. +3. A project switch during create/import/setup/session/run/diff cannot change operation ownership. +4. Project B Local sessions never resolve through project A. +5. Missing/mismatched project references fail closed. +6. Poller/PR late results after stop or generation change are dropped. +7. Same raw worktree/session/local IDs in two projects do not collide in runtime or UI stores. +8. Two expanded projects render two permanent full `ProjectSidebarBody` instances. +9. Selecting a card changes only shared detail state and active emphasis, not body structure or mount identity. +10. Every worktree/session/terminal/diff/run/setup/section/PR action targets the clicked project's context. +11. Registry writes preserve concurrent add/remove/trust changes. +12. Roots sharing one Git common directory cannot both register. +13. Panel shutdown awaits all contexts and stops background activity. +14. Flag-off behavior remains the current single-project UI and state file. +15. A Settings draft loaded for project A cannot write project B after any activation, expansion, removal, trust, or worktree switch. +16. User Settings writes target the revisioned user file; explicit Project Settings writes target only the selected trusted project's revisioned root config. No key is silently rerouted. +17. A clean external config change refreshes Settings; a dirty or saving binding is marked stale without losing its draft. +18. Concurrent editors using the same revision produce one success and one 409 conflict, with no lost update or partial file. +19. A comment-only JSONC edit, file deletion/recreation with changed bytes, or newly created higher-priority config changes the revision/target and rejects the stale write. +20. A save response clears only the matching `{ requestId, binding.id }`; an SSE config event or out-of-order read cannot confirm a save. +21. Global and project writes are independently acknowledged and never presented as one atomic transaction. +22. Project config open/read/write actions reject unknown, untrusted, removed, generation-stale, symlink-escaping, or mismatched project targets. +23. Runtime config for a selected managed worktree uses that worktree directory, while Project Settings/open-file targets the immutable registered project root. +24. Project-sourced providers and other config collections cannot trigger an implicit active-project write from Settings actions. + +## Acceptance criteria + +- No `ProjectSummary` or alternate fake-card body exists. +- Every expanded project displays real live Local, worktree, and session UI concurrently. +- Every visible worktree/session action is usable and routes by explicit project identity. +- Switching detail selection causes no sidebar body remount, replacement, collapse, or data reset. +- Each project reads and writes only its own `.kilo/agent-manager.json`. +- Expanded projects remain live independently; collapsed projects suspend safely. +- No identified operation falls back to active/current/workspace root. +- Single-project behavior and persisted state remain backward-compatible when the flag is off. +- Shared Settings exposes explicit User and Project scope; Project writes require a trusted project selector and immutable binding. +- Runtime project activation and Settings editor binding are separate state machines. +- Every Settings config write has an immutable scope/target binding and revision precondition; narrow domain mutations merge named fields under the same target lock. No config mutation uses a save-time active-directory lookup. +- Dirty drafts survive external updates and conflicts and can never migrate between projects. +- Project Settings targets the explicit registered root, never the active Agent Manager project or active worktree. + +## Planned UI + +```text +┌─ Sidebar ─────────────────────────────────┬─ Shared detail pane ──────────┐ +│ ← selected project search calendar gear │ │ +│ │ Chat / diff / terminal │ +│ PROJECTS + │ for the selected │ +│ ▾ abalone-bactrosaurus │ project/worktree/session │ +│ ┌─────────────────────────────────┐ │ │ +│ │ Local main +3295 -548 ↓54 │ │ │ +│ └─────────────────────────────────┘ │ │ +│ WORKTREES actions │ │ +│ ┌─────────────────────────────────┐ │ │ +│ │ feature-x #1234 +120 -8 ↓2 │ │ │ +│ │ real menus, rename, run, open │ │ │ +│ └─────────────────────────────────┘ │ │ +│ ┌─────────────────────────────────┐ │ │ +│ │ bugfix-y +45 -12 │ │ │ +│ └─────────────────────────────────┘ │ │ +│ SESSIONS │ │ +│ • Fix login redirect running │ │ +│ • Refactor auth │ │ +│ │ │ +│ ▾ kilo-pi-provider │ │ +│ ┌─────────────────────────────────┐ │ │ +│ │ Local master +16 -6 ↓1 │ │ │ +│ └─────────────────────────────────┘ │ │ +│ WORKTREES actions │ │ +│ ┌─────────────────────────────────┐ │ │ +│ │ provider-z #88 +88 -3 │ │ │ +│ │ real menus, rename, run, open │ │ │ +│ └─────────────────────────────────┘ │ │ +│ SESSIONS │ │ +│ • Add provider tests │ │ +│ │ │ +│ ▸ docs-repo collapsed │ │ +│ │ │ +│ [New Session] [Run] │ │ +└───────────────────────────────────────────┴──────────────────────────────┘ + +Selecting any card: + +- keeps every project body mounted and pixel-stable; +- changes only the selected styling, top toolbar target, and shared detail pane; +- never swaps a real body for a summary or vice versa. +``` diff --git a/.kilo/plans/jetbrains-context-settings-page.md b/.kilo/plans/jetbrains-context-settings-page.md new file mode 100644 index 0000000000..1b76e7b6ce --- /dev/null +++ b/.kilo/plans/jetbrains-context-settings-page.md @@ -0,0 +1,423 @@ +# JetBrains Context Settings Page + +Implement the Tier 1 Context settings from `docs/jetbrains-vscode-settings-parity.md` in the JetBrains plugin. This is a pure `kilo.json` settings UI: no CLI feature work, no SDK regen, and no session-rendering changes. + +## Goal + +Add a new JetBrains settings page under `Settings -> Tools -> Kilo Code -> Context` for: + +| Setting | Config key | Type | +|---|---|---| +| Auto-compaction | `compaction.auto` | boolean | +| Compaction threshold percent | `compaction.threshold_percent` | number or null | +| Prune on compaction | `compaction.prune` | boolean | +| Watcher ignore patterns | `watcher.ignore` | string array | + +Do not include VS Code Context-tab memory/indexing controls in this first pass. JetBrains does not have the equivalent memory/indexing settings service yet, and the parity doc excludes indexing from easy wins. + +Do not put `snapshot` on this page unless product explicitly decides to combine Context and Checkpoints. The parity doc suggests `snapshot` belongs on a new Checkpoints page. + +## Context Verified + +- Source parity doc: `docs/jetbrains-vscode-settings-parity.md`. +- JetBrains settings guidance: `packages/kilo-jetbrains/AGENTS.md`, especially `Settings UI`. +- Existing settings pages are registered in `packages/kilo-jetbrains/frontend/src/main/resources/kilo.jetbrains.frontend.xml`. +- Existing page pattern to mirror: + - `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/models/ModelsConfigurable.kt` + - `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/models/ModelsSettingsUi.kt` + - `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/models/ModelsSettingsState.kt` +- Existing global config write path is sufficient once DTO/parser support is added: + - Frontend: `KiloAppService.updateConfigAsync(...)` + - RPC: `KiloAppRpcApi.updateConfig(patch: ConfigPatchDto)` + - Backend: `KiloBackendAppService.updateConfig(...)` + - HTTP: `PATCH /global/config`, then `GET /global/config` +- Existing backend parser currently only serializes selected string keys from `ConfigPatchDto.values`; Context needs typed booleans, numbers, explicit null, and string arrays. + +## Decisions + +- Use global config for the first implementation, matching the existing app-level settings write path. +- Add typed DTO fields instead of overloading `ConfigPatchDto.values` for non-string values. +- Use an explicit `clear` list for nullable compaction fields, because `Double?` cannot distinguish absent from explicit `null`. +- Reuse `BaseSettingsUi`, `DraftReadyConfigurable`, `SettingsDraftState`, `SettingsRows`, `SettingsRow`, and `SettingsToggle`. +- Use the shared settings list primitives for `watcher.ignore`; do not build a bespoke add/remove list if `SettingsListPanel` or adjacent list primitives fit. +- Keep all UI strings in `KiloBundle.properties`. Let other locale bundles fall back unless the repo's resource-bundle checks require duplicated English keys. + +## Part A - Shared DTOs + +File: `packages/kilo-jetbrains/shared/src/main/kotlin/ai/kilocode/rpc/dto/KiloAppStateDto.kt` + +Add config read DTOs: + +```kotlin +@Serializable +data class WatcherConfigDto( + val ignore: List = emptyList(), +) + +@Serializable +data class CompactionConfigDto( + val auto: Boolean? = null, + val threshold_percent: Double? = null, + val prune: Boolean? = null, +) +``` + +Extend `ConfigDto`: + +```kotlin +val watcher: WatcherConfigDto? = null, +val compaction: CompactionConfigDto? = null, +``` + +Add patch DTOs: + +```kotlin +@Serializable +data class WatcherPatchDto( + val ignore: List? = null, +) + +@Serializable +data class CompactionPatchDto( + val clear: List = emptyList(), + val auto: Boolean? = null, + val threshold_percent: Double? = null, + val prune: Boolean? = null, +) +``` + +Extend `ConfigPatchDto`: + +```kotlin +val watcher: WatcherPatchDto? = null, +val compaction: CompactionPatchDto? = null, +``` + +Notes: + +- `watcher.ignore = null` means no change. +- `watcher.ignore = emptyList()` means explicitly save an empty list. +- `compaction.threshold_percent = null` alone means no change. +- `compaction.clear = listOf("threshold_percent")` means emit JSON `"threshold_percent": null`. +- `false` boolean values must be serialized; do not treat `false` as absent. + +## Part B - Backend Config Parser And Serializer + +File: `packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/cli/KiloCliDataParser.kt` + +### Parse + +Extend `parseConfig(raw)` to read: + +- `watcher.ignore` +- `compaction.auto` +- `compaction.threshold_percent` +- `compaction.prune` + +Add private helpers near `parseSkillsConfig` / `parseMcpConfig`: + +```kotlin +private fun parseWatcherConfig(obj: JsonObject?): WatcherConfigDto? +private fun parseCompactionConfig(obj: JsonObject?): CompactionConfigDto? +``` + +Use existing helper style: + +- strings: `str(...)` +- booleans: `flagOrNull(...)` +- numbers: `num(...)` +- arrays: `arr()?.mapNotNull { it.jsonPrimitive.contentOrNull }` + +### Serialize + +Extend `buildConfigPatch(patch)` to emit typed context patches: + +```json +{ + "watcher": { + "ignore": ["**/node_modules/**"] + }, + "compaction": { + "auto": true, + "threshold_percent": 80, + "prune": false + } +} +``` + +For explicit threshold clearing: + +```json +{ + "compaction": { + "threshold_percent": null + } +} +``` + +Keep the existing `values` allowlist for string model keys. Do not pass Context values through `values`. + +## Part C - Frontend State Model + +Add package: `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/context/` + +New file: `ContextSettingsState.kt` + +Define: + +```kotlin +internal data class ContextDraft( + val auto: Boolean? = null, + val threshold: String = "", + val prune: Boolean? = null, + val ignore: List = emptyList(), +) +``` + +Use a string for the threshold draft so the UI can represent blank/invalid intermediate input without losing user text. Convert only when building a patch. + +Functions to add: + +- `contextDraft(config: ConfigDto?): ContextDraft` +- `patch(from: ContextDraft, to: ContextDraft): ConfigPatchDto` +- `savedMatches(base: ContextDraft, draft: ContextDraft): Boolean` +- `threshold(value: String): Double?` or equivalent parsing helper +- validation helper for threshold range if desired + +Patch behavior: + +- Only emit changed fields. +- Emit `CompactionPatchDto(auto = false)` when the user turns auto-compaction off. +- Emit `CompactionPatchDto(prune = false)` when the user turns pruning off. +- Emit `CompactionPatchDto(threshold_percent = 80.0)` for a non-blank valid number. +- Emit `CompactionPatchDto(clear = listOf("threshold_percent"))` when an existing threshold is cleared. +- Emit `WatcherPatchDto(ignore = emptyList())` when the last ignore pattern is removed. +- Return no change from the page when all fields match the baseline. + +## Part D - Frontend UI Page + +New file: `ContextConfigurable.kt` + +Mirror `ModelsConfigurable`: + +- Extend `DraftReadyConfigurable`. +- `ID = "ai.kilocode.jetbrains.settings.context"`. +- `getDisplayName()` returns `KiloBundle.message("settings.context.displayName")`. +- `create(cs)` returns `ContextSettingsUi(cs)`. + +New file: `ContextSettingsUi.kt` + +Mirror the simple parts of `ModelsSettingsUi`: + +- Extend `BaseSettingsUi`. +- Initial draft is `ContextDraft()`. +- `save(change, done)` calls `app.updateConfigAsync(change, done)`. +- `base(result)` and `draft(state)` call `contextDraft(state.config)`. +- `saved(base, draft)` calls `savedMatches(base, draft)`. +- `pendingText()` uses `settings.context.save.pending`. +- `failedText()` uses `settings.context.save.failed`. +- `loadWorkspace(root)` returns `Unit`; `applyWorkspace(result)` is `Unit`. +- `models(state)` is `Unit`. +- `syncContent()` updates enabled states, field values, save/progress overlay, and validation messaging. + +New content class: `ContextSettingsContent` + +Suggested layout: + +- Section `settings.context.compaction.title` + - Toggle row `settings.context.compaction.auto.title` + - Numeric row `settings.context.compaction.threshold.title` + - Toggle row `settings.context.compaction.prune.title` +- Section `settings.context.watcher.title` + - List editor row/panel for ignore patterns + +Controls: + +- Use `SettingsToggle` for booleans. +- Use `JBTextField` or a small reusable numeric field pattern based on `AgentEditDialog` for threshold. +- Use shared list primitives (`SettingsListPanel` / `SettingsListView` / `SettingsListItem` / `SettingsListCell`) for `watcher.ignore` where practical. +- Keep the page editable while app status is ready and no save is pending. +- Disable controls while saving. + +Validation: + +- Blank threshold is valid and means clear/reset the config value if it differs from baseline. +- Non-numeric threshold is invalid and should prevent `apply()` from sending a patch. +- Suggested accepted range is `0..100`; if existing CLI allows a broader range, follow CLI behavior. +- Show validation through existing settings messaging rather than custom ad hoc labels. + +## Part E - Settings Registration And Root Navigation + +File: `packages/kilo-jetbrains/frontend/src/main/resources/kilo.jetbrains.frontend.xml` + +Add a child configurable: + +```xml + +``` + +Adjust weights so the desired order is stable. Recommended order: + +| Page | Weight | +|---|---| +| User Profile | 5 | +| Models | 4 | +| Context | 3 | +| Providers | 2 | +| Agent Behavior | 1 | + +File: `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/KiloSettingsConfigurable.kt` + +Add a root-page `ActionLink` for Context between Models and Providers: + +- Import `ContextConfigurable`. +- Link text: `settings.context.displayName`. +- Link target: `ContextConfigurable.ID`. + +`KiloSettingsSelection.kt` probably needs no code changes because child IDs already share the root prefix. + +## Part F - Strings + +File: `packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle.properties` + +Add base strings near the other settings strings: + +```properties +settings.context.displayName=Context +settings.context.description=Configure compaction and file-watcher context behavior. +settings.context.save.pending=Saving context settings... +settings.context.save.failed=Failed to save context settings +settings.context.compaction.title=Compaction +settings.context.compaction.description=Control when Kilo summarizes long sessions to reduce context usage. +settings.context.compaction.auto.title=Auto-compaction +settings.context.compaction.auto.description=Automatically compact long conversations before they exceed the model context window. +settings.context.compaction.threshold.title=Compaction threshold +settings.context.compaction.threshold.description=Percent of the context window to use before auto-compaction starts. Leave blank to use the default. +settings.context.compaction.threshold.invalid=Enter a number from 0 to 100, or leave the field blank. +settings.context.compaction.prune.title=Prune on compaction +settings.context.compaction.prune.description=Drop older raw conversation details after compaction to keep the session context smaller. +settings.context.watcher.title=Watcher ignore patterns +settings.context.watcher.description=Glob patterns Kilo should ignore when watching repository file changes. +settings.context.watcher.add=Add pattern +settings.context.watcher.empty=No ignore patterns configured. +settings.context.watcher.placeholder=e.g. **/dist/** +settings.context.watcher.remove=Remove {0} +``` + +If resource-bundle tests require every key in every locale bundle, copy English values into the localized bundles and leave translation work for a later i18n pass. + +## Part G - Test Updates + +### Frontend state tests + +Add: `packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/settings/context/ContextSettingsStateTest.kt` + +Cover: + +- Draft reads `ConfigDto.watcher` and `ConfigDto.compaction`. +- Unchanged draft emits no patch. +- Boolean changes emit `false` and `true` correctly. +- Threshold set emits `threshold_percent`. +- Threshold clear emits `clear = listOf("threshold_percent")`. +- Watcher list add/remove emits the whole new `ignore` list, including empty list. +- Invalid threshold is rejected before save if validation lives in state helpers. + +### Frontend UI tests + +Add: `packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/settings/context/ContextSettingsUiTest.kt` + +Use `ModelsSettingsUiTest` as the main pattern: + +- `BasePlatformTestCase`. +- Real EDT. +- `FakeAppRpcApi`. +- `KiloAppService`. +- `flushUntil` helpers. +- Assert `rpc.configPatches` after user interaction. +- Assert controls disable during pending save. +- Assert failed save leaves page modified and shows `settings.context.save.failed`. + +Update `FakeAppRpcApi`: + +- File: `packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/testing/FakeAppRpcApi.kt` +- Apply `patch.watcher` and `patch.compaction` to fake config state. +- Preserve explicit empty lists. +- Preserve boolean `false`. +- Honor `compaction.clear` by setting cleared fields to `null`. + +### Backend parser tests + +Update: `packages/kilo-jetbrains/backend/src/test/kotlin/ai/kilocode/backend/cli/KiloCliDataParserTest.kt` + +Add exact JSON tests for: + +- `parseConfig` reads watcher and compaction fields. +- `buildConfigPatch` emits watcher ignore arrays. +- `buildConfigPatch` emits `auto=false` and `prune=false`. +- `buildConfigPatch` emits numeric `threshold_percent`. +- `buildConfigPatch` emits explicit `threshold_percent:null` when `clear` includes the field. + +### Backend app service tests + +Update: `packages/kilo-jetbrains/backend/src/test/kotlin/ai/kilocode/backend/app/KiloBackendAppServiceTest.kt` + +Add a test similar to the existing model config update test: + +- Call `updateConfig(ConfigPatchDto(watcher = ..., compaction = ...))`. +- Assert `MockCliServer.lastConfigPatchBody` exactly matches the expected nested JSON. +- Assert the returned/reloaded `ConfigDto` includes the saved Context values. + +### Root settings tests + +Update: `packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/settings/KiloSettingsConfigurableTest.kt` + +Add: + +- `ContextConfigurable.ID == "ai.kilocode.jetbrains.settings.context"`. +- Root page includes a Context link. +- Link order matches XML order. + +## Validation + +Run from `packages/kilo-jetbrains/`: + +```bash +./gradlew typecheck +./gradlew test +``` + +Focused checks while iterating: + +```bash +./gradlew :shared:test --tests '*ContextSettingsStateTest' +./gradlew :frontend:test --tests '*ContextSettingsUiTest' +./gradlew :backend:test --tests '*KiloCliDataParserTest' +./gradlew :backend:test --tests '*KiloBackendAppServiceTest' +``` + +If the exact Gradle module test selectors differ, run the package-level `./gradlew test` before marking the implementation ready. + +Manual verification: + +1. Run `./gradlew runIde` from `packages/kilo-jetbrains/`. +2. Open `Settings -> Tools -> Kilo Code -> Context`. +3. Toggle auto-compaction and prune. +4. Set threshold to a number, apply, reopen settings, and verify it persists. +5. Clear threshold, apply, reopen settings, and verify it resets. +6. Add and remove watcher ignore patterns, apply, reopen settings, and verify the list persists. +7. Inspect the global Kilo config file through the existing `Open: global ...` action if needed. + +## Risks And Follow-ups + +- Global vs project-local config: this plan uses the existing global config write path. Project-local Context settings would need new workspace config RPC plumbing. +- Threshold null semantics: implement explicit clear handling; otherwise clearing the field will silently do nothing. +- String-array UI: reuse list primitives even if it takes a small adapter type; avoid one-off list widgets. +- VS Code memory/indexing parity: defer because it is not pure config and is excluded by the easy-win criteria. +- Checkpoints page: implement `snapshot` separately unless product asks to combine it with Context. +- Changeset: when implementing this user-facing JetBrains settings feature, add a patch changeset for `kilo-code`/JetBrains according to repo release guidance. diff --git a/.kilo/plans/jetbrains-mdview-editor-theme-colors.md b/.kilo/plans/jetbrains-mdview-editor-theme-colors.md new file mode 100644 index 0000000000..20e85b546f --- /dev/null +++ b/.kilo/plans/jetbrains-mdview-editor-theme-colors.md @@ -0,0 +1,67 @@ +# JetBrains MdView Editor Theme Colors Plan + +## Goal + +Keep JetBrains markdown layout compact while making markdown colors and backgrounds come from the active editor color scheme, and ensure existing theme/editor-setting listeners refresh all existing `MdView` instances after changes. + +## Findings + +- `SessionUi` already subscribes to `EditorColorsManager.TOPIC` and `LafManagerListener.TOPIC`, then calls `applyStyle(SessionEditorStyle.current())` on the session tree. +- Most markdown consumers already propagate that style through `MdView.applyStyle(style)` via `TextView`, `ReasoningView`, message lists, and session panels. +- `PlanExitView.applyStyle()` sets only font/code font/foreground and does not call `md.applyStyle(style)`, so internal markdown role colors can stay tied to the initial style. +- `MdViewHybrid.applyStyle()` restyles retained HTML panes and code block containers, but retained `CodeField` editors need explicit reapplication of `SessionEditorStyle.applyToEditor()` after creation so syntax highlighting and editor colors follow scheme changes. +- `MdCommon.defaults()` currently mixes editor colors, UI theme colors, and one literal inline-code color fallback. The literal fallback should be removed, and markdown roles should derive from `EditorColorsScheme`/syntax attributes wherever possible. +- `TextView` currently overrides markdown background with `SessionUiStyle.Transcript.bgColor()` (`UiStyle.Colors.bg()`), while prompt markdown already uses `style.editorBackground`. If markdown surfaces should consistently use editor background, normal text views need to use `style.editorBackground` too. + +## Implementation Plan + +1. Keep compact CSS unchanged. + - Do not reintroduce line-height, margin, padding, heading sizing, or other geometry rules. + - Keep the current role color/background selectors only. + +2. Derive markdown role defaults from editor settings. + - Update `MdCommon.defaults(style)` to use `style.editorForeground` and `style.editorBackground` for primary text/background. + - Add small local helper functions for editor attributes, for example foreground/background from `style.editorScheme.getAttributes(key)` and color keys from `style.editorScheme.getColor(key)`. + - Use public IntelliJ editor keys for role colors: + - Links: `CodeInsightColors.HYPERLINK_ATTRIBUTES.foregroundColor`, fallback to platform link color if absent. + - Inline code foreground/background: `DefaultLanguageHighlighterColors.DOC_CODE_INLINE`, fallback to `STRING`, then editor foreground/background. + - Code block foreground/background: `DefaultLanguageHighlighterColors.DOC_CODE_BLOCK`, fallback to editor foreground/background. + - Quote/emphasis/list weak text: comment/doc-comment attributes, fallback to editor foreground or `UIUtil.getContextHelpForeground()` only when the scheme has no useful value. + - Borders/HR/table/code border: editor preview/border color keys such as `EditorColors.PREVIEW_BORDER_COLOR`, fallback to `UiStyle.Colors.contentBorder()`. + - Remove `JBColor(0x...)` or other literal runtime color fallbacks from `MdCommon`. + - Keep public `MdView` API unchanged; role colors stay internal unless a concrete external override need appears. + +3. Ensure style propagation reaches every markdown instance. + - Update `PlanExitView.applyStyle(style)` to call `md.applyStyle(style)` before applying its explicit font/code-font/foreground overrides. + - Audit existing markdown callers after the change; keep using the existing `SessionEditorStyleTarget` propagation path rather than adding per-`MdView` theme listeners. + - Keep explicit foreground overrides in `TextView`, `ReasoningView`, and `PlanExitView` where they intentionally set body text role, but let internal markdown role colors refresh from the new style snapshot. + +4. Ensure retained hybrid code blocks update after editor setting changes. + - In `MdViewHybrid.CodeView.style(opts)`, for retained `CodeField` blocks, reapply `style.applyToEditor(editor)` to the underlying editor if it exists. + - Reapply code editor background/scroll pane/viewport backgrounds from `opts.preBg` in the same path. + - Preserve retained component/editor reuse: do not rebuild code block panes just to update style. + +5. Align markdown backgrounds with editor settings. + - Keep `MdCommon` default background as `style.editorBackground`. + - Change normal `TextView` markdown background to `style.editorBackground` if the intent is that all markdown surfaces use editor background, matching `PromptView` and session root behavior. + - Preserve `transparent` handling: when `md.opaque = false`, background should still be the editor-derived value for child/code surfaces, but the Swing component should remain non-opaque. + +6. Update tests. + - Extend `MdViewTest` to verify markdown role CSS changes when applying a `SessionEditorStyle` backed by a customized editor scheme, especially inline code, code block, link, and border colors. + - Extend `MdViewHybridTest` to assert `applyStyle()` updates retained HTML panes and retained code editors without replacing them, including editor scheme/background changes. + - Add or extend `PlanExitViewTest` so `applyStyle()` refreshes the nested markdown style, not just foreground/font overrides. + - Keep existing compactness expectations: tests should not assert new spacing, padding, margin, line-height, or size rules. + +## Verification + +- From `packages/kilo-jetbrains/`, run `./gradlew frontend:test --tests '*MdView*'`. +- From `packages/kilo-jetbrains/`, run `./gradlew frontend:test --tests '*PlanExitViewTest*'` if the focused test is not covered by the MdView filter. +- From `packages/kilo-jetbrains/`, run `bun run typecheck`. + +## Constraints + +- Do not introduce JCEF, Compose, or Kotlin UI DSL. +- Do not add new theme/editor listeners in `MdView`; use the existing `SessionUi` listener and `SessionEditorStyleTarget` propagation path. +- Avoid hardcoded runtime colors in markdown styling; prefer editor scheme attributes/color keys, then platform/theme APIs as non-literal fallbacks. +- Preserve retained Swing behavior and `MdViewHybrid.sync()` component reuse. +- Keep the public `MdView` override API stable unless implementation proves a new external override is required. diff --git a/.kilo/plans/jetbrains-mdview-vscode-styling.md b/.kilo/plans/jetbrains-mdview-vscode-styling.md new file mode 100644 index 0000000000..89e816d023 --- /dev/null +++ b/.kilo/plans/jetbrains-mdview-vscode-styling.md @@ -0,0 +1,69 @@ +# JetBrains MdView VS Code Styling Plan + +## Goal + +Improve JetBrains markdown output so assistant/user transcript markdown visually matches the VS Code webview markdown style while keeping the existing Swing/JBHtmlPane + editor-backed code block architecture. + +## Findings + +- VS Code markdown styling is split across `packages/ui/src/components/markdown.css`, `packages/kilo-ui/src/components/markdown.css`, `packages/kilo-ui/src/styles/vscode-bridge.css`, and message-part overrides. +- Base VS Code markdown uses 14px sans text, 160% line height, tight first/last margins, same-size medium headings, 12px paragraph spacing, link-colored anchors, compact lists, weak list markers, weak blockquotes with a 2px left border, invisible HR spacing, bordered/padded code blocks, green inline code, and lightly bordered tables. +- The VS Code theme bridge maps markdown roles to editor/theme tokens: heading/link/list/image use `textLinkForeground`, text/strong/code-block use editor foreground, inline code uses charts/syntax green, quote/emphasis use description foreground, HR uses panel border. +- JetBrains markdown is rendered by `MdViewHybrid` and `MdViewHtmlPane`, with shared CSS from `MdCommon.rules()` and defaults from `MdCommon.defaults()`. +- JetBrains currently styles only broad tag font/color, links, code/pre colors, blockquote border/text color, and table border. It lacks VS Code-equivalent spacing, heading/strong/emphasis/list marker/table cell rules, inline-code foreground, blockquote geometry, HR spacing, and code block surface polish. +- JetBrains fenced code blocks are already stronger than VS Code in one respect: they use `EditorTextField` with real IDE syntax highlighting and streaming retention. Preserve this instead of switching to web/JCEF rendering. + +## Implementation Plan + +1. Expand JetBrains markdown style tokens. + - Add internal fields to `MdStyle` for heading, strong, emphasis, inline code foreground, list marker, HR, table/header, and code block border colors. + - Keep the public `MdView` override API stable unless a new external override is clearly needed. + - Compute defaults in `MdCommon.defaults(style)` from IntelliJ/editor theme sources and centralized Kilo semantic colors where no platform key matches. + - Use `JBColor.namedColor("Kilo.Markdown.*", fallback)` for Kilo-specific markdown palette fallbacks, so themes can override them and runtime code avoids scattered hardcoded colors. + +2. Mirror VS Code markdown CSS in `MdCommon.rules()`. + - Add root/body wrapping rules: max width behavior, break-word wrapping, base line-height, and first/last-child margin trimming where supported by `JBHtmlPane` CSS. + - Add heading rules: same base size, medium/bold weight, role-specific color, line height, and bottom spacing. + - Add paragraph, list, list item, nested list, and marker rules. If Swing HTML does not support `::marker`, fall back to `li { color: ... }` plus child text color reset only if supported; otherwise keep list text normal and document the limitation in tests. + - Add strong/emphasis colors matching VS Code token roles. + - Add anchor styling matching VS Code: themed link color, no forced background, and underline behavior where `JBHtmlPane` supports it. + - Add blockquote geometry: 2px left border, 24px vertical margin, 8px left padding, weak text, and normal style. + - Add table layout rules: collapse borders, full width where possible, 24px vertical margin, 12px cell padding, weak row borders, stronger header text. + - Keep HRs visually hidden but spaced consistently with VS Code if the renderer includes them. `MdViewHybrid` currently filters thematic breaks, so this mainly benefits `MdViewHtmlPane` and future reuse. + - Add inline-code foreground and medium font weight. Avoid inline code backgrounds unless the current `JBHtmlPane` configuration already draws them acceptably. + +3. Polish JetBrains code block containers without losing IDE highlighting. + - Keep `EditorTextField` for fenced/indented blocks and `JBTextArea` fallback. + - Style `JBScrollPane` code blocks to match VS Code’s `markdown-code` wrapper feel: subtle background, subtle border, rounded-ish platform arc if feasible, 12px-ish padding, and thin horizontal scrollbar behavior. + - Use `SessionUiStyle.View.Code` for geometry constants. Add only minimal new constants there if current values cannot represent the VS Code spacing. + - Separate code block border color from table border internally so table styling can change without affecting code boxes. + - Continue applying `SessionEditorStyle.applyToEditor(ed)` so code blocks follow IDE syntax highlighting and editor font changes. + +4. Add file/path affordance parity where safe. + - For markdown links whose `href` looks like a relative file path, keep existing link dispatch so the current caller can open files/URLs appropriately. + - Consider decorating inline code that looks like a path with a `file-link` class only when an `openFile` callback is available through the existing usage path. If the current `MdView` abstraction only has `openUrl`, do not widen it unless the call sites can pass file opening cleanly. + - At minimum, make inline code/path-looking content visually closer to VS Code by using the inline-code foreground and dotted underline for explicit file links where generated HTML contains link/code classes. + +5. Preserve retained Swing behavior. + - Keep `MdViewHybrid.sync()` prefix reuse logic unchanged unless necessary. + - Ensure style updates call `reloadCssStylesheets()` and reassign text only for retained `JBHtmlPane` blocks, not by rebuilding all blocks. + - Keep streaming fenced-code fast path and editor disposal behavior intact. + +6. Add focused tests. + - Extend `MdViewTest` and/or `MdViewHybridTest` to assert `overrideSheet()` contains the new VS Code-equivalent rules for headings, strong/emphasis, links, inline code foreground, list/table/blockquote spacing, HR, and code block/table border separation. + - Add component tests for code block pane styling: background, viewport background, border color, padding, scrollbar policy, and retained editor instance after `applyStyle()`. + - Keep existing stress/leak tests green. Add a small stress assertion only if the implementation changes style application semantics. + - Add a changeset: `@kilocode/kilo-jetbrains` patch with user-facing wording such as `Improve markdown readability in JetBrains chat transcripts.` + +## Verification + +- Run targeted JetBrains markdown tests first from `packages/kilo-jetbrains/`: `./gradlew frontend:test --tests '*MdView*'` if the Gradle module supports it; otherwise run the closest supported targeted Gradle test command. +- Run `bun run typecheck` from `packages/kilo-jetbrains/`. +- If targeted Gradle filtering is unreliable, run `./gradlew test` from `packages/kilo-jetbrains/`. + +## Constraints + +- Do not introduce JCEF, Compose, or Kotlin UI DSL. +- Keep changes inside `packages/kilo-jetbrains/` and `.changeset/` unless a shared Kilo UI source of truth is explicitly required. +- No `kilocode_change` markers are needed for JetBrains or Kilo UI paths. +- Prefer IntelliJ theme APIs and centralized semantic tokens over scattered literal colors. diff --git a/.kilo/plans/jetbrains-session-ui-icons-header.md b/.kilo/plans/jetbrains-session-ui-icons-header.md new file mode 100644 index 0000000000..7ed4ae5250 --- /dev/null +++ b/.kilo/plans/jetbrains-session-ui-icons-header.md @@ -0,0 +1,63 @@ +# JetBrains Session UI Icons And Header Layout Plan + +## Goal +Improve JetBrains session UI icon consistency and reduce accidental header interactions: +- Use Kilo/VS Code-aligned session icons in session views. +- Fix the reasoning header icon. +- Normalize session part collapse/expand chevrons so collapsed/expanded states do not jump between differently sized glyphs. +- Move the session-details toggle away from compaction and place it before the session title. + +## Findings +- Session view icons are centralized in `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/views/SessionViewIcons.kt` and loaded from `frontend/src/main/resources/icons/views/*.svg`. +- The JetBrains `views` SVGs already mirror the shared VS Code/UI icon paths from `packages/ui/src/components/icon.tsx` for the audited names, including `brain`, `chevron-down`, `chevron-right`, `checklist`, `console`, `warning`, etc. +- The reasoning view currently renders `SessionViewIcons.eye` in `ReasoningView.kt`; VS Code/shared UI uses the `brain` icon for reasoning/thinking surfaces, and `SessionViewIcons.brain` already exists. +- Standard collapsible session parts use `SessionViewIcons.chevronDown` when expanded and `SessionViewIcons.chevronRight` when collapsed in `AbstractSessionPartView.kt`; `QuestionResultView.kt` repeats this pattern manually. The down/right SVG paths have different visual extents. +- The session header currently places the details toggle next to the compact button in the right-side controls in `SessionHeaderPanel.kt`, making the two actions easy to confuse. + +## Implementation Steps +1. **Keep icon sources aligned with VS Code/shared UI** + - Treat `packages/ui/src/components/icon.tsx` as the source for Kilo web/session glyph shapes. + - Re-check `SessionViewIcons.kt` entries against available JetBrains assets; only update or add SVGs if a session view uses a Kilo icon missing from `frontend/src/main/resources/icons/views/`. + - Preserve JetBrains SVG theming rules: no `currentColor`; use literal palette colors and dark variants where assets are added or changed. + +2. **Fix reasoning icon** + - In `ReasoningView.kt`, change the reasoning header glyph from `SessionViewIcons.eye` to `SessionViewIcons.brain`. + - Add or update test coverage in `ReasoningViewTest.kt` by inspecting the rendered Swing label tree and asserting the reasoning icon is `SessionViewIcons.brain`. + +3. **Normalize collapse/expand chevrons for session parts** + - Stop using the mixed `chevronRight`/`chevronDown` pair for collapsible session content. + - Use a single base Kilo chevron glyph for both states, matching the current custom chevron used by the session header (`/icons/chevron-down.svg` / equivalent `SessionViewIcons.chevronDown`). + - Add a shared rotated icon for the opposite state instead of switching to a differently sized right-facing asset. Prefer a small reusable helper or centralized icon field rather than importing header-specific UI into session views. + - Update `AbstractSessionPartView.kt` and `QuestionResultView.kt` to use the normalized chevron pair. + - Leave `QuestionView.kt` navigation chevrons alone unless auditing shows they are being used for collapse/expand; those are previous/next controls, not expand/collapse controls. + +4. **Relocate and change header show/hide details toggle** + - In `SessionHeaderPanel.kt`, replace the custom header details chevron with platform `AllIcons` arrows/chevrons, e.g. collapsed = `AllIcons.General.ArrowRight`, expanded = `AllIcons.General.ArrowDown`. + - Move the details toggle out of the right-side controls and into `BorderLayout.WEST` of the header row. + - Rebuild the top header as: + - outer border layout + - west: details toggle button + - center: inner border layout + - inner center: session title + - inner east: horizontal stack/row with price/context and compact button + - Remove the details toggle from the right-side row so compaction remains visually separate from show/hide details. + - Keep existing tooltip/accessibility strings and expansion persistence behavior unchanged. + +5. **Tests** + - Update `SessionHeaderPanelTest.kt` to assert: + - collapsed/expanded header details icons use the selected `AllIcons` constants; + - the details toggle persists expansion state as before; + - the details toggle is parented/laid out separately from the compact button. + - Update `AbstractSessionPartViewTest.kt` to assert collapsible parts keep the same icon dimensions across collapsed/expanded states and no longer use the mismatched right/down pair. + - Update `QuestionResultViewTest.kt` similarly because it has its own chevron implementation. + - Update `ReasoningViewTest.kt` for the brain icon. + +6. **Verification** + - Run the smallest relevant JetBrains checks from `packages/kilo-jetbrains/`: + - `./gradlew test --tests "ai.kilocode.client.session.views.ReasoningViewTest" --tests "ai.kilocode.client.session.views.base.AbstractSessionPartViewTest" --tests "ai.kilocode.client.session.views.QuestionResultViewTest" --tests "ai.kilocode.client.session.ui.header.SessionHeaderPanelTest"` + - `./gradlew typecheck` + - If the filtered Gradle test syntax is not accepted by the project, run `./gradlew test` from `packages/kilo-jetbrains/` instead. + +## Notes +- No shared upstream `opencode` files are involved; changes stay under `packages/kilo-jetbrains/`. +- A changeset may be needed because this is user-facing JetBrains UI polish; confirm existing changeset policy for the private JetBrains package during implementation. diff --git a/.kilo/skills/icon-jetbrains/SKILL.md b/.kilo/skills/icon-jetbrains/SKILL.md new file mode 100644 index 0000000000..2a20da53ed --- /dev/null +++ b/.kilo/skills/icon-jetbrains/SKILL.md @@ -0,0 +1,137 @@ +--- +name: icon-jetbrains +description: Create or review IntelliJ New UI SVG icons, theme variants, sizes, and palette. +--- + +# IntelliJ Platform New UI Icons + +Guidance for authoring SVG icons for the JetBrains plugin. This skill is the single source of truth for icon sizing, palette, dark variants, composition rules, and placement. Other docs (including `packages/kilo-jetbrains/AGENTS.md`) defer here for SVG authoring details. + +Icons follow IntelliJ New UI conventions: a fixed canvas per role, a strict light/dark palette, and explicit per-shape colors (the IntelliJ SVG loader recolors by matching literal hex values, so `currentColor` and CSS do not work). The plugin loads icons directly from its resource folder — see [Where the SVGs live](#where-the-svgs-live). + +## Golden rules + +1. **Always ship two SVGs** — one for the light theme (e.g. `add-file.svg`) and one for the dark theme with the `_dark` suffix (`add-file_dark.svg`). Geometry must be identical between them; only the palette swaps. + - **Tool-window icons ship as a quartet, not a pair.** When a tool window has both a 16×16 base (`name.svg` / `name_dark.svg`) and a 20×20 stripe variant (`name@20x20.svg` / `name@20x20_dark.svg`), they must share the same metaphor. The stripe is only one surface — the 16×16 base also appears in **Search Everywhere**, **Find Action**, context menus, the Services tool window, recent locations, and the View ▸ Tool Windows menu. Changing only the @20x20 leaves users seeing two different icons for the same tool window depending on where they encounter it. Always update all four files together (this repo's tool-window quartet is `kilo.svg` / `kilo_dark.svg` + `kilo@20x20.svg` / `kilo@20x20_dark.svg`). +2. **Only use colors from the canonical palette.** See [palette.md](./palette.md). Picking a one-off color breaks theming and contrast. +3. **One canvas size per icon role.** See [Icon roles](#icon-roles). Do not invent new sizes or pad with empty space — IntelliJ scales the canvas as a single unit. +4. **No raster, no gradients, no filters, no embedded fonts.** Path geometry only (``, ``, ``, ``, ``, ``). Text must be converted to outlines. +5. **Use `fill="none"` on the root ``** and set `fill` / `stroke` explicitly per shape — never rely on CSS or `currentColor`. +6. **Strokes use `stroke-width="1"`, `stroke-linecap="round"`, `stroke-linejoin="round"`** (or `stroke-miterlimit="10"` for hard joins). Heavier strokes are reserved for hero glyphs inside a circle badge (e.g. status checkmarks) and use `stroke-width="1.5"` or `"2"`. The `1` applies to the **primary glyph stroke** — do not force *every* stroke to 1. Hairline/decorative strokes (e.g. a thin stroke used to fatten a filled dot) and strokes whose width is coupled to geometry (e.g. a badge ring meant to sit flush with a fill edge) must keep their intended weight (scale with the artwork), or they fatten and misalign. +7. **Pixel-grid align**: keep stroke axes on half-pixel centers (`x.5`) and fills on whole pixels so the icon stays crisp at 1× rendering. Getting the base grid right also keeps it crisp on HiDPI/Retina; fine sub-pixel detail blurs at fractional scales (125%/150%), so keep geometry simple rather than chasing detail that won't survive scaling. SVGs are resolution-independent — ship one vector per theme, never `@2x` raster variants. +8. **File names use kebab-case and stay ASCII-only** (e.g. `arrow-down-to-line.svg`, `book-open-check.svg`, `kilo@20x20.svg`), matching every existing icon in `packages/kilo-jetbrains/frontend/src/main/resources/icons/`. + +## Icon roles + +Pick the canvas size from the role, not the other way around. All icons land in this repo's `packages/kilo-jetbrains/frontend/src/main/resources/icons/` (with a `views/` subfolder for in-view icons — see [Where the SVGs live](#where-the-svgs-live)). + +| Role | Canvas | Filename pattern | +|---|---|---| +| Action icons (menus, popups, toolbars) | **16×16** | `name.svg` + `name_dark.svg` | +| Tree node icons (PSI, structure view) | **16×16** | `name.svg` + `name_dark.svg` | +| Tool-window stripe icons (compact/16) | **16×16** | `name.svg` + `name_dark.svg` | +| Tool-window stripe icons (New UI) | **20×20** | `name@20x20.svg` + `name@20x20_dark.svg` | +| Main toolbar (New UI) | **20×20** | `name@20x20.svg` + `name@20x20_dark.svg` | +| Editor gutter icons | **14×14** (small marks **12×12**, **9×9**) | `name.svg` + `name_dark.svg` | +| Status bar / inline status | **16×16** | `name.svg` + `name_dark.svg` | +| Breakpoint marks | **14×14** (12×12 for sub-marks) | `name.svg` + `name_dark.svg` | +| Run-config tags & disclosure chevrons | **16×16** (`chevron*.svg` may be 9×9 to 16×16) | `name.svg` + `name_dark.svg` | +| Welcome/onboarding & logos | **16, 20, 28, 48** (per surface) | `name.svg` + `name_dark.svg` | + +When in doubt, find a sibling icon of the same role already in the icons folder and copy its `width` / `height` / `viewBox`. + +## Where the SVGs live + +Plugin icons go into `packages/kilo-jetbrains/frontend/src/main/resources/icons/` (action icons, tool-window icons) or the `icons/views/` subfolder (in-view icons used by the chat/session UI). Icons are loaded directly via `IconLoader` — there is no role-based subfolder structure and no mapping file. Place both the light SVG and its `_dark` sibling in the folder and reference them from the plugin's icon-holder class. + +## SVG skeleton + +```svg + + + +``` + +The dark variant is the same file with light-palette colors swapped for their dark-theme partner — see [palette.md](./palette.md). Never change geometry between the two. + +## Composition rules + +- **One semantic meaning per icon.** A status badge, an accent dot, or a "+" overlay is fine; two unrelated glyphs in one icon is not. +- **Optical centering, not geometric.** Plus/arrow/refresh glyphs sit slightly above center; round badges (class, method, status) are centered on `(cx=8, cy=8)` for 16×16 and `(cx=10, cy=10)` for 20×20. +- **Outer keep-out**: leave at least **1 px** of empty padding on each side of a 16×16 icon (so meaningful geometry lives within `1..15`). For 20×20 use **2 px** of padding. Stripe icons must stay visually balanced inside their 20×20 cell. +- **Round caps overshoot the endpoint.** A round `stroke-linecap`/`stroke-linejoin` extends **half the stroke width past the endpoint**, so a 1px round-capped stroke ending at `0` or `16` is clipped by the canvas. Keep stroke endpoints within `0.5..15.5` (this is stricter than the fill keep-out). +- **Stroke + fill pairing for node-style icons** (class/method nodes): a light-tinted fill at radius 6.5 with a stroke in the accent color, plus a glyph filled with the same accent. + - Light: `` then glyph `fill=""`. + - Dark: same circle with `fill="" stroke=""` and glyph filled with ``. +- **Stroke-only icons** (chevrons, refresh, edit pencil): a single-color path using the neutral stroke (`#6C707E` light / `#CED0D6` dark) at `stroke-width="1"`. Use `#818594` (light) / `#6F737A` (dark) for "secondary" stroke glyphs like dropdown chevrons. +- **Status badges** (error/warning/success/info) follow this template: + - Light: filled circle/triangle in the *accent* color, glyph painted in `white`. + - Dark: filled circle/triangle in the *dark accent* color, glyph painted in the matching *muted dark fill* (e.g. `#5E4D33` inside `#F2C55C` warning) — never plain white. +- **Two-tone action icons** (a base glyph plus a small modifier): the base glyph uses the neutral gray, and the small modifier (`+`, ✕, ↻, gear) uses the primary blue accent. Light gray + blue accent → dark gray + blue accent in the dark variant. +- **Disabled / stroke-only variants** (e.g. `*-stroke.svg`): outline-only, same neutral stroke color, no fills. + +## Palette quick reference + +The full lookup is in [palette.md](./palette.md). Most icons only need: + +| Role | Light | Dark | +|---|---|---| +| Primary stroke / fill | `#6C707E` | `#CED0D6` | +| Secondary stroke | `#818594` | `#6F737A` | +| Disabled / faint fill | `#EBECF0` | `#43454A` | +| Accent — Blue | `#3574F0` | `#548AF7` | +| Accent — Blue (bg) | `#EDF3FF` / `#E7EFFD` | `#25324D` | +| Accent — Red | `#DB3B4B` | `#DB5C5C` | +| Accent — Red (bg) | `#FFF7F7` | `#402929` | +| Status — Error fill | `#E55765` | `#DB5C5C` | +| Status — Warning fill | `#FFAF0F` | `#F2C55C` | +| Status — Success fill | `#55A76A` | `#57965C` | +| Accent — Green | `#208A3C` | `#57965C` | +| Accent — Green (bg) | `#F2FCF3` | `#253627` | +| Accent — Orange | `#E66D17` | `#C77D55` | +| Accent — Orange (bg) | `#FFF4EB` | `#45322B` | +| Accent — Yellow/Gold | `#FFAF0F` / `#C27D04` | `#F2C55C` / `#D6AE58` | +| Accent — Purple | `#834DF0` | `#B589EC` | +| Accent — Purple (bg) | `#FAF5FF` | `#2F2936` | +| White on dark badge | `white` | matching muted-dark fill (e.g. `#5E4D33`) | + +Do not use plain `#000000` or off-the-palette grays. + +## Generation workflow + +1. **Pick the role and canvas size** from the table above. Find at least two visually similar sibling icons already in the icons folder and mirror their stroke/fill mix. +2. **Lay out geometry on the pixel grid** (whole-pixel fills, half-pixel stroke centers). Optical-center the glyph. +3. **Apply the canonical light palette** from [palette.md](./palette.md). Never invent colors. +4. **Save the light SVG** with `width`/`height`/`viewBox` matching the role and `fill="none"` on ``. +5. **Duplicate to the `_dark` filename** and swap each color for its dark-theme partner from the palette mapping. Keep paths byte-identical otherwise. +6. **Place and wire the file** → drop both files into `packages/kilo-jetbrains/frontend/src/main/resources/icons/` (action icons, tool-window icons) or `icons/views/` (in-view chat/session icons), then reference the icon from the plugin's icon-holder class. +7. **Verify visually** in both themes via the image preview in the IDE, or run the IDE and toggle *View ▸ Appearance ▸ New UI* to compare. Check selection states for stripe icons. + +## Adapting or rescaling an existing icon + +Importing a Lucide/Codicon-style icon (often drawn on a 20- or 24-unit grid) or moving one onto the 16×16 grid is not a blanket "set everything to the 16 defaults" operation: + +1. **Scale geometry *and* every `stroke-width`** by the same factor (`16 ÷ source size`). This keeps the render faithful before you change anything intentionally. +2. **Only then re-weight the primary glyph stroke** to `1` if it wasn't already ~1px effective. Leave hairlines and geometry-coupled strokes at their scaled value (see rule 6). +3. **Re-check what scaling breaks:** + - Round caps clipping at the edge → nudge stroke endpoints into `0.5..15.5`. + - Strokes that were flush with a fill edge (e.g. a badge ring around a status dot) → the stroke must still straddle the fill boundary after scaling; scale its width too. +4. **Crispness is a separate pass.** Scaling rarely lands coordinates on the pixel grid, so the result is faithful but not automatically crisp; the pixel-grid snap (rule 7) is manual and per-icon. + +## Common mistakes + +- Off-palette colors (e.g. importing from Figma without remapping). They will not theme correctly and reviewers will reject the PR. +- Different geometry between light and dark variants — selection animations and HiDPI overlays will glitch. +- A 16-px glyph saved into a 20×20 canvas without re-balancing. Tool-window/main-toolbar icons need geometry tuned for 20×20, not a 16×16 reused with extra whitespace. +- Using `currentColor`, CSS, or `(data: S) { + return Schema.Struct({ location: Info, data }) +} + +export class Service extends Context.Service()("@opencode/Location") {} + +export const layer = (ref: Ref) => + Layer.effect( + Service, + Effect.gen(function* () { + const project = yield* Project.Service + const resolved = yield* project.resolve(ref.directory) + return Service.of({ + directory: ref.directory, + workspaceID: ref.workspaceID, + project: { id: resolved.id, directory: resolved.directory }, + vcs: resolved.vcs, + }) + }), + ) diff --git a/packages/core/src/markdown.d.ts b/packages/core/src/markdown.d.ts new file mode 100644 index 0000000000..eb3e3b92d6 --- /dev/null +++ b/packages/core/src/markdown.d.ts @@ -0,0 +1,4 @@ +declare module "*.md" { + const content: string + export default content +} diff --git a/packages/core/src/model-request.ts b/packages/core/src/model-request.ts new file mode 100644 index 0000000000..f9f4f56936 --- /dev/null +++ b/packages/core/src/model-request.ts @@ -0,0 +1,124 @@ +export * as ModelRequest from "./model-request" + +import { Effect, Schema } from "effect" + +export const Generation = Schema.Struct({ + maxTokens: Schema.Number.pipe(Schema.optional), + temperature: Schema.Number.pipe(Schema.optional), + topP: Schema.Number.pipe(Schema.optional), + topK: Schema.Number.pipe(Schema.optional), + frequencyPenalty: Schema.Number.pipe(Schema.optional), + presencePenalty: Schema.Number.pipe(Schema.optional), + seed: Schema.Number.pipe(Schema.optional), + stop: Schema.String.pipe(Schema.Array, Schema.mutable, Schema.optional), +}) +export type Generation = typeof Generation.Type + +export const Request = Schema.Struct({ + headers: Schema.Record(Schema.String, Schema.String), + body: Schema.Record(Schema.String, Schema.Any), + generation: Generation.pipe( + Schema.optionalKey, + Schema.withConstructorDefault(Effect.succeed({})), + Schema.withDecodingDefaultKey(Effect.succeed({})), + ), + options: Schema.Record(Schema.String, Schema.Any).pipe( + Schema.optionalKey, + Schema.withConstructorDefault(Effect.succeed({})), + Schema.withDecodingDefaultKey(Effect.succeed({})), + ), +}) +export type Request = typeof Request.Type + +interface MutableRequest { + headers: Record + body: Record + generation?: Generation + options?: Record +} + +const generationKeys = new Map([ + ["maxOutputTokens", "maxTokens"], + ["maxTokens", "maxTokens"], + ["temperature", "temperature"], + ["topP", "topP"], + ["topK", "topK"], + ["frequencyPenalty", "frequencyPenalty"], + ["presencePenalty", "presencePenalty"], + ["seed", "seed"], + ["stopSequences", "stop"], + ["stop", "stop"], +]) + +interface Profile { + readonly namespace: string + readonly semantics: ReadonlyMap +} + +const profiles = new Map([ + [ + "@ai-sdk/openai", + { + namespace: "openai", + semantics: new Map([ + ["store", "store"], + ["promptCacheKey", "promptCacheKey"], + ["reasoningEffort", "reasoningEffort"], + ["reasoningSummary", "reasoningSummary"], + ["include", "include"], + ["textVerbosity", "textVerbosity"], + ["serviceTier", "serviceTier"], + ["service_tier", "serviceTier"], + ]), + }, + ], + [ + "@ai-sdk/openai-compatible", + { + namespace: "openai", + semantics: new Map([ + ["store", "store"], + ["promptCacheKey", "promptCacheKey"], + ["reasoningEffort", "reasoningEffort"], + ["reasoning_effort", "reasoningEffort"], + ]), + }, + ], + ["@ai-sdk/anthropic", { namespace: "anthropic", semantics: new Map([["thinking", "thinking"]]) }], +]) + +export const namespace = (packageName: string) => profiles.get(packageName)?.namespace + +export const merge = (base: Request, override: Partial) => ({ + headers: { ...base.headers, ...override.headers }, + body: { ...base.body, ...override.body }, + generation: { ...base.generation, ...override.generation }, + options: { ...base.options, ...override.options }, +}) + +export const assign = (target: MutableRequest, override: Partial) => { + Object.assign(target.headers, override.headers) + Object.assign(target.body, override.body) + Object.assign((target.generation ??= {}), override.generation) + Object.assign((target.options ??= {}), override.options) +} + +/** Partitions AI-SDK-shaped request options before they enter the Catalog. */ +export function normalizeAiSdkOptions(packageName: string | undefined, input: Readonly>) { + const generation: Record> = {} + const options: Record = {} + const body: Record = {} + const semantics = profiles.get(packageName ?? "")?.semantics + + for (const [key, value] of Object.entries(input)) { + const generationKey = generationKeys.get(key) + if (generationKey === "stop" && Array.isArray(value) && value.every((item) => typeof item === "string")) + generation[generationKey] = value + else if (generationKey !== undefined && generationKey !== "stop" && typeof value === "number") + generation[generationKey] = value + else if (semantics?.has(key)) options[semantics.get(key)!] = value + else body[key] = value + } + + return { generation, options, body } +} diff --git a/packages/core/src/model.ts b/packages/core/src/model.ts index 77b8c60ebe..3b0beece55 100644 --- a/packages/core/src/model.ts +++ b/packages/core/src/model.ts @@ -1,6 +1,7 @@ import { DateTime, Schema } from "effect" import { DateTimeUtcFromMillis } from "effect/Schema" import { ProviderV2 } from "./provider" +import { ModelRequest } from "./model-request" export const ID = Schema.String.pipe(Schema.brand("ModelV2.ID")) export type ID = typeof ID.Type @@ -36,25 +37,36 @@ export const Cost = Schema.Struct({ export const Ref = Schema.Struct({ id: ID, providerID: ProviderV2.ID, - variant: VariantID, + variant: VariantID.pipe(Schema.optional), }) export type Ref = typeof Ref.Type +export const Api = Schema.Union([ + Schema.Struct({ + id: ID, + ...ProviderV2.AISDK.fields, + }), + Schema.Struct({ + id: ID, + ...ProviderV2.Native.fields, + }), +]).pipe(Schema.toTaggedUnion("type")) +export type Api = typeof Api.Type + export class Info extends Schema.Class("ModelV2.Info")({ id: ID, - apiID: ID, providerID: ProviderV2.ID, family: Family.pipe(Schema.optional), name: Schema.String, - endpoint: ProviderV2.Endpoint, + api: Api, capabilities: Capabilities, - options: Schema.Struct({ - ...ProviderV2.Options.fields, + request: Schema.Struct({ + ...ModelRequest.Request.fields, variant: Schema.String.pipe(Schema.optional), }), variants: Schema.Struct({ id: VariantID, - ...ProviderV2.Options.fields, + ...ModelRequest.Request.fields, }).pipe(Schema.Array), time: Schema.Struct({ released: DateTimeUtcFromMillis, @@ -68,27 +80,26 @@ export class Info extends Schema.Class("ModelV2.Info")({ output: Schema.Int, }), }) { - static empty(providerID: ProviderV2.ID, modelID: ID) { + static empty(providerID: ProviderV2.ID, modelID: ID): Info { return new Info({ id: modelID, - apiID: modelID, providerID, name: modelID, - endpoint: { - type: "unknown", + api: { + id: modelID, + type: "native", + settings: {}, }, capabilities: { tools: false, input: [], output: [], }, - options: { + request: { headers: {}, body: {}, - aisdk: { - provider: {}, - request: {}, - }, + generation: {}, + options: {}, }, variants: [], time: { diff --git a/packages/core/src/models-dev.ts b/packages/core/src/models-dev.ts new file mode 100644 index 0000000000..a1b9be3044 --- /dev/null +++ b/packages/core/src/models-dev.ts @@ -0,0 +1,267 @@ +import path from "path" +import { Context, Duration, Effect, Layer, Option, Schedule, Schema } from "effect" +import { FetchHttpClient, HttpClient, HttpClientRequest } from "effect/unstable/http" +import { Global } from "./global" +import { Flag } from "./flag/flag" +import { Flock } from "./util/flock" +import { Hash } from "./util/hash" +import { FSUtil } from "./fs-util" +import { InstallationChannel, InstallationVersion } from "./installation/version" +import * as ModelsRefresh from "./kilocode/models-refresh" // kilocode_change +import { EventV2 } from "./event" +import { LayerNode } from "./effect/layer-node" +import { httpClient } from "./effect/layer-node-platform" + +export const CatalogModelStatus = Schema.Literals(["alpha", "beta", "deprecated"]) +export type CatalogModelStatus = typeof CatalogModelStatus.Type + +const USER_AGENT = `opencode/${InstallationChannel}/${InstallationVersion}/${Flag.KILO_CLIENT}` + +const CostTier = Schema.Struct({ + input: Schema.Finite, + output: Schema.Finite, + cache_read: Schema.optional(Schema.Finite), + cache_write: Schema.optional(Schema.Finite), + tier: Schema.Struct({ + type: Schema.Literal("context"), + size: Schema.Finite, + }), +}) + +const Cost = Schema.Struct({ + input: Schema.Finite, + output: Schema.Finite, + cache_read: Schema.optional(Schema.Finite), + cache_write: Schema.optional(Schema.Finite), + tiers: Schema.optional(Schema.Array(CostTier)), + context_over_200k: Schema.optional( + Schema.Struct({ + input: Schema.Finite, + output: Schema.Finite, + cache_read: Schema.optional(Schema.Finite), + cache_write: Schema.optional(Schema.Finite), + }), + ), +}) + +export const Model = Schema.Struct({ + id: Schema.String, + name: Schema.String, + family: Schema.optional(Schema.String), + release_date: Schema.String, + attachment: Schema.Boolean, + reasoning: Schema.Boolean, + temperature: Schema.Boolean, + tool_call: Schema.Boolean, + interleaved: Schema.optional( + Schema.Union([ + Schema.Literal(true), + Schema.Struct({ + field: Schema.Literals(["reasoning", "reasoning_content", "reasoning_details"]), + }), + ]), + ), + cost: Schema.optional(Cost), + limit: Schema.Struct({ + context: Schema.Finite, + input: Schema.optional(Schema.Finite), + output: Schema.Finite, + }), + modalities: Schema.optional( + Schema.Struct({ + input: Schema.Array(Schema.Literals(["text", "audio", "image", "video", "pdf"])), + output: Schema.Array(Schema.Literals(["text", "audio", "image", "video", "pdf"])), + }), + ), + // kilocode_change start - preserve Kilo catalog metadata + recommendedIndex: Schema.optional(Schema.Finite), + prompt: Schema.optional(Schema.String), + isFree: Schema.optional(Schema.Boolean), + mayTrainOnYourPrompts: Schema.optional(Schema.Boolean), + ai_sdk_provider: Schema.optional(Schema.String), + // kilocode_change end + experimental: Schema.optional( + Schema.Struct({ + modes: Schema.optional( + Schema.Record( + Schema.String, + Schema.Struct({ + cost: Schema.optional(Cost), + provider: Schema.optional( + Schema.Struct({ + body: Schema.optional(Schema.Record(Schema.String, Schema.MutableJson)), + headers: Schema.optional(Schema.Record(Schema.String, Schema.String)), + }), + ), + }), + ), + ), + }), + ), + status: Schema.optional(CatalogModelStatus), + provider: Schema.optional( + Schema.Struct({ npm: Schema.optional(Schema.String), api: Schema.optional(Schema.String) }), + ), +}) +export type Model = Schema.Schema.Type + +export const Provider = Schema.Struct({ + api: Schema.optional(Schema.String), + name: Schema.String, + description: Schema.optional(Schema.String), // kilocode_change + env: Schema.Array(Schema.String), + id: Schema.String, + npm: Schema.optional(Schema.String), + models: Schema.Record(Schema.String, Model), +}) + +export type Provider = Schema.Schema.Type + +export const Event = { + Refreshed: EventV2.define({ + type: "models-dev.refreshed", + schema: {}, + }), +} + +declare const KILO_MODELS_DEV: Record | undefined + +export interface Interface { + readonly get: () => Effect.Effect> + readonly refresh: (force?: boolean) => Effect.Effect +} + +export class Service extends Context.Service()("@opencode/ModelsDev") {} + +export const layer = Layer.effect( + Service, + Effect.gen(function* () { + const fs = yield* FSUtil.Service + const events = yield* EventV2.Service + const http = HttpClient.filterStatusOk( + (yield* HttpClient.HttpClient).pipe( + HttpClient.retryTransient({ + retryOn: "errors-and-responses", + times: 2, + schedule: Schedule.exponential(200).pipe(Schedule.jittered), + }), + ), + ) + + const source = Flag.KILO_MODELS_URL || "https://models.dev" + const filepath = path.join( + Global.Path.cache, + source === "https://models.dev" ? "models.json" : `models-${Hash.fast(source)}.json`, + ) + const ttl = Duration.minutes(5) + const lockKey = `models-dev:${filepath}` + + const fresh = Effect.fnUntraced(function* () { + const stat = yield* fs.stat(filepath).pipe(Effect.catch(() => Effect.succeed(undefined))) + if (!stat) return false + const mtime = Option.getOrElse(stat.mtime, () => new Date(0)).getTime() + return Date.now() - mtime < Duration.toMillis(ttl) + }) + + const fetchApi = Effect.fn("ModelsDev.fetchApi")(function* () { + return yield* HttpClientRequest.get(`${source}/api.json`).pipe( + HttpClientRequest.setHeader("User-Agent", USER_AGENT), + http.execute, + Effect.flatMap((res) => res.text), + Effect.timeout("10 seconds"), + ) + }) + + const loadFromDisk = fs.readJson(Flag.KILO_MODELS_PATH ?? filepath).pipe( + Effect.catch((error) => { + if ( + Flag.KILO_MODELS_PATH === undefined && + error._tag === "FileSystemError" && + error.method === "readJson" + ) { + return fs.remove(filepath, { force: true }).pipe(Effect.ignore, Effect.as(undefined)) + } + return Effect.succeed(undefined) + }), + Effect.map((v) => v as Record | undefined), + ) + + const loadSnapshot = Effect.sync(() => (typeof KILO_MODELS_DEV === "undefined" ? undefined : KILO_MODELS_DEV)) + + const fetchAndWrite = Effect.fn("ModelsDev.fetchAndWrite")(function* () { + const text = yield* fetchApi() + const tempfile = `${filepath}.${process.pid}.${Date.now()}.tmp` + yield* fs.writeWithDirs(tempfile, text).pipe( + Effect.andThen(fs.rename(tempfile, filepath)), + Effect.catch((error) => + Effect.gen(function* () { + yield* fs.remove(tempfile, { force: true }).pipe(Effect.ignore) + return yield* Effect.fail(error) + }), + ), + ) + return text + }) + + const populate = Effect.gen(function* () { + const fromDisk = yield* loadFromDisk + if (fromDisk) return fromDisk + const snapshot = yield* loadSnapshot + if (snapshot) return snapshot + if (Flag.KILO_DISABLE_MODELS_FETCH) return {} + // Flock is cross-process: concurrent opencode CLIs can race on this cache file. + return yield* Effect.scoped( + Effect.gen(function* () { + yield* Flock.effect(lockKey) + // kilocode_change start - re-read under the lock: a concurrent refresh + // may already have recovered the corrupted cache while we waited, and + // fetching again here would duplicate the network call. + const rechecked = yield* loadFromDisk + if (rechecked) return rechecked + // kilocode_change end + const text = yield* fetchAndWrite() + return JSON.parse(text) as Record + }), + ) + }).pipe(Effect.withSpan("ModelsDev.populate"), Effect.orDie) + + const [cachedGet, invalidate] = yield* Effect.cachedInvalidateWithTTL(populate, Duration.infinity) + + const get = (): Effect.Effect> => cachedGet + + const refresh = Effect.fn("ModelsDev.refresh")(function* (force = false) { + if (!force && (yield* fresh())) return + yield* Effect.scoped( + Effect.gen(function* () { + yield* Flock.effect(lockKey) + // Re-check under the lock: another process may have refreshed between + // our outer check and lock acquisition. + if (!force && (yield* fresh())) return + yield* fetchAndWrite() + yield* invalidate + yield* ModelsRefresh.notify() // kilocode_change + yield* events.publish(Event.Refreshed, {}) + }), + ).pipe( + Effect.tapCause((cause) => Effect.logError("Failed to fetch models.dev", { cause: cause })), + Effect.ignore, + ) + }) + + if (!Flag.KILO_DISABLE_MODELS_FETCH && !process.argv.includes("--get-yargs-completions")) { + // Schedule.spaced runs the effect once, then waits between completions. + yield* Effect.forkScoped(refresh().pipe(Effect.repeat(Schedule.spaced("60 minutes")), Effect.ignore)) + } + + return Service.of({ get, refresh }) + }), +) + +export const defaultLayer = layer.pipe( + Layer.provide(FetchHttpClient.layer), + Layer.provide(FSUtil.defaultLayer), + Layer.provide(EventV2.defaultLayer), +) +export const node = LayerNode.make(layer, [FSUtil.node, EventV2.node, httpClient]) + +export * as ModelsDev from "./models-dev" diff --git a/packages/core/src/models-snapshot.d.ts b/packages/core/src/models-snapshot.d.ts deleted file mode 100644 index 839eba6b7d..0000000000 --- a/packages/core/src/models-snapshot.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Auto-generated by build.ts - do not edit -export declare const snapshot: Record diff --git a/packages/core/src/models-snapshot.js b/packages/core/src/models-snapshot.js deleted file mode 100644 index c582a75bdf..0000000000 --- a/packages/core/src/models-snapshot.js +++ /dev/null @@ -1,71726 +0,0 @@ -// @ts-nocheck -// Auto-generated by build.ts - do not edit -export const snapshot = { - "302ai": { - id: "302ai", - env: ["302AI_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.302.ai/v1", - name: "302.AI", - doc: "https://doc.302.ai", - models: { - "qwen3-235b-a22b": { - id: "qwen3-235b-a22b", - name: "Qwen3-235B-A22B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04-29", - last_updated: "2025-04-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.29, output: 2.86 }, - limit: { context: 128000, output: 16384 }, - }, - "grok-4.1": { - id: "grok-4.1", - name: "grok-4.1", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 10 }, - limit: { context: 200000, output: 64000 }, - }, - "MiniMax-M2": { - id: "MiniMax-M2", - name: "MiniMax-M2", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-10-26", - last_updated: "2025-10-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.33, output: 1.32 }, - limit: { context: 1000000, output: 128000 }, - }, - "grok-4-1-fast-reasoning": { - id: "grok-4-1-fast-reasoning", - name: "grok-4-1-fast-reasoning", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-11-20", - last_updated: "2025-11-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5 }, - limit: { context: 2000000, output: 30000 }, - }, - "gemini-2.5-flash-nothink": { - id: "gemini-2.5-flash-nothink", - name: "gemini-2.5-flash-nothink", - family: "gemini-flash", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-24", - last_updated: "2025-06-24", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5 }, - limit: { context: 1000000, output: 65536 }, - }, - "grok-4.20-multi-agent-beta-0309": { - id: "grok-4.20-multi-agent-beta-0309", - name: "grok-4.20-multi-agent-beta-0309", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-16", - last_updated: "2026-03-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6 }, - limit: { context: 2000000, output: 30000 }, - }, - "kimi-k2-0905-preview": { - id: "kimi-k2-0905-preview", - name: "kimi-k2-0905-preview", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.632, output: 2.53 }, - limit: { context: 262144, output: 262144 }, - }, - "claude-haiku-4-5": { - id: "claude-haiku-4-5", - name: "claude-haiku-4-5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-16", - last_updated: "2025-10-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-opus-4-5-20251101": { - id: "claude-opus-4-5-20251101", - name: "claude-opus-4-5-20251101", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-25", - last_updated: "2025-11-25", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25 }, - limit: { context: 200000, output: 64000 }, - }, - "gemini-2.5-flash-lite-preview-09-2025": { - id: "gemini-2.5-flash-lite-preview-09-2025", - name: "gemini-2.5-flash-lite-preview-09-2025", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-26", - last_updated: "2025-09-26", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen3-235b-a22b-instruct-2507": { - id: "qwen3-235b-a22b-instruct-2507", - name: "qwen3-235b-a22b-instruct-2507", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-30", - last_updated: "2025-07-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.29, output: 1.143 }, - limit: { context: 128000, output: 65536 }, - }, - "glm-5v-turbo": { - id: "glm-5v-turbo", - name: "GLM-5V-Turbo", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.72, output: 3.2 }, - limit: { context: 200000, output: 131072 }, - }, - "mistral-large-2512": { - id: "mistral-large-2512", - name: "mistral-large-2512", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-12-16", - last_updated: "2025-12-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 3.3 }, - limit: { context: 128000, output: 262144 }, - }, - "glm-4.7": { - id: "glm-4.7", - name: "glm-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.286, output: 1.142 }, - limit: { context: 204800, output: 131072 }, - }, - "claude-3-5-haiku-20241022": { - id: "claude-3-5-haiku-20241022", - name: "claude-3-5-haiku-20241022", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07-31", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4 }, - limit: { context: 200000, output: 8192 }, - }, - "doubao-seed-1-8-251215": { - id: "doubao-seed-1-8-251215", - name: "doubao-seed-1-8-251215", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-12-18", - last_updated: "2025-12-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.114, output: 0.286 }, - limit: { context: 224000, output: 64000 }, - }, - "chatgpt-4o-latest": { - id: "chatgpt-4o-latest", - name: "chatgpt-4o-latest", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-09", - release_date: "2024-08-08", - last_updated: "2024-08-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 15 }, - limit: { context: 128000, output: 16384 }, - }, - "glm-5": { - id: "glm-5", - name: "glm-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.6 }, - limit: { context: 204800, output: 131072 }, - }, - "deepseek-chat": { - id: "deepseek-chat", - name: "Deepseek-Chat", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-11-29", - last_updated: "2024-11-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.29, output: 0.43 }, - limit: { context: 128000, output: 8192 }, - }, - "deepseek-v3.2-thinking": { - id: "deepseek-v3.2-thinking", - name: "DeepSeek-V3.2-Thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.29, output: 0.43 }, - limit: { context: 128000, output: 128000 }, - }, - "claude-sonnet-4-6": { - id: "claude-sonnet-4-6", - name: "claude-sonnet-4-6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-18", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 1000000, output: 64000 }, - }, - "gpt-5-thinking": { - id: "gpt-5-thinking", - name: "gpt-5-thinking", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-08-08", - last_updated: "2025-08-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, output: 128000 }, - }, - "glm-4.7-flashx": { - id: "glm-4.7-flashx", - name: "glm-4.7-flashx", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-20", - last_updated: "2026-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.0715, output: 0.429 }, - limit: { context: 200000, output: 131072 }, - }, - "gemini-3-flash-preview": { - id: "gemini-3-flash-preview", - name: "gemini-3-flash-preview", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-12-18", - last_updated: "2025-12-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen-plus": { - id: "qwen-plus", - name: "Qwen-Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.12, output: 1.2 }, - limit: { context: 1000000, output: 32768 }, - }, - "grok-4.20-beta-0309-non-reasoning": { - id: "grok-4.20-beta-0309-non-reasoning", - name: "grok-4.20-beta-0309-non-reasoning", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-03-16", - last_updated: "2026-03-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6 }, - limit: { context: 2000000, output: 30000 }, - }, - "claude-opus-4-7": { - id: "claude-opus-4-7", - name: "claude-opus-4-7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2026-01-31", - release_date: "2026-04-17", - last_updated: "2026-04-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 5, - output: 25, - cache_read: 0.5, - cache_write: 6.25, - context_over_200k: { input: 10, output: 37.5, cache_read: 1, cache_write: 12.5 }, - }, - limit: { context: 1000000, output: 128000 }, - }, - "gpt-5-mini": { - id: "gpt-5-mini", - name: "gpt-5-mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-08", - last_updated: "2025-08-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gemini-3-pro-preview": { - id: "gemini-3-pro-preview", - name: "gemini-3-pro-preview", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12 }, - limit: { context: 1000000, output: 64000 }, - }, - "MiniMax-M2.7": { - id: "MiniMax-M2.7", - name: "MiniMax-M2.7", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-03-19", - last_updated: "2026-03-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204800, output: 131072 }, - }, - "qwen3-max-2025-09-23": { - id: "qwen3-max-2025-09-23", - name: "qwen3-max-2025-09-23", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-24", - last_updated: "2025-09-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.86, output: 3.43 }, - limit: { context: 258048, output: 65536 }, - }, - "claude-sonnet-4-5-20250929": { - id: "claude-sonnet-4-5-20250929", - name: "claude-sonnet-4-5-20250929", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 64000 }, - }, - "qwen-flash": { - id: "qwen-flash", - name: "Qwen-Flash", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.022, output: 0.22 }, - limit: { context: 1000000, output: 32768 }, - }, - "gemini-2.5-pro": { - id: "gemini-2.5-pro", - name: "gemini-2.5-pro", - family: "gemini-pro", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 1000000, output: 65536 }, - }, - "grok-4-1-fast-non-reasoning": { - id: "grok-4-1-fast-non-reasoning", - name: "grok-4-1-fast-non-reasoning", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-11-20", - last_updated: "2025-11-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5 }, - limit: { context: 2000000, output: 30000 }, - }, - "claude-3-5-haiku-latest": { - id: "claude-3-5-haiku-latest", - name: "claude-3-5-haiku-latest", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07-31", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4 }, - limit: { context: 200000, output: 8192 }, - }, - "claude-opus-4-5-20251101-thinking": { - id: "claude-opus-4-5-20251101-thinking", - name: "claude-opus-4-5-20251101-thinking", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03", - release_date: "2025-11-25", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25 }, - limit: { context: 200000, output: 64000 }, - }, - "gpt-5.2": { - id: "gpt-5.2", - name: "gpt-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-12", - last_updated: "2025-12-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-5.4-mini": { - id: "gpt-5.4-mini", - name: "gpt-5.4-mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-19", - last_updated: "2026-03-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gemini-3-pro-image-preview": { - id: "gemini-3-pro-image-preview", - name: "gemini-3-pro-image-preview", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-06", - release_date: "2025-11-20", - last_updated: "2025-11-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 120 }, - limit: { context: 32768, output: 64000 }, - }, - "glm-5.1": { - id: "glm-5.1", - name: "glm-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-10", - last_updated: "2026-04-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.86, output: 3.5 }, - limit: { context: 200000, output: 131072 }, - }, - "qwen-max-latest": { - id: "qwen-max-latest", - name: "Qwen-Max-Latest", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2024-04-03", - last_updated: "2025-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.343, output: 1.372 }, - limit: { context: 131072, output: 8192 }, - }, - "gpt-5.4-nano": { - id: "gpt-5.4-nano", - name: "gpt-5.4-nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-19", - last_updated: "2026-03-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.25 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gemini-2.5-flash-image": { - id: "gemini-2.5-flash-image", - name: "gemini-2.5-flash-image", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-01", - release_date: "2025-10-08", - last_updated: "2025-10-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 30 }, - limit: { context: 32768, output: 32768 }, - }, - "glm-4.5": { - id: "glm-4.5", - name: "GLM-4.5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-29", - last_updated: "2025-07-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.286, output: 1.142 }, - limit: { context: 131072, output: 98304 }, - }, - "gpt-5.4-mini-2026-03-17": { - id: "gpt-5.4-mini-2026-03-17", - name: "gpt-5.4-mini-2026-03-17", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-19", - last_updated: "2026-03-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gemini-2.5-flash": { - id: "gemini-2.5-flash", - name: "gemini-2.5-flash", - family: "gemini-flash", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5 }, - limit: { context: 1000000, output: 65536 }, - }, - "gpt-5.2-chat-latest": { - id: "gpt-5.2-chat-latest", - name: "gpt-5.2-chat-latest", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-12", - last_updated: "2025-12-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 128000, output: 16384 }, - }, - "doubao-seed-1-6-vision-250815": { - id: "doubao-seed-1-6-vision-250815", - name: "doubao-seed-1-6-vision-250815", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.114, output: 1.143 }, - limit: { context: 256000, output: 32000 }, - }, - "gemini-3.1-flash-image-preview": { - id: "gemini-3.1-flash-image-preview", - name: "gemini-3.1-flash-image-preview", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-27", - last_updated: "2026-02-27", - modalities: { input: ["text", "image", "pdf"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 0.5, output: 60 }, - limit: { context: 131072, output: 32768 }, - }, - "MiniMax-M2.7-highspeed": { - id: "MiniMax-M2.7-highspeed", - name: "MiniMax-M2.7-highspeed", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-03-19", - last_updated: "2026-03-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 4.8 }, - limit: { context: 204800, output: 131072 }, - }, - "glm-4.5-x": { - id: "glm-4.5-x", - name: "glm-4.5-x", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-29", - last_updated: "2025-07-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.143, output: 2.29 }, - limit: { context: 128000, output: 16384 }, - }, - "MiniMax-M2.1": { - id: "MiniMax-M2.1", - name: "MiniMax-M2.1", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-12-19", - last_updated: "2025-12-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 1000000, output: 131072 }, - }, - "gpt-5.1": { - id: "gpt-5.1", - name: "gpt-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "kimi-k2-thinking-turbo": { - id: "kimi-k2-thinking-turbo", - name: "kimi-k2-thinking-turbo", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.265, output: 9.119 }, - limit: { context: 262144, output: 262144 }, - }, - "deepseek-reasoner": { - id: "deepseek-reasoner", - name: "Deepseek-Reasoner", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.29, output: 0.43 }, - limit: { context: 128000, output: 128000 }, - }, - "grok-4-fast-reasoning": { - id: "grok-4-fast-reasoning", - name: "grok-4-fast-reasoning", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5 }, - limit: { context: 2000000, output: 30000 }, - }, - "claude-opus-4-1-20250805-thinking": { - id: "claude-opus-4-1-20250805-thinking", - name: "claude-opus-4-1-20250805-thinking", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03", - release_date: "2025-05-27", - last_updated: "2025-05-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75 }, - limit: { context: 200000, output: 32000 }, - }, - "glm-4.5-air": { - id: "glm-4.5-air", - name: "glm-4.5-air", - family: "glm-air", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-29", - last_updated: "2025-07-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1143, output: 0.286 }, - limit: { context: 131072, output: 98304 }, - }, - "gpt-5.4-pro": { - id: "gpt-5.4-pro", - name: "gpt-5.4-pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180, cache_read: 0, cache_write: 0, context_over_200k: { input: 60, output: 270 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "glm-5-turbo": { - id: "glm-5-turbo", - name: "glm-5-turbo", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-16", - last_updated: "2026-03-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.72, output: 3.2 }, - limit: { context: 200000, output: 131072 }, - }, - "qwen3-30b-a3b": { - id: "qwen3-30b-a3b", - name: "Qwen3-30B-A3B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04-29", - last_updated: "2025-04-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.11, output: 1.08 }, - limit: { context: 128000, output: 8192 }, - }, - "claude-opus-4-5": { - id: "claude-opus-4-5", - name: "claude-opus-4-5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-25", - last_updated: "2025-11-25", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25 }, - limit: { context: 200000, output: 64000 }, - }, - "glm-4.5v": { - id: "glm-4.5v", - name: "GLM-4.5V", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-08-12", - last_updated: "2025-08-12", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.29, output: 0.86 }, - limit: { context: 64000, output: 16384 }, - }, - "glm-4.6": { - id: "glm-4.6", - name: "glm-4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.286, output: 1.142 }, - limit: { context: 204800, output: 131072 }, - }, - "claude-opus-4-6-thinking": { - id: "claude-opus-4-6-thinking", - name: "claude-opus-4-6-thinking", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-02-06", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25 }, - limit: { context: 1000000, output: 128000 }, - }, - "gemini-2.5-flash-preview-09-2025": { - id: "gemini-2.5-flash-preview-09-2025", - name: "gemini-2.5-flash-preview-09-2025", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-26", - last_updated: "2025-09-26", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5 }, - limit: { context: 1000000, output: 65536 }, - }, - "claude-sonnet-4-6-thinking": { - id: "claude-sonnet-4-6-thinking", - name: "claude-sonnet-4-6-thinking", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08", - release_date: "2026-02-18", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 1000000, output: 64000 }, - }, - "glm-4.6v": { - id: "glm-4.6v", - name: "GLM-4.6V", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-08", - last_updated: "2025-12-08", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.145, output: 0.43 }, - limit: { context: 128000, output: 32768 }, - }, - "claude-opus-4-1-20250805": { - id: "claude-opus-4-1-20250805", - name: "claude-opus-4-1-20250805", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75 }, - limit: { context: 200000, output: 32000 }, - }, - "gpt-5.4": { - id: "gpt-5.4", - name: "gpt-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 2.5, - output: 15, - cache_read: 0.25, - cache_write: 0, - context_over_200k: { input: 5, output: 22.5 }, - }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "gpt-5.1-chat-latest": { - id: "gpt-5.1-chat-latest", - name: "gpt-5.1-chat-latest", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 128000, output: 16384 }, - }, - "claude-haiku-4-5-20251001": { - id: "claude-haiku-4-5-20251001", - name: "claude-haiku-4-5-20251001", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-16", - last_updated: "2025-10-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5 }, - limit: { context: 200000, output: 64000 }, - }, - "MiniMax-M1": { - id: "MiniMax-M1", - name: "MiniMax-M1", - family: "minimax", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-06-16", - last_updated: "2025-06-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.132, output: 1.254 }, - limit: { context: 1000000, output: 128000 }, - }, - "gpt-5.4-nano-2026-03-17": { - id: "gpt-5.4-nano-2026-03-17", - name: "gpt-5.4-nano-2026-03-17", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-19", - last_updated: "2026-03-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.25 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "claude-sonnet-4-20250514": { - id: "claude-sonnet-4-20250514", - name: "claude-sonnet-4-20250514", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 64000 }, - }, - "qwen3-coder-480b-a35b-instruct": { - id: "qwen3-coder-480b-a35b-instruct", - name: "qwen3-coder-480b-a35b-instruct", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.86, output: 3.43 }, - limit: { context: 262144, output: 65536 }, - }, - "claude-opus-4-6": { - id: "claude-opus-4-6", - name: "claude-opus-4-6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-06", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25 }, - limit: { context: 1000000, output: 128000 }, - }, - "doubao-seed-code-preview-251028": { - id: "doubao-seed-code-preview-251028", - name: "doubao-seed-code-preview-251028", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-11-11", - last_updated: "2025-11-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.17, output: 1.14 }, - limit: { context: 256000, output: 32000 }, - }, - "gpt-4.1-nano": { - id: "gpt-4.1-nano", - name: "gpt-4.1-nano", - family: "gpt-nano", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 1047576, output: 32768 }, - }, - "deepseek-v3.2": { - id: "deepseek-v3.2", - name: "deepseek-v3.2", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.29, output: 0.43 }, - limit: { context: 128000, output: 8192 }, - }, - "gpt-5-pro": { - id: "gpt-5-pro", - name: "gpt-5-pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-10-08", - last_updated: "2025-10-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 120 }, - limit: { context: 400000, input: 272000, output: 272000 }, - }, - "gpt-4o": { - id: "gpt-4o", - name: "gpt-4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-05-13", - last_updated: "2024-05-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 128000, output: 16384 }, - }, - "claude-sonnet-4-5": { - id: "claude-sonnet-4-5", - name: "claude-sonnet-4-5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 64000 }, - }, - "gpt-5": { - id: "gpt-5", - name: "gpt-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-08-08", - last_updated: "2025-08-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "grok-4.20-beta-0309-reasoning": { - id: "grok-4.20-beta-0309-reasoning", - name: "grok-4.20-beta-0309-reasoning", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-16", - last_updated: "2026-03-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6 }, - limit: { context: 2000000, output: 30000 }, - }, - "claude-opus-4-20250514": { - id: "claude-opus-4-20250514", - name: "claude-opus-4-20250514", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75 }, - limit: { context: 200000, output: 32000 }, - }, - "glm-for-coding": { - id: "glm-for-coding", - name: "glm-for-coding", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.086, output: 0.343 }, - limit: { context: 200000, output: 131072 }, - }, - "claude-sonnet-4-5-20250929-thinking": { - id: "claude-sonnet-4-5-20250929-thinking", - name: "claude-sonnet-4-5-20250929-thinking", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 64000 }, - }, - "glm-4.5-airx": { - id: "glm-4.5-airx", - name: "glm-4.5-airx", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-29", - last_updated: "2025-07-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.572, output: 1.714 }, - limit: { context: 128000, output: 16384 }, - }, - "gpt-4.1": { - id: "gpt-4.1", - name: "gpt-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8 }, - limit: { context: 1047576, output: 32768 }, - }, - "kimi-k2-thinking": { - id: "kimi-k2-thinking", - name: "kimi-k2-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.575, output: 2.3 }, - limit: { context: 262144, output: 262144 }, - }, - "gemini-2.0-flash-lite": { - id: "gemini-2.0-flash-lite", - name: "gemini-2.0-flash-lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-11", - release_date: "2025-06-16", - last_updated: "2025-06-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 2000000, output: 8192 }, - }, - "gpt-4.1-mini": { - id: "gpt-4.1-mini", - name: "gpt-4.1-mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.6 }, - limit: { context: 1047576, output: 32768 }, - }, - "grok-4-fast-non-reasoning": { - id: "grok-4-fast-non-reasoning", - name: "grok-4-fast-non-reasoning", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5 }, - limit: { context: 2000000, output: 30000 }, - }, - "doubao-seed-1-6-thinking-250715": { - id: "doubao-seed-1-6-thinking-250715", - name: "doubao-seed-1-6-thinking-250715", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-07-15", - last_updated: "2025-07-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.121, output: 1.21 }, - limit: { context: 256000, output: 16000 }, - }, - "ministral-14b-2512": { - id: "ministral-14b-2512", - name: "ministral-14b-2512", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-12-16", - last_updated: "2025-12-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.33, output: 0.33 }, - limit: { context: 128000, output: 128000 }, - }, - }, - }, - alibaba: { - id: "alibaba", - env: ["DASHSCOPE_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1", - name: "Alibaba", - doc: "https://www.alibabacloud.com/help/en/model-studio/models", - models: { - "qwen3-235b-a22b": { - id: "qwen3-235b-a22b", - name: "Qwen3 235B-A22B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 2.8, reasoning: 8.4 }, - limit: { context: 131072, output: 16384 }, - }, - "qwen3.5-122b-a10b": { - id: "qwen3.5-122b-a10b", - name: "Qwen3.5 122B-A10B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-23", - last_updated: "2026-02-23", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 3.2 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen3-coder-plus": { - id: "qwen3-coder-plus", - name: "Qwen3 Coder Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 5 }, - limit: { context: 1048576, output: 65536 }, - }, - "qwen3.6-27b": { - id: "qwen3.6-27b", - name: "Qwen3.6 27B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3.6 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen3.5-27b": { - id: "qwen3.5-27b", - name: "Qwen3.5 27B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-23", - last_updated: "2026-02-23", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 2.4 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen-vl-ocr": { - id: "qwen-vl-ocr", - name: "Qwen-VL OCR", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-04", - release_date: "2024-10-28", - last_updated: "2025-04-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.72, output: 0.72 }, - limit: { context: 34096, output: 4096 }, - }, - "qwen-omni-turbo-realtime": { - id: "qwen-omni-turbo-realtime", - name: "Qwen-Omni Turbo Realtime", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-05-08", - last_updated: "2025-05-08", - modalities: { input: ["text", "image", "audio"], output: ["text", "audio"] }, - open_weights: false, - cost: { input: 0.27, output: 1.07, input_audio: 4.44, output_audio: 8.89 }, - limit: { context: 32768, output: 2048 }, - }, - "qwen3-8b": { - id: "qwen3-8b", - name: "Qwen3 8B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.18, output: 0.7, reasoning: 2.1 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3.5-397b-a17b": { - id: "qwen3.5-397b-a17b", - name: "Qwen3.5 397B-A17B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-15", - last_updated: "2026-02-15", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3.6 }, - limit: { context: 262144, output: 65536 }, - }, - "qwq-plus": { - id: "qwq-plus", - name: "QwQ Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-03-05", - last_updated: "2025-03-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 2.4 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen-vl-plus": { - id: "qwen-vl-plus", - name: "Qwen-VL Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-01-25", - last_updated: "2025-08-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.21, output: 0.63 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3-livetranslate-flash-realtime": { - id: "qwen3-livetranslate-flash-realtime", - name: "Qwen3-LiveTranslate Flash Realtime", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-04", - release_date: "2025-09-22", - last_updated: "2025-09-22", - modalities: { input: ["text", "image", "audio", "video"], output: ["text", "audio"] }, - open_weights: false, - cost: { input: 10, output: 10, input_audio: 10, output_audio: 38 }, - limit: { context: 53248, output: 4096 }, - }, - "qwen3-32b": { - id: "qwen3-32b", - name: "Qwen3 32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 2.8, reasoning: 8.4 }, - limit: { context: 131072, output: 16384 }, - }, - "qwen-max": { - id: "qwen-max", - name: "Qwen Max", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-04-03", - last_updated: "2025-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.6, output: 6.4 }, - limit: { context: 32768, output: 8192 }, - }, - "qwen-plus": { - id: "qwen-plus", - name: "Qwen Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-01-25", - last_updated: "2025-09-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.2, reasoning: 4 }, - limit: { context: 1000000, output: 32768 }, - }, - "qwen3.6-35b-a3b": { - id: "qwen3.6-35b-a3b", - name: "Qwen3.6 35B-A3B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-17", - last_updated: "2026-04-17", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.248, output: 1.485 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen-omni-turbo": { - id: "qwen-omni-turbo", - name: "Qwen-Omni Turbo", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-01-19", - last_updated: "2025-03-26", - modalities: { input: ["text", "image", "audio", "video"], output: ["text", "audio"] }, - open_weights: false, - cost: { input: 0.07, output: 0.27, input_audio: 4.44, output_audio: 8.89 }, - limit: { context: 32768, output: 2048 }, - }, - "qwen-flash": { - id: "qwen-flash", - name: "Qwen Flash", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4 }, - limit: { context: 1000000, output: 32768 }, - }, - "qwen2-5-vl-7b-instruct": { - id: "qwen2-5-vl-7b-instruct", - name: "Qwen2.5-VL 7B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.35, output: 1.05 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3.6-plus": { - id: "qwen3.6-plus", - name: "Qwen3.6 Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.276, output: 1.651, cache_read: 0.028, cache_write: 0.344 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen3-max": { - id: "qwen3-max", - name: "Qwen3 Max", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 6 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen3-omni-flash": { - id: "qwen3-omni-flash", - name: "Qwen3-Omni Flash", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image", "audio", "video"], output: ["text", "audio"] }, - open_weights: false, - cost: { input: 0.43, output: 1.66, input_audio: 3.81, output_audio: 15.11 }, - limit: { context: 65536, output: 16384 }, - }, - "qwen2-5-72b-instruct": { - id: "qwen2-5-72b-instruct", - name: "Qwen2.5 72B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.4, output: 5.6 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3-vl-235b-a22b": { - id: "qwen3-vl-235b-a22b", - name: "Qwen3-VL 235B-A22B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 2.8, reasoning: 8.4 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen3-asr-flash": { - id: "qwen3-asr-flash", - name: "Qwen3-ASR Flash", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2024-04", - release_date: "2025-09-08", - last_updated: "2025-09-08", - modalities: { input: ["audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.035, output: 0.035 }, - limit: { context: 53248, output: 4096 }, - }, - "qwen3-next-80b-a3b-thinking": { - id: "qwen3-next-80b-a3b-thinking", - name: "Qwen3-Next 80B-A3B (Thinking)", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09", - last_updated: "2025-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 6 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen-mt-plus": { - id: "qwen-mt-plus", - name: "Qwen-MT Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-04", - release_date: "2025-01", - last_updated: "2025-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.46, output: 7.37 }, - limit: { context: 16384, output: 8192 }, - }, - "qwen-vl-max": { - id: "qwen-vl-max", - name: "Qwen-VL Max", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-04-08", - last_updated: "2025-08-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 3.2 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3-coder-flash": { - id: "qwen3-coder-flash", - name: "Qwen3 Coder Flash", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.5 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen2-5-7b-instruct": { - id: "qwen2-5-7b-instruct", - name: "Qwen2.5 7B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.175, output: 0.7 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen2-5-14b-instruct": { - id: "qwen2-5-14b-instruct", - name: "Qwen2.5 14B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.35, output: 1.4 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen2-5-32b-instruct": { - id: "qwen2-5-32b-instruct", - name: "Qwen2.5 32B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 2.8 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3-next-80b-a3b-instruct": { - id: "qwen3-next-80b-a3b-instruct", - name: "Qwen3-Next 80B-A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09", - last_updated: "2025-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 2 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen-plus-character-ja": { - id: "qwen-plus-character-ja", - name: "Qwen Plus Character (Japanese)", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-01", - last_updated: "2024-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.4 }, - limit: { context: 8192, output: 512 }, - }, - "qwen3-omni-flash-realtime": { - id: "qwen3-omni-flash-realtime", - name: "Qwen3-Omni Flash Realtime", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image", "audio", "video"], output: ["text", "audio"] }, - open_weights: false, - cost: { input: 0.52, output: 1.99, input_audio: 4.57, output_audio: 18.13 }, - limit: { context: 65536, output: 16384 }, - }, - "qwen3-vl-30b-a3b": { - id: "qwen3-vl-30b-a3b", - name: "Qwen3-VL 30B-A3B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.8, reasoning: 2.4 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen3-vl-plus": { - id: "qwen3-vl-plus", - name: "Qwen3-VL Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.6, reasoning: 4.8 }, - limit: { context: 262144, output: 32768 }, - }, - "qwen3-coder-480b-a35b-instruct": { - id: "qwen3-coder-480b-a35b-instruct", - name: "Qwen3-Coder 480B-A35B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.5, output: 7.5 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen3-coder-30b-a3b-instruct": { - id: "qwen3-coder-30b-a3b-instruct", - name: "Qwen3-Coder 30B-A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 2.25 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen-turbo": { - id: "qwen-turbo", - name: "Qwen Turbo", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-11-01", - last_updated: "2025-04-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.2, reasoning: 0.5 }, - limit: { context: 1000000, output: 16384 }, - }, - "qwen-mt-turbo": { - id: "qwen-mt-turbo", - name: "Qwen-MT Turbo", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-04", - release_date: "2025-01", - last_updated: "2025-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.16, output: 0.49 }, - limit: { context: 16384, output: 8192 }, - }, - "qwen3.6-max-preview": { - id: "qwen3.6-max-preview", - name: "Qwen3.6 Max Preview", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-20", - last_updated: "2026-04-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.3, output: 7.8, cache_read: 0.13, cache_write: 1.625 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen2-5-omni-7b": { - id: "qwen2-5-omni-7b", - name: "Qwen2.5-Omni 7B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-12", - last_updated: "2024-12", - modalities: { input: ["text", "image", "audio", "video"], output: ["text", "audio"] }, - open_weights: true, - cost: { input: 0.1, output: 0.4, input_audio: 6.76 }, - limit: { context: 32768, output: 2048 }, - }, - "qwen3.5-plus": { - id: "qwen3.5-plus", - name: "Qwen3.5 Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2.4, reasoning: 2.4 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen2-5-vl-72b-instruct": { - id: "qwen2-5-vl-72b-instruct", - name: "Qwen2.5-VL 72B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 2.8, output: 8.4 }, - limit: { context: 131072, output: 8192 }, - }, - "qvq-max": { - id: "qvq-max", - name: "QVQ Max", - family: "qvq", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-03-25", - last_updated: "2025-03-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 4.8 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3-14b": { - id: "qwen3-14b", - name: "Qwen3 14B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.35, output: 1.4, reasoning: 4.2 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3.5-35b-a3b": { - id: "qwen3.5-35b-a3b", - name: "Qwen3.5 35B-A3B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-23", - last_updated: "2026-02-23", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 2 }, - limit: { context: 262144, output: 65536 }, - }, - }, - }, - scaleway: { - id: "scaleway", - env: ["SCALEWAY_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.scaleway.ai/v1", - name: "Scaleway", - doc: "https://www.scaleway.com/en/docs/generative-apis/", - models: { - "qwen3-embedding-8b": { - id: "qwen3-embedding-8b", - name: "Qwen3 Embedding 8B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-25-11", - last_updated: "2026-03-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0 }, - limit: { context: 32768, output: 4096 }, - }, - "qwen3-235b-a22b-instruct-2507": { - id: "qwen3-235b-a22b-instruct-2507", - name: "Qwen3 235B A22B Instruct 2507", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-01", - last_updated: "2026-03-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.75, output: 2.25 }, - limit: { context: 260000, output: 16384 }, - }, - "llama-3.3-70b-instruct": { - id: "llama-3.3-70b-instruct", - name: "Llama-3.3-70B-Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2026-03-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.9, output: 0.9 }, - limit: { context: 100000, output: 16384 }, - }, - "qwen3.5-397b-a17b": { - id: "qwen3.5-397b-a17b", - name: "Qwen3.5 397B A17B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3.6 }, - limit: { context: 256000, output: 16384 }, - }, - "devstral-2-123b-instruct-2512": { - id: "devstral-2-123b-instruct-2512", - name: "Devstral 2 123B Instruct (2512)", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-01-07", - last_updated: "2026-03-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2 }, - limit: { context: 256000, output: 16384 }, - }, - "deepseek-r1-distill-llama-70b": { - id: "deepseek-r1-distill-llama-70b", - name: "DeepSeek R1 Distill Llama 70B", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-01-20", - last_updated: "2026-03-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.9, output: 0.9 }, - limit: { context: 32000, output: 8196 }, - }, - "pixtral-12b-2409": { - id: "pixtral-12b-2409", - name: "Pixtral 12B 2409", - family: "pixtral", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-09-25", - last_updated: "2026-03-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 128000, output: 4096 }, - }, - "whisper-large-v3": { - id: "whisper-large-v3", - name: "Whisper Large v3", - family: "whisper", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2023-09", - release_date: "2023-09-01", - last_updated: "2026-03-17", - modalities: { input: ["audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.003, output: 0 }, - limit: { context: 0, output: 8192 }, - }, - "voxtral-small-24b-2507": { - id: "voxtral-small-24b-2507", - name: "Voxtral Small 24B 2507", - family: "voxtral", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-01", - last_updated: "2026-03-17", - modalities: { input: ["text", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.35 }, - limit: { context: 32000, output: 16384 }, - }, - "gemma-3-27b-it": { - id: "gemma-3-27b-it", - name: "Gemma-3-27B-IT", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2024-12-01", - last_updated: "2026-03-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.5 }, - limit: { context: 40000, output: 8192 }, - }, - "bge-multilingual-gemma2": { - id: "bge-multilingual-gemma2", - name: "BGE Multilingual Gemma2", - family: "gemma", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-07-26", - last_updated: "2025-06-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0 }, - limit: { context: 8191, output: 3072 }, - }, - "qwen3-coder-30b-a3b-instruct": { - id: "qwen3-coder-30b-a3b-instruct", - name: "Qwen3-Coder 30B-A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2026-03-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 128000, output: 32768 }, - }, - "mistral-small-3.2-24b-instruct-2506": { - id: "mistral-small-3.2-24b-instruct-2506", - name: "Mistral Small 3.2 24B Instruct (2506)", - family: "mistral-small", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-06-20", - last_updated: "2026-03-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.35 }, - limit: { context: 128000, output: 32768 }, - }, - "gpt-oss-120b": { - id: "gpt-oss-120b", - name: "GPT-OSS 120B", - family: "gpt-oss", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-01-01", - last_updated: "2026-03-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 32768 }, - }, - "mistral-nemo-instruct-2407": { - id: "mistral-nemo-instruct-2407", - name: "Mistral Nemo Instruct 2407", - family: "mistral-nemo", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-07-25", - last_updated: "2026-03-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 128000, output: 8192 }, - }, - "llama-3.1-8b-instruct": { - id: "llama-3.1-8b-instruct", - name: "Llama 3.1 8B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2025-01-01", - last_updated: "2026-03-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 128000, output: 16384 }, - }, - }, - }, - "nano-gpt": { - id: "nano-gpt", - env: ["NANO_GPT_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://nano-gpt.com/api/v1", - name: "NanoGPT", - doc: "https://docs.nano-gpt.com", - models: { - "glm-4-flash": { - id: "glm-4-flash", - name: "GLM-4 Flash", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-08-01", - last_updated: "2024-08-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1003, output: 0.1003 }, - limit: { context: 128000, input: 128000, output: 4096 }, - }, - "Meta-Llama-3-1-8B-Instruct-FP8": { - id: "Meta-Llama-3-1-8B-Instruct-FP8", - name: "Llama 3.1 8B (decentralized)", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.02, output: 0.03 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "claude-opus-4-thinking:32000": { - id: "claude-opus-4-thinking:32000", - name: "Claude 4 Opus Thinking (32K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 14.994, output: 75.004 }, - limit: { context: 200000, input: 200000, output: 32000 }, - }, - "gemini-2.5-pro-preview-05-06": { - id: "gemini-2.5-pro-preview-05-06", - name: "Gemini 2.5 Pro Preview 0506", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-05-06", - last_updated: "2025-05-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "grok-3-mini-fast-beta": { - id: "grok-3-mini-fast-beta", - name: "Grok 3 Mini Fast Beta", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 4 }, - limit: { context: 131072, input: 131072, output: 131072 }, - }, - "MiniMax-M2": { - id: "MiniMax-M2", - name: "MiniMax M2", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-10-25", - last_updated: "2025-10-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.17, output: 1.53 }, - limit: { context: 200000, input: 200000, output: 131072 }, - }, - "command-a-reasoning-08-2025": { - id: "command-a-reasoning-08-2025", - name: "Cohere Command A (08/2025)", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-22", - last_updated: "2025-08-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 256000, input: 256000, output: 8192 }, - }, - brave: { - id: "brave", - name: "Brave (Answers)", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2023-03-02", - last_updated: "2024-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 5 }, - limit: { context: 8192, input: 8192, output: 8192 }, - }, - "exa-research": { - id: "exa-research", - name: "Exa (Research)", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-06-04", - last_updated: "2025-06-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 2.5 }, - limit: { context: 8192, input: 8192, output: 8192 }, - }, - "Llama-3.3-70B-Nova": { - id: "Llama-3.3-70B-Nova", - name: "Llama 3.3 70B Nova", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "gemini-exp-1206": { - id: "gemini-exp-1206", - name: "Gemini 2.0 Pro 1206", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.258, output: 4.998 }, - limit: { context: 2097152, input: 2097152, output: 8192 }, - }, - "claude-opus-4-5-20251101": { - id: "claude-opus-4-5-20251101", - name: "Claude 4.5 Opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-11-01", - last_updated: "2025-11-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 4.998, output: 25.007 }, - limit: { context: 200000, input: 200000, output: 32000 }, - }, - "auto-model-basic": { - id: "auto-model-basic", - name: "Auto model (Basic)", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-06-01", - last_updated: "2024-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 9.996, output: 19.992 }, - limit: { context: 1000000, input: 1000000, output: 1000000 }, - }, - "jamba-mini": { - id: "jamba-mini", - name: "Jamba Mini", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1989, output: 0.408 }, - limit: { context: 256000, input: 256000, output: 4096 }, - }, - "gemini-2.5-flash-lite-preview-09-2025": { - id: "gemini-2.5-flash-lite-preview-09-2025", - name: "Gemini 2.5 Flash Lite Preview (09/2025)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "yi-large": { - id: "yi-large", - name: "Yi Large", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-05-13", - last_updated: "2024-05-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3.196, output: 3.196 }, - limit: { context: 32000, input: 32000, output: 4096 }, - }, - "auto-model-premium": { - id: "auto-model-premium", - name: "Auto model (Premium)", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-06-01", - last_updated: "2024-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 9.996, output: 19.992 }, - limit: { context: 1000000, input: 1000000, output: 1000000 }, - }, - "azure-gpt-4o": { - id: "azure-gpt-4o", - name: "Azure gpt-4o", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2024-05-13", - last_updated: "2024-05-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.499, output: 9.996 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "deepseek-v3-0324": { - id: "deepseek-v3-0324", - name: "DeepSeek Chat 0324", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-03-24", - last_updated: "2025-03-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.7 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "claude-3-5-haiku-20241022": { - id: "claude-3-5-haiku-20241022", - name: "Claude 3.5 Haiku", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4 }, - limit: { context: 200000, input: 200000, output: 8192 }, - }, - "doubao-seed-1-8-251215": { - id: "doubao-seed-1-8-251215", - name: "Doubao Seed 1.8", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-15", - last_updated: "2025-12-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.612, output: 6.12 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "doubao-seed-1-6-250615": { - id: "doubao-seed-1-6-250615", - name: "Doubao Seed 1.6", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-06-15", - last_updated: "2025-06-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.204, output: 0.51 }, - limit: { context: 256000, input: 256000, output: 16384 }, - }, - "ernie-x1.1-preview": { - id: "ernie-x1.1-preview", - name: "ERNIE X1.1", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-10", - last_updated: "2025-09-10", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 64000, input: 64000, output: 8192 }, - }, - "ernie-5.0-thinking-preview": { - id: "ernie-5.0-thinking-preview", - name: "Ernie 5.0 Thinking Preview", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 2 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "glm-4-air-0111": { - id: "glm-4-air-0111", - name: "GLM 4 Air 0111", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-11", - last_updated: "2025-01-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1394, output: 0.1394 }, - limit: { context: 128000, input: 128000, output: 4096 }, - }, - fastgpt: { - id: "fastgpt", - name: "Web Answer", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2023-08-01", - last_updated: "2024-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 7.5, output: 7.5 }, - limit: { context: 32768, input: 32768, output: 32768 }, - }, - "doubao-seed-1-6-thinking-250615": { - id: "doubao-seed-1-6-thinking-250615", - name: "Doubao Seed 1.6 Thinking", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-06-15", - last_updated: "2025-06-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.204, output: 2.04 }, - limit: { context: 256000, input: 256000, output: 16384 }, - }, - "gemini-2.0-flash-001": { - id: "gemini-2.0-flash-001", - name: "Gemini 2.0 Flash", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1003, output: 0.408 }, - limit: { context: 1000000, input: 1000000, output: 8192 }, - }, - "claude-opus-4-1-thinking:32000": { - id: "claude-opus-4-1-thinking:32000", - name: "Claude 4.1 Opus Thinking (32K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 14.994, output: 75.004 }, - limit: { context: 200000, input: 200000, output: 32000 }, - }, - "Llama-3.3-70B-RAWMAW": { - id: "Llama-3.3-70B-RAWMAW", - name: "Llama 3.3 70B RAWMAW", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "GLM-4.5-Air-Derestricted-Steam": { - id: "GLM-4.5-Air-Derestricted-Steam", - name: "GLM 4.5 Air Derestricted Steam", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 220600, input: 220600, output: 65536 }, - }, - "claude-3-5-sonnet-20241022": { - id: "claude-3-5-sonnet-20241022", - name: "Claude 3.5 Sonnet", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-08-26", - last_updated: "2025-08-26", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 200000, input: 200000, output: 8192 }, - }, - "yi-medium-200k": { - id: "yi-medium-200k", - name: "Yi Medium 200k", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-03-01", - last_updated: "2024-03-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.499, output: 2.499 }, - limit: { context: 200000, input: 200000, output: 4096 }, - }, - "Gemma-3-27B-ArliAI-RPMax-v3": { - id: "Gemma-3-27B-ArliAI-RPMax-v3", - name: "Gemma 3 27B RPMax v3", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-03", - last_updated: "2025-07-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "phi-4-mini-instruct": { - id: "phi-4-mini-instruct", - name: "Phi 4 Mini", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-26", - last_updated: "2025-07-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.17, output: 0.68 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "Llama-3.3+(3v3.3)-70B-TenyxChat-DaybreakStorywriter": { - id: "Llama-3.3+(3v3.3)-70B-TenyxChat-DaybreakStorywriter", - name: "Llama 3.3+ 70B TenyxChat DaybreakStorywriter", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "ernie-x1-32k": { - id: "ernie-x1-32k", - name: "Ernie X1 32k", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-05-08", - last_updated: "2025-05-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.33, output: 1.32 }, - limit: { context: 32000, input: 32000, output: 16384 }, - }, - "deepseek-chat": { - id: "deepseek-chat", - name: "DeepSeek V3/Deepseek Chat", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-02-27", - last_updated: "2025-02-27", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.7 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "glm-z1-air": { - id: "glm-z1-air", - name: "GLM Z1 Air", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.07 }, - limit: { context: 32000, input: 32000, output: 16384 }, - }, - "claude-3-7-sonnet-thinking:128000": { - id: "claude-3-7-sonnet-thinking:128000", - name: "Claude 3.7 Sonnet Thinking (128K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-02-24", - last_updated: "2025-02-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 200000, input: 200000, output: 64000 }, - }, - "glm-4-air": { - id: "glm-4-air", - name: "GLM-4 Air", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-06-05", - last_updated: "2024-06-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2006, output: 0.2006 }, - limit: { context: 128000, input: 128000, output: 4096 }, - }, - "Llama-3.3-70B-MiraiFanfare": { - id: "Llama-3.3-70B-MiraiFanfare", - name: "Llama 3.3 70b Mirai Fanfare", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-26", - last_updated: "2025-07-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.493, output: 0.493 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "gemini-2.0-flash-thinking-exp-01-21": { - id: "gemini-2.0-flash-thinking-exp-01-21", - name: "Gemini 2.0 Flash Thinking 0121", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-01-21", - last_updated: "2025-01-21", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 1.003 }, - limit: { context: 1000000, input: 1000000, output: 8192 }, - }, - "Magistral-Small-2506": { - id: "Magistral-Small-2506", - name: "Magistral Small 2506", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.4 }, - limit: { context: 32768, input: 32768, output: 32768 }, - }, - "doubao-1.5-pro-32k": { - id: "doubao-1.5-pro-32k", - name: "Doubao 1.5 Pro 32k", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-22", - last_updated: "2025-01-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1343, output: 0.3349 }, - limit: { context: 32000, input: 32000, output: 8192 }, - }, - "venice-uncensored:web": { - id: "venice-uncensored:web", - name: "Venice Uncensored Web", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-05-01", - last_updated: "2024-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 0.4 }, - limit: { context: 80000, input: 80000, output: 16384 }, - }, - "glm-4": { - id: "glm-4", - name: "GLM-4", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-01-16", - last_updated: "2024-01-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 14.994, output: 14.994 }, - limit: { context: 128000, input: 128000, output: 4096 }, - }, - "qwen-max": { - id: "qwen-max", - name: "Qwen 2.5 Max", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-04-03", - last_updated: "2024-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5997, output: 6.392 }, - limit: { context: 32000, input: 32000, output: 8192 }, - }, - "qwen3-vl-235b-a22b-instruct-original": { - id: "qwen3-vl-235b-a22b-instruct-original", - name: "Qwen3 VL 235B A22B Instruct Original", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.2 }, - limit: { context: 32768, input: 32768, output: 32768 }, - }, - "jamba-large-1.6": { - id: "jamba-large-1.6", - name: "Jamba Large 1.6", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-12", - last_updated: "2025-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.989, output: 7.99 }, - limit: { context: 256000, input: 256000, output: 4096 }, - }, - "qwen-plus": { - id: "qwen-plus", - name: "Qwen Plus", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2024-01-25", - last_updated: "2024-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3995, output: 1.2002 }, - limit: { context: 995904, input: 995904, output: 32768 }, - }, - "qwen25-vl-72b-instruct": { - id: "qwen25-vl-72b-instruct", - name: "Qwen25 VL 72b", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-05-10", - last_updated: "2025-05-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.69989, output: 0.69989 }, - limit: { context: 32000, input: 32000, output: 32768 }, - }, - "claude-sonnet-4-thinking:64000": { - id: "claude-sonnet-4-thinking:64000", - name: "Claude 4 Sonnet Thinking (64K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 1000000, input: 1000000, output: 64000 }, - }, - "gemini-3-pro-preview": { - id: "gemini-3-pro-preview", - name: "Gemini 3 Pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "Llama-3.3+(3.1v3.3)-70B-New-Dawn-v1.1": { - id: "Llama-3.3+(3.1v3.3)-70B-New-Dawn-v1.1", - name: "Llama 3.3+ 70B New Dawn v1.1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "GLM-4.5-Air-Derestricted-Iceblink-ReExtract": { - id: "GLM-4.5-Air-Derestricted-Iceblink-ReExtract", - name: "GLM 4.5 Air Derestricted Iceblink ReExtract", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-12", - last_updated: "2025-12-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 131072, input: 131072, output: 98304 }, - }, - "universal-summarizer": { - id: "universal-summarizer", - name: "Universal Summarizer", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2023-05-01", - last_updated: "2024-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 30 }, - limit: { context: 32768, input: 32768, output: 32768 }, - }, - "claude-sonnet-4-thinking:32768": { - id: "claude-sonnet-4-thinking:32768", - name: "Claude 4 Sonnet Thinking (32K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 1000000, input: 1000000, output: 64000 }, - }, - "sarvan-medium": { - id: "sarvan-medium", - name: "Sarvam Medium", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.75 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "claude-3-7-sonnet-thinking:8192": { - id: "claude-3-7-sonnet-thinking:8192", - name: "Claude 3.7 Sonnet Thinking (8K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-02-24", - last_updated: "2025-02-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 200000, input: 200000, output: 64000 }, - }, - "gemini-2.5-flash-preview-05-20": { - id: "gemini-2.5-flash-preview-05-20", - name: "Gemini 2.5 Flash 0520", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 1048000, input: 1048000, output: 65536 }, - }, - "GLM-4.5-Air-Derestricted-Iceblink-v2-ReExtract": { - id: "GLM-4.5-Air-Derestricted-Iceblink-v2-ReExtract", - name: "GLM 4.5 Air Derestricted Iceblink v2 ReExtract", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-12", - last_updated: "2025-12-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 131072, input: 131072, output: 65536 }, - }, - "Llama-3.3-70B-Fallen-v1": { - id: "Llama-3.3-70B-Fallen-v1", - name: "Llama 3.3 70B Fallen v1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "qwen3-vl-235b-a22b-thinking": { - id: "qwen3-vl-235b-a22b-thinking", - name: "Qwen3 VL 235B A22B Thinking", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-08-26", - last_updated: "2025-08-26", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 6 }, - limit: { context: 32768, input: 32768, output: 32768 }, - }, - "claude-3-7-sonnet-thinking:32768": { - id: "claude-3-7-sonnet-thinking:32768", - name: "Claude 3.7 Sonnet Thinking (32K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-07-15", - last_updated: "2025-07-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 200000, input: 200000, output: 64000 }, - }, - "claude-3-7-sonnet-thinking:1024": { - id: "claude-3-7-sonnet-thinking:1024", - name: "Claude 3.7 Sonnet Thinking (1K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-02-24", - last_updated: "2025-02-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 200000, input: 200000, output: 64000 }, - }, - "claude-sonnet-4-5-20250929": { - id: "claude-sonnet-4-5-20250929", - name: "Claude Sonnet 4.5", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 1000000, input: 1000000, output: 64000 }, - }, - "Llama-3.3-70B-Vulpecula-R1": { - id: "Llama-3.3-70B-Vulpecula-R1", - name: "Llama 3.3 70B Vulpecula R1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "claude-sonnet-4-thinking:8192": { - id: "claude-sonnet-4-thinking:8192", - name: "Claude 4 Sonnet Thinking (8K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 1000000, input: 1000000, output: 64000 }, - }, - "gemini-2.5-pro": { - id: "gemini-2.5-pro", - name: "Gemini 2.5 Pro", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-06-05", - last_updated: "2025-06-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "Llama-3.3-70B-Ignition-v0.1": { - id: "Llama-3.3-70B-Ignition-v0.1", - name: "Llama 3.3 70B Ignition v0.1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "glm-4-plus-0111": { - id: "glm-4-plus-0111", - name: "GLM 4 Plus 0111", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 9.996, output: 9.996 }, - limit: { context: 128000, input: 128000, output: 4096 }, - }, - "KAT-Coder-Air-V1": { - id: "KAT-Coder-Air-V1", - name: "KAT Coder Air V1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-10-28", - last_updated: "2025-10-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.2 }, - limit: { context: 128000, input: 128000, output: 32768 }, - }, - "deepseek-r1-sambanova": { - id: "deepseek-r1-sambanova", - name: "DeepSeek R1 Fast", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-20", - last_updated: "2025-02-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 4.998, output: 6.987 }, - limit: { context: 128000, input: 128000, output: 4096 }, - }, - "deepseek-r1": { - id: "deepseek-r1", - name: "DeepSeek R1", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.7 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "doubao-1-5-thinking-pro-250415": { - id: "doubao-1-5-thinking-pro-250415", - name: "Doubao 1.5 Thinking Pro", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-17", - last_updated: "2025-04-17", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 2.4 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "sonar-pro": { - id: "sonar-pro", - name: "Perplexity Pro", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 200000, input: 200000, output: 128000 }, - }, - "Gemma-3-27B-it-Abliterated": { - id: "Gemma-3-27B-it-Abliterated", - name: "Gemma 3 27B IT Abliterated", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-03", - last_updated: "2025-07-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.42, output: 0.42 }, - limit: { context: 32768, input: 32768, output: 96000 }, - }, - "deepseek-chat-cheaper": { - id: "deepseek-chat-cheaper", - name: "DeepSeek V3/Chat Cheaper", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.7 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "gemini-2.0-pro-exp-02-05": { - id: "gemini-2.0-pro-exp-02-05", - name: "Gemini 2.0 Pro 0205", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-05", - last_updated: "2025-02-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.989, output: 7.956 }, - limit: { context: 2097152, input: 2097152, output: 8192 }, - }, - "azure-gpt-4o-mini": { - id: "azure-gpt-4o-mini", - name: "Azure gpt-4o-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1496, output: 0.595 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "Llama-3.3-70B-MS-Nevoria": { - id: "Llama-3.3-70B-MS-Nevoria", - name: "Llama 3.3 70B MS Nevoria", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "claude-opus-4-thinking": { - id: "claude-opus-4-thinking", - name: "Claude 4 Opus Thinking", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-07-15", - last_updated: "2025-07-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 14.994, output: 75.004 }, - limit: { context: 200000, input: 200000, output: 32000 }, - }, - "Llama-3.3-70B-Sapphira-0.1": { - id: "Llama-3.3-70B-Sapphira-0.1", - name: "Llama 3.3 70B Sapphira 0.1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "doubao-seed-code-preview-latest": { - id: "doubao-seed-code-preview-latest", - name: "Doubao Seed Code Preview", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 256000, input: 256000, output: 16384 }, - }, - "qwen-3.6-plus": { - id: "qwen-3.6-plus", - name: "Qwen 3.6 Plus", - family: "qwen3.6", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.45, output: 2.7 }, - limit: { context: 991800, output: 65536 }, - }, - "Llama-3.3-70B-ArliAI-RPMax-v1.4": { - id: "Llama-3.3-70B-ArliAI-RPMax-v1.4", - name: "Llama 3.3 70B RPMax v1.4", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "mistral-small-31-24b-instruct": { - id: "mistral-small-31-24b-instruct", - name: "Mistral Small 31 24b Instruct", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 128000, input: 128000, output: 131072 }, - }, - "glm-4.1v-thinking-flashx": { - id: "glm-4.1v-thinking-flashx", - name: "GLM 4.1V Thinking FlashX", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.3 }, - limit: { context: 64000, input: 64000, output: 8192 }, - }, - "hunyuan-t1-latest": { - id: "hunyuan-t1-latest", - name: "Hunyuan T1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-22", - last_updated: "2025-03-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.17, output: 0.66 }, - limit: { context: 256000, input: 256000, output: 16384 }, - }, - "doubao-1-5-thinking-vision-pro-250428": { - id: "doubao-1-5-thinking-vision-pro-250428", - name: "Doubao 1.5 Thinking Vision Pro", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-05-15", - last_updated: "2025-05-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.55, output: 1.43 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "asi1-mini": { - id: "asi1-mini", - name: "ASI1 Mini", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-25", - last_updated: "2025-03-25", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 1 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "ernie-5.0-thinking-latest": { - id: "ernie-5.0-thinking-latest", - name: "Ernie 5.0 Thinking", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 2 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "Llama-3.3-70B-Incandescent-Malevolence": { - id: "Llama-3.3-70B-Incandescent-Malevolence", - name: "Llama 3.3 70B Incandescent Malevolence", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Llama-3.3-70B-Damascus-R1": { - id: "Llama-3.3-70B-Damascus-R1", - name: "Damascus R1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Gemma-3-27B-Nidum-Uncensored": { - id: "Gemma-3-27B-Nidum-Uncensored", - name: "Gemma 3 27B Nidum Uncensored", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-08", - last_updated: "2025-08-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 96000 }, - }, - "gemini-2.5-flash-lite-preview-09-2025-thinking": { - id: "gemini-2.5-flash-lite-preview-09-2025-thinking", - name: "Gemini 2.5 Flash Lite Preview (09/2025) – Thinking", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "doubao-seed-2-0-pro-260215": { - id: "doubao-seed-2-0-pro-260215", - name: "Doubao Seed 2.0 Pro", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-02-14", - last_updated: "2026-02-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.782, output: 3.876 }, - limit: { context: 256000, input: 256000, output: 128000 }, - }, - "gemini-3-pro-image-preview": { - id: "gemini-3-pro-image-preview", - name: "Gemini 3 Pro Image", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "Gemma-3-27B-CardProjector-v4": { - id: "Gemma-3-27B-CardProjector-v4", - name: "Gemma 3 27B CardProjector v4", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-10", - last_updated: "2025-03-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "jamba-mini-1.7": { - id: "jamba-mini-1.7", - name: "Jamba Mini 1.7", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1989, output: 0.408 }, - limit: { context: 256000, input: 256000, output: 4096 }, - }, - "Llama-3.3-70B-Forgotten-Safeword-3.6": { - id: "Llama-3.3-70B-Forgotten-Safeword-3.6", - name: "Llama 3.3 70B Forgotten Safeword 3.6", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "doubao-1-5-thinking-pro-vision-250415": { - id: "doubao-1-5-thinking-pro-vision-250415", - name: "Doubao 1.5 Thinking Pro Vision", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 2.4 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "gemini-2.5-pro-preview-06-05": { - id: "gemini-2.5-pro-preview-06-05", - name: "Gemini 2.5 Pro Preview 0605", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-06-05", - last_updated: "2025-06-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "gemini-2.0-pro-reasoner": { - id: "gemini-2.0-pro-reasoner", - name: "Gemini 2.0 Pro Reasoner", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-05", - last_updated: "2025-02-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.292, output: 4.998 }, - limit: { context: 128000, input: 128000, output: 65536 }, - }, - "doubao-seed-2-0-lite-260215": { - id: "doubao-seed-2-0-lite-260215", - name: "Doubao Seed 2.0 Lite", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-02-14", - last_updated: "2026-02-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1462, output: 0.8738 }, - limit: { context: 256000, input: 256000, output: 32000 }, - }, - "gemini-2.5-flash-lite-preview-06-17": { - id: "gemini-2.5-flash-lite-preview-06-17", - name: "Gemini 2.5 Flash Lite Preview", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "sonar-deep-research": { - id: "sonar-deep-research", - name: "Perplexity Deep Research", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-25", - last_updated: "2025-02-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3.4, output: 13.6 }, - limit: { context: 60000, input: 60000, output: 128000 }, - }, - "Gemma-3-27B-it": { - id: "Gemma-3-27B-it", - name: "Gemma 3 27B IT", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-10", - last_updated: "2025-03-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Llama-3.3-70B-GeneticLemonade-Unleashed-v3": { - id: "Llama-3.3-70B-GeneticLemonade-Unleashed-v3", - name: "Llama 3.3 70B GeneticLemonade Unleashed v3", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Gemma-3-27B-Glitter": { - id: "Gemma-3-27B-Glitter", - name: "Gemma 3 27B Glitter", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-10", - last_updated: "2025-03-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Llama-3.3-70B-The-Omega-Directive-Unslop-v2.1": { - id: "Llama-3.3-70B-The-Omega-Directive-Unslop-v2.1", - name: "Llama 3.3 70B Omega Directive Unslop v2.1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "qwen3-30b-a3b-instruct-2507": { - id: "qwen3-30b-a3b-instruct-2507", - name: "Qwen3 30B A3B Instruct 2507", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-20", - last_updated: "2025-02-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5 }, - limit: { context: 256000, input: 256000, output: 32768 }, - }, - "gemini-2.5-flash-preview-09-2025-thinking": { - id: "gemini-2.5-flash-preview-09-2025-thinking", - name: "Gemini 2.5 Flash Preview (09/2025) – Thinking", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "gemini-2.5-flash": { - id: "gemini-2.5-flash", - name: "Gemini 2.5 Flash", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-06-05", - last_updated: "2025-06-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - deepclaude: { - id: "deepclaude", - name: "DeepClaude", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-01", - last_updated: "2025-02-01", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "ernie-4.5-8k-preview": { - id: "ernie-4.5-8k-preview", - name: "Ernie 4.5 8k Preview", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-25", - last_updated: "2025-03-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.66, output: 2.6 }, - limit: { context: 8000, input: 8000, output: 16384 }, - }, - "doubao-seed-2-0-mini-260215": { - id: "doubao-seed-2-0-mini-260215", - name: "Doubao Seed 2.0 Mini", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-02-14", - last_updated: "2026-02-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.0493, output: 0.4845 }, - limit: { context: 256000, input: 256000, output: 32000 }, - }, - "gemini-3-pro-preview-thinking": { - id: "gemini-3-pro-preview-thinking", - name: "Gemini 3 Pro Thinking", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "Llama-3.3-70B-GeneticLemonade-Opus": { - id: "Llama-3.3-70B-GeneticLemonade-Opus", - name: "Llama 3.3 70B GeneticLemonade Opus", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "v0-1.5-lg": { - id: "v0-1.5-lg", - name: "v0 1.5 LG", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-04", - last_updated: "2025-07-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75 }, - limit: { context: 1000000, input: 1000000, output: 64000 }, - }, - "ernie-4.5-turbo-128k": { - id: "ernie-4.5-turbo-128k", - name: "Ernie 4.5 Turbo 128k", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-05-08", - last_updated: "2025-05-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.132, output: 0.55 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "KAT-Coder-Pro-V1": { - id: "KAT-Coder-Pro-V1", - name: "KAT Coder Pro V1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-10-28", - last_updated: "2025-10-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5, output: 6 }, - limit: { context: 256000, input: 256000, output: 32768 }, - }, - "claude-3-5-sonnet-20240620": { - id: "claude-3-5-sonnet-20240620", - name: "Claude 3.5 Sonnet Old", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2024-06-20", - last_updated: "2024-06-20", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 200000, input: 200000, output: 8192 }, - }, - "claude-opus-4-1-thinking:8192": { - id: "claude-opus-4-1-thinking:8192", - name: "Claude 4.1 Opus Thinking (8K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 14.994, output: 75.004 }, - limit: { context: 200000, input: 200000, output: 32000 }, - }, - "gemini-2.0-flash-exp-image-generation": { - id: "gemini-2.0-flash-exp-image-generation", - name: "Gemini Text + Image", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 32767, input: 32767, output: 8192 }, - }, - "Llama-3.3-70B-Magnum-v4-SE": { - id: "Llama-3.3-70B-Magnum-v4-SE", - name: "Llama 3.3 70B Magnum v4 SE", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "glm-zero-preview": { - id: "glm-zero-preview", - name: "GLM Zero Preview", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.802, output: 1.802 }, - limit: { context: 8000, input: 8000, output: 4096 }, - }, - "study_gpt-chatgpt-4o-latest": { - id: "study_gpt-chatgpt-4o-latest", - name: "Study Mode", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-05-13", - last_updated: "2024-05-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 4.998, output: 14.994 }, - limit: { context: 200000, input: 200000, output: 16384 }, - }, - "glm-4-airx": { - id: "glm-4-airx", - name: "GLM-4 AirX", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-06-05", - last_updated: "2024-06-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.006, output: 2.006 }, - limit: { context: 8000, input: 8000, output: 4096 }, - }, - "step-2-mini": { - id: "step-2-mini", - name: "Step-2 Mini", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-05", - last_updated: "2024-07-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2006, output: 0.408 }, - limit: { context: 8000, input: 8000, output: 4096 }, - }, - "gemini-2.5-flash-preview-04-17:thinking": { - id: "gemini-2.5-flash-preview-04-17:thinking", - name: "Gemini 2.5 Flash Preview Thinking", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-04-17", - last_updated: "2025-04-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 3.5 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "Llama-3.3-70B-Mokume-Gane-R1": { - id: "Llama-3.3-70B-Mokume-Gane-R1", - name: "Llama 3.3 70B Mokume Gane R1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "deepseek-reasoner": { - id: "deepseek-reasoner", - name: "DeepSeek Reasoner", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.7 }, - limit: { context: 64000, input: 64000, output: 65536 }, - }, - "glm-z1-airx": { - id: "glm-z1-airx", - name: "GLM Z1 AirX", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7, output: 0.7 }, - limit: { context: 32000, input: 32000, output: 16384 }, - }, - "jamba-mini-1.6": { - id: "jamba-mini-1.6", - name: "Jamba Mini 1.6", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-01", - last_updated: "2025-03-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1989, output: 0.408 }, - limit: { context: 256000, input: 256000, output: 4096 }, - }, - "claude-opus-4-1-thinking": { - id: "claude-opus-4-1-thinking", - name: "Claude 4.1 Opus Thinking", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 14.994, output: 75.004 }, - limit: { context: 200000, input: 200000, output: 32000 }, - }, - "grok-3-beta": { - id: "grok-3-beta", - name: "Grok 3 Beta", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 131072, input: 131072, output: 131072 }, - }, - "Llama-3.3-70B-Legion-V2.1": { - id: "Llama-3.3-70B-Legion-V2.1", - name: "Llama 3.3 70B Legion V2.1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - sonar: { - id: "sonar", - name: "Perplexity Simple", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.003, output: 1.003 }, - limit: { context: 127000, input: 127000, output: 128000 }, - }, - "z-image-turbo": { - id: "z-image-turbo", - name: "Z Image Turbo", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-11-27", - last_updated: "2025-11-27", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "GLM-4.5-Air-Derestricted-Iceblink-v2": { - id: "GLM-4.5-Air-Derestricted-Iceblink-v2", - name: "GLM 4.5 Air Derestricted Iceblink v2", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 158600, input: 158600, output: 65536 }, - }, - "jamba-large": { - id: "jamba-large", - name: "Jamba Large", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.989, output: 7.99 }, - limit: { context: 256000, input: 256000, output: 4096 }, - }, - "claude-3-7-sonnet-reasoner": { - id: "claude-3-7-sonnet-reasoner", - name: "Claude 3.7 Sonnet Reasoner", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-29", - last_updated: "2025-03-29", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "ernie-4.5-turbo-vl-32k": { - id: "ernie-4.5-turbo-vl-32k", - name: "Ernie 4.5 Turbo VL 32k", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-05-08", - last_updated: "2025-05-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.495, output: 1.43 }, - limit: { context: 32000, input: 32000, output: 16384 }, - }, - "Mistral-Nemo-12B-Instruct-2407": { - id: "Mistral-Nemo-12B-Instruct-2407", - name: "Mistral Nemo 12B Instruct 2407", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.01, output: 0.01 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "doubao-seed-1-6-flash-250615": { - id: "doubao-seed-1-6-flash-250615", - name: "Doubao Seed 1.6 Flash", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-06-15", - last_updated: "2025-06-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.0374, output: 0.374 }, - limit: { context: 256000, input: 256000, output: 16384 }, - }, - "qwq-32b": { - id: "qwq-32b", - name: "Qwen: QwQ 32B", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25599999, output: 0.30499999 }, - limit: { context: 128000, input: 128000, output: 32768 }, - }, - "Llama-3.3-70B-Strawberrylemonade-v1.2": { - id: "Llama-3.3-70B-Strawberrylemonade-v1.2", - name: "Llama 3.3 70B StrawberryLemonade v1.2", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "gemini-2.5-flash-preview-04-17": { - id: "gemini-2.5-flash-preview-04-17", - name: "Gemini 2.5 Flash Preview", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-04-17", - last_updated: "2025-04-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "ernie-x1-turbo-32k": { - id: "ernie-x1-turbo-32k", - name: "Ernie X1 Turbo 32k", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-05-08", - last_updated: "2025-05-08", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.165, output: 0.66 }, - limit: { context: 32000, input: 32000, output: 16384 }, - }, - "deepseek-math-v2": { - id: "deepseek-math-v2", - name: "DeepSeek Math V2", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-03", - last_updated: "2025-12-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 128000, input: 128000, output: 65536 }, - }, - "Llama-3.3-70B-Electranova-v1.0": { - id: "Llama-3.3-70B-Electranova-v1.0", - name: "Llama 3.3 70B Electranova v1.0", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Llama-3.3-70B-ArliAI-RPMax-v2": { - id: "Llama-3.3-70B-ArliAI-RPMax-v2", - name: "Llama 3.3 70B ArliAI RPMax v2", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-08", - last_updated: "2025-08-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "qwen-image": { - id: "qwen-image", - name: "Qwen Image", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "Llama-3.3-70B-Cu-Mai-R1": { - id: "Llama-3.3-70B-Cu-Mai-R1", - name: "Llama 3.3 70B Cu Mai R1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "GLM-4.5-Air-Derestricted-Iceblink": { - id: "GLM-4.5-Air-Derestricted-Iceblink", - name: "GLM 4.5 Air Derestricted Iceblink", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 131072, input: 131072, output: 98304 }, - }, - "Llama-3.3-70B-Bigger-Body": { - id: "Llama-3.3-70B-Bigger-Body", - name: "Llama 3.3 70B Bigger Body", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Llama-3.3+(3.1v3.3)-70B-Hanami-x1": { - id: "Llama-3.3+(3.1v3.3)-70B-Hanami-x1", - name: "Llama 3.3+ 70B Hanami x1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "hunyuan-turbos-20250226": { - id: "hunyuan-turbos-20250226", - name: "Hunyuan Turbo S", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-27", - last_updated: "2025-02-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.187, output: 0.374 }, - limit: { context: 24000, input: 24000, output: 8192 }, - }, - "gemini-2.5-flash-preview-09-2025": { - id: "gemini-2.5-flash-preview-09-2025", - name: "Gemini 2.5 Flash Preview (09/2025)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "GLM-4.6-Derestricted-v5": { - id: "GLM-4.6-Derestricted-v5", - name: "GLM 4.6 Derestricted v5", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.5 }, - limit: { context: 131072, input: 131072, output: 8192 }, - }, - "glm-4-plus": { - id: "glm-4-plus", - name: "GLM-4 Plus", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-08-01", - last_updated: "2024-08-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 7.497, output: 7.497 }, - limit: { context: 128000, input: 128000, output: 4096 }, - }, - "Gemma-3-27B-Big-Tiger-v3": { - id: "Gemma-3-27B-Big-Tiger-v3", - name: "Gemma 3 27B Big Tiger v3", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-08", - last_updated: "2025-08-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "brave-research": { - id: "brave-research", - name: "Brave (Research)", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2023-03-02", - last_updated: "2024-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 5 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - hidream: { - id: "hidream", - name: "Hidream", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2024-01-01", - last_updated: "2024-01-01", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "qwen3-max-2026-01-23": { - id: "qwen3-max-2026-01-23", - name: "Qwen3 Max 2026-01-23", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-01-26", - last_updated: "2026-01-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2002, output: 6.001 }, - limit: { context: 256000, input: 256000, output: 32768 }, - }, - "claude-opus-4-1-20250805": { - id: "claude-opus-4-1-20250805", - name: "Claude 4.1 Opus", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 14.994, output: 75.004 }, - limit: { context: 200000, input: 200000, output: 32000 }, - }, - "claude-haiku-4-5-20251001": { - id: "claude-haiku-4-5-20251001", - name: "Claude Haiku 4.5", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5 }, - limit: { context: 200000, input: 200000, output: 64000 }, - }, - "MiniMax-M1": { - id: "MiniMax-M1", - name: "MiniMax M1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-06-16", - last_updated: "2025-06-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1394, output: 1.3328 }, - limit: { context: 1000000, input: 1000000, output: 131072 }, - }, - "gemini-2.5-flash-nothinking": { - id: "gemini-2.5-flash-nothinking", - name: "Gemini 2.5 Flash (No Thinking)", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-06-05", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "exa-research-pro": { - id: "exa-research-pro", - name: "Exa (Research Pro)", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-06-04", - last_updated: "2025-06-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 2.5 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "grok-3-fast-beta": { - id: "grok-3-fast-beta", - name: "Grok 3 Fast Beta", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25 }, - limit: { context: 131072, input: 131072, output: 131072 }, - }, - "claude-opus-4-5-20251101:thinking": { - id: "claude-opus-4-5-20251101:thinking", - name: "Claude 4.5 Opus Thinking", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-11-01", - last_updated: "2025-11-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 4.998, output: 25.007 }, - limit: { context: 200000, input: 200000, output: 32000 }, - }, - "gemini-2.5-pro-exp-03-25": { - id: "gemini-2.5-pro-exp-03-25", - name: "Gemini 2.5 Pro Experimental 0325", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-03-25", - last_updated: "2025-03-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "claude-3-7-sonnet-thinking": { - id: "claude-3-7-sonnet-thinking", - name: "Claude 3.7 Sonnet Thinking", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-02-24", - last_updated: "2025-02-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 200000, input: 200000, output: 16000 }, - }, - "claude-opus-4-thinking:8192": { - id: "claude-opus-4-thinking:8192", - name: "Claude 4 Opus Thinking (8K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 14.994, output: 75.004 }, - limit: { context: 200000, input: 200000, output: 32000 }, - }, - "claude-sonnet-4-thinking:1024": { - id: "claude-sonnet-4-thinking:1024", - name: "Claude 4 Sonnet Thinking (1K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 1000000, input: 1000000, output: 64000 }, - }, - "Llama-3.3-70B-Magnum-v4-SE-Cirrus-x1-SLERP": { - id: "Llama-3.3-70B-Magnum-v4-SE-Cirrus-x1-SLERP", - name: "Llama 3.3 70B Magnum v4 SE Cirrus x1 SLERP", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-26", - last_updated: "2025-07-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "step-r1-v-mini": { - id: "step-r1-v-mini", - name: "Step R1 V Mini", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-08", - last_updated: "2025-04-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 11 }, - limit: { context: 128000, input: 128000, output: 65536 }, - }, - "ernie-x1-32k-preview": { - id: "ernie-x1-32k-preview", - name: "Ernie X1 32k", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.33, output: 1.32 }, - limit: { context: 32000, input: 32000, output: 16384 }, - }, - "Llama-3.3-70B-StrawberryLemonade-v1.0": { - id: "Llama-3.3-70B-StrawberryLemonade-v1.0", - name: "Llama 3.3 70B StrawberryLemonade v1.0", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "KAT-Coder-Exp-72B-1010": { - id: "KAT-Coder-Exp-72B-1010", - name: "KAT Coder Exp 72B 1010", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-10-28", - last_updated: "2025-10-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.2 }, - limit: { context: 128000, input: 128000, output: 32768 }, - }, - "gemini-2.5-pro-preview-03-25": { - id: "gemini-2.5-pro-preview-03-25", - name: "Gemini 2.5 Pro Preview 0325", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-03-25", - last_updated: "2025-03-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "claude-opus-4-thinking:1024": { - id: "claude-opus-4-thinking:1024", - name: "Claude 4 Opus Thinking (1K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 14.994, output: 75.004 }, - limit: { context: 200000, input: 200000, output: 32000 }, - }, - "claude-sonnet-4-20250514": { - id: "claude-sonnet-4-20250514", - name: "Claude 4 Sonnet", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 200000, input: 200000, output: 64000 }, - }, - "Llama-3.3-70B-Progenitor-V3.3": { - id: "Llama-3.3-70B-Progenitor-V3.3", - name: "Llama 3.3 70B Progenitor V3.3", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-26", - last_updated: "2025-07-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Qwen2.5-32B-EVA-v0.2": { - id: "Qwen2.5-32B-EVA-v0.2", - name: "Qwen 2.5 32b EVA", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-09-01", - last_updated: "2024-09-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.493, output: 0.493 }, - limit: { context: 24576, input: 24576, output: 8192 }, - }, - "brave-pro": { - id: "brave-pro", - name: "Brave (Pro)", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2023-03-02", - last_updated: "2024-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 5 }, - limit: { context: 8192, input: 8192, output: 8192 }, - }, - "step-2-16k-exp": { - id: "step-2-16k-exp", - name: "Step-2 16k Exp", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-05", - last_updated: "2024-07-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 7.004, output: 19.992 }, - limit: { context: 16000, input: 16000, output: 8192 }, - }, - "Llama-3.3-70B-Fallen-R1-v1": { - id: "Llama-3.3-70B-Fallen-R1-v1", - name: "Llama 3.3 70B Fallen R1 v1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "claude-sonnet-4-thinking": { - id: "claude-sonnet-4-thinking", - name: "Claude 4 Sonnet Thinking", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-02-24", - last_updated: "2025-02-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 1000000, input: 1000000, output: 64000 }, - }, - "doubao-1.5-pro-256k": { - id: "doubao-1.5-pro-256k", - name: "Doubao 1.5 Pro 256k", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-12", - last_updated: "2025-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.799, output: 1.445 }, - limit: { context: 256000, input: 256000, output: 16384 }, - }, - "claude-3-7-sonnet-20250219": { - id: "claude-3-7-sonnet-20250219", - name: "Claude 3.7 Sonnet", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 200000, input: 200000, output: 16000 }, - }, - "learnlm-1.5-pro-experimental": { - id: "learnlm-1.5-pro-experimental", - name: "Gemini LearnLM Experimental", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-05-14", - last_updated: "2024-05-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3.502, output: 10.506 }, - limit: { context: 32767, input: 32767, output: 8192 }, - }, - "qwen3-coder-30b-a3b-instruct": { - id: "qwen3-coder-30b-a3b-instruct", - name: "Qwen3 Coder 30B A3B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 128000, input: 128000, output: 65536 }, - }, - chroma: { - id: "chroma", - name: "Chroma", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-08-12", - last_updated: "2025-08-12", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "Llama-3.3-70B-Predatorial-Extasy": { - id: "Llama-3.3-70B-Predatorial-Extasy", - name: "Llama 3.3 70B Predatorial Extasy", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Llama-3.3-70B-Aurora-Borealis": { - id: "Llama-3.3-70B-Aurora-Borealis", - name: "Llama 3.3 70B Aurora Borealis", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Llama-3.3-70B-ArliAI-RPMax-v3": { - id: "Llama-3.3-70B-ArliAI-RPMax-v3", - name: "Llama 3.3 70B ArliAI RPMax v3", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "venice-uncensored": { - id: "venice-uncensored", - name: "Venice Uncensored", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-24", - last_updated: "2025-02-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 0.4 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "step-3": { - id: "step-3", - name: "Step-3", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-31", - last_updated: "2025-07-31", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2499, output: 0.6494 }, - limit: { context: 65536, input: 65536, output: 8192 }, - }, - "Llama-3.3-70B-The-Omega-Directive-Unslop-v2.0": { - id: "Llama-3.3-70B-The-Omega-Directive-Unslop-v2.0", - name: "Llama 3.3 70B Omega Directive Unslop v2.0", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "auto-model": { - id: "auto-model", - name: "Auto model", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-06-01", - last_updated: "2024-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 1000000, input: 1000000, output: 1000000 }, - }, - "claude-opus-4-1-thinking:32768": { - id: "claude-opus-4-1-thinking:32768", - name: "Claude 4.1 Opus Thinking (32K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 14.994, output: 75.004 }, - limit: { context: 200000, input: 200000, output: 32000 }, - }, - "Llama-3.3-70B-Shakudo": { - id: "Llama-3.3-70B-Shakudo", - name: "Llama 3.3 70B Shakudo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Baichuan4-Air": { - id: "Baichuan4-Air", - name: "Baichuan 4 Air", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-19", - last_updated: "2025-08-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.157, output: 0.157 }, - limit: { context: 32768, input: 32768, output: 32768 }, - }, - "kimi-thinking-preview": { - id: "kimi-thinking-preview", - name: "Kimi Thinking Preview", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-05-07", - last_updated: "2025-05-07", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 31.46, output: 31.46 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "qwen-turbo": { - id: "qwen-turbo", - name: "Qwen Turbo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-11-01", - last_updated: "2024-11-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.04998, output: 0.2006 }, - limit: { context: 1000000, input: 1000000, output: 8192 }, - }, - "Llama-3.3-70B-Mhnnn-x1": { - id: "Llama-3.3-70B-Mhnnn-x1", - name: "Llama 3.3 70B Mhnnn x1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "claude-opus-4-thinking:32768": { - id: "claude-opus-4-thinking:32768", - name: "Claude 4 Opus Thinking (32K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 14.994, output: 75.004 }, - limit: { context: 200000, input: 200000, output: 32000 }, - }, - "Llama-3.3-70B-Argunaut-1-SFT": { - id: "Llama-3.3-70B-Argunaut-1-SFT", - name: "Llama 3.3 70B Argunaut 1 SFT", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "claude-opus-4-1-thinking:1024": { - id: "claude-opus-4-1-thinking:1024", - name: "Claude 4.1 Opus Thinking (1K)", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 14.994, output: 75.004 }, - limit: { context: 200000, input: 200000, output: 32000 }, - }, - "gemini-2.5-flash-lite": { - id: "gemini-2.5-flash-lite", - name: "Gemini 2.5 Flash Lite", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "phi-4-multimodal-instruct": { - id: "phi-4-multimodal-instruct", - name: "Phi 4 Multimodal", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-26", - last_updated: "2025-07-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.11 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "doubao-seed-2-0-code-preview-260215": { - id: "doubao-seed-2-0-code-preview-260215", - name: "Doubao Seed 2.0 Code Preview", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-02-14", - last_updated: "2026-02-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.782, output: 3.893 }, - limit: { context: 256000, input: 256000, output: 128000 }, - }, - "deepseek-reasoner-cheaper": { - id: "deepseek-reasoner-cheaper", - name: "Deepseek R1 Cheaper", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.7 }, - limit: { context: 128000, input: 128000, output: 65536 }, - }, - "exa-answer": { - id: "exa-answer", - name: "Exa (Answer)", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-06-04", - last_updated: "2025-06-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 2.5 }, - limit: { context: 4096, input: 4096, output: 4096 }, - }, - "v0-1.0-md": { - id: "v0-1.0-md", - name: "v0 1.0 MD", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-04", - last_updated: "2025-07-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, input: 200000, output: 64000 }, - }, - "glm-4.1v-thinking-flash": { - id: "glm-4.1v-thinking-flash", - name: "GLM 4.1V Thinking Flash", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.3 }, - limit: { context: 64000, input: 64000, output: 8192 }, - }, - "azure-o1": { - id: "azure-o1", - name: "Azure o1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-17", - last_updated: "2024-12-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 14.994, output: 59.993 }, - limit: { context: 200000, input: 200000, output: 100000 }, - }, - "GLM-4.5-Air-Derestricted": { - id: "GLM-4.5-Air-Derestricted", - name: "GLM 4.5 Air Derestricted", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 202600, input: 202600, output: 98304 }, - }, - "azure-o3-mini": { - id: "azure-o3-mini", - name: "Azure o3-mini", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-31", - last_updated: "2025-01-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.088, output: 4.3996 }, - limit: { context: 200000, input: 200000, output: 65536 }, - }, - "qwen3.6-max-preview": { - id: "qwen3.6-max-preview", - name: "Qwen3.6 Max Preview", - family: "qwen3.6", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-04-20", - last_updated: "2026-04-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.3, output: 7.8 }, - limit: { context: 245800, output: 65536 }, - }, - "Llama-3.3-70B-Sapphira-0.2": { - id: "Llama-3.3-70B-Sapphira-0.2", - name: "Llama 3.3 70B Sapphira 0.2", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Llama-3.3-70B-Anthrobomination": { - id: "Llama-3.3-70B-Anthrobomination", - name: "Llama 3.3 70B Anthrobomination", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "QwQ-32B-ArliAI-RpR-v1": { - id: "QwQ-32B-ArliAI-RpR-v1", - name: "QwQ 32b Arli V1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 32768, input: 32768, output: 32768 }, - }, - "claude-opus-4-20250514": { - id: "claude-opus-4-20250514", - name: "Claude 4 Opus", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-05-14", - last_updated: "2025-05-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 14.994, output: 75.004 }, - limit: { context: 200000, input: 200000, output: 32000 }, - }, - "yi-lightning": { - id: "yi-lightning", - name: "Yi Lightning", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-10-16", - last_updated: "2024-10-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2006, output: 0.2006 }, - limit: { context: 12000, input: 12000, output: 4096 }, - }, - "Llama-3.3-70B-Electra-R1": { - id: "Llama-3.3-70B-Electra-R1", - name: "Llama 3.3 70B Electra R1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Llama-3.3-70B-Forgotten-Abomination-v5.0": { - id: "Llama-3.3-70B-Forgotten-Abomination-v5.0", - name: "Llama 3.3 70B Forgotten Abomination v5.0", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Llama-3.3-70B-Cirrus-x1": { - id: "Llama-3.3-70B-Cirrus-x1", - name: "Llama 3.3 70B Cirrus x1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "grok-3-mini-beta": { - id: "grok-3-mini-beta", - name: "Grok 3 Mini Beta", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.5 }, - limit: { context: 131072, input: 131072, output: 131072 }, - }, - "auto-model-standard": { - id: "auto-model-standard", - name: "Auto model (Standard)", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-06-01", - last_updated: "2024-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 9.996, output: 19.992 }, - limit: { context: 1000000, input: 1000000, output: 1000000 }, - }, - "claude-sonnet-4-5-20250929-thinking": { - id: "claude-sonnet-4-5-20250929-thinking", - name: "Claude Sonnet 4.5 Thinking", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.994 }, - limit: { context: 1000000, input: 1000000, output: 64000 }, - }, - "v0-1.5-md": { - id: "v0-1.5-md", - name: "v0 1.5 MD", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-04", - last_updated: "2025-07-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, input: 200000, output: 64000 }, - }, - "kimi-k2-instruct-fast": { - id: "kimi-k2-instruct-fast", - name: "Kimi K2 0711 Fast", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-15", - last_updated: "2025-07-15", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 2 }, - limit: { context: 131072, input: 131072, output: 16384 }, - }, - "glm-4-long": { - id: "glm-4-long", - name: "GLM-4 Long", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-08-01", - last_updated: "2024-08-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2006, output: 0.2006 }, - limit: { context: 1000000, input: 1000000, output: 4096 }, - }, - "jamba-large-1.7": { - id: "jamba-large-1.7", - name: "Jamba Large 1.7", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.989, output: 7.99 }, - limit: { context: 256000, input: 256000, output: 4096 }, - }, - "qvq-max": { - id: "qvq-max", - name: "Qwen: QvQ Max", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-28", - last_updated: "2025-03-28", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.4, output: 5.3 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "gemini-2.0-flash-thinking-exp-1219": { - id: "gemini-2.0-flash-thinking-exp-1219", - name: "Gemini 2.0 Flash Thinking 1219", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-19", - last_updated: "2024-12-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1003, output: 0.408 }, - limit: { context: 32767, input: 32767, output: 8192 }, - }, - "gemini-2.0-flash-lite": { - id: "gemini-2.0-flash-lite", - name: "Gemini 2.0 Flash Lite", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.0748, output: 0.306 }, - limit: { context: 1000000, input: 1000000, output: 8192 }, - }, - "azure-gpt-4-turbo": { - id: "azure-gpt-4-turbo", - name: "Azure gpt-4-turbo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2023-11-06", - last_updated: "2024-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 9.996, output: 30.005 }, - limit: { context: 128000, input: 128000, output: 4096 }, - }, - "Baichuan-M2": { - id: "Baichuan-M2", - name: "Baichuan M2 32B Medical", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-19", - last_updated: "2025-08-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 15.73, output: 15.73 }, - limit: { context: 32768, input: 32768, output: 32768 }, - }, - "qwen-long": { - id: "qwen-long", - name: "Qwen Long 10M", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-25", - last_updated: "2025-01-25", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1003, output: 0.408 }, - limit: { context: 10000000, input: 10000000, output: 8192 }, - }, - "sonar-reasoning-pro": { - id: "sonar-reasoning-pro", - name: "Perplexity Reasoning Pro", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.006, output: 7.9985 }, - limit: { context: 127000, input: 127000, output: 128000 }, - }, - "gemini-2.5-flash-preview-05-20:thinking": { - id: "gemini-2.5-flash-preview-05-20:thinking", - name: "Gemini 2.5 Flash 0520 Thinking", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 3.5 }, - limit: { context: 1048000, input: 1048000, output: 65536 }, - }, - "GLM-4.5-Air-Derestricted-Steam-ReExtract": { - id: "GLM-4.5-Air-Derestricted-Steam-ReExtract", - name: "GLM 4.5 Air Derestricted Steam ReExtract", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-12", - last_updated: "2025-12-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 131072, input: 131072, output: 65536 }, - }, - "Llama-3.3-70B-Dark-Ages-v0.1": { - id: "Llama-3.3-70B-Dark-Ages-v0.1", - name: "Llama 3.3 70B Dark Ages v0.1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "Baichuan4-Turbo": { - id: "Baichuan4-Turbo", - name: "Baichuan 4 Turbo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-19", - last_updated: "2025-08-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.42, output: 2.42 }, - limit: { context: 128000, input: 128000, output: 32768 }, - }, - "doubao-1.5-vision-pro-32k": { - id: "doubao-1.5-vision-pro-32k", - name: "Doubao 1.5 Vision Pro 32k", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-22", - last_updated: "2025-01-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.459, output: 1.377 }, - limit: { context: 32000, input: 32000, output: 8192 }, - }, - "alibaba/qwen3.6-flash": { - id: "alibaba/qwen3.6-flash", - name: "Qwen3.6 Flash", - family: "qwen3.6", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-04-17", - last_updated: "2026-04-17", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.19, output: 1.16 }, - limit: { context: 991800, output: 65536 }, - }, - "inflection/inflection-3-pi": { - id: "inflection/inflection-3-pi", - name: "Inflection 3 Pi", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-10-11", - last_updated: "2024-10-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.499, output: 9.996 }, - limit: { context: 8000, input: 8000, output: 4096 }, - }, - "inflection/inflection-3-productivity": { - id: "inflection/inflection-3-productivity", - name: "Inflection 3 Productivity", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-10-11", - last_updated: "2024-10-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.499, output: 9.996 }, - limit: { context: 8000, input: 8000, output: 4096 }, - }, - "essentialai/rnj-1-instruct": { - id: "essentialai/rnj-1-instruct", - name: "RNJ-1 Instruct 8B", - family: "rnj", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-13", - last_updated: "2025-12-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "LLM360/K2-Think": { - id: "LLM360/K2-Think", - name: "K2-Think", - family: "kimi-thinking", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-26", - last_updated: "2025-07-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.17, output: 0.68 }, - limit: { context: 128000, input: 128000, output: 32768 }, - }, - "TEE/kimi-k2.5": { - id: "TEE/kimi-k2.5", - name: "Kimi K2.5 TEE", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-01-29", - last_updated: "2026-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.9 }, - limit: { context: 128000, input: 128000, output: 65535 }, - }, - "TEE/glm-4.7": { - id: "TEE/glm-4.7", - name: "GLM 4.7 TEE", - family: "glm", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-01-29", - last_updated: "2026-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.85, output: 3.3 }, - limit: { context: 131000, input: 131000, output: 65535 }, - }, - "TEE/qwen3.5-397b-a17b": { - id: "TEE/qwen3.5-397b-a17b", - name: "Qwen3.5 397B A17B TEE", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-02-28", - last_updated: "2026-02-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 3.6 }, - limit: { context: 258048, input: 258048, output: 65536 }, - }, - "TEE/glm-5": { - id: "TEE/glm-5", - name: "GLM 5 TEE", - family: "glm", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 3.5 }, - limit: { context: 203000, input: 203000, output: 65535 }, - }, - "TEE/qwen2.5-vl-72b-instruct": { - id: "TEE/qwen2.5-vl-72b-instruct", - name: "Qwen2.5 VL 72B TEE", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-01", - last_updated: "2025-02-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7, output: 0.7 }, - limit: { context: 65536, input: 65536, output: 8192 }, - }, - "TEE/minimax-m2.1": { - id: "TEE/minimax-m2.1", - name: "MiniMax M2.1 TEE", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 200000, input: 200000, output: 131072 }, - }, - "TEE/qwen3-30b-a3b-instruct-2507": { - id: "TEE/qwen3-30b-a3b-instruct-2507", - name: "Qwen3 30B A3B Instruct 2507 TEE", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-29", - last_updated: "2025-07-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.44999999999999996 }, - limit: { context: 262000, input: 262000, output: 32768 }, - }, - "TEE/deepseek-v3.1": { - id: "TEE/deepseek-v3.1", - name: "DeepSeek V3.1 TEE", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 2.5 }, - limit: { context: 164000, input: 164000, output: 8192 }, - }, - "TEE/llama3-3-70b": { - id: "TEE/llama3-3-70b", - name: "Llama 3.3 70B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-03", - last_updated: "2025-07-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 2 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "TEE/glm-4.6": { - id: "TEE/glm-4.6", - name: "GLM 4.6 TEE", - family: "glm", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 2 }, - limit: { context: 203000, input: 203000, output: 65535 }, - }, - "TEE/kimi-k2.5-thinking": { - id: "TEE/kimi-k2.5-thinking", - name: "Kimi K2.5 Thinking TEE", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2026-01-29", - last_updated: "2026-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.9 }, - limit: { context: 128000, input: 128000, output: 65535 }, - }, - "TEE/gemma-3-27b-it": { - id: "TEE/gemma-3-27b-it", - name: "Gemma 3 27B TEE", - family: "gemma", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-10", - last_updated: "2025-03-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 131072, input: 131072, output: 8192 }, - }, - "TEE/deepseek-v3.2": { - id: "TEE/deepseek-v3.2", - name: "DeepSeek V3.2 TEE", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1 }, - limit: { context: 164000, input: 164000, output: 65536 }, - }, - "TEE/gpt-oss-20b": { - id: "TEE/gpt-oss-20b", - name: "GPT-OSS 20B TEE", - family: "gpt-oss", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 131072, input: 131072, output: 8192 }, - }, - "TEE/qwen3-coder": { - id: "TEE/qwen3-coder", - name: "Qwen3 Coder 480B TEE", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5, output: 2 }, - limit: { context: 128000, input: 128000, output: 32768 }, - }, - "TEE/glm-4.7-flash": { - id: "TEE/glm-4.7-flash", - name: "GLM 4.7 Flash TEE", - family: "glm-flash", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.5 }, - limit: { context: 203000, input: 203000, output: 65535 }, - }, - "TEE/gpt-oss-120b": { - id: "TEE/gpt-oss-120b", - name: "GPT-OSS 120B TEE", - family: "gpt-oss", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 2 }, - limit: { context: 131072, input: 131072, output: 16384 }, - }, - "TEE/deepseek-r1-0528": { - id: "TEE/deepseek-r1-0528", - name: "DeepSeek R1 0528 TEE", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 2 }, - limit: { context: 128000, input: 128000, output: 65536 }, - }, - "TEE/kimi-k2-thinking": { - id: "TEE/kimi-k2-thinking", - name: "Kimi K2 Thinking TEE", - family: "kimi-thinking", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 2 }, - limit: { context: 128000, input: 128000, output: 65535 }, - }, - "CrucibleLab/L3.3-70B-Loki-V2.0": { - id: "CrucibleLab/L3.3-70B-Loki-V2.0", - name: "L3.3 70B Loki v2.0", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-01-22", - last_updated: "2026-01-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "deepseek/deepseek-v3.2:thinking": { - id: "deepseek/deepseek-v3.2:thinking", - name: "DeepSeek V3.2 Thinking", - family: "deepseek", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27999999999999997, output: 0.42000000000000004 }, - limit: { context: 163000, input: 163000, output: 65536 }, - }, - "deepseek/deepseek-prover-v2-671b": { - id: "deepseek/deepseek-prover-v2-671b", - name: "DeepSeek Prover v2 671B", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-30", - last_updated: "2025-04-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 2.5 }, - limit: { context: 160000, input: 160000, output: 16384 }, - }, - "deepseek/deepseek-v3.2-speciale": { - id: "deepseek/deepseek-v3.2-speciale", - name: "DeepSeek V3.2 Speciale", - family: "deepseek", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-12-02", - last_updated: "2025-12-02", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27999999999999997, output: 0.42000000000000004 }, - limit: { context: 163000, input: 163000, output: 65536 }, - }, - "deepseek/deepseek-v3.2": { - id: "deepseek/deepseek-v3.2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27999999999999997, output: 0.42000000000000004 }, - limit: { context: 163000, input: 163000, output: 65536 }, - }, - "Doctor-Shotgun/MS3.2-24B-Magnum-Diamond": { - id: "Doctor-Shotgun/MS3.2-24B-Magnum-Diamond", - name: "MS3.2 24B Magnum Diamond", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-11-24", - last_updated: "2025-11-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 32768 }, - }, - "NeverSleep/Llama-3-Lumimaid-70B-v0.1": { - id: "NeverSleep/Llama-3-Lumimaid-70B-v0.1", - name: "Lumimaid 70b", - family: "llama", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.006, output: 2.006 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "NeverSleep/Lumimaid-v0.2-70B": { - id: "NeverSleep/Lumimaid-v0.2-70B", - name: "Lumimaid v0.2", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 1.5 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "Steelskull/L3.3-Cu-Mai-R1-70b": { - id: "Steelskull/L3.3-Cu-Mai-R1-70b", - name: "Llama 3.3 70B Cu Mai", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "Steelskull/L3.3-Nevoria-R1-70b": { - id: "Steelskull/L3.3-Nevoria-R1-70b", - name: "Steelskull Nevoria R1 70b", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "Steelskull/L3.3-MS-Evayale-70B": { - id: "Steelskull/L3.3-MS-Evayale-70B", - name: "Evayale 70b ", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "Steelskull/L3.3-Electra-R1-70b": { - id: "Steelskull/L3.3-Electra-R1-70b", - name: "Steelskull Electra R1 70b", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.69989, output: 0.69989 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "Steelskull/L3.3-MS-Nevoria-70b": { - id: "Steelskull/L3.3-MS-Nevoria-70b", - name: "Steelskull Nevoria 70b", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "Steelskull/L3.3-MS-Evalebis-70b": { - id: "Steelskull/L3.3-MS-Evalebis-70b", - name: "MS Evalebis 70b", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "miromind-ai/mirothinker-v1.5-235b": { - id: "miromind-ai/mirothinker-v1.5-235b", - name: "MiroThinker v1.5 235B", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-01-07", - last_updated: "2026-01-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 32768, input: 32768, output: 4000 }, - }, - "pamanseau/OpenReasoning-Nemotron-32B": { - id: "pamanseau/OpenReasoning-Nemotron-32B", - name: "OpenReasoning Nemotron 32B", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 32768, input: 32768, output: 65536 }, - }, - "arcee-ai/trinity-mini": { - id: "arcee-ai/trinity-mini", - name: "Trinity Mini", - family: "trinity-mini", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.045000000000000005, output: 0.15 }, - limit: { context: 131072, input: 131072, output: 8192 }, - }, - "arcee-ai/trinity-large": { - id: "arcee-ai/trinity-large", - name: "Trinity Large", - family: "trinity", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1 }, - limit: { context: 131072, input: 131072, output: 8192 }, - }, - "cognitivecomputations/dolphin-2.9.2-qwen2-72b": { - id: "cognitivecomputations/dolphin-2.9.2-qwen2-72b", - name: "Dolphin 72b", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-27", - last_updated: "2025-02-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.306 }, - limit: { context: 8192, input: 8192, output: 4096 }, - }, - "deepcogito/cogito-v1-preview-qwen-32B": { - id: "deepcogito/cogito-v1-preview-qwen-32B", - name: "Cogito v1 Preview Qwen 32B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-05-10", - last_updated: "2025-05-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.7999999999999998, output: 1.7999999999999998 }, - limit: { context: 128000, input: 128000, output: 32768 }, - }, - "deepcogito/cogito-v2.1-671b": { - id: "deepcogito/cogito-v2.1-671b", - name: "Cogito v2.1 671B MoE", - family: "cogito", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 1.25 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "Salesforce/Llama-xLAM-2-70b-fc-r": { - id: "Salesforce/Llama-xLAM-2-70b-fc-r", - name: "Llama-xLAM-2 70B fc-r", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-13", - last_updated: "2025-04-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 2.5 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "NousResearch 2/hermes-4-405b:thinking": { - id: "NousResearch 2/hermes-4-405b:thinking", - name: "Hermes 4 Large (Thinking)", - family: "nousresearch", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "NousResearch 2/DeepHermes-3-Mistral-24B-Preview": { - id: "NousResearch 2/DeepHermes-3-Mistral-24B-Preview", - name: "DeepHermes-3 Mistral 24B (Preview)", - family: "nousresearch", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-05-10", - last_updated: "2025-05-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.3 }, - limit: { context: 128000, input: 128000, output: 32768 }, - }, - "NousResearch 2/Hermes-4-70B:thinking": { - id: "NousResearch 2/Hermes-4-70B:thinking", - name: "Hermes 4 (Thinking)", - family: "nousresearch", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-17", - last_updated: "2025-09-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2006, output: 0.39949999999999997 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "NousResearch 2/hermes-4-405b": { - id: "NousResearch 2/hermes-4-405b", - name: "Hermes 4 Large", - family: "nousresearch", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-08-26", - last_updated: "2025-08-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "NousResearch 2/hermes-3-llama-3.1-70b": { - id: "NousResearch 2/hermes-3-llama-3.1-70b", - name: "Hermes 3 70B", - family: "nousresearch", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-01-07", - last_updated: "2026-01-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.408, output: 0.408 }, - limit: { context: 65536, input: 65536, output: 8192 }, - }, - "NousResearch 2/hermes-4-70b": { - id: "NousResearch 2/hermes-4-70b", - name: "Hermes 4 Medium", - family: "nousresearch", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-03", - last_updated: "2025-07-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2006, output: 0.39949999999999997 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "soob3123/Veiled-Calla-12B": { - id: "soob3123/Veiled-Calla-12B", - name: "Veiled Calla 12B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-13", - last_updated: "2025-04-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.3 }, - limit: { context: 32768, input: 32768, output: 8192 }, - }, - "soob3123/GrayLine-Qwen3-8B": { - id: "soob3123/GrayLine-Qwen3-8B", - name: "Grayline Qwen3 8B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.3 }, - limit: { context: 16384, input: 16384, output: 32768 }, - }, - "soob3123/amoral-gemma3-27B-v2": { - id: "soob3123/amoral-gemma3-27B-v2", - name: "Amoral Gemma3 27B v2", - family: "gemma", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-05-23", - last_updated: "2025-05-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.3 }, - limit: { context: 32768, input: 32768, output: 8192 }, - }, - "nex-agi/deepseek-v3.1-nex-n1": { - id: "nex-agi/deepseek-v3.1-nex-n1", - name: "DeepSeek V3.1 Nex N1", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-10", - last_updated: "2025-12-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27999999999999997, output: 0.42000000000000004 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "Envoid/Llama-3.05-NT-Storybreaker-Ministral-70B": { - id: "Envoid/Llama-3.05-NT-Storybreaker-Ministral-70B", - name: "Llama 3.05 Storybreaker Ministral 70b", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "Envoid/Llama-3.05-Nemotron-Tenyxchat-Storybreaker-70B": { - id: "Envoid/Llama-3.05-Nemotron-Tenyxchat-Storybreaker-70B", - name: "Nemotron Tenyxchat Storybreaker 70b", - family: "nemotron", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "anthracite-org/magnum-v4-72b": { - id: "anthracite-org/magnum-v4-72b", - name: "Magnum v4 72B", - family: "llama", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.006, output: 2.992 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "anthracite-org/magnum-v2-72b": { - id: "anthracite-org/magnum-v2-72b", - name: "Magnum V2 72B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.006, output: 2.992 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "ReadyArt/MS3.2-The-Omega-Directive-24B-Unslop-v2.0": { - id: "ReadyArt/MS3.2-The-Omega-Directive-24B-Unslop-v2.0", - name: "Omega Directive 24B Unslop v2.0", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-08", - last_updated: "2025-12-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 0.5 }, - limit: { context: 16384, input: 16384, output: 32768 }, - }, - "ReadyArt/The-Omega-Abomination-L-70B-v1.0": { - id: "ReadyArt/The-Omega-Abomination-L-70B-v1.0", - name: "The Omega Abomination V1", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7, output: 0.95 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "undi95/remm-slerp-l2-13b": { - id: "undi95/remm-slerp-l2-13b", - name: "ReMM SLERP 13B", - family: "llama", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7989999999999999, output: 1.2069999999999999 }, - limit: { context: 6144, input: 6144, output: 4096 }, - }, - "MarinaraSpaghetti/NemoMix-Unleashed-12B": { - id: "MarinaraSpaghetti/NemoMix-Unleashed-12B", - name: "NemoMix 12B Unleashed", - family: "mistral-nemo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 32768, input: 32768, output: 8192 }, - }, - "allenai/molmo-2-8b": { - id: "allenai/molmo-2-8b", - name: "Molmo 2 8B", - family: "allenai", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-02-14", - last_updated: "2026-02-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 36864, input: 36864, output: 36864 }, - }, - "allenai/olmo-3.1-32b-instruct": { - id: "allenai/olmo-3.1-32b-instruct", - name: "Olmo 3.1 32B Instruct", - family: "allenai", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-01-25", - last_updated: "2026-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 65536, input: 65536, output: 8192 }, - }, - "allenai/olmo-3.1-32b-think": { - id: "allenai/olmo-3.1-32b-think", - name: "Olmo 3.1 32B Think", - family: "allenai", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2026-01-25", - last_updated: "2026-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.5 }, - limit: { context: 65536, input: 65536, output: 8192 }, - }, - "allenai/olmo-3-32b-think": { - id: "allenai/olmo-3-32b-think", - name: "Olmo 3 32B Think", - family: "allenai", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-11-01", - last_updated: "2025-11-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.44999999999999996 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "stepfun-ai/step-3.5-flash:thinking": { - id: "stepfun-ai/step-3.5-flash:thinking", - name: "Step 3.5 Flash Thinking", - family: "step", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2026-02-02", - last_updated: "2026-02-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5 }, - limit: { context: 256000, input: 256000, output: 256000 }, - }, - "stepfun-ai/step-3.5-flash": { - id: "stepfun-ai/step-3.5-flash", - name: "Step 3.5 Flash", - family: "step", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2026-02-02", - last_updated: "2026-02-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5 }, - limit: { context: 256000, input: 256000, output: 256000 }, - }, - "zai-org/glm-4.7": { - id: "zai-org/glm-4.7", - name: "GLM 4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-01-29", - last_updated: "2026-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.8 }, - limit: { context: 200000, input: 200000, output: 128000 }, - }, - "zai-org/glm-5": { - id: "zai-org/glm-5", - name: "GLM 5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 2.55 }, - limit: { context: 200000, input: 200000, output: 128000 }, - }, - "zai-org/glm-5.1": { - id: "zai-org/glm-5.1", - name: "GLM 5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-03-27", - last_updated: "2026-03-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 2.55 }, - limit: { context: 200000, input: 200000, output: 131072 }, - }, - "zai-org/glm-5.1:thinking": { - id: "zai-org/glm-5.1:thinking", - name: "GLM 5.1 Thinking", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-03-27", - last_updated: "2026-03-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 2.55 }, - limit: { context: 200000, input: 200000, output: 131072 }, - }, - "zai-org/glm-5:thinking": { - id: "zai-org/glm-5:thinking", - name: "GLM 5 Thinking", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 2.55 }, - limit: { context: 200000, input: 200000, output: 128000 }, - }, - "zai-org/glm-4.7-flash": { - id: "zai-org/glm-4.7-flash", - name: "GLM 4.7 Flash", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.4 }, - limit: { context: 200000, input: 200000, output: 128000 }, - }, - "featherless-ai/Qwerky-72B": { - id: "featherless-ai/Qwerky-72B", - name: "Qwerky 72B", - family: "qwerky", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-20", - last_updated: "2025-03-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 0.5 }, - limit: { context: 32000, input: 32000, output: 8192 }, - }, - "mlabonne/NeuralDaredevil-8B-abliterated": { - id: "mlabonne/NeuralDaredevil-8B-abliterated", - name: "Neural Daredevil 8B abliterated", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.44, output: 0.44 }, - limit: { context: 8192, input: 8192, output: 8192 }, - }, - "raifle/sorcererlm-8x22b": { - id: "raifle/sorcererlm-8x22b", - name: "SorcererLM 8x22B", - family: "mixtral", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 4.505, output: 4.505 }, - limit: { context: 16000, input: 16000, output: 8192 }, - }, - "mistralai/mixtral-8x7b-instruct-v0.1": { - id: "mistralai/mixtral-8x7b-instruct-v0.1", - name: "Mixtral 8x7B", - family: "mixtral", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 0.27 }, - limit: { context: 32768, input: 32768, output: 32768 }, - }, - "mistralai/mistral-saba": { - id: "mistralai/mistral-saba", - name: "Mistral Saba", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1989, output: 0.595 }, - limit: { context: 32000, input: 32000, output: 32768 }, - }, - "mistralai/mistral-large-3-675b-instruct-2512": { - id: "mistralai/mistral-large-3-675b-instruct-2512", - name: "Mistral Large 3 675B", - family: "mistral-large", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-02", - last_updated: "2025-12-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 3 }, - limit: { context: 262144, input: 262144, output: 256000 }, - }, - "mistralai/devstral-2-123b-instruct-2512": { - id: "mistralai/devstral-2-123b-instruct-2512", - name: "Devstral 2 123B", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-09", - last_updated: "2025-12-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.4 }, - limit: { context: 262144, input: 262144, output: 65536 }, - }, - "mistralai/codestral-2508": { - id: "mistralai/codestral-2508", - name: "Codestral 2508", - family: "codestral", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-01", - last_updated: "2025-08-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.8999999999999999 }, - limit: { context: 256000, input: 256000, output: 32768 }, - }, - "mistralai/ministral-14b-instruct-2512": { - id: "mistralai/ministral-14b-instruct-2512", - name: "Ministral 3 14B", - family: "ministral", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-02", - last_updated: "2025-12-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 262144, input: 262144, output: 32768 }, - }, - "mistralai/mistral-tiny": { - id: "mistralai/mistral-tiny", - name: "Mistral Tiny", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2023-12-11", - last_updated: "2024-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25499999999999995, output: 0.25499999999999995 }, - limit: { context: 32000, input: 32000, output: 8192 }, - }, - "mistralai/ministral-8b-2512": { - id: "mistralai/ministral-8b-2512", - name: "Ministral 8B", - family: "ministral", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-04", - last_updated: "2025-12-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 262144, input: 262144, output: 32768 }, - }, - "mistralai/mixtral-8x22b-instruct-v0.1": { - id: "mistralai/mixtral-8x22b-instruct-v0.1", - name: "Mixtral 8x22B", - family: "mixtral", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8999999999999999, output: 0.8999999999999999 }, - limit: { context: 65536, input: 65536, output: 32768 }, - }, - "mistralai/mistral-medium-3.1": { - id: "mistralai/mistral-medium-3.1", - name: "Mistral Medium 3.1", - family: "mistral-medium", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 131072, input: 131072, output: 32768 }, - }, - "mistralai/ministral-3b-2512": { - id: "mistralai/ministral-3b-2512", - name: "Ministral 3B", - family: "ministral", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-04", - last_updated: "2025-12-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 131072, input: 131072, output: 32768 }, - }, - "mistralai/Mistral-Nemo-Instruct-2407": { - id: "mistralai/Mistral-Nemo-Instruct-2407", - name: "Mistral Nemo", - family: "mistral-nemo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1003, output: 0.1207 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "mistralai/mistral-medium-3": { - id: "mistralai/mistral-medium-3", - name: "Mistral Medium 3", - family: "mistral-medium", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 131072, input: 131072, output: 32768 }, - }, - "mistralai/mistral-7b-instruct": { - id: "mistralai/mistral-7b-instruct", - name: "Mistral 7B Instruct", - family: "mistral", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-05-27", - last_updated: "2024-05-27", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.0544, output: 0.0544 }, - limit: { context: 32768, input: 32768, output: 8192 }, - }, - "mistralai/Devstral-Small-2505": { - id: "mistralai/Devstral-Small-2505", - name: "Mistral Devstral Small 2505", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-02", - last_updated: "2025-08-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.060000000000000005, output: 0.060000000000000005 }, - limit: { context: 32768, input: 32768, output: 8192 }, - }, - "mistralai/mistral-small-creative": { - id: "mistralai/mistral-small-creative", - name: "Mistral Small Creative", - family: "mistral-small", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-12-16", - last_updated: "2025-12-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 32768, input: 32768, output: 32768 }, - }, - "mistralai/mistral-large": { - id: "mistralai/mistral-large", - name: "Mistral Large 2411", - family: "mistral-large", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-02-26", - last_updated: "2024-02-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.006, output: 6.001 }, - limit: { context: 128000, input: 128000, output: 256000 }, - }, - "mistralai/ministral-14b-2512": { - id: "mistralai/ministral-14b-2512", - name: "Ministral 14B", - family: "ministral", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-04", - last_updated: "2025-12-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 262144, input: 262144, output: 32768 }, - }, - "shisa-ai/shisa-v2.1-llama3.3-70b": { - id: "shisa-ai/shisa-v2.1-llama3.3-70b", - name: "Shisa V2.1 Llama 3.3 70B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 0.5 }, - limit: { context: 32768, input: 32768, output: 4096 }, - }, - "shisa-ai/shisa-v2-llama3.3-70b": { - id: "shisa-ai/shisa-v2-llama3.3-70b", - name: "Shisa V2 Llama 3.3 70B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-26", - last_updated: "2025-07-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 0.5 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "meta-llama/llama-3.3-70b-instruct": { - id: "meta-llama/llama-3.3-70b-instruct", - name: "Llama 3.3 70b Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-02-27", - last_updated: "2025-02-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.23 }, - limit: { context: 131072, input: 131072, output: 16384 }, - }, - "meta-llama/llama-4-scout": { - id: "meta-llama/llama-4-scout", - name: "Llama 4 Scout", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.085, output: 0.46 }, - limit: { context: 328000, input: 328000, output: 65536 }, - }, - "meta-llama/llama-4-maverick": { - id: "meta-llama/llama-4-maverick", - name: "Llama 4 Maverick", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18000000000000002, output: 0.8 }, - limit: { context: 1048576, input: 1048576, output: 65536 }, - }, - "meta-llama/llama-3.2-90b-vision-instruct": { - id: "meta-llama/llama-3.2-90b-vision-instruct", - name: "Llama 3.2 Medium", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.9009999999999999, output: 0.9009999999999999 }, - limit: { context: 131072, input: 131072, output: 16384 }, - }, - "meta-llama/llama-3.2-3b-instruct": { - id: "meta-llama/llama-3.2-3b-instruct", - name: "Llama 3.2 3b Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-09-25", - last_updated: "2024-09-25", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.0306, output: 0.0493 }, - limit: { context: 131072, input: 131072, output: 8192 }, - }, - "meta-llama/llama-3.1-8b-instruct": { - id: "meta-llama/llama-3.1-8b-instruct", - name: "Llama 3.1 8b Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.0544, output: 0.0544 }, - limit: { context: 131072, input: 131072, output: 16384 }, - }, - "GalrionSoftworks/MN-LooseCannon-12B-v1": { - id: "GalrionSoftworks/MN-LooseCannon-12B-v1", - name: "MN-LooseCannon-12B-v1", - family: "mistral-nemo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "baseten/Kimi-K2-Instruct-FP4": { - id: "baseten/Kimi-K2-Instruct-FP4", - name: "Kimi K2 0711 Instruct FP4", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-11", - last_updated: "2025-07-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 2 }, - limit: { context: 128000, input: 128000, output: 131072 }, - }, - "Gryphe/MythoMax-L2-13b": { - id: "Gryphe/MythoMax-L2-13b", - name: "MythoMax 13B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-08", - last_updated: "2025-08-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1003, output: 0.1003 }, - limit: { context: 4000, input: 4000, output: 4096 }, - }, - "x-ai/grok-4-fast:thinking": { - id: "x-ai/grok-4-fast:thinking", - name: "Grok 4 Fast Thinking", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5 }, - limit: { context: 2000000, input: 2000000, output: 131072 }, - }, - "x-ai/grok-4-07-09": { - id: "x-ai/grok-4-07-09", - name: "Grok 4", - family: "grok", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 256000, input: 256000, output: 131072 }, - }, - "x-ai/grok-4-fast": { - id: "x-ai/grok-4-fast", - name: "Grok 4 Fast", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-09-20", - last_updated: "2025-09-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5 }, - limit: { context: 2000000, input: 2000000, output: 131072 }, - }, - "x-ai/grok-code-fast-1": { - id: "x-ai/grok-code-fast-1", - name: "Grok Code Fast 1", - family: "grok", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-08-28", - last_updated: "2025-08-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.5 }, - limit: { context: 256000, input: 256000, output: 131072 }, - }, - "x-ai/grok-4.1-fast": { - id: "x-ai/grok-4.1-fast", - name: "Grok 4.1 Fast", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-11-20", - last_updated: "2025-11-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5 }, - limit: { context: 2000000, input: 2000000, output: 131072 }, - }, - "x-ai/grok-4.1-fast-reasoning": { - id: "x-ai/grok-4.1-fast-reasoning", - name: "Grok 4.1 Fast Reasoning", - family: "grok", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-11-20", - last_updated: "2025-11-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5 }, - limit: { context: 2000000, input: 2000000, output: 131072 }, - }, - "tencent/Hunyuan-MT-7B": { - id: "tencent/Hunyuan-MT-7B", - name: "Hunyuan MT 7B", - family: "hunyuan", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-18", - last_updated: "2025-09-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 20 }, - limit: { context: 8192, input: 8192, output: 8192 }, - }, - "microsoft/wizardlm-2-8x22b": { - id: "microsoft/wizardlm-2-8x22b", - name: "WizardLM-2 8x22B", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 65536, input: 65536, output: 8192 }, - }, - "microsoft/MAI-DS-R1-FP8": { - id: "microsoft/MAI-DS-R1-FP8", - name: "Microsoft DeepSeek R1", - family: "deepseek", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.3 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "cohere/command-r": { - id: "cohere/command-r", - name: "Cohere: Command R", - family: "command-r", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-03-11", - last_updated: "2024-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.476, output: 1.428 }, - limit: { context: 128000, input: 128000, output: 4096 }, - }, - "cohere/command-r-plus-08-2024": { - id: "cohere/command-r-plus-08-2024", - name: "Cohere: Command R+", - family: "command-r", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - release_date: "2024-08-30", - last_updated: "2024-08-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.856, output: 14.246 }, - limit: { context: 128000, input: 128000, output: 4096 }, - }, - "chutesai/Mistral-Small-3.2-24B-Instruct-2506": { - id: "chutesai/Mistral-Small-3.2-24B-Instruct-2506", - name: "Mistral Small 3.2 24b Instruct", - family: "chutesai", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.4 }, - limit: { context: 128000, input: 128000, output: 131072 }, - }, - "nvidia/Llama-3.1-Nemotron-Ultra-253B-v1": { - id: "nvidia/Llama-3.1-Nemotron-Ultra-253B-v1", - name: "Nvidia Nemotron Ultra 253B", - family: "nemotron", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-03", - last_updated: "2025-07-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 0.8 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "nvidia/nemotron-3-nano-30b-a3b": { - id: "nvidia/nemotron-3-nano-30b-a3b", - name: "Nvidia Nemotron 3 Nano 30B", - family: "nemotron", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-15", - last_updated: "2025-12-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.17, output: 0.68 }, - limit: { context: 256000, input: 256000, output: 262144 }, - }, - "nvidia/nvidia-nemotron-nano-9b-v2": { - id: "nvidia/nvidia-nemotron-nano-9b-v2", - name: "Nvidia Nemotron Nano 9B v2", - family: "nemotron", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-18", - last_updated: "2025-08-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.17, output: 0.68 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "nvidia/Llama-3.1-Nemotron-70B-Instruct-HF": { - id: "nvidia/Llama-3.1-Nemotron-70B-Instruct-HF", - name: "Nvidia Nemotron 70b", - family: "nemotron", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.357, output: 0.408 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "nvidia/Llama-3.3-Nemotron-Super-49B-v1": { - id: "nvidia/Llama-3.3-Nemotron-Super-49B-v1", - name: "Nvidia Nemotron Super 49B", - family: "nemotron", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-08", - last_updated: "2025-08-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "nvidia/Llama-3_3-Nemotron-Super-49B-v1_5": { - id: "nvidia/Llama-3_3-Nemotron-Super-49B-v1_5", - name: "Nvidia Nemotron Super 49B v1.5", - family: "nemotron", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-08", - last_updated: "2025-08-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.25 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "TheDrummer 2/Anubis-70B-v1": { - id: "TheDrummer 2/Anubis-70B-v1", - name: "Anubis 70B v1", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.31, output: 0.31 }, - limit: { context: 65536, input: 65536, output: 16384 }, - }, - "TheDrummer 2/Cydonia-24B-v4.3": { - id: "TheDrummer 2/Cydonia-24B-v4.3", - name: "The Drummer Cydonia 24B v4.3", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-25", - last_updated: "2025-12-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1003, output: 0.1207 }, - limit: { context: 32768, input: 32768, output: 32768 }, - }, - "TheDrummer 2/Magidonia-24B-v4.3": { - id: "TheDrummer 2/Magidonia-24B-v4.3", - name: "The Drummer Magidonia 24B v4.3", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-25", - last_updated: "2025-12-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1003, output: 0.1207 }, - limit: { context: 32768, input: 32768, output: 32768 }, - }, - "TheDrummer 2/Cydonia-24B-v4": { - id: "TheDrummer 2/Cydonia-24B-v4", - name: "The Drummer Cydonia 24B v4", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-22", - last_updated: "2025-07-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2006, output: 0.2414 }, - limit: { context: 16384, input: 16384, output: 32768 }, - }, - "TheDrummer 2/Anubis-70B-v1.1": { - id: "TheDrummer 2/Anubis-70B-v1.1", - name: "Anubis 70B v1.1", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.31, output: 0.31 }, - limit: { context: 131072, input: 131072, output: 16384 }, - }, - "TheDrummer 2/Rocinante-12B-v1.1": { - id: "TheDrummer 2/Rocinante-12B-v1.1", - name: "Rocinante 12b", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.408, output: 0.595 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "TheDrummer 2/Cydonia-24B-v4.1": { - id: "TheDrummer 2/Cydonia-24B-v4.1", - name: "The Drummer Cydonia 24B v4.1", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-19", - last_updated: "2025-08-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1003, output: 0.1207 }, - limit: { context: 16384, input: 16384, output: 32768 }, - }, - "TheDrummer 2/UnslopNemo-12B-v4.1": { - id: "TheDrummer 2/UnslopNemo-12B-v4.1", - name: "UnslopNemo 12b v4", - family: "llama", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 32768, input: 32768, output: 8192 }, - }, - "TheDrummer 2/Cydonia-24B-v2": { - id: "TheDrummer 2/Cydonia-24B-v2", - name: "The Drummer Cydonia 24B v2", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1003, output: 0.1207 }, - limit: { context: 16384, input: 16384, output: 32768 }, - }, - "TheDrummer 2/skyfall-36b-v2": { - id: "TheDrummer 2/skyfall-36b-v2", - name: "TheDrummer Skyfall 36B V2", - family: "llama", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-10", - last_updated: "2025-03-10", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 64000, input: 64000, output: 32768 }, - }, - "deepseek-ai/DeepSeek-V3.1:thinking": { - id: "deepseek-ai/DeepSeek-V3.1:thinking", - name: "DeepSeek V3.1 Thinking", - family: "deepseek-thinking", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.7 }, - limit: { context: 128000, input: 128000, output: 65536 }, - }, - "deepseek-ai/DeepSeek-V3.1": { - id: "deepseek-ai/DeepSeek-V3.1", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-26", - last_updated: "2025-07-26", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.7 }, - limit: { context: 128000, input: 128000, output: 65536 }, - }, - "deepseek-ai/DeepSeek-V3.1-Terminus:thinking": { - id: "deepseek-ai/DeepSeek-V3.1-Terminus:thinking", - name: "DeepSeek V3.1 Terminus (Thinking)", - family: "deepseek-thinking", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-09-22", - last_updated: "2025-09-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.7 }, - limit: { context: 128000, input: 128000, output: 65536 }, - }, - "deepseek-ai/deepseek-v3.2-exp-thinking": { - id: "deepseek-ai/deepseek-v3.2-exp-thinking", - name: "DeepSeek V3.2 Exp Thinking", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27999999999999997, output: 0.42000000000000004 }, - limit: { context: 163840, input: 163840, output: 65536 }, - }, - "deepseek-ai/deepseek-v3.2-exp": { - id: "deepseek-ai/deepseek-v3.2-exp", - name: "DeepSeek V3.2 Exp", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27999999999999997, output: 0.42000000000000004 }, - limit: { context: 163840, input: 163840, output: 65536 }, - }, - "deepseek-ai/DeepSeek-R1-0528": { - id: "deepseek-ai/DeepSeek-R1-0528", - name: "DeepSeek R1 0528", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.7 }, - limit: { context: 128000, input: 128000, output: 163840 }, - }, - "deepseek-ai/DeepSeek-V3.1-Terminus": { - id: "deepseek-ai/DeepSeek-V3.1-Terminus", - name: "DeepSeek V3.1 Terminus", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-08-02", - last_updated: "2025-08-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.7 }, - limit: { context: 128000, input: 128000, output: 65536 }, - }, - "openai/gpt-5.1-codex-max": { - id: "openai/gpt-5.1-codex-max", - name: "GPT 5.1 Codex Max", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 20 }, - limit: { context: 400000, input: 400000, output: 128000 }, - }, - "openai/gpt-5.2-chat": { - id: "openai/gpt-5.2-chat", - name: "GPT 5.2 Chat", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2026-01-01", - last_updated: "2026-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 400000, input: 400000, output: 16384 }, - }, - "openai/gpt-4o-mini-search-preview": { - id: "openai/gpt-4o-mini-search-preview", - name: "GPT-4o mini Search Preview", - family: "gpt-mini", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.088, output: 0.35 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "openai/chatgpt-4o-latest": { - id: "openai/chatgpt-4o-latest", - name: "ChatGPT 4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2024-05-13", - last_updated: "2024-05-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 4.998, output: 14.993999999999998 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "openai/gpt-5.2-pro": { - id: "openai/gpt-5.2-pro", - name: "GPT 5.2 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-01-01", - last_updated: "2026-01-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 21, output: 168 }, - limit: { context: 400000, input: 400000, output: 128000 }, - }, - "openai/gpt-5-mini": { - id: "openai/gpt-5-mini", - name: "GPT 5 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2 }, - limit: { context: 400000, input: 400000, output: 128000 }, - }, - "openai/gpt-5-nano": { - id: "openai/gpt-5-nano", - name: "GPT 5 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4 }, - limit: { context: 400000, input: 400000, output: 128000 }, - }, - "openai/gpt-4-turbo": { - id: "openai/gpt-4-turbo", - name: "GPT-4 Turbo", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2023-11-06", - last_updated: "2024-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 30 }, - limit: { context: 128000, input: 128000, output: 4096 }, - }, - "openai/gpt-5.2": { - id: "openai/gpt-5.2", - name: "GPT 5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-01-01", - last_updated: "2026-01-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 400000, input: 400000, output: 128000 }, - }, - "openai/o3-mini-high": { - id: "openai/o3-mini-high", - name: "OpenAI o3-mini (High)", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-01-31", - last_updated: "2025-01-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.64, output: 2.588 }, - limit: { context: 200000, input: 200000, output: 100000 }, - }, - "openai/gpt-4o-mini": { - id: "openai/gpt-4o-mini", - name: "GPT-4o mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1496, output: 0.595 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "openai/o4-mini-deep-research": { - id: "openai/o4-mini-deep-research", - name: "OpenAI o4-mini Deep Research", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 9.996, output: 19.992 }, - limit: { context: 200000, input: 200000, output: 100000 }, - }, - "openai/gpt-5.1-chat": { - id: "openai/gpt-5.1-chat", - name: "GPT 5.1 Chat", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, input: 400000, output: 128000 }, - }, - "openai/o4-mini": { - id: "openai/o4-mini", - name: "OpenAI o4-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4 }, - limit: { context: 200000, input: 200000, output: 100000 }, - }, - "openai/gpt-5.2-codex": { - id: "openai/gpt-5.2-codex", - name: "GPT 5.2 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-01-14", - last_updated: "2026-01-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 400000, input: 400000, output: 128000 }, - }, - "openai/gpt-5.1-codex-mini": { - id: "openai/gpt-5.1-codex-mini", - name: "GPT 5.1 Codex Mini", - family: "gpt-codex-mini", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2 }, - limit: { context: 400000, input: 400000, output: 128000 }, - }, - "openai/o1-preview": { - id: "openai/o1-preview", - name: "OpenAI o1-preview", - family: "o", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2024-09-12", - last_updated: "2024-09-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 14.993999999999998, output: 59.993 }, - limit: { context: 128000, input: 128000, output: 32768 }, - }, - "openai/gpt-4o-2024-08-06": { - id: "openai/gpt-4o-2024-08-06", - name: "GPT-4o (2024-08-06)", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-08-06", - last_updated: "2024-08-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.499, output: 9.996 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "openai/gpt-5.1": { - id: "openai/gpt-5.1", - name: "GPT 5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, input: 400000, output: 128000 }, - }, - "openai/o1": { - id: "openai/o1", - name: "OpenAI o1", - family: "o", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2024-12-17", - last_updated: "2024-12-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 14.993999999999998, output: 59.993 }, - limit: { context: 200000, input: 200000, output: 100000 }, - }, - "openai/gpt-3.5-turbo": { - id: "openai/gpt-3.5-turbo", - name: "GPT-3.5 Turbo", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2022-11-30", - last_updated: "2024-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 16385, input: 16385, output: 4096 }, - }, - "openai/o3-deep-research": { - id: "openai/o3-deep-research", - name: "OpenAI o3 Deep Research", - family: "o", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 9.996, output: 19.992 }, - limit: { context: 200000, input: 200000, output: 100000 }, - }, - "openai/o3-mini": { - id: "openai/o3-mini", - name: "OpenAI o3-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-01-31", - last_updated: "2025-01-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4 }, - limit: { context: 200000, input: 200000, output: 100000 }, - }, - "openai/gpt-4-turbo-preview": { - id: "openai/gpt-4-turbo-preview", - name: "GPT-4 Turbo Preview", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2023-11-06", - last_updated: "2024-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 9.996, output: 30.004999999999995 }, - limit: { context: 128000, input: 128000, output: 4096 }, - }, - "openai/o1-pro": { - id: "openai/o1-pro", - name: "OpenAI o1 Pro", - family: "o-pro", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-25", - last_updated: "2025-01-25", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 150, output: 600 }, - limit: { context: 200000, input: 200000, output: 100000 }, - }, - "openai/gpt-5-codex": { - id: "openai/gpt-5-codex", - name: "GPT-5 Codex", - family: "gpt-codex", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 9.996, output: 19.992 }, - limit: { context: 256000, input: 256000, output: 32768 }, - }, - "openai/gpt-5.1-chat-latest": { - id: "openai/gpt-5.1-chat-latest", - name: "GPT 5.1 Chat (Latest)", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, input: 400000, output: 16384 }, - }, - "openai/gpt-4o-search-preview": { - id: "openai/gpt-4o-search-preview", - name: "GPT-4o Search Preview", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-05-13", - last_updated: "2024-05-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.47, output: 5.88 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "openai/gpt-4.1-nano": { - id: "openai/gpt-4.1-nano", - name: "GPT 4.1 Nano", - family: "gpt-nano", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 1047576, input: 1047576, output: 32768 }, - }, - "openai/o4-mini-high": { - id: "openai/o4-mini-high", - name: "OpenAI o4-mini high", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4 }, - limit: { context: 200000, input: 200000, output: 100000 }, - }, - "openai/o3": { - id: "openai/o3", - name: "OpenAI o3", - family: "o", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8 }, - limit: { context: 200000, input: 200000, output: 100000 }, - }, - "openai/gpt-oss-20b": { - id: "openai/gpt-oss-20b", - name: "GPT OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.04, output: 0.15 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "openai/gpt-5-pro": { - id: "openai/gpt-5-pro", - name: "GPT 5 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 120 }, - limit: { context: 400000, input: 400000, output: 128000 }, - }, - "openai/gpt-5.1-2025-11-13": { - id: "openai/gpt-5.1-2025-11-13", - name: "GPT-5.1 (2025-11-13)", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 1000000, input: 1000000, output: 32768 }, - }, - "openai/gpt-4o": { - id: "openai/gpt-4o", - name: "GPT-4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-05-13", - last_updated: "2024-05-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.499, output: 9.996 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "openai/o3-mini-low": { - id: "openai/o3-mini-low", - name: "OpenAI o3-mini (Low)", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-01-31", - last_updated: "2025-01-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 9.996, output: 19.992 }, - limit: { context: 200000, input: 200000, output: 100000 }, - }, - "openai/gpt-5": { - id: "openai/gpt-5", - name: "GPT 5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, input: 400000, output: 128000 }, - }, - "openai/gpt-oss-safeguard-20b": { - id: "openai/gpt-oss-safeguard-20b", - name: "GPT OSS Safeguard 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-10-29", - last_updated: "2025-10-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "openai/o3-pro-2025-06-10": { - id: "openai/o3-pro-2025-06-10", - name: "OpenAI o3-pro (2025-06-10)", - family: "o-pro", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-06-10", - last_updated: "2025-06-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 9.996, output: 19.992 }, - limit: { context: 200000, input: 200000, output: 100000 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.25 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "openai/gpt-5-chat-latest": { - id: "openai/gpt-5-chat-latest", - name: "GPT 5 Chat", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, input: 400000, output: 128000 }, - }, - "openai/gpt-4.1": { - id: "openai/gpt-4.1", - name: "GPT 4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-09-10", - last_updated: "2025-09-10", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8 }, - limit: { context: 1047576, input: 1047576, output: 32768 }, - }, - "openai/gpt-4.1-mini": { - id: "openai/gpt-4.1-mini", - name: "GPT 4.1 Mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.6 }, - limit: { context: 1047576, input: 1047576, output: 32768 }, - }, - "openai/gpt-5.1-codex": { - id: "openai/gpt-5.1-codex", - name: "GPT 5.1 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, input: 400000, output: 128000 }, - }, - "openai/gpt-4o-2024-11-20": { - id: "openai/gpt-4o-2024-11-20", - name: "GPT-4o (2024-11-20)", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-11-20", - last_updated: "2024-11-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 128000, input: 128000, output: 16384 }, - }, - "VongolaChouko/Starcannon-Unleashed-12B-v1.0": { - id: "VongolaChouko/Starcannon-Unleashed-12B-v1.0", - name: "Mistral Nemo Starcannon 12b v1", - family: "mistral-nemo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "amazon/nova-lite-v1": { - id: "amazon/nova-lite-v1", - name: "Amazon Nova Lite 1.0", - family: "nova-lite", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-03", - last_updated: "2024-12-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.0595, output: 0.238 }, - limit: { context: 300000, input: 300000, output: 5120 }, - }, - "amazon/nova-pro-v1": { - id: "amazon/nova-pro-v1", - name: "Amazon Nova Pro 1.0", - family: "nova-pro", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-03", - last_updated: "2024-12-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7989999999999999, output: 3.1959999999999997 }, - limit: { context: 300000, input: 300000, output: 32000 }, - }, - "amazon/nova-2-lite-v1": { - id: "amazon/nova-2-lite-v1", - name: "Amazon Nova 2 Lite", - family: "nova", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-03", - last_updated: "2024-12-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5099999999999999, output: 4.25 }, - limit: { context: 1000000, input: 1000000, output: 65535 }, - }, - "amazon/nova-micro-v1": { - id: "amazon/nova-micro-v1", - name: "Amazon Nova Micro 1.0", - family: "nova-micro", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-03", - last_updated: "2024-12-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.0357, output: 0.1394 }, - limit: { context: 128000, input: 128000, output: 5120 }, - }, - "Sao10K/L3.3-70B-Euryale-v2.3": { - id: "Sao10K/L3.3-70B-Euryale-v2.3", - name: "Llama 3.3 70B Euryale", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 20480, input: 20480, output: 16384 }, - }, - "Sao10K/L3.1-70B-Euryale-v2.2": { - id: "Sao10K/L3.1-70B-Euryale-v2.2", - name: "Llama 3.1 70B Euryale", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.306, output: 0.357 }, - limit: { context: 20480, input: 20480, output: 16384 }, - }, - "Sao10K/L3.1-70B-Hanami-x1": { - id: "Sao10K/L3.1-70B-Hanami-x1", - name: "Llama 3.1 70B Hanami", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "Sao10K/L3-8B-Stheno-v3.2": { - id: "Sao10K/L3-8B-Stheno-v3.2", - name: "Sao10K Stheno 8b", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-11-29", - last_updated: "2024-11-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2006, output: 0.2006 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "LatitudeGames/Wayfarer-Large-70B-Llama-3.3": { - id: "LatitudeGames/Wayfarer-Large-70B-Llama-3.3", - name: "Llama 3.3 70B Wayfarer", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-20", - last_updated: "2025-02-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.700000007, output: 0.700000007 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "z-ai/glm-4.6:thinking": { - id: "z-ai/glm-4.6:thinking", - name: "GLM 4.6 Thinking", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.5 }, - limit: { context: 200000, input: 200000, output: 65535 }, - }, - "z-ai/glm-4.5v": { - id: "z-ai/glm-4.5v", - name: "GLM 4.5V", - family: "glmv", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-11-22", - last_updated: "2025-11-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 1.7999999999999998 }, - limit: { context: 64000, input: 64000, output: 96000 }, - }, - "z-ai/glm-4.6": { - id: "z-ai/glm-4.6", - name: "GLM 4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.5 }, - limit: { context: 200000, input: 200000, output: 65535 }, - }, - "z-ai/glm-4.5v:thinking": { - id: "z-ai/glm-4.5v:thinking", - name: "GLM 4.5V Thinking", - family: "glmv", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-11-22", - last_updated: "2025-11-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 1.7999999999999998 }, - limit: { context: 64000, input: 64000, output: 96000 }, - }, - "baidu/ernie-4.5-vl-28b-a3b": { - id: "baidu/ernie-4.5-vl-28b-a3b", - name: "ERNIE 4.5 VL 28B", - family: "ernie", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-06-30", - last_updated: "2025-06-30", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.13999999999999999, output: 0.5599999999999999 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "baidu/ernie-4.5-300b-a47b": { - id: "baidu/ernie-4.5-300b-a47b", - name: "ERNIE 4.5 300B", - family: "ernie", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-06-30", - last_updated: "2025-06-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.35, output: 1.15 }, - limit: { context: 131072, input: 131072, output: 16384 }, - }, - "dmind/dmind-1": { - id: "dmind/dmind-1", - name: "DMind-1", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-06-01", - last_updated: "2025-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.6 }, - limit: { context: 32768, input: 32768, output: 8192 }, - }, - "dmind/dmind-1-mini": { - id: "dmind/dmind-1-mini", - name: "DMind-1-Mini", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-06-01", - last_updated: "2025-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.4 }, - limit: { context: 32768, input: 32768, output: 8192 }, - }, - "Infermatic/MN-12B-Inferor-v0.0": { - id: "Infermatic/MN-12B-Inferor-v0.0", - name: "Mistral Nemo Inferor 12B", - family: "mistral-nemo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25499999999999995, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "meituan-longcat/LongCat-Flash-Chat-FP8": { - id: "meituan-longcat/LongCat-Flash-Chat-FP8", - name: "LongCat Flash", - family: "longcat", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-08-31", - last_updated: "2025-08-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.7 }, - limit: { context: 128000, input: 128000, output: 32768 }, - }, - "meganova-ai/manta-mini-1.0": { - id: "meganova-ai/manta-mini-1.0", - name: "Manta Mini 1.0", - family: "nova", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-20", - last_updated: "2025-12-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.02, output: 0.16 }, - limit: { context: 8192, input: 8192, output: 8192 }, - }, - "meganova-ai/manta-pro-1.0": { - id: "meganova-ai/manta-pro-1.0", - name: "Manta Pro 1.0", - family: "nova", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-20", - last_updated: "2025-12-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.060000000000000005, output: 0.5 }, - limit: { context: 32768, input: 32768, output: 32768 }, - }, - "meganova-ai/manta-flash-1.0": { - id: "meganova-ai/manta-flash-1.0", - name: "Manta Flash 1.0", - family: "nova", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-20", - last_updated: "2025-12-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.02, output: 0.16 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "minimax/minimax-m2.7": { - id: "minimax/minimax-m2.7", - name: "MiniMax M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204800, input: 204800, output: 131072 }, - }, - "minimax/minimax-01": { - id: "minimax/minimax-01", - name: "MiniMax 01", - family: "minimax", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-15", - last_updated: "2025-01-15", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1394, output: 1.1219999999999999 }, - limit: { context: 1000192, input: 1000192, output: 16384 }, - }, - "minimax/minimax-m2.1": { - id: "minimax/minimax-m2.1", - name: "MiniMax M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-12-19", - last_updated: "2025-12-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.33, output: 1.32 }, - limit: { context: 200000, input: 200000, output: 131072 }, - }, - "minimax/minimax-m2-her": { - id: "minimax/minimax-m2-her", - name: "MiniMax M2-her", - family: "minimax", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-01-24", - last_updated: "2026-01-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.30200000000000005, output: 1.2069999999999999 }, - limit: { context: 65532, input: 65532, output: 2048 }, - }, - "minimax/minimax-m2.5": { - id: "minimax/minimax-m2.5", - name: "MiniMax M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204800, input: 204800, output: 131072 }, - }, - "qwen/Qwen3.6-35B-A3B:thinking": { - id: "qwen/Qwen3.6-35B-A3B:thinking", - name: "Qwen3.6 35B A3B Thinking", - family: "qwen3.6", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2026-04-19", - last_updated: "2026-04-21", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.29, output: 1.74 }, - limit: { context: 262144, output: 16384 }, - }, - "qwen/qwen3.5-397b-a17b": { - id: "qwen/qwen3.5-397b-a17b", - name: "Qwen3.5 397B A17B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3.6 }, - limit: { context: 258048, input: 258048, output: 65536 }, - }, - "qwen/Qwen3.6-35B-A3B": { - id: "qwen/Qwen3.6-35B-A3B", - name: "Qwen3.6 35B A3B", - family: "qwen3.6", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2026-04-17", - last_updated: "2026-04-21", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.29, output: 1.74 }, - limit: { context: 262144, output: 16384 }, - }, - "unsloth/gemma-3-1b-it": { - id: "unsloth/gemma-3-1b-it", - name: "Gemma 3 1B IT", - family: "unsloth", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-10", - last_updated: "2025-03-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1003, output: 0.1003 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "unsloth/gemma-3-12b-it": { - id: "unsloth/gemma-3-12b-it", - name: "Gemma 3 12B IT", - family: "unsloth", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-10", - last_updated: "2025-03-10", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.272, output: 0.272 }, - limit: { context: 128000, input: 128000, output: 131072 }, - }, - "unsloth/gemma-3-4b-it": { - id: "unsloth/gemma-3-4b-it", - name: "Gemma 3 4B IT", - family: "unsloth", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-10", - last_updated: "2025-03-10", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2006, output: 0.2006 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "unsloth/gemma-3-27b-it": { - id: "unsloth/gemma-3-27b-it", - name: "Gemma 3 27B IT", - family: "unsloth", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-03-10", - last_updated: "2025-03-10", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2992, output: 0.2992 }, - limit: { context: 128000, input: 128000, output: 96000 }, - }, - "THUDM/GLM-Z1-9B-0414": { - id: "THUDM/GLM-Z1-9B-0414", - name: "GLM Z1 9B 0414", - family: "glm-z", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 32000, input: 32000, output: 8000 }, - }, - "THUDM/GLM-4-9B-0414": { - id: "THUDM/GLM-4-9B-0414", - name: "GLM 4 9B 0414", - family: "glm", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 32000, input: 32000, output: 8000 }, - }, - "THUDM/GLM-Z1-Rumination-32B-0414": { - id: "THUDM/GLM-Z1-Rumination-32B-0414", - name: "GLM Z1 Rumination 32B 0414", - family: "glm-z", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 32000, input: 32000, output: 65536 }, - }, - "THUDM/GLM-4-32B-0414": { - id: "THUDM/GLM-4-32B-0414", - name: "GLM 4 32B 0414", - family: "glm", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 128000, input: 128000, output: 65536 }, - }, - "THUDM/GLM-Z1-32B-0414": { - id: "THUDM/GLM-Z1-32B-0414", - name: "GLM Z1 32B 0414", - family: "glm-z", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 128000, input: 128000, output: 65536 }, - }, - "google/gemini-3-flash-preview": { - id: "google/gemini-3-flash-preview", - name: "Gemini 3 Flash (Preview)", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "google/gemini-flash-1.5": { - id: "google/gemini-flash-1.5", - name: "Gemini 1.5 Flash", - family: "gemini-flash", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-05-14", - last_updated: "2024-05-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.0748, output: 0.306 }, - limit: { context: 2000000, input: 2000000, output: 8192 }, - }, - "google/gemini-3-flash-preview-thinking": { - id: "google/gemini-3-flash-preview-thinking", - name: "Gemini 3 Flash Thinking", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3 }, - limit: { context: 1048756, input: 1048756, output: 65536 }, - }, - "moonshotai/kimi-k2.5": { - id: "moonshotai/kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - release_date: "2026-01-26", - last_updated: "2026-01-26", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.9 }, - limit: { context: 256000, input: 256000, output: 65536 }, - }, - "moonshotai/kimi-k2-instruct": { - id: "moonshotai/kimi-k2-instruct", - name: "Kimi K2 Instruct", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-07-01", - last_updated: "2025-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 2 }, - limit: { context: 256000, input: 256000, output: 8192 }, - }, - "moonshotai/kimi-k2-thinking-original": { - id: "moonshotai/kimi-k2-thinking-original", - name: "Kimi K2 Thinking Original", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 2.5 }, - limit: { context: 256000, input: 256000, output: 16384 }, - }, - "moonshotai/kimi-k2-instruct-0711": { - id: "moonshotai/kimi-k2-instruct-0711", - name: "Kimi K2 0711", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-07-11", - last_updated: "2025-07-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 2 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "moonshotai/Kimi-Dev-72B": { - id: "moonshotai/Kimi-Dev-72B", - name: "Kimi Dev 72B", - family: "kimi", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 0.4 }, - limit: { context: 128000, input: 128000, output: 131072 }, - }, - "moonshotai/kimi-k2-thinking-turbo-original": { - id: "moonshotai/kimi-k2-thinking-turbo-original", - name: "Kimi K2 Thinking Turbo Original", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.15, output: 8 }, - limit: { context: 256000, input: 256000, output: 16384 }, - }, - "moonshotai/kimi-k2.6": { - id: "moonshotai/kimi-k2.6", - name: "Kimi K2.6", - family: "kimi-k2.6", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - release_date: "2026-04-16", - last_updated: "2026-04-21", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.53, output: 2.73 }, - limit: { context: 256000, output: 65536 }, - }, - "moonshotai/kimi-k2.6:thinking": { - id: "moonshotai/kimi-k2.6:thinking", - name: "Kimi K2.6 Thinking", - family: "kimi-thinking", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - release_date: "2026-04-16", - last_updated: "2026-04-21", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.53, output: 2.73 }, - limit: { context: 256000, output: 65536 }, - }, - "moonshotai/Kimi-K2-Instruct-0905": { - id: "moonshotai/Kimi-K2-Instruct-0905", - name: "Kimi K2 0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 256000, input: 256000, output: 262144 }, - }, - "moonshotai/kimi-k2-thinking": { - id: "moonshotai/kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 256000, input: 256000, output: 262144 }, - }, - "moonshotai/kimi-k2.5:thinking": { - id: "moonshotai/kimi-k2.5:thinking", - name: "Kimi K2.5 Thinking", - family: "kimi-thinking", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - release_date: "2026-01-26", - last_updated: "2026-01-26", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.9 }, - limit: { context: 256000, input: 256000, output: 65536 }, - }, - "Tongyi-Zhiwen/QwenLong-L1-32B": { - id: "Tongyi-Zhiwen/QwenLong-L1-32B", - name: "QwenLong L1 32B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-25", - last_updated: "2025-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.13999999999999999, output: 0.6 }, - limit: { context: 128000, input: 128000, output: 40960 }, - }, - "nothingiisreal/L3.1-70B-Celeste-V0.1-BF16": { - id: "nothingiisreal/L3.1-70B-Celeste-V0.1-BF16", - name: "Llama 3.1 70B Celeste v0.1", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "aion-labs/aion-1.0": { - id: "aion-labs/aion-1.0", - name: "Aion 1.0", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-01", - last_updated: "2025-02-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3.995, output: 7.99 }, - limit: { context: 65536, input: 65536, output: 8192 }, - }, - "aion-labs/aion-rp-llama-3.1-8b": { - id: "aion-labs/aion-rp-llama-3.1-8b", - name: "Llama 3.1 8b (uncensored)", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2006, output: 0.2006 }, - limit: { context: 32768, input: 32768, output: 16384 }, - }, - "aion-labs/aion-1.0-mini": { - id: "aion-labs/aion-1.0-mini", - name: "Aion 1.0 mini (DeepSeek)", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-02-20", - last_updated: "2025-02-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7989999999999999, output: 1.394 }, - limit: { context: 131072, input: 131072, output: 8192 }, - }, - "Alibaba-NLP/Tongyi-DeepResearch-30B-A3B": { - id: "Alibaba-NLP/Tongyi-DeepResearch-30B-A3B", - name: "Tongyi DeepResearch 30B A3B", - family: "yi", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-26", - last_updated: "2025-08-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.08, output: 0.24000000000000002 }, - limit: { context: 128000, input: 128000, output: 65536 }, - }, - "MiniMaxAI/MiniMax-M1-80k": { - id: "MiniMaxAI/MiniMax-M1-80k", - name: "MiniMax M1 80K", - family: "minimax", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-06-16", - last_updated: "2025-06-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6052, output: 2.4225000000000003 }, - limit: { context: 1000000, input: 1000000, output: 131072 }, - }, - "anthropic/claude-opus-4.6:thinking:low": { - id: "anthropic/claude-opus-4.6:thinking:low", - name: "Claude 4.6 Opus Thinking Low", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 4.998, output: 25.007 }, - limit: { context: 1000000, input: 1000000, output: 128000 }, - }, - "anthropic/claude-opus-4.6": { - id: "anthropic/claude-opus-4.6", - name: "Claude 4.6 Opus", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 4.998, output: 25.007 }, - limit: { context: 1000000, input: 1000000, output: 128000 }, - }, - "anthropic/claude-sonnet-4.6:thinking": { - id: "anthropic/claude-sonnet-4.6:thinking", - name: "Claude Sonnet 4.6 Thinking", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.993999999999998 }, - limit: { context: 1000000, input: 1000000, output: 128000 }, - }, - "anthropic/claude-opus-4.6:thinking:max": { - id: "anthropic/claude-opus-4.6:thinking:max", - name: "Claude 4.6 Opus Thinking Max", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 4.998, output: 25.007 }, - limit: { context: 1000000, input: 1000000, output: 128000 }, - }, - "anthropic/claude-opus-4.6:thinking:medium": { - id: "anthropic/claude-opus-4.6:thinking:medium", - name: "Claude 4.6 Opus Thinking Medium", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 4.998, output: 25.007 }, - limit: { context: 1000000, input: 1000000, output: 128000 }, - }, - "anthropic/claude-sonnet-4.6": { - id: "anthropic/claude-sonnet-4.6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.992, output: 14.993999999999998 }, - limit: { context: 1000000, input: 1000000, output: 128000 }, - }, - "anthropic/claude-opus-4.6:thinking": { - id: "anthropic/claude-opus-4.6:thinking", - name: "Claude 4.6 Opus Thinking", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 4.998, output: 25.007 }, - limit: { context: 1000000, input: 1000000, output: 128000 }, - }, - "abacusai/Dracarys-72B-Instruct": { - id: "abacusai/Dracarys-72B-Instruct", - name: "Llama 3.1 70B Dracarys 2", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-02", - last_updated: "2025-08-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "EVA-UNIT-01/EVA-LLaMA-3.33-70B-v0.0": { - id: "EVA-UNIT-01/EVA-LLaMA-3.33-70B-v0.0", - name: "EVA Llama 3.33 70B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-26", - last_updated: "2025-07-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.006, output: 2.006 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "EVA-UNIT-01/EVA-Qwen2.5-72B-v0.2": { - id: "EVA-UNIT-01/EVA-Qwen2.5-72B-v0.2", - name: "EVA-Qwen2.5-72B-v0.2", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7989999999999999, output: 0.7989999999999999 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "EVA-UNIT-01/EVA-LLaMA-3.33-70B-v0.1": { - id: "EVA-UNIT-01/EVA-LLaMA-3.33-70B-v0.1", - name: "EVA-LLaMA-3.33-70B-v0.1", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.006, output: 2.006 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "EVA-UNIT-01/EVA-Qwen2.5-32B-v0.2": { - id: "EVA-UNIT-01/EVA-Qwen2.5-32B-v0.2", - name: "EVA-Qwen2.5-32B-v0.2", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-26", - last_updated: "2025-07-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7989999999999999, output: 0.7989999999999999 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "huihui-ai/DeepSeek-R1-Distill-Qwen-32B-abliterated": { - id: "huihui-ai/DeepSeek-R1-Distill-Qwen-32B-abliterated", - name: "DeepSeek R1 Qwen Abliterated", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.4, output: 1.4 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "huihui-ai/DeepSeek-R1-Distill-Llama-70B-abliterated": { - id: "huihui-ai/DeepSeek-R1-Distill-Llama-70B-abliterated", - name: "DeepSeek R1 Llama 70B Abliterated", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7, output: 0.7 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "huihui-ai/Llama-3.3-70B-Instruct-abliterated": { - id: "huihui-ai/Llama-3.3-70B-Instruct-abliterated", - name: "Llama 3.3 70B Instruct abliterated", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-08-08", - last_updated: "2025-08-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7, output: 0.7 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "huihui-ai/Qwen2.5-32B-Instruct-abliterated": { - id: "huihui-ai/Qwen2.5-32B-Instruct-abliterated", - name: "Qwen 2.5 32B Abliterated", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-01-06", - last_updated: "2025-01-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7, output: 0.7 }, - limit: { context: 32768, input: 32768, output: 8192 }, - }, - "huihui-ai/Llama-3.1-Nemotron-70B-Instruct-HF-abliterated": { - id: "huihui-ai/Llama-3.1-Nemotron-70B-Instruct-HF-abliterated", - name: "Nemotron 3.1 70B abliterated", - family: "nemotron", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7, output: 0.7 }, - limit: { context: 16384, input: 16384, output: 16384 }, - }, - "xiaomi/mimo-v2-flash-thinking-original": { - id: "xiaomi/mimo-v2-flash-thinking-original", - name: "MiMo V2 Flash (Thinking) Original", - family: "mimo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.102, output: 0.306 }, - limit: { context: 256000, input: 256000, output: 32768 }, - }, - "xiaomi/mimo-v2-flash-thinking": { - id: "xiaomi/mimo-v2-flash-thinking", - name: "MiMo V2 Flash (Thinking)", - family: "mimo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.102, output: 0.306 }, - limit: { context: 256000, input: 256000, output: 32768 }, - }, - "xiaomi/mimo-v2-flash": { - id: "xiaomi/mimo-v2-flash", - name: "MiMo V2 Flash", - family: "mimo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.102, output: 0.306 }, - limit: { context: 256000, input: 256000, output: 32768 }, - }, - "xiaomi/mimo-v2-flash-original": { - id: "xiaomi/mimo-v2-flash-original", - name: "MiMo V2 Flash Original", - family: "mimo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.102, output: 0.306 }, - limit: { context: 256000, input: 256000, output: 32768 }, - }, - "tngtech/DeepSeek-TNG-R1T2-Chimera": { - id: "tngtech/DeepSeek-TNG-R1T2-Chimera", - name: "DeepSeek TNG R1T2 Chimera", - family: "tngtech", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.31, output: 0.31 }, - limit: { context: 128000, input: 128000, output: 8192 }, - }, - "tngtech/tng-r1t-chimera": { - id: "tngtech/tng-r1t-chimera", - name: "TNG R1T Chimera", - family: "tngtech", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-11-26", - last_updated: "2025-11-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 128000, input: 128000, output: 65536 }, - }, - "inflatebot/MN-12B-Mag-Mell-R1": { - id: "inflatebot/MN-12B-Mag-Mell-R1", - name: "Mag Mell R1", - family: "mistral-nemo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.49299999999999994, output: 0.49299999999999994 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - "failspy/Meta-Llama-3-70B-Instruct-abliterated-v3.5": { - id: "failspy/Meta-Llama-3-70B-Instruct-abliterated-v3.5", - name: "Llama 3 70B abliterated", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - release_date: "2025-07-26", - last_updated: "2025-07-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7, output: 0.7 }, - limit: { context: 8192, input: 8192, output: 8192 }, - }, - }, - }, - abacus: { - id: "abacus", - env: ["ABACUS_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://routellm.abacus.ai/v1", - name: "Abacus", - doc: "https://abacus.ai/help/api", - models: { - "gpt-5.1-codex-max": { - id: "gpt-5.1-codex-max", - name: "GPT-5.1 Codex Max", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "claude-opus-4-5-20251101": { - id: "claude-opus-4-5-20251101", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-01", - last_updated: "2025-11-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25 }, - limit: { context: 200000, output: 64000 }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3 }, - limit: { context: 262144, output: 32768 }, - }, - "gemini-3.1-flash-lite-preview": { - id: "gemini-3.1-flash-lite-preview", - name: "Gemini 3.1 Flash Lite Preview", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-01", - last_updated: "2026-03-01", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5, cache_read: 0.025, cache_write: 1 }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-sonnet-4-6": { - id: "claude-sonnet-4-6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 64000 }, - }, - "gemini-3.1-pro-preview": { - id: "gemini-3.1-pro-preview", - name: "Gemini 3.1 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12 }, - limit: { context: 1048576, output: 65536 }, - }, - "gpt-5.3-chat-latest": { - id: "gpt-5.3-chat-latest", - name: "GPT-5.3 Chat Latest", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-01", - last_updated: "2026-03-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 400000, output: 128000 }, - }, - "gemini-3-flash-preview": { - id: "gemini-3-flash-preview", - name: "Gemini 3 Flash Preview", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3 }, - limit: { context: 1048576, output: 65536 }, - }, - "llama-3.3-70b-versatile": { - id: "llama-3.3-70b-versatile", - name: "Llama 3.3 70B Versatile", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.59, output: 0.79 }, - limit: { context: 128000, output: 32768 }, - }, - "gpt-5-mini": { - id: "gpt-5-mini", - name: "GPT-5 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2 }, - limit: { context: 400000, output: 128000 }, - }, - "gpt-5-nano": { - id: "gpt-5-nano", - name: "GPT-5 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4 }, - limit: { context: 400000, output: 128000 }, - }, - "gpt-5.3-codex": { - id: "gpt-5.3-codex", - name: "GPT-5.3 Codex", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "claude-sonnet-4-5-20250929": { - id: "claude-sonnet-4-5-20250929", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 64000 }, - }, - "gemini-2.5-pro": { - id: "gemini-2.5-pro", - name: "Gemini 2.5 Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-25", - last_updated: "2025-03-25", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 1048576, output: 65536 }, - }, - "grok-4-1-fast-non-reasoning": { - id: "grok-4-1-fast-non-reasoning", - name: "Grok 4.1 Fast (Non-Reasoning)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-11-17", - last_updated: "2025-11-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5 }, - limit: { context: 2000000, output: 16384 }, - }, - "gpt-5.2": { - id: "gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 400000, output: 128000 }, - }, - "o3-pro": { - id: "o3-pro", - name: "o3-pro", - family: "o-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-06-10", - last_updated: "2025-06-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 20, output: 40 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-4o-mini": { - id: "gpt-4o-mini", - name: "GPT-4o Mini", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 16384 }, - }, - "qwen3-max": { - id: "qwen3-max", - name: "Qwen3 Max", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 6 }, - limit: { context: 131072, output: 16384 }, - }, - "o4-mini": { - id: "o4-mini", - name: "o4-mini", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-5.2-codex": { - id: "gpt-5.2-codex", - name: "GPT-5.2 Codex", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gemini-2.5-flash": { - id: "gemini-2.5-flash", - name: "Gemini 2.5 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5 }, - limit: { context: 1048576, output: 65536 }, - }, - "gpt-5.2-chat-latest": { - id: "gpt-5.2-chat-latest", - name: "GPT-5.2 Chat Latest", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2026-01-01", - last_updated: "2026-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 400000, output: 128000 }, - }, - "gpt-5.3-codex-xhigh": { - id: "gpt-5.3-codex-xhigh", - name: "GPT-5.3 Codex XHigh", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "grok-code-fast-1": { - id: "grok-code-fast-1", - name: "Grok Code Fast 1", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-09-01", - last_updated: "2025-09-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.5 }, - limit: { context: 256000, output: 16384 }, - }, - "gpt-5.1": { - id: "gpt-5.1", - name: "GPT-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, output: 128000 }, - }, - "o3-mini": { - id: "o3-mini", - name: "o3-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05", - release_date: "2024-12-20", - last_updated: "2025-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4 }, - limit: { context: 200000, output: 100000 }, - }, - "grok-4-0709": { - id: "grok-4-0709", - name: "Grok 4", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 256000, output: 16384 }, - }, - "route-llm": { - id: "route-llm", - name: "Route LLM", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-01-01", - last_updated: "2024-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 128000, output: 16384 }, - }, - "qwen-2.5-coder-32b": { - id: "qwen-2.5-coder-32b", - name: "Qwen 2.5 Coder 32B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-11-11", - last_updated: "2024-11-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.79, output: 0.79 }, - limit: { context: 128000, output: 8192 }, - }, - "gpt-5-codex": { - id: "gpt-5-codex", - name: "GPT-5 Codex", - family: "gpt", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "claude-opus-4-1-20250805": { - id: "claude-opus-4-1-20250805", - name: "Claude Opus 4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75 }, - limit: { context: 200000, output: 32000 }, - }, - "gpt-5.4": { - id: "gpt-5.4", - name: "GPT-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 15 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "gpt-5.1-chat-latest": { - id: "gpt-5.1-chat-latest", - name: "GPT-5.1 Chat Latest", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, output: 128000 }, - }, - "claude-haiku-4-5-20251001": { - id: "claude-haiku-4-5-20251001", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-sonnet-4-20250514": { - id: "claude-sonnet-4-20250514", - name: "Claude Sonnet 4", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-05-14", - last_updated: "2025-05-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 64000 }, - }, - "kimi-k2-turbo-preview": { - id: "kimi-k2-turbo-preview", - name: "Kimi K2 Turbo Preview", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-08", - last_updated: "2025-07-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 8 }, - limit: { context: 256000, output: 8192 }, - }, - "claude-opus-4-6": { - id: "claude-opus-4-6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25 }, - limit: { context: 200000, output: 128000 }, - }, - "gpt-4.1-nano": { - id: "gpt-4.1-nano", - name: "GPT-4.1 Nano", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 1047576, output: 32768 }, - }, - "claude-3-7-sonnet-20250219": { - id: "claude-3-7-sonnet-20250219", - name: "Claude Sonnet 3.7", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10-31", - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 64000 }, - }, - o3: { - id: "o3", - name: "o3", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-5": { - id: "gpt-5", - name: "GPT-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, output: 128000 }, - }, - "claude-opus-4-20250514": { - id: "claude-opus-4-20250514", - name: "Claude Opus 4", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-05-14", - last_updated: "2025-05-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75 }, - limit: { context: 200000, output: 32000 }, - }, - "gpt-4.1": { - id: "gpt-4.1", - name: "GPT-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8 }, - limit: { context: 1047576, output: 32768 }, - }, - "gpt-4.1-mini": { - id: "gpt-4.1-mini", - name: "GPT-4.1 Mini", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.6 }, - limit: { context: 1047576, output: 32768 }, - }, - "gpt-5.1-codex": { - id: "gpt-5.1-codex", - name: "GPT-5.1 Codex", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-4o-2024-11-20": { - id: "gpt-4o-2024-11-20", - name: "GPT-4o (2024-11-20)", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-11-20", - last_updated: "2024-11-20", - modalities: { input: ["text", "image", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 128000, output: 16384 }, - }, - "grok-4-fast-non-reasoning": { - id: "grok-4-fast-non-reasoning", - name: "Grok 4 Fast (Non-Reasoning)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5 }, - limit: { context: 2000000, output: 16384 }, - }, - "deepseek/deepseek-v3.1": { - id: "deepseek/deepseek-v3.1", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 1.66 }, - limit: { context: 128000, output: 8192 }, - }, - "Qwen/QwQ-32B": { - id: "Qwen/QwQ-32B", - name: "QwQ 32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2024-11-28", - last_updated: "2024-11-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 0.4 }, - limit: { context: 32768, output: 32768 }, - }, - "Qwen/Qwen3-235B-A22B-Instruct-2507": { - id: "Qwen/Qwen3-235B-A22B-Instruct-2507", - name: "Qwen3 235B A22B Instruct", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-07-01", - last_updated: "2025-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.6 }, - limit: { context: 262144, output: 8192 }, - }, - "Qwen/Qwen3-32B": { - id: "Qwen/Qwen3-32B", - name: "Qwen3 32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-04-29", - last_updated: "2025-04-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.29 }, - limit: { context: 128000, output: 8192 }, - }, - "Qwen/qwen3-coder-480b-a35b-instruct": { - id: "Qwen/qwen3-coder-480b-a35b-instruct", - name: "Qwen3 Coder 480B A35B Instruct", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-07-22", - last_updated: "2025-07-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.29, output: 1.2 }, - limit: { context: 262144, output: 65536 }, - }, - "Qwen/Qwen2.5-72B-Instruct": { - id: "Qwen/Qwen2.5-72B-Instruct", - name: "Qwen 2.5 72B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-09-19", - last_updated: "2024-09-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.11, output: 0.38 }, - limit: { context: 128000, output: 8192 }, - }, - "zai-org/glm-4.7": { - id: "zai-org/glm-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-06-01", - last_updated: "2025-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 128000, output: 8192 }, - }, - "zai-org/glm-5": { - id: "zai-org/glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2 }, - limit: { context: 204800, output: 131072 }, - }, - "zai-org/glm-4.5": { - id: "zai-org/glm-4.5", - name: "GLM-4.5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 128000, output: 8192 }, - }, - "zai-org/glm-4.6": { - id: "zai-org/glm-4.6", - name: "GLM-4.6", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-03-01", - last_updated: "2025-03-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 128000, output: 8192 }, - }, - "meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo": { - id: "meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo", - name: "Llama 3.1 405B Instruct Turbo", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 3.5, output: 3.5 }, - limit: { context: 128000, output: 4096 }, - }, - "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": { - id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8", - name: "Llama 4 Maverick 17B 128E Instruct FP8", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.59 }, - limit: { context: 1000000, output: 32768 }, - }, - "meta-llama/Meta-Llama-3.1-8B-Instruct": { - id: "meta-llama/Meta-Llama-3.1-8B-Instruct", - name: "Llama 3.1 8B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.05 }, - limit: { context: 128000, output: 4096 }, - }, - "deepseek-ai/DeepSeek-R1": { - id: "deepseek-ai/DeepSeek-R1", - name: "DeepSeek R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 3, output: 7 }, - limit: { context: 128000, output: 8192 }, - }, - "deepseek-ai/DeepSeek-V3.2": { - id: "deepseek-ai/DeepSeek-V3.2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-06-15", - last_updated: "2025-06-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 0.4 }, - limit: { context: 128000, output: 8192 }, - }, - "deepseek-ai/DeepSeek-V3.1-Terminus": { - id: "deepseek-ai/DeepSeek-V3.1-Terminus", - name: "DeepSeek V3.1 Terminus", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-06-01", - last_updated: "2025-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 1 }, - limit: { context: 128000, output: 8192 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT-OSS 120B", - family: "gpt-oss", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.44 }, - limit: { context: 128000, output: 32768 }, - }, - }, - }, - "perplexity-agent": { - id: "perplexity-agent", - env: ["PERPLEXITY_API_KEY"], - npm: "@ai-sdk/openai", - api: "https://api.perplexity.ai/v1", - name: "Perplexity Agent", - doc: "https://docs.perplexity.ai/docs/agent-api/models", - models: { - "perplexity/sonar": { - id: "perplexity/sonar", - name: "Sonar", - family: "sonar", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-09-01", - release_date: "2024-01-01", - last_updated: "2025-09-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2.5, cache_read: 0.0625 }, - limit: { context: 128000, output: 8192 }, - }, - "xai/grok-4-1-fast-non-reasoning": { - id: "xai/grok-4-1-fast-non-reasoning", - name: "Grok 4.1 Fast (Non-Reasoning)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "nvidia/nemotron-3-super-120b-a12b": { - id: "nvidia/nemotron-3-super-120b-a12b", - name: "Nemotron 3 Super 120B", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2026-02", - release_date: "2026-03-11", - last_updated: "2026-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 2.5 }, - limit: { context: 1000000, output: 32000 }, - }, - "openai/gpt-5.5": { - id: "openai/gpt-5.5", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-23", - last_updated: "2026-04-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "openai/gpt-5-mini": { - id: "openai/gpt-5-mini", - name: "GPT-5 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/gpt-5.2": { - id: "openai/gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/gpt-5.1": { - id: "openai/gpt-5.1", - name: "GPT-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/gpt-5.4": { - id: "openai/gpt-5.4", - name: "GPT-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 15, cache_read: 0.25 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "google/gemini-3.1-pro-preview": { - id: "google/gemini-3.1-pro-preview", - name: "Gemini 3.1 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-3-flash-preview": { - id: "google/gemini-3-flash-preview", - name: "Gemini 3 Flash Preview", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 0.5, - output: 3, - cache_read: 0.05, - context_over_200k: { input: 0.5, output: 3, cache_read: 0.05 }, - }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-2.5-pro": { - id: "google/gemini-2.5-pro", - name: "Gemini 2.5 Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 1.25, - output: 10, - cache_read: 0.125, - context_over_200k: { input: 2.5, output: 15, cache_read: 0.25 }, - }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-2.5-flash": { - id: "google/gemini-2.5-flash", - name: "Gemini 2.5 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.03 }, - limit: { context: 1048576, output: 65536 }, - }, - "anthropic/claude-haiku-4-5": { - id: "anthropic/claude-haiku-4-5", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-sonnet-4-6": { - id: "anthropic/claude-sonnet-4-6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-opus-4-7": { - id: "anthropic/claude-opus-4-7", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5 }, - limit: { context: 1000000, output: 128000 }, - }, - "anthropic/claude-opus-4-5": { - id: "anthropic/claude-opus-4-5", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-11-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-opus-4-6": { - id: "anthropic/claude-opus-4-6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5 }, - limit: { context: 200000, output: 128000 }, - }, - "anthropic/claude-sonnet-4-5": { - id: "anthropic/claude-sonnet-4-5", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3 }, - limit: { context: 200000, output: 64000 }, - }, - }, - }, - "siliconflow-cn": { - id: "siliconflow-cn", - env: ["SILICONFLOW_CN_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.siliconflow.cn/v1", - name: "SiliconFlow (China)", - doc: "https://cloud.siliconflow.com/models", - models: { - "Kwaipilot/KAT-Dev": { - id: "Kwaipilot/KAT-Dev", - name: "Kwaipilot/KAT-Dev", - family: "kat-coder", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-27", - last_updated: "2026-01-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 128000, output: 128000 }, - }, - "Qwen/Qwen3.5-397B-A17B": { - id: "Qwen/Qwen3.5-397B-A17B", - name: "Qwen/Qwen3.5-397B-A17B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.29, output: 1.74 }, - limit: { context: 262144, output: 65536 }, - }, - "Qwen/Qwen3.5-35B-A3B": { - id: "Qwen/Qwen3.5-35B-A3B", - name: "Qwen/Qwen3.5-35B-A3B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-25", - last_updated: "2026-02-25", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.23, output: 1.86 }, - limit: { context: 262144, output: 65536 }, - }, - "Qwen/Qwen3.5-122B-A10B": { - id: "Qwen/Qwen3.5-122B-A10B", - name: "Qwen/Qwen3.5-122B-A10B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-26", - last_updated: "2026-02-26", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.29, output: 2.32 }, - limit: { context: 262144, output: 65536 }, - }, - "Qwen/Qwen3.5-9B": { - id: "Qwen/Qwen3.5-9B", - name: "Qwen/Qwen3.5-9B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-03-03", - last_updated: "2026-03-03", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 1.74 }, - limit: { context: 262144, output: 65536 }, - }, - "Qwen/Qwen3.5-27B": { - id: "Qwen/Qwen3.5-27B", - name: "Qwen/Qwen3.5-27B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-25", - last_updated: "2026-02-25", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.26, output: 2.09 }, - limit: { context: 262144, output: 65536 }, - }, - "Qwen/Qwen3.5-4B": { - id: "Qwen/Qwen3.5-4B", - name: "Qwen/Qwen3.5-4B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-03-03", - last_updated: "2026-03-03", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 65536 }, - }, - "Qwen/Qwen3.6-35B-A3B": { - id: "Qwen/Qwen3.6-35B-A3B", - name: "Qwen/Qwen3.6-35B-A3B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-17", - last_updated: "2026-04-17", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.23, output: 1.86 }, - limit: { context: 262144, output: 65536 }, - }, - "Qwen/Qwen2.5-72B-Instruct": { - id: "Qwen/Qwen2.5-72B-Instruct", - name: "Qwen/Qwen2.5-72B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.59, output: 0.59 }, - limit: { context: 33000, output: 4000 }, - }, - "Qwen/Qwen3-Coder-480B-A35B-Instruct": { - id: "Qwen/Qwen3-Coder-480B-A35B-Instruct", - name: "Qwen/Qwen3-Coder-480B-A35B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-31", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-VL-8B-Instruct": { - id: "Qwen/Qwen3-VL-8B-Instruct", - name: "Qwen/Qwen3-VL-8B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-15", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 0.68 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-VL-32B-Instruct": { - id: "Qwen/Qwen3-VL-32B-Instruct", - name: "Qwen/Qwen3-VL-32B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-21", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-VL-30B-A3B-Thinking": { - id: "Qwen/Qwen3-VL-30B-A3B-Thinking", - name: "Qwen/Qwen3-VL-30B-A3B-Thinking", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-11", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.29, output: 1 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen2.5-14B-Instruct": { - id: "Qwen/Qwen2.5-14B-Instruct", - name: "Qwen/Qwen2.5-14B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 33000, output: 4000 }, - }, - "Qwen/Qwen3-VL-235B-A22B-Instruct": { - id: "Qwen/Qwen3-VL-235B-A22B-Instruct", - name: "Qwen/Qwen3-VL-235B-A22B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-04", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.5 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-Next-80B-A3B-Thinking": { - id: "Qwen/Qwen3-Next-80B-A3B-Thinking", - name: "Qwen/Qwen3-Next-80B-A3B-Thinking", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-25", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.57 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen2.5-VL-32B-Instruct": { - id: "Qwen/Qwen2.5-VL-32B-Instruct", - name: "Qwen/Qwen2.5-VL-32B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-03-24", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 0.27 }, - limit: { context: 131000, output: 131000 }, - }, - "Qwen/Qwen3-Omni-30B-A3B-Thinking": { - id: "Qwen/Qwen3-Omni-30B-A3B-Thinking", - name: "Qwen/Qwen3-Omni-30B-A3B-Thinking", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-04", - last_updated: "2025-11-25", - modalities: { input: ["text", "image", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 66000, output: 66000 }, - }, - "Qwen/Qwen3-235B-A22B-Thinking-2507": { - id: "Qwen/Qwen3-235B-A22B-Thinking-2507", - name: "Qwen/Qwen3-235B-A22B-Thinking-2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-28", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.13, output: 0.6 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen2.5-32B-Instruct": { - id: "Qwen/Qwen2.5-32B-Instruct", - name: "Qwen/Qwen2.5-32B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-09-19", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 0.18 }, - limit: { context: 33000, output: 4000 }, - }, - "Qwen/Qwen2.5-72B-Instruct-128K": { - id: "Qwen/Qwen2.5-72B-Instruct-128K", - name: "Qwen/Qwen2.5-72B-Instruct-128K", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.59, output: 0.59 }, - limit: { context: 131000, output: 4000 }, - }, - "Qwen/Qwen3-14B": { - id: "Qwen/Qwen3-14B", - name: "Qwen/Qwen3-14B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-30", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.28 }, - limit: { context: 131000, output: 131000 }, - }, - "Qwen/Qwen3-Omni-30B-A3B-Instruct": { - id: "Qwen/Qwen3-Omni-30B-A3B-Instruct", - name: "Qwen/Qwen3-Omni-30B-A3B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-04", - last_updated: "2025-11-25", - modalities: { input: ["text", "image", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 66000, output: 66000 }, - }, - "Qwen/Qwen3-Coder-30B-A3B-Instruct": { - id: "Qwen/Qwen3-Coder-30B-A3B-Instruct", - name: "Qwen/Qwen3-Coder-30B-A3B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-01", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.28 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-32B": { - id: "Qwen/Qwen3-32B", - name: "Qwen/Qwen3-32B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-30", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.57 }, - limit: { context: 131000, output: 131000 }, - }, - "Qwen/Qwen3-235B-A22B-Instruct-2507": { - id: "Qwen/Qwen3-235B-A22B-Instruct-2507", - name: "Qwen/Qwen3-235B-A22B-Instruct-2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-23", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09, output: 0.6 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-30B-A3B-Instruct-2507": { - id: "Qwen/Qwen3-30B-A3B-Instruct-2507", - name: "Qwen/Qwen3-30B-A3B-Instruct-2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-30", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09, output: 0.3 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-8B": { - id: "Qwen/Qwen3-8B", - name: "Qwen/Qwen3-8B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-30", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.06, output: 0.06 }, - limit: { context: 131000, output: 131000 }, - }, - "Qwen/Qwen3-Next-80B-A3B-Instruct": { - id: "Qwen/Qwen3-Next-80B-A3B-Instruct", - name: "Qwen/Qwen3-Next-80B-A3B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 1.4 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-VL-8B-Thinking": { - id: "Qwen/Qwen3-VL-8B-Thinking", - name: "Qwen/Qwen3-VL-8B-Thinking", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-15", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 2 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-Omni-30B-A3B-Captioner": { - id: "Qwen/Qwen3-Omni-30B-A3B-Captioner", - name: "Qwen/Qwen3-Omni-30B-A3B-Captioner", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-04", - last_updated: "2025-11-25", - modalities: { input: ["audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 66000, output: 66000 }, - }, - "Qwen/QwQ-32B": { - id: "Qwen/QwQ-32B", - name: "Qwen/QwQ-32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-03-06", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.58 }, - limit: { context: 131000, output: 131000 }, - }, - "Qwen/Qwen3-VL-30B-A3B-Instruct": { - id: "Qwen/Qwen3-VL-30B-A3B-Instruct", - name: "Qwen/Qwen3-VL-30B-A3B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-05", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.29, output: 1 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen2.5-Coder-32B-Instruct": { - id: "Qwen/Qwen2.5-Coder-32B-Instruct", - name: "Qwen/Qwen2.5-Coder-32B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-11-11", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 0.18 }, - limit: { context: 33000, output: 4000 }, - }, - "Qwen/Qwen2.5-7B-Instruct": { - id: "Qwen/Qwen2.5-7B-Instruct", - name: "Qwen/Qwen2.5-7B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.05 }, - limit: { context: 33000, output: 4000 }, - }, - "Qwen/Qwen3-VL-235B-A22B-Thinking": { - id: "Qwen/Qwen3-VL-235B-A22B-Thinking", - name: "Qwen/Qwen3-VL-235B-A22B-Thinking", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-04", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.45, output: 3.5 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-30B-A3B-Thinking-2507": { - id: "Qwen/Qwen3-30B-A3B-Thinking-2507", - name: "Qwen/Qwen3-30B-A3B-Thinking-2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-31", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09, output: 0.3 }, - limit: { context: 262000, output: 131000 }, - }, - "Qwen/Qwen3-VL-32B-Thinking": { - id: "Qwen/Qwen3-VL-32B-Thinking", - name: "Qwen/Qwen3-VL-32B-Thinking", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-21", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.5 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen2.5-VL-72B-Instruct": { - id: "Qwen/Qwen2.5-VL-72B-Instruct", - name: "Qwen/Qwen2.5-VL-72B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-01-28", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.59, output: 0.59 }, - limit: { context: 131000, output: 4000 }, - }, - "stepfun-ai/Step-3.5-Flash": { - id: "stepfun-ai/Step-3.5-Flash", - name: "stepfun-ai/Step-3.5-Flash", - family: "step", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 262000, output: 262000 }, - }, - "zai-org/GLM-4.5V": { - id: "zai-org/GLM-4.5V", - name: "zai-org/GLM-4.5V", - family: "glm", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-13", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.86 }, - limit: { context: 66000, output: 66000 }, - }, - "zai-org/GLM-4.6": { - id: "zai-org/GLM-4.6", - name: "zai-org/GLM-4.6", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-04", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.9 }, - limit: { context: 205000, output: 205000 }, - }, - "zai-org/GLM-4.6V": { - id: "zai-org/GLM-4.6V", - name: "zai-org/GLM-4.6V", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-07", - last_updated: "2025-12-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 131000, output: 131000 }, - }, - "zai-org/GLM-4.5-Air": { - id: "zai-org/GLM-4.5-Air", - name: "zai-org/GLM-4.5-Air", - family: "glm-air", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-28", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.86 }, - limit: { context: 131000, output: 131000 }, - }, - "inclusionAI/Ling-flash-2.0": { - id: "inclusionAI/Ling-flash-2.0", - name: "inclusionAI/Ling-flash-2.0", - family: "ling", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.57 }, - limit: { context: 131000, output: 131000 }, - }, - "inclusionAI/Ling-mini-2.0": { - id: "inclusionAI/Ling-mini-2.0", - name: "inclusionAI/Ling-mini-2.0", - family: "ling", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-10", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.28 }, - limit: { context: 131000, output: 131000 }, - }, - "inclusionAI/Ring-flash-2.0": { - id: "inclusionAI/Ring-flash-2.0", - name: "inclusionAI/Ring-flash-2.0", - family: "ring", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-29", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.57 }, - limit: { context: 131000, output: 131000 }, - }, - "ascend-tribe/pangu-pro-moe": { - id: "ascend-tribe/pangu-pro-moe", - name: "ascend-tribe/pangu-pro-moe", - family: "pangu", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-07-02", - last_updated: "2026-01-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 128000, output: 128000 }, - }, - "tencent/Hunyuan-MT-7B": { - id: "tencent/Hunyuan-MT-7B", - name: "tencent/Hunyuan-MT-7B", - family: "hunyuan", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 33000, output: 33000 }, - }, - "tencent/Hunyuan-A13B-Instruct": { - id: "tencent/Hunyuan-A13B-Instruct", - name: "tencent/Hunyuan-A13B-Instruct", - family: "hunyuan", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-06-30", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.57 }, - limit: { context: 131000, output: 131000 }, - }, - "Pro/zai-org/GLM-4.7": { - id: "Pro/zai-org/GLM-4.7", - name: "Pro/zai-org/GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 205000, output: 205000 }, - }, - "Pro/zai-org/GLM-5.1": { - id: "Pro/zai-org/GLM-5.1", - name: "Pro/zai-org/GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-08", - last_updated: "2026-04-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.4, output: 4.4, cache_write: 0 }, - limit: { context: 205000, output: 205000 }, - }, - "Pro/zai-org/GLM-5": { - id: "Pro/zai-org/GLM-5", - name: "Pro/zai-org/GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2 }, - limit: { context: 205000, output: 205000 }, - }, - "Pro/deepseek-ai/DeepSeek-V3": { - id: "Pro/deepseek-ai/DeepSeek-V3", - name: "Pro/deepseek-ai/DeepSeek-V3", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-26", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1 }, - limit: { context: 164000, output: 164000 }, - }, - "Pro/deepseek-ai/DeepSeek-R1": { - id: "Pro/deepseek-ai/DeepSeek-R1", - name: "Pro/deepseek-ai/DeepSeek-R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-05-28", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 2.18 }, - limit: { context: 164000, output: 164000 }, - }, - "Pro/deepseek-ai/DeepSeek-V3.2": { - id: "Pro/deepseek-ai/DeepSeek-V3.2", - name: "Pro/deepseek-ai/DeepSeek-V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-03", - last_updated: "2025-12-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 0.42 }, - limit: { context: 164000, output: 164000 }, - }, - "Pro/deepseek-ai/DeepSeek-V3.1-Terminus": { - id: "Pro/deepseek-ai/DeepSeek-V3.1-Terminus", - name: "Pro/deepseek-ai/DeepSeek-V3.1-Terminus", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-29", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 1 }, - limit: { context: 164000, output: 164000 }, - }, - "Pro/moonshotai/Kimi-K2-Thinking": { - id: "Pro/moonshotai/Kimi-K2-Thinking", - name: "Pro/moonshotai/Kimi-K2-Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-11-07", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.55, output: 2.5 }, - limit: { context: 262000, output: 262000 }, - }, - "Pro/moonshotai/Kimi-K2.6": { - id: "Pro/moonshotai/Kimi-K2.6", - name: "Pro/moonshotai/Kimi-K2.6", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262000, output: 262000 }, - }, - "Pro/moonshotai/Kimi-K2-Instruct-0905": { - id: "Pro/moonshotai/Kimi-K2-Instruct-0905", - name: "Pro/moonshotai/Kimi-K2-Instruct-0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-08", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 262000, output: 262000 }, - }, - "Pro/moonshotai/Kimi-K2.5": { - id: "Pro/moonshotai/Kimi-K2.5", - name: "Pro/moonshotai/Kimi-K2.5", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 2.25 }, - limit: { context: 262000, output: 262000 }, - }, - "Pro/MiniMaxAI/MiniMax-M2.5": { - id: "Pro/MiniMaxAI/MiniMax-M2.5", - name: "Pro/MiniMaxAI/MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: false, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-13", - last_updated: "2026-02-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.22 }, - limit: { context: 192000, output: 131000 }, - }, - "Pro/MiniMaxAI/MiniMax-M2.1": { - id: "Pro/MiniMaxAI/MiniMax-M2.1", - name: "Pro/MiniMaxAI/MiniMax-M2.1", - family: "minimax", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 197000, output: 131000 }, - }, - "PaddlePaddle/PaddleOCR-VL": { - id: "PaddlePaddle/PaddleOCR-VL", - name: "PaddlePaddle/PaddleOCR-VL", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-10-16", - last_updated: "2025-10-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 16384, output: 16384 }, - }, - "PaddlePaddle/PaddleOCR-VL-1.5": { - id: "PaddlePaddle/PaddleOCR-VL-1.5", - name: "PaddlePaddle/PaddleOCR-VL-1.5", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-01-29", - last_updated: "2026-01-29", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 16384, output: 16384 }, - }, - "deepseek-ai/DeepSeek-OCR": { - id: "deepseek-ai/DeepSeek-OCR", - name: "deepseek-ai/DeepSeek-OCR", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-10-20", - last_updated: "2025-10-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 8192 }, - }, - "deepseek-ai/DeepSeek-V3.1-Terminus": { - id: "deepseek-ai/DeepSeek-V3.1-Terminus", - name: "deepseek-ai/DeepSeek-V3.1-Terminus", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-29", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 1 }, - limit: { context: 164000, output: 164000 }, - }, - "deepseek-ai/DeepSeek-V3.2": { - id: "deepseek-ai/DeepSeek-V3.2", - name: "deepseek-ai/DeepSeek-V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-03", - last_updated: "2025-12-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 0.42 }, - limit: { context: 164000, output: 164000 }, - }, - "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B": { - id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B", - name: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-01-20", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 131000, output: 131000 }, - }, - "deepseek-ai/DeepSeek-R1": { - id: "deepseek-ai/DeepSeek-R1", - name: "deepseek-ai/DeepSeek-R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-05-28", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 2.18 }, - limit: { context: 164000, output: 164000 }, - }, - "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B": { - id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B", - name: "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-01-20", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 0.18 }, - limit: { context: 131000, output: 131000 }, - }, - "deepseek-ai/DeepSeek-V3": { - id: "deepseek-ai/DeepSeek-V3", - name: "deepseek-ai/DeepSeek-V3", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-26", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1 }, - limit: { context: 164000, output: 164000 }, - }, - "deepseek-ai/deepseek-vl2": { - id: "deepseek-ai/deepseek-vl2", - name: "deepseek-ai/deepseek-vl2", - family: "deepseek", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-13", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 4000, output: 4000 }, - }, - "baidu/ERNIE-4.5-300B-A47B": { - id: "baidu/ERNIE-4.5-300B-A47B", - name: "baidu/ERNIE-4.5-300B-A47B", - family: "ernie", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-02", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.28, output: 1.1 }, - limit: { context: 131000, output: 131000 }, - }, - "THUDM/GLM-Z1-32B-0414": { - id: "THUDM/GLM-Z1-32B-0414", - name: "THUDM/GLM-Z1-32B-0414", - family: "glm-z", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.57 }, - limit: { context: 131000, output: 131000 }, - }, - "THUDM/GLM-4-32B-0414": { - id: "THUDM/GLM-4-32B-0414", - name: "THUDM/GLM-4-32B-0414", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 0.27 }, - limit: { context: 33000, output: 33000 }, - }, - "THUDM/GLM-4-9B-0414": { - id: "THUDM/GLM-4-9B-0414", - name: "THUDM/GLM-4-9B-0414", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.086, output: 0.086 }, - limit: { context: 33000, output: 33000 }, - }, - "THUDM/GLM-Z1-9B-0414": { - id: "THUDM/GLM-Z1-9B-0414", - name: "THUDM/GLM-Z1-9B-0414", - family: "glm-z", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.086, output: 0.086 }, - limit: { context: 131000, output: 131000 }, - }, - "moonshotai/Kimi-K2-Instruct-0905": { - id: "moonshotai/Kimi-K2-Instruct-0905", - name: "moonshotai/Kimi-K2-Instruct-0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-08", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 262000, output: 262000 }, - }, - "moonshotai/Kimi-K2-Thinking": { - id: "moonshotai/Kimi-K2-Thinking", - name: "moonshotai/Kimi-K2-Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-11-07", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.55, output: 2.5 }, - limit: { context: 262000, output: 262000 }, - }, - "ByteDance-Seed/Seed-OSS-36B-Instruct": { - id: "ByteDance-Seed/Seed-OSS-36B-Instruct", - name: "ByteDance-Seed/Seed-OSS-36B-Instruct", - family: "seed", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-04", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.21, output: 0.57 }, - limit: { context: 262000, output: 262000 }, - }, - }, - }, - submodel: { - id: "submodel", - env: ["SUBMODEL_INSTAGEN_ACCESS_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://llm.submodel.ai/v1", - name: "submodel", - doc: "https://submodel.gitbook.io", - models: { - "Qwen/Qwen3-235B-A22B-Instruct-2507": { - id: "Qwen/Qwen3-235B-A22B-Instruct-2507", - name: "Qwen3 235B A22B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-08-23", - last_updated: "2025-08-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.3 }, - limit: { context: 262144, output: 131072 }, - }, - "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8": { - id: "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8", - name: "Qwen3 Coder 480B A35B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-08-23", - last_updated: "2025-08-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 262144, output: 262144 }, - }, - "Qwen/Qwen3-235B-A22B-Thinking-2507": { - id: "Qwen/Qwen3-235B-A22B-Thinking-2507", - name: "Qwen3 235B A22B Thinking 2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-23", - last_updated: "2025-08-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 262144, output: 131072 }, - }, - "zai-org/GLM-4.5-Air": { - id: "zai-org/GLM-4.5-Air", - name: "GLM 4.5 Air", - family: "glm-air", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.5 }, - limit: { context: 131072, output: 131072 }, - }, - "zai-org/GLM-4.5-FP8": { - id: "zai-org/GLM-4.5-FP8", - name: "GLM 4.5 FP8", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 131072, output: 131072 }, - }, - "deepseek-ai/DeepSeek-V3.1": { - id: "deepseek-ai/DeepSeek-V3.1", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-23", - last_updated: "2025-08-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 75000, output: 163840 }, - }, - "deepseek-ai/DeepSeek-V3-0324": { - id: "deepseek-ai/DeepSeek-V3-0324", - name: "DeepSeek V3 0324", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-08-23", - last_updated: "2025-08-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 75000, output: 163840 }, - }, - "deepseek-ai/DeepSeek-R1-0528": { - id: "deepseek-ai/DeepSeek-R1-0528", - name: "DeepSeek R1 0528", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-23", - last_updated: "2025-08-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 2.15 }, - limit: { context: 75000, output: 163840 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-23", - last_updated: "2025-08-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.5 }, - limit: { context: 131072, output: 32768 }, - }, - }, - }, - "minimax-coding-plan": { - id: "minimax-coding-plan", - env: ["MINIMAX_API_KEY"], - npm: "@ai-sdk/anthropic", - api: "https://api.minimax.io/anthropic/v1", - name: "MiniMax Coding Plan (minimax.io)", - doc: "https://platform.minimax.io/docs/coding-plan/intro", - models: { - "MiniMax-M2": { - id: "MiniMax-M2", - name: "MiniMax-M2", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-10-27", - last_updated: "2025-10-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 196608, output: 128000 }, - }, - "MiniMax-M2.5": { - id: "MiniMax-M2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.7": { - id: "MiniMax-M2.7", - name: "MiniMax-M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.7-highspeed": { - id: "MiniMax-M2.7-highspeed", - name: "MiniMax-M2.7-highspeed", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.1": { - id: "MiniMax-M2.1", - name: "MiniMax-M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.5-highspeed": { - id: "MiniMax-M2.5-highspeed", - name: "MiniMax-M2.5-highspeed", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-13", - last_updated: "2026-02-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - }, - }, - perplexity: { - id: "perplexity", - env: ["PERPLEXITY_API_KEY"], - npm: "@ai-sdk/perplexity", - name: "Perplexity", - doc: "https://docs.perplexity.ai", - models: { - "sonar-pro": { - id: "sonar-pro", - name: "Sonar Pro", - family: "sonar-pro", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-09-01", - release_date: "2024-01-01", - last_updated: "2025-09-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 8192 }, - }, - "sonar-deep-research": { - id: "sonar-deep-research", - name: "Perplexity Sonar Deep Research", - attachment: false, - reasoning: true, - tool_call: false, - temperature: false, - knowledge: "2025-01", - release_date: "2025-02-01", - last_updated: "2025-09-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, reasoning: 3 }, - limit: { context: 128000, output: 32768 }, - }, - sonar: { - id: "sonar", - name: "Sonar", - family: "sonar", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-09-01", - release_date: "2024-01-01", - last_updated: "2025-09-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 1 }, - limit: { context: 128000, output: 4096 }, - }, - "sonar-reasoning-pro": { - id: "sonar-reasoning-pro", - name: "Sonar Reasoning Pro", - family: "sonar-reasoning", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-09-01", - release_date: "2024-01-01", - last_updated: "2025-09-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8 }, - limit: { context: 128000, output: 4096 }, - }, - }, - }, - deepseek: { - id: "deepseek", - env: ["DEEPSEEK_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.deepseek.com", - name: "DeepSeek", - doc: "https://api-docs.deepseek.com/quick_start/pricing", - models: { - "deepseek-chat": { - id: "deepseek-chat", - name: "DeepSeek Chat", - family: "deepseek", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-12-01", - last_updated: "2026-02-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.28, cache_read: 0.028 }, - limit: { context: 1000000, output: 384000 }, - }, - "deepseek-reasoner": { - id: "deepseek-reasoner", - name: "DeepSeek Reasoner", - family: "deepseek-thinking", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-09", - release_date: "2025-12-01", - last_updated: "2026-02-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.28, cache_read: 0.028 }, - limit: { context: 1000000, output: 384000 }, - }, - "deepseek-v4-flash": { - id: "deepseek-v4-flash", - name: "DeepSeek V4 Flash", - family: "deepseek-flash", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.28, cache_read: 0.028 }, - limit: { context: 1000000, output: 384000 }, - }, - "deepseek-v4-pro": { - id: "deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.74, output: 3.48, cache_read: 0.145 }, - limit: { context: 1000000, output: 384000 }, - }, - }, - }, - llama: { - id: "llama", - env: ["LLAMA_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.llama.com/compat/v1/", - name: "Llama", - doc: "https://llama.developer.meta.com/docs/models", - models: { - "llama-3.3-70b-instruct": { - id: "llama-3.3-70b-instruct", - name: "Llama-3.3-70B-Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "cerebras-llama-4-maverick-17b-128e-instruct": { - id: "cerebras-llama-4-maverick-17b-128e-instruct", - name: "Cerebras-Llama-4-Maverick-17B-128E-Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "llama-3.3-8b-instruct": { - id: "llama-3.3-8b-instruct", - name: "Llama-3.3-8B-Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "cerebras-llama-4-scout-17b-16e-instruct": { - id: "cerebras-llama-4-scout-17b-16e-instruct", - name: "Cerebras-Llama-4-Scout-17B-16E-Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "groq-llama-4-maverick-17b-128e-instruct": { - id: "groq-llama-4-maverick-17b-128e-instruct", - name: "Groq-Llama-4-Maverick-17B-128E-Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "llama-4-scout-17b-16e-instruct-fp8": { - id: "llama-4-scout-17b-16e-instruct-fp8", - name: "Llama-4-Scout-17B-16E-Instruct-FP8", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "llama-4-maverick-17b-128e-instruct-fp8": { - id: "llama-4-maverick-17b-128e-instruct-fp8", - name: "Llama-4-Maverick-17B-128E-Instruct-FP8", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - }, - }, - openrouter: { - id: "openrouter", - env: ["OPENROUTER_API_KEY"], - npm: "@openrouter/ai-sdk-provider", - api: "https://openrouter.ai/api/v1", - name: "OpenRouter", - doc: "https://openrouter.ai/models", - models: { - "liquid/lfm-2.5-1.2b-instruct:free": { - id: "liquid/lfm-2.5-1.2b-instruct:free", - name: "LFM2.5-1.2B-Instruct (free)", - family: "liquid", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-06", - release_date: "2026-01-20", - last_updated: "2026-01-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 32768 }, - }, - "liquid/lfm-2.5-1.2b-thinking:free": { - id: "liquid/lfm-2.5-1.2b-thinking:free", - name: "LFM2.5-1.2B-Thinking (free)", - family: "liquid", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-06", - release_date: "2026-01-20", - last_updated: "2026-01-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 32768 }, - }, - "deepseek/deepseek-chat-v3.1": { - id: "deepseek/deepseek-chat-v3.1", - name: "DeepSeek-V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 163840, output: 163840 }, - }, - "deepseek/deepseek-r1-distill-llama-70b": { - id: "deepseek/deepseek-r1-distill-llama-70b", - name: "DeepSeek R1 Distill Llama 70B", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-01-23", - last_updated: "2025-01-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 8192 }, - }, - "deepseek/deepseek-r1": { - id: "deepseek/deepseek-r1", - name: "DeepSeek: R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - knowledge: "2024-07", - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 2.5 }, - limit: { context: 64000, output: 16000 }, - }, - "deepseek/deepseek-v3.2-speciale": { - id: "deepseek/deepseek-v3.2-speciale", - name: "DeepSeek V3.2 Speciale", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 0.41 }, - limit: { context: 163840, output: 65536 }, - }, - "deepseek/deepseek-v3.2": { - id: "deepseek/deepseek-v3.2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.28, output: 0.4 }, - limit: { context: 163840, output: 65536 }, - }, - "deepseek/deepseek-v3.1-terminus:exacto": { - id: "deepseek/deepseek-v3.1-terminus:exacto", - name: "DeepSeek V3.1 Terminus (exacto)", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-09-22", - last_updated: "2025-09-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 1 }, - limit: { context: 131072, output: 65536 }, - }, - "deepseek/deepseek-chat-v3-0324": { - id: "deepseek/deepseek-chat-v3-0324", - name: "DeepSeek V3 0324", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-24", - last_updated: "2025-03-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 16384, output: 8192 }, - }, - "deepseek/deepseek-v3.1-terminus": { - id: "deepseek/deepseek-v3.1-terminus", - name: "DeepSeek V3.1 Terminus", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-09-22", - last_updated: "2025-09-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 1 }, - limit: { context: 131072, output: 65536 }, - }, - "openrouter/owl-alpha": { - id: "openrouter/owl-alpha", - name: "Owl Alpha", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-28", - last_updated: "2026-04-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 1048756, output: 262144 }, - status: "alpha", - }, - "openrouter/pareto-code": { - id: "openrouter/pareto-code", - name: "Pareto Code Router", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 200000 }, - }, - "openrouter/elephant-alpha": { - id: "openrouter/elephant-alpha", - name: "Elephant (free)", - family: "elephant", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-13", - last_updated: "2026-04-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 32768 }, - }, - "openrouter/free": { - id: "openrouter/free", - name: "Free Models Router", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-01", - last_updated: "2026-02-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 200000, input: 200000, output: 8000 }, - }, - "arcee-ai/trinity-large-thinking": { - id: "arcee-ai/trinity-large-thinking", - name: "Trinity Large Thinking", - family: "trinity", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 0.85 }, - limit: { context: 262144, output: 80000 }, - }, - "arcee-ai/trinity-large-preview:free": { - id: "arcee-ai/trinity-large-preview:free", - name: "Trinity Large Preview", - family: "trinity", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-06", - release_date: "2026-01-28", - last_updated: "2026-01-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 131072 }, - }, - "cognitivecomputations/dolphin-mistral-24b-venice-edition:free": { - id: "cognitivecomputations/dolphin-mistral-24b-venice-edition:free", - name: "Uncensored (free)", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-07-09", - last_updated: "2026-01-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 32768, output: 32768 }, - }, - "bytedance-seed/seedream-4.5": { - id: "bytedance-seed/seedream-4.5", - name: "Seedream 4.5", - family: "seed", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-06", - release_date: "2025-12-23", - last_updated: "2026-01-31", - modalities: { input: ["image", "text"], output: ["image"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 4096, output: 4096 }, - }, - "black-forest-labs/flux.2-max": { - id: "black-forest-labs/flux.2-max", - name: "FLUX.2 Max", - family: "flux", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-06", - release_date: "2025-12-16", - last_updated: "2026-01-31", - modalities: { input: ["image", "text"], output: ["image"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 46864, output: 46864 }, - }, - "black-forest-labs/flux.2-flex": { - id: "black-forest-labs/flux.2-flex", - name: "FLUX.2 Flex", - family: "flux", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-06", - release_date: "2025-11-25", - last_updated: "2026-01-31", - modalities: { input: ["image", "text"], output: ["image"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 67344, output: 67344 }, - }, - "black-forest-labs/flux.2-pro": { - id: "black-forest-labs/flux.2-pro", - name: "FLUX.2 Pro", - family: "flux", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-06", - release_date: "2025-11-25", - last_updated: "2026-01-31", - modalities: { input: ["image", "text"], output: ["image"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 46864, output: 46864 }, - }, - "black-forest-labs/flux.2-klein-4b": { - id: "black-forest-labs/flux.2-klein-4b", - name: "FLUX.2 Klein 4B", - family: "flux", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-06", - release_date: "2026-01-14", - last_updated: "2026-01-31", - modalities: { input: ["image", "text"], output: ["image"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 40960, output: 40960 }, - }, - "nousresearch/hermes-3-llama-3.1-405b:free": { - id: "nousresearch/hermes-3-llama-3.1-405b:free", - name: "Hermes 3 405B Instruct (free)", - family: "hermes", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2023-12", - release_date: "2024-08-16", - last_updated: "2024-08-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 131072 }, - }, - "nousresearch/hermes-4-405b": { - id: "nousresearch/hermes-4-405b", - name: "Hermes 4 405B", - family: "hermes", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2025-08-25", - last_updated: "2025-08-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3 }, - limit: { context: 131072, output: 131072 }, - }, - "nousresearch/hermes-4-70b": { - id: "nousresearch/hermes-4-70b", - name: "Hermes 4 70B", - family: "hermes", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-12", - release_date: "2025-08-25", - last_updated: "2025-08-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.4 }, - limit: { context: 131072, output: 131072 }, - }, - "stepfun/step-3.5-flash": { - id: "stepfun/step-3.5-flash", - name: "Step 3.5 Flash", - family: "step", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-29", - last_updated: "2026-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3, cache_read: 0.02 }, - limit: { context: 256000, output: 256000 }, - }, - "mistralai/mistral-small-3.1-24b-instruct": { - id: "mistralai/mistral-small-3.1-24b-instruct", - name: "Mistral Small 3.1 24B Instruct", - family: "mistral-small", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-17", - last_updated: "2025-03-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "mistralai/devstral-2512": { - id: "mistralai/devstral-2512", - name: "Devstral 2 2512", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-12", - release_date: "2025-09-12", - last_updated: "2025-09-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 262144, output: 262144 }, - }, - "mistralai/codestral-2508": { - id: "mistralai/codestral-2508", - name: "Codestral 2508", - family: "codestral", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-08-01", - last_updated: "2025-08-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 256000, output: 256000 }, - }, - "mistralai/mistral-medium-3.1": { - id: "mistralai/mistral-medium-3.1", - name: "Mistral Medium 3.1", - family: "mistral-medium", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-08-12", - last_updated: "2025-08-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 262144, output: 262144 }, - }, - "mistralai/mistral-small-2603": { - id: "mistralai/mistral-small-2603", - name: "Mistral Small 4", - family: "mistral-small", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2026-03-16", - last_updated: "2026-03-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 262144, output: 262144 }, - }, - "mistralai/mistral-medium-3": { - id: "mistralai/mistral-medium-3", - name: "Mistral Medium 3", - family: "mistral-medium", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-05-07", - last_updated: "2025-05-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 131072, output: 131072 }, - }, - "mistralai/devstral-small-2505": { - id: "mistralai/devstral-small-2505", - name: "Devstral Small", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-05-07", - last_updated: "2025-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.12 }, - limit: { context: 128000, output: 128000 }, - }, - "mistralai/mistral-small-3.2-24b-instruct": { - id: "mistralai/mistral-small-3.2-24b-instruct", - name: "Mistral Small 3.2 24B Instruct", - family: "mistral-small", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-06-20", - last_updated: "2025-06-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 96000, output: 8192 }, - }, - "mistralai/devstral-medium-2507": { - id: "mistralai/devstral-medium-2507", - name: "Devstral Medium", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-07-10", - last_updated: "2025-07-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2 }, - limit: { context: 131072, output: 131072 }, - }, - "mistralai/devstral-small-2507": { - id: "mistralai/devstral-small-2507", - name: "Devstral Small 1.1", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-07-10", - last_updated: "2025-07-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 131072, output: 131072 }, - }, - "meta-llama/llama-3.2-11b-vision-instruct": { - id: "meta-llama/llama-3.2-11b-vision-instruct", - name: "Llama 3.2 11B Vision Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-25", - last_updated: "2024-09-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 8192 }, - }, - "meta-llama/llama-3.2-3b-instruct:free": { - id: "meta-llama/llama-3.2-3b-instruct:free", - name: "Llama 3.2 3B Instruct (free)", - family: "llama", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-25", - last_updated: "2024-09-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 131072 }, - }, - "meta-llama/llama-3.3-70b-instruct:free": { - id: "meta-llama/llama-3.3-70b-instruct:free", - name: "Llama 3.3 70B Instruct (free)", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 131072 }, - }, - "x-ai/grok-4.20-multi-agent-beta": { - id: "x-ai/grok-4.20-multi-agent-beta", - name: "Grok 4.20 Multi - Agent Beta", - family: "grok", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2026-03-12", - last_updated: "2026-03-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.2, context_over_200k: { input: 4, output: 12 } }, - limit: { context: 2000000, output: 30000 }, - status: "beta", - }, - "x-ai/grok-4-fast": { - id: "x-ai/grok-4-fast", - name: "Grok 4 Fast", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-08-19", - last_updated: "2025-08-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05, cache_write: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "x-ai/grok-code-fast-1": { - id: "x-ai/grok-code-fast-1", - name: "Grok Code Fast 1", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08", - release_date: "2025-08-26", - last_updated: "2025-08-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.5, cache_read: 0.02 }, - limit: { context: 256000, output: 10000 }, - }, - "x-ai/grok-3-beta": { - id: "x-ai/grok-3-beta", - name: "Grok 3 Beta", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75, cache_write: 15 }, - limit: { context: 131072, output: 8192 }, - }, - "x-ai/grok-4": { - id: "x-ai/grok-4", - name: "Grok 4", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75, cache_write: 15 }, - limit: { context: 256000, output: 64000 }, - }, - "x-ai/grok-3-mini": { - id: "x-ai/grok-3-mini", - name: "Grok 3 Mini", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.5, cache_read: 0.075, cache_write: 0.5 }, - limit: { context: 131072, output: 8192 }, - }, - "x-ai/grok-4.1-fast": { - id: "x-ai/grok-4.1-fast", - name: "Grok 4.1 Fast", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05, cache_write: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "x-ai/grok-4.20-beta": { - id: "x-ai/grok-4.20-beta", - name: "Grok 4.20 Beta", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-12", - last_updated: "2026-03-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.2, context_over_200k: { input: 4, output: 12 } }, - limit: { context: 2000000, output: 30000 }, - status: "beta", - }, - "x-ai/grok-3-mini-beta": { - id: "x-ai/grok-3-mini-beta", - name: "Grok 3 Mini Beta", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.5, cache_read: 0.075, cache_write: 0.5 }, - limit: { context: 131072, output: 8192 }, - }, - "x-ai/grok-3": { - id: "x-ai/grok-3", - name: "Grok 3", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75, cache_write: 15 }, - limit: { context: 131072, output: 8192 }, - }, - "tencent/hy3-preview": { - id: "tencent/hy3-preview", - name: "Hy3 preview", - family: "Hy", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-20", - last_updated: "2026-04-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.066, output: 0.26, cache_read: 0.029, cache_write: 0.029 }, - limit: { context: 256000, output: 64000 }, - }, - "poolside/laguna-m.1:free": { - id: "poolside/laguna-m.1:free", - name: "Laguna M.1", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-28", - last_updated: "2026-04-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 131072, output: 8192 }, - }, - "poolside/laguna-xs.2:free": { - id: "poolside/laguna-xs.2:free", - name: "Laguna XS.2", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-28", - last_updated: "2026-04-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 131072, output: 8192 }, - }, - "prime-intellect/intellect-3": { - id: "prime-intellect/intellect-3", - name: "Intellect 3", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-01-15", - last_updated: "2025-01-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1.1 }, - limit: { context: 131072, output: 8192 }, - }, - "nvidia/nemotron-3-super-120b-a12b": { - id: "nvidia/nemotron-3-super-120b-a12b", - name: "Nemotron 3 Super", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2026-03-11", - last_updated: "2026-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.5 }, - limit: { context: 262144, output: 262144 }, - }, - "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free": { - id: "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free", - name: "Nemotron 3 Nano Omni (free)", - family: "nemotron", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-28", - last_updated: "2026-04-28", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 65536 }, - }, - "nvidia/nemotron-3-nano-30b-a3b:free": { - id: "nvidia/nemotron-3-nano-30b-a3b:free", - name: "Nemotron 3 Nano 30B A3B (free)", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-11", - release_date: "2025-12-14", - last_updated: "2026-01-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 256000 }, - }, - "nvidia/nemotron-nano-9b-v2:free": { - id: "nvidia/nemotron-nano-9b-v2:free", - name: "Nemotron Nano 9B V2 (free)", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-09", - release_date: "2025-09-05", - last_updated: "2025-08-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 128000 }, - }, - "nvidia/nemotron-3-super-120b-a12b:free": { - id: "nvidia/nemotron-3-super-120b-a12b:free", - name: "Nemotron 3 Super (free)", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2026-03-11", - last_updated: "2026-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 262144 }, - }, - "nvidia/nemotron-nano-9b-v2": { - id: "nvidia/nemotron-nano-9b-v2", - name: "nvidia-nemotron-nano-9b-v2", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2025-08-18", - last_updated: "2025-08-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.16 }, - limit: { context: 131072, output: 131072 }, - }, - "nvidia/nemotron-nano-12b-v2-vl:free": { - id: "nvidia/nemotron-nano-12b-v2-vl:free", - name: "Nemotron Nano 12B 2 VL (free)", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-11", - release_date: "2025-10-28", - last_updated: "2026-01-31", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 128000 }, - }, - "inception/mercury-edit-2": { - id: "inception/mercury-edit-2", - name: "Mercury Edit 2", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2026-03-30", - last_updated: "2026-03-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.75, cache_read: 0.025 }, - limit: { context: 128000, output: 8192 }, - }, - "inception/mercury-2": { - id: "inception/mercury-2", - name: "Mercury 2", - family: "mercury", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-04", - last_updated: "2026-03-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.75, cache_read: 0.025 }, - limit: { context: 128000, output: 50000 }, - }, - "openai/gpt-5.1-codex-max": { - id: "openai/gpt-5.1-codex-max", - name: "GPT-5.1-Codex-Max", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 9, cache_read: 0.11 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.2-chat": { - id: "openai/gpt-5.2-chat", - name: "GPT-5.2 Chat", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-oss-120b:exacto": { - id: "openai/gpt-oss-120b:exacto", - name: "GPT OSS 120B (exacto)", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.24 }, - limit: { context: 131072, output: 32768 }, - }, - "openai/gpt-5-chat": { - id: "openai/gpt-5-chat", - name: "GPT-5 Chat (latest)", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.2-pro": { - id: "openai/gpt-5.2-pro", - name: "GPT-5.2 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 21, output: 168 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5-mini": { - id: "openai/gpt-5-mini", - name: "GPT-5 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10-01", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5-nano": { - id: "openai/gpt-5-nano", - name: "GPT-5 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10-01", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.3-codex": { - id: "openai/gpt-5.3-codex", - name: "GPT-5.3-Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-24", - last_updated: "2026-02-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.2": { - id: "openai/gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-oss-20b:free": { - id: "openai/gpt-oss-20b:free", - name: "gpt-oss-20b (free)", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2026-01-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 32768 }, - }, - "openai/gpt-4o-mini": { - id: "openai/gpt-4o-mini", - name: "GPT-4o-mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.08 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-5.4-mini": { - id: "openai/gpt-5.4-mini", - name: "GPT-5.4 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5, cache_read: 0.075 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.1-chat": { - id: "openai/gpt-5.1-chat", - name: "GPT-5.1 Chat", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/o4-mini": { - id: "openai/o4-mini", - name: "o4 Mini", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.28 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-5.4-nano": { - id: "openai/gpt-5.4-nano", - name: "GPT-5.4 Nano", - family: "gpt-nano", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.25, cache_read: 0.02 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.2-codex": { - id: "openai/gpt-5.2-codex", - name: "GPT-5.2-Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-01-14", - last_updated: "2026-01-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.1-codex-mini": { - id: "openai/gpt-5.1-codex-mini", - name: "GPT-5.1-Codex-Mini", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, output: 100000 }, - }, - "openai/gpt-5-image": { - id: "openai/gpt-5-image", - name: "GPT-5 Image", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10-01", - release_date: "2025-10-14", - last_updated: "2025-10-14", - modalities: { input: ["text", "image", "pdf"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 5, output: 10, cache_read: 1.25 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.1": { - id: "openai/gpt-5.1", - name: "GPT-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.4-pro": { - id: "openai/gpt-5.4-pro", - name: "GPT-5.4 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180, cache_read: 30 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "openai/gpt-5-codex": { - id: "openai/gpt-5-codex", - name: "GPT-5 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10-01", - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-oss-20b": { - id: "openai/gpt-oss-20b", - name: "GPT OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.2 }, - limit: { context: 131072, output: 32768 }, - }, - "openai/gpt-5-pro": { - id: "openai/gpt-5-pro", - name: "GPT-5 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-10-06", - last_updated: "2025-10-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 120 }, - limit: { context: 400000, output: 272000 }, - }, - "openai/gpt-oss-120b:free": { - id: "openai/gpt-oss-120b:free", - name: "gpt-oss-120b (free)", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 32768 }, - }, - "openai/gpt-5": { - id: "openai/gpt-5", - name: "GPT-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10-01", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-oss-safeguard-20b": { - id: "openai/gpt-oss-safeguard-20b", - name: "GPT OSS Safeguard 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-10-29", - last_updated: "2025-10-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 131072, output: 65536 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.072, output: 0.28 }, - limit: { context: 131072, output: 32768 }, - }, - "openai/gpt-4.1": { - id: "openai/gpt-4.1", - name: "GPT-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 1047576, output: 32768 }, - }, - "openai/gpt-4.1-mini": { - id: "openai/gpt-4.1-mini", - name: "GPT-4.1 Mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.6, cache_read: 0.1 }, - limit: { context: 1047576, output: 32768 }, - }, - "openai/gpt-5.1-codex": { - id: "openai/gpt-5.1-codex", - name: "GPT-5.1-Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "z-ai/glm-4.7": { - id: "z-ai/glm-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.11 }, - limit: { context: 204800, output: 131072 }, - }, - "z-ai/glm-4.5-air:free": { - id: "z-ai/glm-4.5-air:free", - name: "GLM 4.5 Air (free)", - family: "glm-air", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 96000 }, - }, - "z-ai/glm-5": { - id: "z-ai/glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2, cache_read: 0.2 }, - limit: { context: 202752, output: 131000 }, - }, - "z-ai/glm-5.1": { - id: "z-ai/glm-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-07", - last_updated: "2026-04-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.4, output: 4.4, cache_read: 0.26 }, - limit: { context: 202752, output: 131072 }, - }, - "z-ai/glm-4.5": { - id: "z-ai/glm-4.5", - name: "GLM 4.5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 128000, output: 96000 }, - }, - "z-ai/glm-4.6:exacto": { - id: "z-ai/glm-4.6:exacto", - name: "GLM 4.6 (exacto)", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.9, cache_read: 0.11 }, - limit: { context: 200000, output: 128000 }, - }, - "z-ai/glm-4.5-air": { - id: "z-ai/glm-4.5-air", - name: "GLM 4.5 Air", - family: "glm-air", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1.1 }, - limit: { context: 128000, output: 96000 }, - }, - "z-ai/glm-5-turbo": { - id: "z-ai/glm-5-turbo", - name: "GLM-5-Turbo", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-16", - last_updated: "2026-03-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.96, output: 3.2, cache_read: 0.192, cache_write: 0 }, - limit: { context: 202752, output: 131072 }, - }, - "z-ai/glm-4.5v": { - id: "z-ai/glm-4.5v", - name: "GLM 4.5V", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-08-11", - last_updated: "2025-08-11", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.8 }, - limit: { context: 64000, output: 16384 }, - }, - "z-ai/glm-4.6": { - id: "z-ai/glm-4.6", - name: "GLM 4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.11 }, - limit: { context: 200000, output: 128000 }, - }, - "z-ai/glm-4.7-flash": { - id: "z-ai/glm-4.7-flash", - name: "GLM-4.7-Flash", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - structured_output: true, - temperature: true, - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.4 }, - limit: { context: 200000, output: 65535 }, - }, - "sourceful/riverflow-v2-standard-preview": { - id: "sourceful/riverflow-v2-standard-preview", - name: "Riverflow V2 Standard Preview", - family: "sourceful", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-06", - release_date: "2025-12-08", - last_updated: "2026-01-28", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 8192 }, - }, - "sourceful/riverflow-v2-fast-preview": { - id: "sourceful/riverflow-v2-fast-preview", - name: "Riverflow V2 Fast Preview", - family: "sourceful", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-06", - release_date: "2025-12-08", - last_updated: "2026-01-28", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 8192 }, - }, - "sourceful/riverflow-v2-max-preview": { - id: "sourceful/riverflow-v2-max-preview", - name: "Riverflow V2 Max Preview", - family: "sourceful", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-06", - release_date: "2025-12-08", - last_updated: "2026-01-28", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 8192 }, - }, - "minimax/minimax-m2.7": { - id: "minimax/minimax-m2.7", - name: "MiniMax M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - "minimax/minimax-m2": { - id: "minimax/minimax-m2", - name: "MiniMax M2", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - structured_output: true, - temperature: true, - release_date: "2025-10-23", - last_updated: "2025-10-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.28, output: 1.15, cache_read: 0.28, cache_write: 1.15 }, - limit: { context: 196600, output: 118000 }, - }, - "minimax/minimax-01": { - id: "minimax/minimax-01", - name: "MiniMax-01", - family: "minimax", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-01-15", - last_updated: "2025-01-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1.1 }, - limit: { context: 1000000, output: 1000000 }, - }, - "minimax/minimax-m2.1": { - id: "minimax/minimax-m2.1", - name: "MiniMax M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - structured_output: true, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204800, output: 131072 }, - }, - "minimax/minimax-m2.5:free": { - id: "minimax/minimax-m2.5:free", - name: "MiniMax M2.5 (free)", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - structured_output: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "minimax/minimax-m1": { - id: "minimax/minimax-m1", - name: "MiniMax M1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2.2 }, - limit: { context: 1000000, output: 40000 }, - }, - "minimax/minimax-m2.5": { - id: "minimax/minimax-m2.5", - name: "MiniMax M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - structured_output: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.03 }, - limit: { context: 204800, output: 131072 }, - }, - "qwen/qwen3-coder-plus": { - id: "qwen/qwen3-coder-plus", - name: "Qwen3 Coder Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.65, output: 3.25, cache_read: 0.13, cache_write: 0.8125 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen/qwen3.5-397b-a17b": { - id: "qwen/qwen3.5-397b-a17b", - name: "Qwen3.5 397B A17B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3.6 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen2.5-vl-72b-instruct": { - id: "qwen/qwen2.5-vl-72b-instruct", - name: "Qwen2.5 VL 72B Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-02-01", - last_updated: "2025-02-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 32768, output: 8192 }, - }, - "qwen/qwen-plus": { - id: "qwen/qwen-plus", - name: "Qwen: Qwen-Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - knowledge: "2024-04", - release_date: "2025-01-25", - last_updated: "2025-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.26, output: 0.78, cache_read: 0.052, cache_write: 0.325 }, - limit: { context: 1000000, output: 32768 }, - }, - "qwen/qwen3.5-flash-02-23": { - id: "qwen/qwen3.5-flash-02-23", - name: "Qwen: Qwen3.5-Flash", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-25", - last_updated: "2026-02-25", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.065, output: 0.26 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen/qwen3.6-plus": { - id: "qwen/qwen3.6-plus", - name: "Qwen3.6 Plus", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.325, output: 1.95, cache_read: 0.0325, cache_write: 0.40625 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen/qwen3-max": { - id: "qwen/qwen3-max", - name: "Qwen3 Max", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 6, cache_read: 0.156, cache_write: 0.975 }, - limit: { context: 262144, output: 32768 }, - }, - "qwen/qwen3-coder:exacto": { - id: "qwen/qwen3-coder:exacto", - name: "Qwen3 Coder (exacto)", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.38, output: 1.53 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3-30b-a3b-instruct-2507": { - id: "qwen/qwen3-30b-a3b-instruct-2507", - name: "Qwen3 30B A3B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-29", - last_updated: "2025-07-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 262000, output: 262000 }, - }, - "qwen/qwen-3.6-27b": { - id: "qwen/qwen-3.6-27b", - name: "Qwen3.6 27B", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.195, output: 1.56 }, - limit: { context: 262144, output: 81920 }, - }, - "qwen/qwen3-235b-a22b-thinking-2507": { - id: "qwen/qwen3-235b-a22b-thinking-2507", - name: "Qwen3 235B A22B Thinking 2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-25", - last_updated: "2025-07-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.078, output: 0.312 }, - limit: { context: 262144, output: 81920 }, - }, - "qwen/qwen3-next-80b-a3b-thinking": { - id: "qwen/qwen3-next-80b-a3b-thinking", - name: "Qwen3 Next 80B A3B Thinking", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-11", - last_updated: "2025-09-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 1.4 }, - limit: { context: 262144, output: 262144 }, - }, - "qwen/qwen3-30b-a3b-thinking-2507": { - id: "qwen/qwen3-30b-a3b-thinking-2507", - name: "Qwen3 30B A3B Thinking 2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-29", - last_updated: "2025-07-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 262000, output: 262000 }, - }, - "qwen/qwen3-coder-flash": { - id: "qwen/qwen3-coder-flash", - name: "Qwen3 Coder Flash", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.5, cache_read: 0.039, cache_write: 0.24375 }, - limit: { context: 128000, output: 66536 }, - }, - "qwen/qwen3-next-80b-a3b-instruct": { - id: "qwen/qwen3-next-80b-a3b-instruct", - name: "Qwen3 Next 80B A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-11", - last_updated: "2025-09-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 1.4 }, - limit: { context: 262144, output: 262144 }, - }, - "qwen/qwen-2.5-coder-32b-instruct": { - id: "qwen/qwen-2.5-coder-32b-instruct", - name: "Qwen2.5 Coder 32B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-11-11", - last_updated: "2024-11-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 32768, output: 8192 }, - }, - "qwen/qwen3-coder-30b-a3b-instruct": { - id: "qwen/qwen3-coder-30b-a3b-instruct", - name: "Qwen3 Coder 30B A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-31", - last_updated: "2025-07-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.27 }, - limit: { context: 160000, output: 65536 }, - }, - "qwen/qwen3-coder": { - id: "qwen/qwen3-coder", - name: "Qwen3 Coder", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 262144, output: 66536 }, - }, - "qwen/qwen3.5-plus-02-15": { - id: "qwen/qwen3.5-plus-02-15", - name: "Qwen3.5 Plus 2026-02-15", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2.4 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen/qwen3-235b-a22b-07-25": { - id: "qwen/qwen3-235b-a22b-07-25", - name: "Qwen3 235B A22B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04-28", - last_updated: "2025-07-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.85 }, - limit: { context: 262144, output: 131072 }, - }, - "google/gemini-2.5-pro-preview-05-06": { - id: "google/gemini-2.5-pro-preview-05-06", - name: "Gemini 2.5 Pro Preview 05-06", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-05-06", - last_updated: "2025-05-06", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.31 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-3.1-pro-preview-customtools": { - id: "google/gemini-3.1-pro-preview-customtools", - name: "Gemini 3.1 Pro Preview Custom Tools", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, reasoning: 12, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemma-3-4b-it:free": { - id: "google/gemma-3-4b-it:free", - name: "Gemma 3 4B (free)", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 32768, output: 8192 }, - }, - "google/gemini-2.5-flash-lite-preview-09-2025": { - id: "google/gemini-2.5-flash-lite-preview-09-2025", - name: "Gemini 2.5 Flash Lite Preview 09-25", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-2.0-flash-001": { - id: "google/gemini-2.0-flash-001", - name: "Gemini 2.0 Flash", - family: "gemini-flash", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 8192 }, - }, - "google/gemma-3n-e4b-it": { - id: "google/gemma-3n-e4b-it", - name: "Gemma 3n 4B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-06", - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.04 }, - limit: { context: 32768, output: 32768 }, - }, - "google/gemini-3.1-flash-lite-preview": { - id: "google/gemini-3.1-flash-lite-preview", - name: "Gemini 3.1 Flash Lite Preview", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-03", - last_updated: "2026-03-03", - modalities: { input: ["text", "image", "video", "pdf", "audio"], output: ["text"] }, - open_weights: false, - cost: { - input: 0.25, - output: 1.5, - reasoning: 1.5, - cache_read: 0.025, - cache_write: 0.083, - input_audio: 0.5, - output_audio: 0.5, - }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemma-3n-e4b-it:free": { - id: "google/gemma-3n-e4b-it:free", - name: "Gemma 3n 4B (free)", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-06", - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 2000 }, - }, - "google/gemini-3.1-pro-preview": { - id: "google/gemini-3.1-pro-preview", - name: "Gemini 3.1 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, reasoning: 12, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-3-flash-preview": { - id: "google/gemini-3-flash-preview", - name: "Gemini 3 Flash Preview", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3, cache_read: 0.05 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-3-pro-preview": { - id: "google/gemini-3-pro-preview", - name: "Gemini 3 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-11-18", - last_updated: "2025-11", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12 }, - limit: { context: 1050000, output: 66000 }, - }, - "google/gemma-3n-e2b-it:free": { - id: "google/gemma-3n-e2b-it:free", - name: "Gemma 3n 2B (free)", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-06", - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 2000 }, - }, - "google/gemma-2-9b-it": { - id: "google/gemma-2-9b-it", - name: "Gemma 2 9B", - family: "gemma", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-06", - release_date: "2024-06-28", - last_updated: "2024-06-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.09 }, - limit: { context: 8192, output: 8192 }, - }, - "google/gemma-4-31b-it": { - id: "google/gemma-4-31b-it", - name: "Gemma 4 31B", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.4 }, - limit: { context: 262144, output: 262144 }, - }, - "google/gemini-2.5-pro-preview-06-05": { - id: "google/gemini-2.5-pro-preview-06-05", - name: "Gemini 2.5 Pro Preview 06-05", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-05", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.31 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemma-3-12b-it": { - id: "google/gemma-3-12b-it", - name: "Gemma 3 12B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.1 }, - limit: { context: 131072, output: 131072 }, - }, - "google/gemma-3-27b-it:free": { - id: "google/gemma-3-27b-it:free", - name: "Gemma 3 27B (free)", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-12", - last_updated: "2025-03-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 8192 }, - }, - "google/gemini-2.5-flash": { - id: "google/gemini-2.5-flash", - name: "Gemini 2.5 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-07-17", - last_updated: "2025-07-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.0375 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-3.1-flash-image-preview": { - id: "google/gemini-3.1-flash-image-preview", - name: "Gemini 3.1 Flash Image Preview (Nano Banana 2)", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-26", - last_updated: "2026-02-26", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 0.5, output: 3 }, - limit: { context: 65536, output: 65536 }, - }, - "google/gemma-4-31b-it:free": { - id: "google/gemma-4-31b-it:free", - name: "Gemma 4 31B (free)", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 32768 }, - }, - "google/gemma-3-12b-it:free": { - id: "google/gemma-3-12b-it:free", - name: "Gemma 3 12B (free)", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 32768, output: 8192 }, - }, - "google/gemma-3-4b-it": { - id: "google/gemma-3-4b-it", - name: "Gemma 3 4B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.01703, output: 0.06815 }, - limit: { context: 96000, output: 96000 }, - }, - "google/gemini-2.5-flash-preview-09-2025": { - id: "google/gemini-2.5-flash-preview-09-2025", - name: "Gemini 2.5 Flash Preview 09-25", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.031 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemma-3-27b-it": { - id: "google/gemma-3-27b-it", - name: "Gemma 3 27B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-12", - last_updated: "2025-03-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.15 }, - limit: { context: 96000, output: 96000 }, - }, - "google/gemma-4-26b-a4b-it": { - id: "google/gemma-4-26b-a4b-it", - name: "Gemma 4 26B A4B", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-03", - last_updated: "2026-04-03", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.4 }, - limit: { context: 262144, output: 262144 }, - }, - "google/gemma-4-26b-a4b-it:free": { - id: "google/gemma-4-26b-a4b-it:free", - name: "Gemma 4 26B A4B (free)", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-03", - last_updated: "2026-04-03", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 32768 }, - }, - "google/gemini-2.5-flash-lite": { - id: "google/gemini-2.5-flash-lite", - name: "Gemini 2.5 Flash Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 65536 }, - }, - "moonshotai/kimi-k2.5": { - id: "moonshotai/kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.1 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/kimi-k2-0905": { - id: "moonshotai/kimi-k2-0905", - name: "Kimi K2 Instruct 0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5 }, - limit: { context: 262144, output: 16384 }, - }, - "moonshotai/kimi-k2.6": { - id: "moonshotai/kimi-k2.6", - name: "Kimi K2.6", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - structured_output: true, - temperature: true, - release_date: "2026-04-20", - last_updated: "2026-04-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/kimi-k2-0905:exacto": { - id: "moonshotai/kimi-k2-0905:exacto", - name: "Kimi K2 Instruct 0905 (exacto)", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5 }, - limit: { context: 262144, output: 16384 }, - }, - "moonshotai/kimi-k2": { - id: "moonshotai/kimi-k2", - name: "Kimi K2", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-07-11", - last_updated: "2025-07-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.2 }, - limit: { context: 131072, output: 32768 }, - }, - "moonshotai/kimi-k2-thinking": { - id: "moonshotai/kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - structured_output: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5, cache_read: 0.15 }, - limit: { context: 262144, output: 262144 }, - }, - "anthropic/claude-opus-4.1": { - id: "anthropic/claude-opus-4.1", - name: "Claude Opus 4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "anthropic/claude-3.7-sonnet": { - id: "anthropic/claude-3.7-sonnet", - name: "Claude Sonnet 3.7", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-01", - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 128000 }, - }, - "anthropic/claude-opus-4.6": { - id: "anthropic/claude-opus-4.6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 5, - output: 25, - cache_read: 0.5, - cache_write: 6.25, - context_over_200k: { input: 10, output: 37.5, cache_read: 1, cache_write: 12.5 }, - }, - limit: { context: 1000000, output: 128000 }, - }, - "anthropic/claude-opus-4.7": { - id: "anthropic/claude-opus-4.7", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 5, - output: 25, - cache_read: 0.5, - cache_write: 6.25, - context_over_200k: { input: 10, output: 37.5, cache_read: 1, cache_write: 12.5 }, - }, - limit: { context: 1000000, output: 128000 }, - }, - "anthropic/claude-sonnet-4": { - id: "anthropic/claude-sonnet-4", - name: "Claude Sonnet 4", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.6, cache_write: 7.5 }, - }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-sonnet-4.5": { - id: "anthropic/claude-sonnet-4.5", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.6, cache_write: 7.5 }, - }, - limit: { context: 1000000, output: 64000 }, - }, - "anthropic/claude-opus-4.5": { - id: "anthropic/claude-opus-4.5", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05-30", - release_date: "2025-11-24", - last_updated: "2025-11-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 32000 }, - }, - "anthropic/claude-haiku-4.5": { - id: "anthropic/claude-haiku-4.5", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-sonnet-4.6": { - id: "anthropic/claude-sonnet-4.6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.6, cache_write: 7.5 }, - }, - limit: { context: 1000000, output: 128000 }, - }, - "deepseek/deepseek-v4-flash": { - id: "deepseek/deepseek-v4-flash", - name: "DeepSeek V4 Flash", - family: "deepseek-flash", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.28, cache_read: 0.028 }, - limit: { context: 1048576, output: 393216 }, - }, - "deepseek/deepseek-v4-pro": { - id: "deepseek/deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.74, output: 3.48, cache_read: 0.145 }, - limit: { context: 1048576, output: 393216 }, - }, - "x-ai/grok-4.3": { - id: "x-ai/grok-4.3", - name: "Grok 4.3", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-05-01", - last_updated: "2026-05-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { - input: 1.25, - output: 2.5, - cache_read: 0.2, - context_over_200k: { input: 2.5, output: 5, cache_read: 0.4 }, - }, - limit: { context: 1000000, output: 1000000 }, - }, - "openai/gpt-5.5": { - id: "openai/gpt-5.5", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-23", - last_updated: "2026-04-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5, context_over_200k: { input: 10, output: 45, cache_read: 1 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "openai/gpt-5.4": { - id: "openai/gpt-5.4", - name: "GPT-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 2.5, - output: 15, - cache_read: 0.25, - context_over_200k: { input: 5, output: 22.5, cache_read: 0.5 }, - }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "openai/gpt-5.5-pro": { - id: "openai/gpt-5.5-pro", - name: "GPT-5.5 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-23", - last_updated: "2026-04-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180, context_over_200k: { input: 60, output: 270 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "google/gemini-2.5-pro": { - id: "google/gemini-2.5-pro", - name: "Gemini 2.5 Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 1.25, - output: 10, - cache_read: 0.125, - context_over_200k: { input: 2.5, output: 15, cache_read: 0.25 }, - }, - limit: { context: 1048576, output: 65536 }, - }, - "anthropic/claude-opus-4": { - id: "anthropic/claude-opus-4", - name: "Claude Opus 4", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "anthropic/claude-3.5-haiku": { - id: "anthropic/claude-3.5-haiku", - name: "Claude Haiku 3.5", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07-31", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4, cache_read: 0.08, cache_write: 1 }, - limit: { context: 200000, output: 8192 }, - }, - "xiaomi/mimo-v2.5-pro": { - id: "xiaomi/mimo-v2.5-pro", - name: "Xiaomi: MiMo-V2.5-Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3, cache_read: 0.2, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1048576, output: 131072 }, - }, - "xiaomi/mimo-v2-omni": { - id: "xiaomi/mimo-v2-omni", - name: "Xiaomi: MiMo-V2-Omni", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2, cache_read: 0.08 }, - limit: { context: 262144, output: 131072 }, - }, - "xiaomi/mimo-v2.5": { - id: "xiaomi/mimo-v2.5", - name: "Xiaomi: MiMo-V2.5", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: true, - cost: { - input: 0.4, - output: 2, - cache_read: 0.08, - context_over_200k: { input: 0.8, output: 4, cache_read: 0.16 }, - }, - limit: { context: 1048576, output: 131072 }, - }, - "xiaomi/mimo-v2-pro": { - id: "xiaomi/mimo-v2-pro", - name: "Xiaomi: MiMo-V2-Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 3, cache_read: 0.2, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1048576, output: 131072 }, - }, - "xiaomi/mimo-v2-flash": { - id: "xiaomi/mimo-v2-flash", - name: "Xiaomi: MiMo-V2-Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - temperature: true, - knowledge: "2024-12-01", - release_date: "2025-12-16", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3, cache_read: 0.01 }, - limit: { context: 262144, output: 65536 }, - }, - }, - }, - "fireworks-ai": { - id: "fireworks-ai", - env: ["FIREWORKS_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.fireworks.ai/inference/v1/", - name: "Fireworks AI", - doc: "https://fireworks.ai/docs/", - models: { - "accounts/fireworks/models/glm-5p1": { - id: "accounts/fireworks/models/glm-5p1", - name: "GLM 5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.4, output: 4.4, cache_read: 0.26 }, - limit: { context: 202800, output: 131072 }, - }, - "accounts/fireworks/models/deepseek-v3p2": { - id: "accounts/fireworks/models/deepseek-v3p2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-09", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.56, output: 1.68, cache_read: 0.28 }, - limit: { context: 160000, output: 160000 }, - }, - "accounts/fireworks/models/minimax-m2p5": { - id: "accounts/fireworks/models/minimax-m2p5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.03 }, - limit: { context: 196608, output: 196608 }, - }, - "accounts/fireworks/models/glm-4p5-air": { - id: "accounts/fireworks/models/glm-4p5-air", - name: "GLM 4.5 Air", - family: "glm-air", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-08-01", - last_updated: "2025-08-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 0.88 }, - limit: { context: 131072, output: 131072 }, - }, - "accounts/fireworks/models/glm-5": { - id: "accounts/fireworks/models/glm-5", - name: "GLM 5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2, cache_read: 0.5 }, - limit: { context: 202752, output: 131072 }, - }, - "accounts/fireworks/models/deepseek-v3p1": { - id: "accounts/fireworks/models/deepseek-v3p1", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.56, output: 1.68 }, - limit: { context: 163840, output: 163840 }, - }, - "accounts/fireworks/models/kimi-k2p6": { - id: "accounts/fireworks/models/kimi-k2p6", - name: "Kimi K2.6", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-17", - last_updated: "2026-04-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262000, output: 262000 }, - }, - "accounts/fireworks/models/kimi-k2-instruct": { - id: "accounts/fireworks/models/kimi-k2-instruct", - name: "Kimi K2 Instruct", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-07-11", - last_updated: "2025-07-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3 }, - limit: { context: 128000, output: 16384 }, - }, - "accounts/fireworks/models/qwen3p6-plus": { - id: "accounts/fireworks/models/qwen3p6-plus", - name: "Qwen 3.6 Plus", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-04", - last_updated: "2026-04-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3, cache_read: 0.1 }, - limit: { context: 128000, output: 8192 }, - }, - "accounts/fireworks/models/minimax-m2p1": { - id: "accounts/fireworks/models/minimax-m2p1", - name: "MiniMax-M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.03 }, - limit: { context: 200000, output: 200000 }, - }, - "accounts/fireworks/models/minimax-m2p7": { - id: "accounts/fireworks/models/minimax-m2p7", - name: "MiniMax-M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-12", - last_updated: "2026-04-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.03 }, - limit: { context: 196608, output: 196608 }, - }, - "accounts/fireworks/models/glm-4p7": { - id: "accounts/fireworks/models/glm-4p7", - name: "GLM 4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.3 }, - limit: { context: 198000, output: 198000 }, - }, - "accounts/fireworks/models/glm-4p5": { - id: "accounts/fireworks/models/glm-4p5", - name: "GLM 4.5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-29", - last_updated: "2025-07-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.19 }, - limit: { context: 131072, output: 131072 }, - }, - "accounts/fireworks/models/kimi-k2p5": { - id: "accounts/fireworks/models/kimi-k2p5", - name: "Kimi K2.5", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.1 }, - limit: { context: 256000, output: 256000 }, - }, - "accounts/fireworks/models/gpt-oss-20b": { - id: "accounts/fireworks/models/gpt-oss-20b", - name: "GPT OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.2 }, - limit: { context: 131072, output: 32768 }, - }, - "accounts/fireworks/models/gpt-oss-120b": { - id: "accounts/fireworks/models/gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 131072, output: 32768 }, - }, - "accounts/fireworks/models/kimi-k2-thinking": { - id: "accounts/fireworks/models/kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5, cache_read: 0.3 }, - limit: { context: 256000, output: 256000 }, - }, - "accounts/fireworks/routers/kimi-k2p5-turbo": { - id: "accounts/fireworks/routers/kimi-k2p5-turbo", - name: "Kimi K2.5 Turbo", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 256000, output: 256000 }, - }, - "accounts/fireworks/models/deepseek-v4-pro": { - id: "accounts/fireworks/models/deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.74, output: 3.48, cache_read: 0.15 }, - limit: { context: 1000000, output: 384000 }, - }, - }, - }, - "kimi-for-coding": { - id: "kimi-for-coding", - env: ["KIMI_API_KEY"], - npm: "@ai-sdk/anthropic", - api: "https://api.kimi.com/coding/v1", - name: "Kimi For Coding", - doc: "https://www.kimi.com/coding/docs/en/third-party-agents.html", - models: { - k2p6: { - id: "k2p6", - name: "Kimi K2.6", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04", - last_updated: "2026-04", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 262144, output: 32768 }, - }, - k2p5: { - id: "k2p5", - name: "Kimi K2.5", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 262144, output: 32768 }, - }, - "kimi-k2-thinking": { - id: "kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-11", - last_updated: "2025-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 262144, output: 32768 }, - }, - }, - }, - moark: { - id: "moark", - env: ["MOARK_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://moark.com/v1", - name: "Moark", - doc: "https://moark.com/docs/openapi/v1#tag/%E6%96%87%E6%9C%AC%E7%94%9F%E6%88%90", - models: { - "GLM-4.7": { - id: "GLM-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 3.5, output: 14 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.1": { - id: "MiniMax-M2.1", - name: "MiniMax-M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.1, output: 8.4 }, - limit: { context: 204800, output: 131072 }, - }, - }, - }, - "opencode-go": { - id: "opencode-go", - env: ["OPENCODE_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://opencode.ai/zen/go/v1", - name: "OpenCode Go", - doc: "https://opencode.ai/docs/zen", - models: { - "minimax-m2.7": { - id: "minimax-m2.7", - name: "MiniMax M2.7", - family: "minimax-m2.7", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06 }, - limit: { context: 204800, output: 131072 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi K2.5", - family: "kimi-k2.5", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-10", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.1 }, - limit: { context: 262144, output: 65536 }, - }, - "mimo-v2.5-pro": { - id: "mimo-v2.5-pro", - name: "MiMo V2.5 Pro", - family: "mimo-v2.5-pro", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3, cache_read: 0.2, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1048576, output: 128000 }, - }, - "glm-5": { - id: "glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2, cache_read: 0.2 }, - limit: { context: 202752, output: 32768 }, - }, - "mimo-v2-omni": { - id: "mimo-v2-omni", - name: "MiMo V2 Omni", - family: "mimo-v2-omni", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text", "image", "audio", "pdf"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2, cache_read: 0.08 }, - limit: { context: 262144, output: 128000 }, - status: "deprecated", - }, - "mimo-v2.5": { - id: "mimo-v2.5", - name: "MiMo V2.5", - family: "mimo-v2.5", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: true, - cost: { - input: 0.4, - output: 2, - cache_read: 0.08, - context_over_200k: { input: 0.8, output: 4, cache_read: 0.16 }, - }, - limit: { context: 1000000, output: 128000 }, - }, - "qwen3.6-plus": { - id: "qwen3.6-plus", - name: "Qwen3.6 Plus", - family: "qwen3.6", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3, cache_read: 0.05, cache_write: 0.625 }, - limit: { context: 262144, output: 65536 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - "glm-5.1": { - id: "glm-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-07", - last_updated: "2026-04-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.4, output: 4.4, cache_read: 0.26 }, - limit: { context: 202752, output: 32768 }, - }, - "deepseek-v4-flash": { - id: "deepseek-v4-flash", - name: "DeepSeek V4 Flash", - family: "deepseek-flash", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.28, cache_read: 0.0028 }, - limit: { context: 1000000, output: 384000 }, - }, - "kimi-k2.6": { - id: "kimi-k2.6", - name: "Kimi K2.6", - family: "kimi-k2.6", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-10", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262144, output: 65536 }, - }, - "deepseek-v4-pro": { - id: "deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.74, output: 3.48, cache_read: 0.0145 }, - limit: { context: 1000000, output: 384000 }, - }, - "minimax-m2.5": { - id: "minimax-m2.5", - name: "MiniMax M2.5", - family: "minimax-m2.5", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.03 }, - limit: { context: 204800, output: 65536 }, - }, - "mimo-v2-pro": { - id: "mimo-v2-pro", - name: "MiMo V2 Pro", - family: "mimo-v2-pro", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3, cache_read: 0.2, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1048576, output: 128000 }, - status: "deprecated", - }, - "qwen3.5-plus": { - id: "qwen3.5-plus", - name: "Qwen3.5 Plus", - family: "qwen3.5", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.2, cache_read: 0.02, cache_write: 0.25 }, - limit: { context: 262144, output: 65536 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - }, - }, - "io-net": { - id: "io-net", - env: ["IOINTELLIGENCE_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.intelligence.io.solutions/api/v1", - name: "IO.NET", - doc: "https://io.net/docs/guides/intelligence/io-intelligence", - models: { - "Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar": { - id: "Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar", - name: "Qwen 3 Coder 480B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-15", - last_updated: "2025-01-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 0.95, cache_read: 0.11, cache_write: 0.44 }, - limit: { context: 106000, output: 4096 }, - }, - "Qwen/Qwen3-Next-80B-A3B-Instruct": { - id: "Qwen/Qwen3-Next-80B-A3B-Instruct", - name: "Qwen 3 Next 80B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-10", - last_updated: "2025-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.8, cache_read: 0.05, cache_write: 0.2 }, - limit: { context: 262144, output: 4096 }, - }, - "Qwen/Qwen3-235B-A22B-Thinking-2507": { - id: "Qwen/Qwen3-235B-A22B-Thinking-2507", - name: "Qwen 3 235B Thinking", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-07-01", - last_updated: "2025-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.11, output: 0.6, cache_read: 0.055, cache_write: 0.22 }, - limit: { context: 262144, output: 4096 }, - }, - "Qwen/Qwen2.5-VL-32B-Instruct": { - id: "Qwen/Qwen2.5-VL-32B-Instruct", - name: "Qwen 2.5 VL 32B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2024-11-01", - last_updated: "2024-11-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.22, cache_read: 0.025, cache_write: 0.1 }, - limit: { context: 32000, output: 4096 }, - }, - "zai-org/GLM-4.6": { - id: "zai-org/GLM-4.6", - name: "GLM 4.6", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-11-15", - last_updated: "2024-11-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.75, cache_read: 0.2, cache_write: 0.8 }, - limit: { context: 200000, output: 4096 }, - }, - "mistralai/Magistral-Small-2506": { - id: "mistralai/Magistral-Small-2506", - name: "Magistral Small 2506", - family: "magistral-small", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-01", - last_updated: "2025-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.5, cache_read: 0.25, cache_write: 1 }, - limit: { context: 128000, output: 4096 }, - }, - "mistralai/Mistral-Large-Instruct-2411": { - id: "mistralai/Mistral-Large-Instruct-2411", - name: "Mistral Large Instruct 2411", - family: "mistral-large", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-11-01", - last_updated: "2024-11-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 1, cache_write: 4 }, - limit: { context: 128000, output: 4096 }, - }, - "mistralai/Mistral-Nemo-Instruct-2407": { - id: "mistralai/Mistral-Nemo-Instruct-2407", - name: "Mistral Nemo Instruct 2407", - family: "mistral-nemo", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-05", - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.04, cache_read: 0.01, cache_write: 0.04 }, - limit: { context: 128000, output: 4096 }, - }, - "mistralai/Devstral-Small-2505": { - id: "mistralai/Devstral-Small-2505", - name: "Devstral Small 2505", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-05-01", - last_updated: "2025-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.22, cache_read: 0.025, cache_write: 0.1 }, - limit: { context: 128000, output: 4096 }, - }, - "meta-llama/Llama-3.3-70B-Instruct": { - id: "meta-llama/Llama-3.3-70B-Instruct", - name: "Llama 3.3 70B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.38, cache_read: 0.065, cache_write: 0.26 }, - limit: { context: 128000, output: 4096 }, - }, - "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": { - id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8", - name: "Llama 4 Maverick 17B 128E Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-15", - last_updated: "2025-01-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6, cache_read: 0.075, cache_write: 0.3 }, - limit: { context: 430000, output: 4096 }, - }, - "meta-llama/Llama-3.2-90B-Vision-Instruct": { - id: "meta-llama/Llama-3.2-90B-Vision-Instruct", - name: "Llama 3.2 90B Vision Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-25", - last_updated: "2024-09-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.35, output: 0.4, cache_read: 0.175, cache_write: 0.7 }, - limit: { context: 16000, output: 4096 }, - }, - "deepseek-ai/DeepSeek-R1-0528": { - id: "deepseek-ai/DeepSeek-R1-0528", - name: "DeepSeek R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-01-20", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 8.75, cache_read: 1, cache_write: 4 }, - limit: { context: 128000, output: 4096 }, - }, - "openai/gpt-oss-20b": { - id: "openai/gpt-oss-20b", - name: "GPT-OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.14, cache_read: 0.015, cache_write: 0.06 }, - limit: { context: 64000, output: 4096 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT-OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.4, cache_read: 0.02, cache_write: 0.08 }, - limit: { context: 131072, output: 4096 }, - }, - "moonshotai/Kimi-K2-Thinking": { - id: "moonshotai/Kimi-K2-Thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2024-11-01", - last_updated: "2024-11-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.55, output: 2.25, cache_read: 0.275, cache_write: 1.1 }, - limit: { context: 32768, output: 4096 }, - }, - "moonshotai/Kimi-K2-Instruct-0905": { - id: "moonshotai/Kimi-K2-Instruct-0905", - name: "Kimi K2 Instruct", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2024-09-05", - last_updated: "2024-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.39, output: 1.9, cache_read: 0.195, cache_write: 0.78 }, - limit: { context: 32768, output: 4096 }, - }, - }, - }, - "alibaba-cn": { - id: "alibaba-cn", - env: ["DASHSCOPE_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://dashscope.aliyuncs.com/compatible-mode/v1", - name: "Alibaba (China)", - doc: "https://www.alibabacloud.com/help/en/model-studio/models", - models: { - "qwen3-235b-a22b": { - id: "qwen3-235b-a22b", - name: "Qwen3 235B-A22B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.287, output: 1.147, reasoning: 2.868 }, - limit: { context: 131072, output: 16384 }, - }, - "qwen-plus-character": { - id: "qwen-plus-character", - name: "Qwen Plus Character", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-01", - last_updated: "2024-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.115, output: 0.287 }, - limit: { context: 32768, output: 4096 }, - }, - "qwen2-5-math-7b-instruct": { - id: "qwen2-5-math-7b-instruct", - name: "Qwen2.5-Math 7B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.144, output: 0.287 }, - limit: { context: 4096, output: 3072 }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Moonshot Kimi K2.5", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: false, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.574, output: 2.411 }, - limit: { context: 262144, output: 32768 }, - }, - "qwen-doc-turbo": { - id: "qwen-doc-turbo", - name: "Qwen Doc Turbo", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-01", - last_updated: "2024-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.087, output: 0.144 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen-vl-ocr": { - id: "qwen-vl-ocr", - name: "Qwen-VL OCR", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-04", - release_date: "2024-10-28", - last_updated: "2025-04-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.717, output: 0.717 }, - limit: { context: 34096, output: 4096 }, - }, - "qwen-omni-turbo-realtime": { - id: "qwen-omni-turbo-realtime", - name: "Qwen-Omni Turbo Realtime", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-05-08", - last_updated: "2025-05-08", - modalities: { input: ["text", "image", "audio"], output: ["text", "audio"] }, - open_weights: false, - cost: { input: 0.23, output: 0.918, input_audio: 3.584, output_audio: 7.168 }, - limit: { context: 32768, output: 2048 }, - }, - "qwen3-8b": { - id: "qwen3-8b", - name: "Qwen3 8B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.072, output: 0.287, reasoning: 0.717 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3.5-397b-a17b": { - id: "qwen3.5-397b-a17b", - name: "Qwen3.5 397B-A17B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.43, output: 2.58, reasoning: 2.58 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen-math-turbo": { - id: "qwen-math-turbo", - name: "Qwen Math Turbo", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09-19", - last_updated: "2024-09-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.287, output: 0.861 }, - limit: { context: 4096, output: 3072 }, - }, - "qwq-plus": { - id: "qwq-plus", - name: "QwQ Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-03-05", - last_updated: "2025-03-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.23, output: 0.574 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen-vl-plus": { - id: "qwen-vl-plus", - name: "Qwen-VL Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-01-25", - last_updated: "2025-08-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.115, output: 0.287 }, - limit: { context: 131072, output: 8192 }, - }, - "glm-5": { - id: "glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.86, output: 3.15 }, - limit: { context: 202752, output: 16384 }, - }, - "deepseek-r1-distill-llama-70b": { - id: "deepseek-r1-distill-llama-70b", - name: "DeepSeek R1 Distill Llama 70B", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.287, output: 0.861 }, - limit: { context: 32768, output: 16384 }, - }, - "qwen3-32b": { - id: "qwen3-32b", - name: "Qwen3 32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.287, output: 1.147, reasoning: 2.868 }, - limit: { context: 131072, output: 16384 }, - }, - "MiniMax-M2.5": { - id: "MiniMax-M2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204800, output: 131072 }, - }, - "qwen-max": { - id: "qwen-max", - name: "Qwen Max", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-04-03", - last_updated: "2025-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.345, output: 1.377 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen-plus": { - id: "qwen-plus", - name: "Qwen Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-01-25", - last_updated: "2025-09-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.115, output: 0.287, reasoning: 1.147 }, - limit: { context: 1000000, output: 32768 }, - }, - "qwen-omni-turbo": { - id: "qwen-omni-turbo", - name: "Qwen-Omni Turbo", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-01-19", - last_updated: "2025-03-26", - modalities: { input: ["text", "image", "audio", "video"], output: ["text", "audio"] }, - open_weights: false, - cost: { input: 0.058, output: 0.23, input_audio: 3.584, output_audio: 7.168 }, - limit: { context: 32768, output: 2048 }, - }, - "qwen-flash": { - id: "qwen-flash", - name: "Qwen Flash", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.022, output: 0.216 }, - limit: { context: 1000000, output: 32768 }, - }, - "qwen2-5-vl-7b-instruct": { - id: "qwen2-5-vl-7b-instruct", - name: "Qwen2.5-VL 7B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.287, output: 0.717 }, - limit: { context: 131072, output: 8192 }, - }, - "deepseek-r1": { - id: "deepseek-r1", - name: "DeepSeek R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.574, output: 2.294 }, - limit: { context: 131072, output: 16384 }, - }, - "qwen3.5-flash": { - id: "qwen3.5-flash", - name: "Qwen3.5 Flash", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-23", - last_updated: "2026-02-23", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.172, output: 1.72, reasoning: 1.72 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen3.6-plus": { - id: "qwen3.6-plus", - name: "Qwen3.6 Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.276, output: 1.651, cache_read: 0.028, cache_write: 0.344 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen3-max": { - id: "qwen3-max", - name: "Qwen3 Max", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.861, output: 3.441 }, - limit: { context: 262144, output: 65536 }, - }, - "glm-5.1": { - id: "glm-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-14", - last_updated: "2026-04-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.87, output: 3.48, cache_read: 0.17 }, - limit: { context: 202752, output: 128000 }, - }, - "qwen3-omni-flash": { - id: "qwen3-omni-flash", - name: "Qwen3-Omni Flash", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image", "audio", "video"], output: ["text", "audio"] }, - open_weights: false, - cost: { input: 0.058, output: 0.23, input_audio: 3.584, output_audio: 7.168 }, - limit: { context: 65536, output: 16384 }, - }, - "deepseek-v3-1": { - id: "deepseek-v3-1", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.574, output: 1.721 }, - limit: { context: 131072, output: 65536 }, - }, - "qwen2-5-72b-instruct": { - id: "qwen2-5-72b-instruct", - name: "Qwen2.5 72B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.574, output: 1.721 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3-vl-235b-a22b": { - id: "qwen3-vl-235b-a22b", - name: "Qwen3-VL 235B-A22B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.286705, output: 1.14682, reasoning: 2.867051 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen-math-plus": { - id: "qwen-math-plus", - name: "Qwen Math Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-08-16", - last_updated: "2024-09-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.574, output: 1.721 }, - limit: { context: 4096, output: 3072 }, - }, - "qwen2-5-coder-32b-instruct": { - id: "qwen2-5-coder-32b-instruct", - name: "Qwen2.5-Coder 32B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-11", - last_updated: "2024-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.287, output: 0.861 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3-asr-flash": { - id: "qwen3-asr-flash", - name: "Qwen3-ASR Flash", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2024-04", - release_date: "2025-09-08", - last_updated: "2025-09-08", - modalities: { input: ["audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.032, output: 0.032 }, - limit: { context: 53248, output: 4096 }, - }, - "qwen-deep-research": { - id: "qwen-deep-research", - name: "Qwen Deep Research", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-01", - last_updated: "2024-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 7.742, output: 23.367 }, - limit: { context: 1000000, output: 32768 }, - }, - "qwen3-next-80b-a3b-thinking": { - id: "qwen3-next-80b-a3b-thinking", - name: "Qwen3-Next 80B-A3B (Thinking)", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09", - last_updated: "2025-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.144, output: 1.434 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen-mt-plus": { - id: "qwen-mt-plus", - name: "Qwen-MT Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-04", - release_date: "2025-01", - last_updated: "2025-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.259, output: 0.775 }, - limit: { context: 16384, output: 8192 }, - }, - "deepseek-r1-distill-qwen-32b": { - id: "deepseek-r1-distill-qwen-32b", - name: "DeepSeek R1 Distill Qwen 32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.287, output: 0.861 }, - limit: { context: 32768, output: 16384 }, - }, - "qwen-vl-max": { - id: "qwen-vl-max", - name: "Qwen-VL Max", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-04-08", - last_updated: "2025-08-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.23, output: 0.574 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3-coder-flash": { - id: "qwen3-coder-flash", - name: "Qwen3 Coder Flash", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.144, output: 0.574 }, - limit: { context: 1000000, output: 65536 }, - }, - "deepseek-r1-distill-qwen-7b": { - id: "deepseek-r1-distill-qwen-7b", - name: "DeepSeek R1 Distill Qwen 7B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.072, output: 0.144 }, - limit: { context: 32768, output: 16384 }, - }, - "qwen2-5-7b-instruct": { - id: "qwen2-5-7b-instruct", - name: "Qwen2.5 7B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.072, output: 0.144 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen2-5-14b-instruct": { - id: "qwen2-5-14b-instruct", - name: "Qwen2.5 14B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.144, output: 0.431 }, - limit: { context: 131072, output: 8192 }, - }, - "tongyi-intent-detect-v3": { - id: "tongyi-intent-detect-v3", - name: "Tongyi Intent Detect V3", - family: "yi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-04", - release_date: "2024-01", - last_updated: "2024-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.058, output: 0.144 }, - limit: { context: 8192, output: 1024 }, - }, - "qwq-32b": { - id: "qwq-32b", - name: "QwQ 32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-12", - last_updated: "2024-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.287, output: 0.861 }, - limit: { context: 131072, output: 8192 }, - }, - "moonshot-kimi-k2-instruct": { - id: "moonshot-kimi-k2-instruct", - name: "Moonshot Kimi K2 Instruct", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.574, output: 2.294 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen2-5-32b-instruct": { - id: "qwen2-5-32b-instruct", - name: "Qwen2.5 32B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.287, output: 0.861 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3-next-80b-a3b-instruct": { - id: "qwen3-next-80b-a3b-instruct", - name: "Qwen3-Next 80B-A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09", - last_updated: "2025-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.144, output: 0.574 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen3-omni-flash-realtime": { - id: "qwen3-omni-flash-realtime", - name: "Qwen3-Omni Flash Realtime", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image", "audio"], output: ["text", "audio"] }, - open_weights: false, - cost: { input: 0.23, output: 0.918, input_audio: 3.584, output_audio: 7.168 }, - limit: { context: 65536, output: 16384 }, - }, - "kimi-k2.6": { - id: "kimi-k2.6", - name: "Moonshot Kimi K2.6", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: false, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.929, output: 3.858 }, - limit: { context: 262144, output: 16384 }, - }, - "qwen3-vl-30b-a3b": { - id: "qwen3-vl-30b-a3b", - name: "Qwen3-VL 30B-A3B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.108, output: 0.431, reasoning: 1.076 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen3-vl-plus": { - id: "qwen3-vl-plus", - name: "Qwen3-VL Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.143353, output: 1.433525, reasoning: 4.300576 }, - limit: { context: 262144, output: 32768 }, - }, - "deepseek-v3-2-exp": { - id: "deepseek-v3-2-exp", - name: "DeepSeek V3.2 Exp", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.287, output: 0.431 }, - limit: { context: 131072, output: 65536 }, - }, - "qwen3-coder-480b-a35b-instruct": { - id: "qwen3-coder-480b-a35b-instruct", - name: "Qwen3-Coder 480B-A35B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.861, output: 3.441 }, - limit: { context: 262144, output: 65536 }, - }, - "deepseek-r1-distill-qwen-1-5b": { - id: "deepseek-r1-distill-qwen-1-5b", - name: "DeepSeek R1 Distill Qwen 1.5B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 32768, output: 16384 }, - }, - "qwen3-coder-30b-a3b-instruct": { - id: "qwen3-coder-30b-a3b-instruct", - name: "Qwen3-Coder 30B-A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.216, output: 0.861 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen2-5-coder-7b-instruct": { - id: "qwen2-5-coder-7b-instruct", - name: "Qwen2.5-Coder 7B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-11", - last_updated: "2024-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.144, output: 0.287 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen-turbo": { - id: "qwen-turbo", - name: "Qwen Turbo", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-11-01", - last_updated: "2025-07-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.044, output: 0.087, reasoning: 0.431 }, - limit: { context: 1000000, output: 16384 }, - }, - "qwen-mt-turbo": { - id: "qwen-mt-turbo", - name: "Qwen-MT Turbo", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-04", - release_date: "2025-01", - last_updated: "2025-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.101, output: 0.28 }, - limit: { context: 16384, output: 8192 }, - }, - "qwen2-5-math-72b-instruct": { - id: "qwen2-5-math-72b-instruct", - name: "Qwen2.5-Math 72B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.574, output: 1.721 }, - limit: { context: 4096, output: 3072 }, - }, - "qwen3.6-max-preview": { - id: "qwen3.6-max-preview", - name: "Qwen3.6 Max Preview", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-20", - last_updated: "2026-04-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.32, output: 7.9, cache_read: 0.132 }, - limit: { context: 245800, output: 65536 }, - }, - "qwen2-5-omni-7b": { - id: "qwen2-5-omni-7b", - name: "Qwen2.5-Omni 7B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-12", - last_updated: "2024-12", - modalities: { input: ["text", "image", "audio", "video"], output: ["text", "audio"] }, - open_weights: true, - cost: { input: 0.087, output: 0.345, input_audio: 5.448 }, - limit: { context: 32768, output: 2048 }, - }, - "qwen3.5-plus": { - id: "qwen3.5-plus", - name: "Qwen3.5 Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.573, output: 3.44, reasoning: 3.44 }, - limit: { context: 1000000, output: 65536 }, - }, - "deepseek-r1-distill-qwen-14b": { - id: "deepseek-r1-distill-qwen-14b", - name: "DeepSeek R1 Distill Qwen 14B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.144, output: 0.431 }, - limit: { context: 32768, output: 16384 }, - }, - "qwen2-5-vl-72b-instruct": { - id: "qwen2-5-vl-72b-instruct", - name: "Qwen2.5-VL 72B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 2.294, output: 6.881 }, - limit: { context: 131072, output: 8192 }, - }, - "deepseek-v3": { - id: "deepseek-v3", - name: "DeepSeek V3", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.287, output: 1.147 }, - limit: { context: 65536, output: 8192 }, - }, - "deepseek-r1-0528": { - id: "deepseek-r1-0528", - name: "DeepSeek R1 0528", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.574, output: 2.294 }, - limit: { context: 131072, output: 16384 }, - }, - "qvq-max": { - id: "qvq-max", - name: "QVQ Max", - family: "qvq", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-03-25", - last_updated: "2025-03-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.147, output: 4.588 }, - limit: { context: 131072, output: 8192 }, - }, - "kimi-k2-thinking": { - id: "kimi-k2-thinking", - name: "Moonshot Kimi K2 Thinking", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.574, output: 2.294 }, - limit: { context: 262144, output: 16384 }, - }, - "qwen3-14b": { - id: "qwen3-14b", - name: "Qwen3 14B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.144, output: 0.574, reasoning: 1.434 }, - limit: { context: 131072, output: 8192 }, - }, - "deepseek-r1-distill-llama-8b": { - id: "deepseek-r1-distill-llama-8b", - name: "DeepSeek R1 Distill Llama 8B", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 32768, output: 16384 }, - }, - "qwen-long": { - id: "qwen-long", - name: "Qwen Long", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-01-25", - last_updated: "2025-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.072, output: 0.287 }, - limit: { context: 10000000, output: 8192 }, - }, - "kimi/kimi-k2.5": { - id: "kimi/kimi-k2.5", - name: "kimi/kimi-k2.5", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: false, - knowledge: "2025-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.1 }, - limit: { context: 262144, output: 262144 }, - }, - "MiniMax/MiniMax-M2.7": { - id: "MiniMax/MiniMax-M2.7", - name: "MiniMax-M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - "siliconflow/deepseek-v3-0324": { - id: "siliconflow/deepseek-v3-0324", - name: "siliconflow/deepseek-v3-0324", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-26", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1 }, - limit: { context: 163840, output: 163840 }, - }, - "siliconflow/deepseek-v3.2": { - id: "siliconflow/deepseek-v3.2", - name: "siliconflow/deepseek-v3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-03", - last_updated: "2025-12-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 0.42 }, - limit: { context: 163840, output: 65536 }, - }, - "siliconflow/deepseek-r1-0528": { - id: "siliconflow/deepseek-r1-0528", - name: "siliconflow/deepseek-r1-0528", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-05-28", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 2.18 }, - limit: { context: 163840, output: 32768 }, - }, - "siliconflow/deepseek-v3.1-terminus": { - id: "siliconflow/deepseek-v3.1-terminus", - name: "siliconflow/deepseek-v3.1-terminus", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-29", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 1 }, - limit: { context: 163840, output: 65536 }, - }, - "qwen3-coder-plus": { - id: "qwen3-coder-plus", - name: "Qwen3 Coder Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 5 }, - limit: { context: 1048576, output: 65536 }, - }, - "deepseek-v4-flash": { - id: "deepseek-v4-flash", - name: "DeepSeek V4 Flash", - family: "deepseek-flash", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.28, cache_read: 0.028 }, - limit: { context: 1000000, output: 384000 }, - }, - "deepseek-v4-pro": { - id: "deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.74, output: 3.48, cache_read: 0.145 }, - limit: { context: 1000000, output: 384000 }, - }, - }, - }, - firepass: { - id: "firepass", - env: ["FIREPASS_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.fireworks.ai/inference/v1/", - name: "Fireworks (Firepass)", - doc: "https://docs.fireworks.ai/firepass", - models: { - "accounts/fireworks/routers/kimi-k2p6-turbo": { - id: "accounts/fireworks/routers/kimi-k2p6-turbo", - name: "Kimi K2.6 Turbo", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-17", - last_updated: "2026-04-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 262000, output: 262000 }, - }, - }, - }, - "minimax-cn-coding-plan": { - id: "minimax-cn-coding-plan", - env: ["MINIMAX_API_KEY"], - npm: "@ai-sdk/anthropic", - api: "https://api.minimaxi.com/anthropic/v1", - name: "MiniMax Coding Plan (minimaxi.com)", - doc: "https://platform.minimaxi.com/docs/coding-plan/intro", - models: { - "MiniMax-M2": { - id: "MiniMax-M2", - name: "MiniMax-M2", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-10-27", - last_updated: "2025-10-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 196608, output: 128000 }, - }, - "MiniMax-M2.5": { - id: "MiniMax-M2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.7": { - id: "MiniMax-M2.7", - name: "MiniMax-M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.7-highspeed": { - id: "MiniMax-M2.7-highspeed", - name: "MiniMax-M2.7-highspeed", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.1": { - id: "MiniMax-M2.1", - name: "MiniMax-M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.5-highspeed": { - id: "MiniMax-M2.5-highspeed", - name: "MiniMax-M2.5-highspeed", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-13", - last_updated: "2026-02-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - }, - }, - jiekou: { - id: "jiekou", - env: ["JIEKOU_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.jiekou.ai/openai", - name: "Jiekou.AI", - doc: "https://docs.jiekou.ai/docs/support/quickstart?utm_source=github_models.dev", - models: { - "gpt-5.1-codex-max": { - id: "gpt-5.1-codex-max", - name: "gpt-5.1-codex-max", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.125, output: 9 }, - limit: { context: 400000, output: 128000 }, - }, - "grok-4-1-fast-reasoning": { - id: "grok-4-1-fast-reasoning", - name: "grok-4-1-fast-reasoning", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 0.45 }, - limit: { context: 2000000, output: 2000000 }, - }, - "claude-opus-4-5-20251101": { - id: "claude-opus-4-5-20251101", - name: "claude-opus-4-5-20251101", - family: "claude-opus", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 4.5, output: 22.5 }, - limit: { context: 200000, output: 65536 }, - }, - "gemini-2.5-flash-lite-preview-09-2025": { - id: "gemini-2.5-flash-lite-preview-09-2025", - name: "gemini-2.5-flash-lite-preview-09-2025", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09, output: 0.36 }, - limit: { context: 1048576, output: 65536 }, - }, - "gpt-5.2-pro": { - id: "gpt-5.2-pro", - name: "gpt-5.2-pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 18.9, output: 151.2 }, - limit: { context: 400000, output: 128000 }, - }, - "gemini-3-flash-preview": { - id: "gemini-3-flash-preview", - name: "gemini-3-flash-preview", - family: "gemini-flash", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3 }, - limit: { context: 1048576, output: 65536 }, - }, - "gpt-5-mini": { - id: "gpt-5-mini", - name: "gpt-5-mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.225, output: 1.8 }, - limit: { context: 400000, output: 128000 }, - }, - "gpt-5-nano": { - id: "gpt-5-nano", - name: "gpt-5-nano", - family: "gpt-nano", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.045, output: 0.36 }, - limit: { context: 400000, output: 128000 }, - }, - "gemini-3-pro-preview": { - id: "gemini-3-pro-preview", - name: "gemini-3-pro-preview", - family: "gemini-pro", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 1.8, output: 10.8 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-2.5-flash-preview-05-20": { - id: "gemini-2.5-flash-preview-05-20", - name: "gemini-2.5-flash-preview-05-20", - family: "gemini-flash", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.135, output: 3.15 }, - limit: { context: 1048576, output: 200000 }, - }, - "claude-sonnet-4-5-20250929": { - id: "claude-sonnet-4-5-20250929", - name: "claude-sonnet-4-5-20250929", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.7, output: 13.5 }, - limit: { context: 200000, output: 64000 }, - }, - "gemini-2.5-pro": { - id: "gemini-2.5-pro", - name: "gemini-2.5-pro", - family: "gemini-pro", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 1.125, output: 9 }, - limit: { context: 1048576, output: 65535 }, - }, - "grok-4-1-fast-non-reasoning": { - id: "grok-4-1-fast-non-reasoning", - name: "grok-4-1-fast-non-reasoning", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 0.45 }, - limit: { context: 2000000, output: 2000000 }, - }, - "gpt-5.2": { - id: "gpt-5.2", - name: "gpt-5.2", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.575, output: 12.6 }, - limit: { context: 400000, output: 128000 }, - }, - "o4-mini": { - id: "o4-mini", - name: "o4-mini", - family: "o", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4 }, - limit: { context: 200000, output: 100000 }, - }, - "gemini-2.5-pro-preview-06-05": { - id: "gemini-2.5-pro-preview-06-05", - name: "gemini-2.5-pro-preview-06-05", - family: "gemini-pro", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 1.125, output: 9 }, - limit: { context: 1048576, output: 200000 }, - }, - "gemini-2.5-flash-lite-preview-06-17": { - id: "gemini-2.5-flash-lite-preview-06-17", - name: "gemini-2.5-flash-lite-preview-06-17", - family: "gemini-flash-lite", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "video", "image", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09, output: 0.36 }, - limit: { context: 1048576, output: 65535 }, - }, - "gpt-5.2-codex": { - id: "gpt-5.2-codex", - name: "gpt-5.2-codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 400000, output: 128000 }, - }, - "gemini-2.5-flash": { - id: "gemini-2.5-flash", - name: "gemini-2.5-flash", - family: "gemini-flash", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 2.25 }, - limit: { context: 1048576, output: 65535 }, - }, - "gpt-5.1-codex-mini": { - id: "gpt-5.1-codex-mini", - name: "gpt-5.1-codex-mini", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.225, output: 1.8 }, - limit: { context: 400000, output: 128000 }, - }, - "grok-code-fast-1": { - id: "grok-code-fast-1", - name: "grok-code-fast-1", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 1.35 }, - limit: { context: 256000, output: 256000 }, - }, - "gpt-5.1": { - id: "gpt-5.1", - name: "gpt-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02", - last_updated: "2026-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.125, output: 9 }, - limit: { context: 400000, output: 128000 }, - }, - "grok-4-fast-reasoning": { - id: "grok-4-fast-reasoning", - name: "grok-4-fast-reasoning", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 0.45 }, - limit: { context: 2000000, output: 2000000 }, - }, - "o3-mini": { - id: "o3-mini", - name: "o3-mini", - family: "o", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4 }, - limit: { context: 131072, output: 131072 }, - }, - "grok-4-0709": { - id: "grok-4-0709", - name: "grok-4-0709", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.7, output: 13.5 }, - limit: { context: 256000, output: 8192 }, - }, - "gpt-5-codex": { - id: "gpt-5-codex", - name: "gpt-5-codex", - family: "gpt-codex", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.125, output: 9 }, - limit: { context: 400000, output: 128000 }, - }, - "claude-opus-4-1-20250805": { - id: "claude-opus-4-1-20250805", - name: "claude-opus-4-1-20250805", - family: "claude-opus", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 13.5, output: 67.5 }, - limit: { context: 200000, output: 32000 }, - }, - "claude-haiku-4-5-20251001": { - id: "claude-haiku-4-5-20251001", - name: "claude-haiku-4-5-20251001", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.9, output: 4.5 }, - limit: { context: 20000, output: 64000 }, - }, - "claude-sonnet-4-20250514": { - id: "claude-sonnet-4-20250514", - name: "claude-sonnet-4-20250514", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.7, output: 13.5 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-opus-4-6": { - id: "claude-opus-4-6", - name: "claude-opus-4-6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02", - last_updated: "2026-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25 }, - limit: { context: 1000000, output: 128000 }, - }, - o3: { - id: "o3", - name: "o3", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 40 }, - limit: { context: 131072, output: 131072 }, - }, - "gpt-5-pro": { - id: "gpt-5-pro", - name: "gpt-5-pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 13.5, output: 108 }, - limit: { context: 400000, output: 272000 }, - }, - "gemini-2.5-flash-lite": { - id: "gemini-2.5-flash-lite", - name: "gemini-2.5-flash-lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09, output: 0.36 }, - limit: { context: 1048576, output: 65535 }, - }, - "gpt-5-chat-latest": { - id: "gpt-5-chat-latest", - name: "gpt-5-chat-latest", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.125, output: 9 }, - limit: { context: 400000, output: 128000 }, - }, - "claude-opus-4-20250514": { - id: "claude-opus-4-20250514", - name: "claude-opus-4-20250514", - family: "claude-opus", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 13.5, output: 67.5 }, - limit: { context: 200000, output: 32000 }, - }, - "gpt-5.1-codex": { - id: "gpt-5.1-codex", - name: "gpt-5.1-codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.125, output: 9 }, - limit: { context: 400000, output: 128000 }, - }, - "grok-4-fast-non-reasoning": { - id: "grok-4-fast-non-reasoning", - name: "grok-4-fast-non-reasoning", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 0.45 }, - limit: { context: 2000000, output: 2000000 }, - }, - "deepseek/deepseek-v3-0324": { - id: "deepseek/deepseek-v3-0324", - name: "DeepSeek V3 0324", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.28, output: 1.14 }, - limit: { context: 163840, output: 163840 }, - }, - "deepseek/deepseek-v3.1": { - id: "deepseek/deepseek-v3.1", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 1 }, - limit: { context: 163840, output: 32768 }, - }, - "deepseek/deepseek-r1-0528": { - id: "deepseek/deepseek-r1-0528", - name: "DeepSeek R1 0528", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 2.5 }, - limit: { context: 163840, output: 32768 }, - }, - "zai-org/glm-4.7": { - id: "zai-org/glm-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 204800, output: 131072 }, - }, - "zai-org/glm-4.5": { - id: "zai-org/glm-4.5", - name: "GLM-4.5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 131072, output: 98304 }, - }, - "zai-org/glm-4.5v": { - id: "zai-org/glm-4.5v", - name: "GLM 4.5V", - family: "glmv", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.8 }, - limit: { context: 65536, output: 16384 }, - }, - "zai-org/glm-4.7-flash": { - id: "zai-org/glm-4.7-flash", - name: "GLM-4.7-Flash", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.4 }, - limit: { context: 200000, output: 128000 }, - }, - "minimaxai/minimax-m1-80k": { - id: "minimaxai/minimax-m1-80k", - name: "MiniMax M1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.2 }, - limit: { context: 1000000, output: 40000 }, - }, - "xiaomimimo/mimo-v2-flash": { - id: "xiaomimimo/mimo-v2-flash", - name: "XiaomiMiMo/MiMo-V2-Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 131072 }, - }, - "baidu/ernie-4.5-vl-424b-a47b": { - id: "baidu/ernie-4.5-vl-424b-a47b", - name: "ERNIE 4.5 VL 424B A47B", - family: "ernie", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.42, output: 1.25 }, - limit: { context: 123000, output: 16000 }, - }, - "baidu/ernie-4.5-300b-a47b-paddle": { - id: "baidu/ernie-4.5-300b-a47b-paddle", - name: "ERNIE 4.5 300B A47B", - family: "ernie", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.28, output: 1.1 }, - limit: { context: 123000, output: 12000 }, - }, - "minimax/minimax-m2.1": { - id: "minimax/minimax-m2.1", - name: "Minimax M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204800, output: 131072 }, - }, - "qwen/qwen3-235b-a22b-instruct-2507": { - id: "qwen/qwen3-235b-a22b-instruct-2507", - name: "Qwen3 235B A22B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.8 }, - limit: { context: 131072, output: 16384 }, - }, - "qwen/qwen3-32b-fp8": { - id: "qwen/qwen3-32b-fp8", - name: "Qwen3 32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.45 }, - limit: { context: 40960, output: 20000 }, - }, - "qwen/qwen3-235b-a22b-thinking-2507": { - id: "qwen/qwen3-235b-a22b-thinking-2507", - name: "Qwen3 235B A22b Thinking 2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 3 }, - limit: { context: 131072, output: 131072 }, - }, - "qwen/qwen3-next-80b-a3b-thinking": { - id: "qwen/qwen3-next-80b-a3b-thinking", - name: "Qwen3 Next 80B A3B Thinking", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 1.5 }, - limit: { context: 65536, output: 65536 }, - }, - "qwen/qwen3-next-80b-a3b-instruct": { - id: "qwen/qwen3-next-80b-a3b-instruct", - name: "Qwen3 Next 80B A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 1.5 }, - limit: { context: 65536, output: 65536 }, - }, - "qwen/qwen3-30b-a3b-fp8": { - id: "qwen/qwen3-30b-a3b-fp8", - name: "Qwen3 30B A3B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.45 }, - limit: { context: 40960, output: 20000 }, - }, - "qwen/qwen3-coder-next": { - id: "qwen/qwen3-coder-next", - name: "qwen/qwen3-coder-next", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02", - last_updated: "2026-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1.5 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen3-coder-480b-a35b-instruct": { - id: "qwen/qwen3-coder-480b-a35b-instruct", - name: "Qwen3 Coder 480B A35B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.29, output: 1.2 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen3-235b-a22b-fp8": { - id: "qwen/qwen3-235b-a22b-fp8", - name: "Qwen3 235B A22B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 40960, output: 20000 }, - }, - "moonshotai/kimi-k2.5": { - id: "moonshotai/kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/kimi-k2-instruct": { - id: "moonshotai/kimi-k2-instruct", - name: "Kimi K2 Instruct", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.57, output: 2.3 }, - limit: { context: 131072, output: 131072 }, - }, - "moonshotai/kimi-k2-0905": { - id: "moonshotai/kimi-k2-0905", - name: "Kimi K2 0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5 }, - limit: { context: 262144, output: 262144 }, - }, - }, - }, - bailing: { - id: "bailing", - env: ["BAILING_API_TOKEN"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.tbox.cn/api/llm/v1/chat/completions", - name: "Bailing", - doc: "https://alipaytbox.yuque.com/sxs0ba/ling/intro", - models: { - "Ring-1T": { - id: "Ring-1T", - name: "Ring-1T", - family: "ring", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2024-06", - release_date: "2025-10", - last_updated: "2025-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.57, output: 2.29 }, - limit: { context: 128000, output: 32000 }, - }, - "Ling-1T": { - id: "Ling-1T", - name: "Ling-1T", - family: "ling", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-10", - last_updated: "2025-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.57, output: 2.29 }, - limit: { context: 128000, output: 32000 }, - }, - }, - }, - iflowcn: { - id: "iflowcn", - env: ["IFLOW_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://apis.iflow.cn/v1", - name: "iFlow", - doc: "https://platform.iflow.cn/en/docs", - models: { - "qwen3-coder-plus": { - id: "qwen3-coder-plus", - name: "Qwen3-Coder-Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-01", - last_updated: "2025-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 64000 }, - }, - "qwen3-32b": { - id: "qwen3-32b", - name: "Qwen3-32B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 32000 }, - }, - "deepseek-r1": { - id: "deepseek-r1", - name: "DeepSeek-R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 32000 }, - }, - "qwen3-max": { - id: "qwen3-max", - name: "Qwen3-Max", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 32000 }, - }, - "qwen3-235b-a22b-instruct": { - id: "qwen3-235b-a22b-instruct", - name: "Qwen3-235B-A22B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-01", - last_updated: "2025-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 64000 }, - }, - "qwen3-235b-a22b-thinking-2507": { - id: "qwen3-235b-a22b-thinking-2507", - name: "Qwen3-235B-A22B-Thinking", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-01", - last_updated: "2025-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 64000 }, - }, - "kimi-k2-0905": { - id: "kimi-k2-0905", - name: "Kimi-K2-0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 64000 }, - }, - "glm-4.6": { - id: "glm-4.6", - name: "GLM-4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-01", - last_updated: "2025-11-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 200000, output: 128000 }, - }, - "qwen3-vl-plus": { - id: "qwen3-vl-plus", - name: "Qwen3-VL-Plus", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 32000 }, - }, - "deepseek-v3.2": { - id: "deepseek-v3.2", - name: "DeepSeek-V3.2-Exp", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 64000 }, - }, - "qwen3-235b": { - id: "qwen3-235b", - name: "Qwen3-235B-A22B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 32000 }, - }, - "kimi-k2": { - id: "kimi-k2", - name: "Kimi-K2", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 64000 }, - }, - "qwen3-max-preview": { - id: "qwen3-max-preview", - name: "Qwen3-Max-Preview", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 32000 }, - }, - "deepseek-v3": { - id: "deepseek-v3", - name: "DeepSeek-V3", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-26", - last_updated: "2024-12-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 32000 }, - }, - }, - }, - v0: { - id: "v0", - env: ["V0_API_KEY"], - npm: "@ai-sdk/vercel", - name: "v0", - doc: "https://sdk.vercel.ai/providers/ai-sdk-providers/vercel", - models: { - "v0-1.5-lg": { - id: "v0-1.5-lg", - name: "v0-1.5-lg", - family: "v0", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-06-09", - last_updated: "2025-06-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75 }, - limit: { context: 512000, output: 32000 }, - }, - "v0-1.0-md": { - id: "v0-1.0-md", - name: "v0-1.0-md", - family: "v0", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 128000, output: 32000 }, - }, - "v0-1.5-md": { - id: "v0-1.5-md", - name: "v0-1.5-md", - family: "v0", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-06-09", - last_updated: "2025-06-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 128000, output: 32000 }, - }, - }, - }, - huggingface: { - id: "huggingface", - env: ["HF_TOKEN"], - npm: "@ai-sdk/openai-compatible", - api: "https://router.huggingface.co/v1", - name: "Hugging Face", - doc: "https://huggingface.co/docs/inference-providers", - models: { - "Qwen/Qwen3.5-397B-A17B": { - id: "Qwen/Qwen3.5-397B-A17B", - name: "Qwen3.5-397B-A17B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-01", - last_updated: "2026-02-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3.6 }, - limit: { context: 262144, output: 32768 }, - }, - "Qwen/Qwen3-Coder-Next": { - id: "Qwen/Qwen3-Coder-Next", - name: "Qwen3-Coder-Next", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-03", - last_updated: "2026-02-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1.5 }, - limit: { context: 262144, output: 65536 }, - }, - "Qwen/Qwen3-Next-80B-A3B-Instruct": { - id: "Qwen/Qwen3-Next-80B-A3B-Instruct", - name: "Qwen3-Next-80B-A3B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-11", - last_updated: "2025-09-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 1 }, - limit: { context: 262144, output: 66536 }, - }, - "Qwen/Qwen3-Embedding-8B": { - id: "Qwen/Qwen3-Embedding-8B", - name: "Qwen 3 Embedding 8B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2024-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.01, output: 0 }, - limit: { context: 32000, output: 4096 }, - }, - "Qwen/Qwen3-235B-A22B-Thinking-2507": { - id: "Qwen/Qwen3-235B-A22B-Thinking-2507", - name: "Qwen3-235B-A22B-Thinking-2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-25", - last_updated: "2025-07-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 3 }, - limit: { context: 262144, output: 131072 }, - }, - "Qwen/Qwen3-Next-80B-A3B-Thinking": { - id: "Qwen/Qwen3-Next-80B-A3B-Thinking", - name: "Qwen3-Next-80B-A3B-Thinking", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-11", - last_updated: "2025-09-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 2 }, - limit: { context: 262144, output: 131072 }, - }, - "Qwen/Qwen3-Embedding-4B": { - id: "Qwen/Qwen3-Embedding-4B", - name: "Qwen 3 Embedding 4B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2024-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.01, output: 0 }, - limit: { context: 32000, output: 2048 }, - }, - "Qwen/Qwen3-Coder-480B-A35B-Instruct": { - id: "Qwen/Qwen3-Coder-480B-A35B-Instruct", - name: "Qwen3-Coder-480B-A35B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 2 }, - limit: { context: 262144, output: 66536 }, - }, - "zai-org/GLM-4.7-Flash": { - id: "zai-org/GLM-4.7-Flash", - name: "GLM-4.7-Flash", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-08-08", - last_updated: "2025-08-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 200000, output: 128000 }, - }, - "zai-org/GLM-4.7": { - id: "zai-org/GLM-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.11 }, - limit: { context: 204800, output: 131072 }, - }, - "zai-org/GLM-5.1": { - id: "zai-org/GLM-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-03", - last_updated: "2026-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2, cache_read: 0.2 }, - limit: { context: 202752, output: 131072 }, - }, - "zai-org/GLM-5": { - id: "zai-org/GLM-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2, cache_read: 0.2 }, - limit: { context: 202752, output: 131072 }, - }, - "XiaomiMiMo/MiMo-V2-Flash": { - id: "XiaomiMiMo/MiMo-V2-Flash", - name: "MiMo-V2-Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-12-16", - last_updated: "2025-12-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 262144, output: 4096 }, - }, - "deepseek-ai/DeepSeek-R1-0528": { - id: "deepseek-ai/DeepSeek-R1-0528", - name: "DeepSeek-R1-0528", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 3, output: 5 }, - limit: { context: 163840, output: 163840 }, - }, - "deepseek-ai/DeepSeek-V3.2": { - id: "deepseek-ai/DeepSeek-V3.2", - name: "DeepSeek-V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.28, output: 0.4 }, - limit: { context: 163840, output: 65536 }, - }, - "moonshotai/Kimi-K2-Thinking": { - id: "moonshotai/Kimi-K2-Thinking", - name: "Kimi-K2-Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5, cache_read: 0.15 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/Kimi-K2.6": { - id: "moonshotai/Kimi-K2.6", - name: "Kimi-K2.6", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-20", - last_updated: "2026-04-20", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/Kimi-K2-Instruct": { - id: "moonshotai/Kimi-K2-Instruct", - name: "Kimi-K2-Instruct", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-07-14", - last_updated: "2025-07-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3 }, - limit: { context: 131072, output: 16384 }, - }, - "moonshotai/Kimi-K2-Instruct-0905": { - id: "moonshotai/Kimi-K2-Instruct-0905", - name: "Kimi-K2-Instruct-0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-04", - last_updated: "2025-09-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3 }, - limit: { context: 262144, output: 16384 }, - }, - "moonshotai/Kimi-K2.5": { - id: "moonshotai/Kimi-K2.5", - name: "Kimi-K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-01", - last_updated: "2026-01-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.1 }, - limit: { context: 262144, output: 262144 }, - }, - "MiniMaxAI/MiniMax-M2.5": { - id: "MiniMaxAI/MiniMax-M2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.03 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMaxAI/MiniMax-M2.7": { - id: "MiniMaxAI/MiniMax-M2.7", - name: "MiniMax-M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMaxAI/MiniMax-M2.1": { - id: "MiniMaxAI/MiniMax-M2.1", - name: "MiniMax-M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-10", - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204800, output: 131072 }, - }, - "deepseek-ai/DeepSeek-V4-Pro": { - id: "deepseek-ai/DeepSeek-V4-Pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.74, output: 3.48, cache_read: 0.145 }, - limit: { context: 1048576, output: 393216 }, - }, - }, - }, - zenmux: { - id: "zenmux", - env: ["ZENMUX_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://zenmux.ai/api/v1", - name: "ZenMux", - doc: "https://docs.zenmux.ai", - models: { - "deepseek/deepseek-chat": { - id: "deepseek/deepseek-chat", - name: "DeepSeek-V3.2 (Non-thinking Mode)", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.28, output: 0.42, cache_read: 0.03 }, - limit: { context: 128000, output: 64000 }, - }, - "deepseek/deepseek-v3.2-exp": { - id: "deepseek/deepseek-v3.2-exp", - name: "DeepSeek-V3.2-Exp", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.22, output: 0.33 }, - limit: { context: 163000, output: 64000 }, - }, - "deepseek/deepseek-v3.2": { - id: "deepseek/deepseek-v3.2", - name: "DeepSeek V3.2", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-12-05", - last_updated: "2025-12-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.28, output: 0.43 }, - limit: { context: 128000, output: 64000 }, - }, - "inclusionai/ring-1t": { - id: "inclusionai/ring-1t", - name: "Ring-1T", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-10-12", - last_updated: "2025-10-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.56, output: 2.24, cache_read: 0.11 }, - limit: { context: 128000, output: 64000 }, - }, - "inclusionai/ling-1t": { - id: "inclusionai/ling-1t", - name: "Ling-1T", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-10-09", - last_updated: "2025-10-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.56, output: 2.24, cache_read: 0.11 }, - limit: { context: 128000, output: 64000 }, - }, - "stepfun/step-3.5-flash-free": { - id: "stepfun/step-3.5-flash-free", - name: "Step 3.5 Flash (Free)", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-02-02", - last_updated: "2026-02-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 64000 }, - }, - "stepfun/step-3.5-flash": { - id: "stepfun/step-3.5-flash", - name: "Step 3.5 Flash", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-02-02", - last_updated: "2026-02-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 256000, output: 64000 }, - }, - "stepfun/step-3": { - id: "stepfun/step-3", - name: "Step-3", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-07-31", - last_updated: "2025-07-31", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.21, output: 0.57 }, - limit: { context: 65536, output: 64000 }, - }, - "kuaishou/kat-coder-pro-v2": { - id: "kuaishou/kat-coder-pro-v2", - name: "KAT-Coder-Pro-V2", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-03-30", - last_updated: "2026-03-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2, cache_read: 0.06 }, - limit: { context: 256000, output: 80000 }, - }, - "x-ai/grok-4-fast": { - id: "x-ai/grok-4-fast", - name: "Grok 4 Fast", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 64000 }, - }, - "x-ai/grok-code-fast-1": { - id: "x-ai/grok-code-fast-1", - name: "Grok Code Fast 1", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-08-26", - last_updated: "2025-08-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.5, cache_read: 0.02 }, - limit: { context: 256000, output: 64000 }, - }, - "x-ai/grok-4.1-fast-non-reasoning": { - id: "x-ai/grok-4.1-fast-non-reasoning", - name: "Grok 4.1 Fast Non Reasoning", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-11-20", - last_updated: "2025-11-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 64000 }, - }, - "x-ai/grok-4": { - id: "x-ai/grok-4", - name: "Grok 4", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75 }, - limit: { context: 256000, output: 64000 }, - }, - "x-ai/grok-4.1-fast": { - id: "x-ai/grok-4.1-fast", - name: "Grok 4.1 Fast", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-11-20", - last_updated: "2025-11-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 64000 }, - }, - "x-ai/grok-4.2-fast": { - id: "x-ai/grok-4.2-fast", - name: "Grok 4.2 Fast", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-03-20", - last_updated: "2026-03-20", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 9 }, - limit: { context: 2000000, output: 30000 }, - }, - "x-ai/grok-4.2-fast-non-reasoning": { - id: "x-ai/grok-4.2-fast-non-reasoning", - name: "Grok 4.2 Fast Non Reasoning", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-03-20", - last_updated: "2026-03-20", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 9 }, - limit: { context: 2000000, output: 30000 }, - }, - "openai/gpt-5.3-chat": { - id: "openai/gpt-5.3-chat", - name: "GPT-5.3 Chat", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-03-20", - last_updated: "2026-03-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 128000, output: 16380 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "openai/gpt-5.2-pro": { - id: "openai/gpt-5.2-pro", - name: "GPT-5.2-Pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 21, output: 168 }, - limit: { context: 400000, output: 128000 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "openai/gpt-5.3-codex": { - id: "openai/gpt-5.3-codex", - name: "GPT-5.3 Codex", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-03-20", - last_updated: "2026-03-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 400000, output: 128000 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "openai/gpt-5.2": { - id: "openai/gpt-5.2", - name: "GPT-5.2", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-01-01", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["image", "text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.17 }, - limit: { context: 400000, output: 64000 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "openai/gpt-5.4-mini": { - id: "openai/gpt-5.4-mini", - name: "GPT-5.4 Mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-03-20", - last_updated: "2026-03-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5 }, - limit: { context: 400000, output: 128000 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "openai/gpt-5.1-chat": { - id: "openai/gpt-5.1-chat", - name: "GPT-5.1 Chat", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["pdf", "image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.12 }, - limit: { context: 128000, output: 64000 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "openai/gpt-5.4-nano": { - id: "openai/gpt-5.4-nano", - name: "GPT-5.4 Nano", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-03-20", - last_updated: "2026-03-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.25 }, - limit: { context: 400000, output: 128000 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "openai/gpt-5.2-codex": { - id: "openai/gpt-5.2-codex", - name: "GPT-5.2-Codex", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-01-01", - release_date: "2026-01-15", - last_updated: "2026-01-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.17 }, - limit: { context: 400000, output: 64000 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "openai/gpt-5.1-codex-mini": { - id: "openai/gpt-5.1-codex-mini", - name: "GPT-5.1-Codex-Mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.03 }, - limit: { context: 400000, output: 64000 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "openai/gpt-5.1": { - id: "openai/gpt-5.1", - name: "GPT-5.1", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["image", "text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.12 }, - limit: { context: 400000, output: 64000 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "openai/gpt-5.4-pro": { - id: "openai/gpt-5.4-pro", - name: "GPT-5.4 Pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-03-20", - last_updated: "2026-03-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 45, output: 225 }, - limit: { context: 1050000, output: 128000 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "openai/gpt-5-codex": { - id: "openai/gpt-5-codex", - name: "GPT-5 Codex", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.12 }, - limit: { context: 400000, output: 64000 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "openai/gpt-5.4": { - id: "openai/gpt-5.4", - name: "GPT-5.4", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-03-20", - last_updated: "2026-03-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3.75, output: 18.75 }, - limit: { context: 1050000, output: 128000 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "openai/gpt-5": { - id: "openai/gpt-5", - name: "GPT-5", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.12 }, - limit: { context: 400000, output: 64000 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "openai/gpt-5.1-codex": { - id: "openai/gpt-5.1-codex", - name: "GPT-5.1-Codex", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.12 }, - limit: { context: 400000, output: 64000 }, - provider: { npm: "@ai-sdk/openai", api: "https://zenmux.ai/api/v1" }, - }, - "z-ai/glm-4.7-flash-free": { - id: "z-ai/glm-4.7-flash-free", - name: "GLM 4.7 Flash (Free)", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 200000, output: 64000 }, - }, - "z-ai/glm-5v-turbo": { - id: "z-ai/glm-5v-turbo", - name: "GLM 5V Turbo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-01", - modalities: { input: ["text", "image", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.726, output: 3.1946, cache_read: 0.1743 }, - limit: { context: 200000, output: 128000 }, - }, - "z-ai/glm-4.7": { - id: "z-ai/glm-4.7", - name: "GLM 4.7", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.28, output: 1.14, cache_read: 0.06 }, - limit: { context: 200000, output: 64000 }, - }, - "z-ai/glm-5": { - id: "z-ai/glm-5", - name: "GLM 5", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.58, output: 2.6, cache_read: 0.14 }, - limit: { context: 200000, output: 128000 }, - }, - "z-ai/glm-4.7-flashx": { - id: "z-ai/glm-4.7-flashx", - name: "GLM 4.7 FlashX", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.42, cache_read: 0.01 }, - limit: { context: 200000, output: 64000 }, - }, - "z-ai/glm-4.6v-flash-free": { - id: "z-ai/glm-4.6v-flash-free", - name: "GLM 4.6V Flash (Free)", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-12-08", - last_updated: "2025-12-08", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 200000, output: 64000 }, - }, - "z-ai/glm-5.1": { - id: "z-ai/glm-5.1", - name: "GLM-5.1", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-03", - last_updated: "2026-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8781, output: 3.5126, cache_read: 0.1903 }, - limit: { context: 200000, output: 131072 }, - }, - "z-ai/glm-4.6v-flash": { - id: "z-ai/glm-4.6v-flash", - name: "GLM 4.6V FlashX", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-12-08", - last_updated: "2025-12-08", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.02, output: 0.21, cache_read: 0.0043 }, - limit: { context: 200000, output: 64000 }, - }, - "z-ai/glm-4.5": { - id: "z-ai/glm-4.5", - name: "GLM 4.5", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-07-25", - last_updated: "2025-07-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.35, output: 1.54, cache_read: 0.07 }, - limit: { context: 128000, output: 64000 }, - }, - "z-ai/glm-4.5-air": { - id: "z-ai/glm-4.5-air", - name: "GLM 4.5 Air", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-07-25", - last_updated: "2025-07-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.11, output: 0.56, cache_read: 0.02 }, - limit: { context: 128000, output: 64000 }, - }, - "z-ai/glm-5-turbo": { - id: "z-ai/glm-5-turbo", - name: "GLM 5 Turbo", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-03-20", - last_updated: "2026-03-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.88, output: 3.48 }, - limit: { context: 200000, output: 128000 }, - }, - "z-ai/glm-4.6": { - id: "z-ai/glm-4.6", - name: "GLM 4.6", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.35, output: 1.54, cache_read: 0.07 }, - limit: { context: 200000, output: 64000 }, - }, - "z-ai/glm-4.6v": { - id: "z-ai/glm-4.6v", - name: "GLM 4.6V", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-12-08", - last_updated: "2025-12-08", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.42, cache_read: 0.03 }, - limit: { context: 200000, output: 64000 }, - }, - "volcengine/doubao-seed-2.0-code": { - id: "volcengine/doubao-seed-2.0-code", - name: "Doubao Seed 2.0 Code", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-03-20", - last_updated: "2026-03-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.9, output: 4.48 }, - limit: { context: 256000, output: 32000 }, - }, - "volcengine/doubao-seed-code": { - id: "volcengine/doubao-seed-code", - name: "Doubao-Seed-Code", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-11-11", - last_updated: "2025-11-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.17, output: 1.12, cache_read: 0.03 }, - limit: { context: 256000, output: 64000 }, - }, - "volcengine/doubao-seed-2.0-mini": { - id: "volcengine/doubao-seed-2.0-mini", - name: "Doubao-Seed-2.0-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2026-02-14", - release_date: "2026-02-14", - last_updated: "2026-02-14", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.03, output: 0.28, cache_read: 0.01, cache_write: 0.0024 }, - limit: { context: 256000, output: 64000 }, - }, - "volcengine/doubao-seed-2.0-lite": { - id: "volcengine/doubao-seed-2.0-lite", - name: "Doubao-Seed-2.0-lite", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2026-02-14", - release_date: "2026-02-14", - last_updated: "2026-02-14", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09, output: 0.51, cache_read: 0.02, cache_write: 0.0024 }, - limit: { context: 256000, output: 64000 }, - }, - "volcengine/doubao-seed-1.8": { - id: "volcengine/doubao-seed-1.8", - name: "Doubao-Seed-1.8", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-12-18", - last_updated: "2025-12-18", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.11, output: 0.28, cache_read: 0.02, cache_write: 0.0024 }, - limit: { context: 256000, output: 64000 }, - }, - "volcengine/doubao-seed-2.0-pro": { - id: "volcengine/doubao-seed-2.0-pro", - name: "Doubao-Seed-2.0-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2026-02-14", - release_date: "2026-02-14", - last_updated: "2026-02-14", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.45, output: 2.24, cache_read: 0.09, cache_write: 0.0024 }, - limit: { context: 256000, output: 64000 }, - }, - "baidu/ernie-5.0-thinking-preview": { - id: "baidu/ernie-5.0-thinking-preview", - name: "ERNIE 5.0", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-01-22", - last_updated: "2026-01-22", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.84, output: 3.37 }, - limit: { context: 128000, output: 64000 }, - }, - "minimax/minimax-m2.7": { - id: "minimax/minimax-m2.7", - name: "MiniMax M2.7", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-03-20", - last_updated: "2026-03-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3055, output: 1.2219 }, - limit: { context: 204800, output: 131070 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "minimax/minimax-m2.7-highspeed": { - id: "minimax/minimax-m2.7-highspeed", - name: "MiniMax M2.7 highspeed", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-03-20", - last_updated: "2026-03-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.611, output: 2.4439 }, - limit: { context: 204800, output: 131070 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "minimax/minimax-m2": { - id: "minimax/minimax-m2", - name: "MiniMax M2", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-10-27", - last_updated: "2025-10-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2, cache_read: 0.03, cache_write: 0.38 }, - limit: { context: 204000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "minimax/minimax-m2.1": { - id: "minimax/minimax-m2.1", - name: "MiniMax M2.1", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2, cache_read: 0.03, cache_write: 0.38 }, - limit: { context: 204000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "minimax/minimax-m2.5-lightning": { - id: "minimax/minimax-m2.5-lightning", - name: "MiniMax M2.5 highspeed", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-02-13", - last_updated: "2026-02-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 4.8, cache_read: 0.06, cache_write: 0.75 }, - limit: { context: 204800, output: 131072 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "minimax/minimax-m2.5": { - id: "minimax/minimax-m2.5", - name: "MiniMax M2.5", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-02-13", - last_updated: "2026-02-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2, cache_read: 0.03, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "qwen/qwen3-coder-plus": { - id: "qwen/qwen3-coder-plus", - name: "Qwen3-Coder-Plus", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 1000000, output: 64000 }, - }, - "qwen/qwen3.5-flash": { - id: "qwen/qwen3.5-flash", - name: "Qwen3.5 Flash", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-03-20", - last_updated: "2026-03-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 1020000, output: 1020000 }, - }, - "qwen/qwen3.6-plus": { - id: "qwen/qwen3.6-plus", - name: "Qwen3.6-Plus", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-30", - last_updated: "2026-03-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { - input: 0.5, - output: 3, - cache_read: 0.05, - cache_write: 0.625, - context_over_200k: { input: 2, output: 6, cache_read: 0.2, cache_write: 2.5 }, - }, - limit: { context: 1000000, output: 64000 }, - }, - "qwen/qwen3-max": { - id: "qwen/qwen3-max", - name: "Qwen3-Max-Thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-01-23", - last_updated: "2026-01-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 6 }, - limit: { context: 256000, output: 64000 }, - }, - "qwen/qwen3.5-plus": { - id: "qwen/qwen3.5-plus", - name: "Qwen3.5 Plus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-03-20", - last_updated: "2026-03-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4.8 }, - limit: { context: 1000000, output: 64000 }, - }, - "google/gemini-3.1-flash-lite-preview": { - id: "google/gemini-3.1-flash-lite-preview", - name: "Gemini 3.1 Flash Lite Preview", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-03-20", - last_updated: "2025-03-20", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5 }, - limit: { context: 1050000, output: 65530 }, - }, - "google/gemini-3.1-pro-preview": { - id: "google/gemini-3.1-pro-preview", - name: "Gemini 3.1 Pro Preview", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2026-02-19", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "pdf", "audio", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, cache_write: 4.5 }, - limit: { context: 1048000, output: 64000 }, - }, - "google/gemini-3-flash-preview": { - id: "google/gemini-3-flash-preview", - name: "Gemini 3 Flash Preview", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "pdf", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3, cache_read: 0.05, cache_write: 1 }, - limit: { context: 1048000, output: 64000 }, - }, - "google/gemini-2.5-pro": { - id: "google/gemini-2.5-pro", - name: "Gemini 2.5 Pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["pdf", "image", "text", "audio", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.31, cache_write: 4.5 }, - limit: { context: 1048000, output: 64000 }, - }, - "google/gemini-2.5-flash": { - id: "google/gemini-2.5-flash", - name: "Gemini 2.5 Flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["pdf", "image", "text", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.07, cache_write: 1 }, - limit: { context: 1048000, output: 64000 }, - }, - "google/gemini-2.5-flash-lite": { - id: "google/gemini-2.5-flash-lite", - name: "Gemini 2.5 Flash Lite", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-07-22", - last_updated: "2025-07-22", - modalities: { input: ["pdf", "image", "text", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.03, cache_write: 1 }, - limit: { context: 1048000, output: 64000 }, - }, - "sapiens-ai/agnes-1.5-lite": { - id: "sapiens-ai/agnes-1.5-lite", - name: "Agnes 1.5 Lite", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-03-26", - last_updated: "2026-03-26", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.12, output: 0.6 }, - limit: { context: 256000, output: 256000 }, - }, - "sapiens-ai/agnes-1.5-pro": { - id: "sapiens-ai/agnes-1.5-pro", - name: "Agnes 1.5 Pro", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-21", - last_updated: "2026-03-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.16, output: 0.8 }, - limit: { context: 256000, output: 256000 }, - }, - "moonshotai/kimi-k2.5": { - id: "moonshotai/kimi-k2.5", - name: "Kimi K2.5", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: false, - knowledge: "2025-01-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.58, output: 3.02, cache_read: 0.1 }, - limit: { context: 262000, output: 64000 }, - }, - "moonshotai/kimi-k2-thinking-turbo": { - id: "moonshotai/kimi-k2-thinking-turbo", - name: "Kimi K2 Thinking Turbo", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.15, output: 8, cache_read: 0.15 }, - limit: { context: 262000, output: 64000 }, - }, - "moonshotai/kimi-k2-0905": { - id: "moonshotai/kimi-k2-0905", - name: "Kimi K2 0905", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-09-04", - last_updated: "2025-09-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 2.5, cache_read: 0.15 }, - limit: { context: 262000, output: 64000 }, - }, - "moonshotai/kimi-k2.6": { - id: "moonshotai/kimi-k2.6", - name: "Kimi K2.6", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: false, - knowledge: "2025-01-01", - release_date: "2026-04-20", - last_updated: "2026-04-20", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262140, output: 262140 }, - }, - "moonshotai/kimi-k2-thinking": { - id: "moonshotai/kimi-k2-thinking", - name: "Kimi K2 Thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 2.5, cache_read: 0.15 }, - limit: { context: 262000, output: 64000 }, - }, - "anthropic/claude-opus-4.1": { - id: "anthropic/claude-opus-4.1", - name: "Claude Opus 4.1", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["image", "text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "anthropic/claude-3.7-sonnet": { - id: "anthropic/claude-3.7-sonnet", - name: "Claude 3.7 Sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-02-24", - last_updated: "2025-02-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "anthropic/claude-opus-4.6": { - id: "anthropic/claude-opus-4.6", - name: "Claude Opus 4.6", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-06", - last_updated: "2026-02-06", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "anthropic/claude-opus-4.7": { - id: "anthropic/claude-opus-4.7", - name: "Claude Opus 4.7", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "anthropic/claude-sonnet-4": { - id: "anthropic/claude-sonnet-4", - name: "Claude Sonnet 4", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["image", "text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "anthropic/claude-sonnet-4.5": { - id: "anthropic/claude-sonnet-4.5", - name: "Claude Sonnet 4.5", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "anthropic/claude-opus-4.5": { - id: "anthropic/claude-opus-4.5", - name: "Claude Opus 4.5", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-11-24", - last_updated: "2025-11-24", - modalities: { input: ["pdf", "image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "anthropic/claude-opus-4": { - id: "anthropic/claude-opus-4", - name: "Claude Opus 4", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["image", "text", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "anthropic/claude-3.5-haiku": { - id: "anthropic/claude-3.5-haiku", - name: "Claude 3.5 Haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2024-11-04", - last_updated: "2024-11-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4, cache_read: 0.08, cache_write: 1 }, - limit: { context: 200000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "anthropic/claude-haiku-4.5": { - id: "anthropic/claude-haiku-4.5", - name: "Claude Haiku 4.5", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "anthropic/claude-sonnet-4.6": { - id: "anthropic/claude-sonnet-4.6", - name: "Claude Sonnet 4.6", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-18", - last_updated: "2026-02-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic", api: "https://zenmux.ai/api/anthropic/v1" }, - }, - "deepseek/deepseek-v4-flash": { - id: "deepseek/deepseek-v4-flash", - name: "DeepSeek V4 Flash", - family: "deepseek-flash", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.28, cache_read: 0.028 }, - limit: { context: 1000000, output: 384000 }, - }, - "deepseek/deepseek-v4-pro": { - id: "deepseek/deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.74, output: 3.48, cache_read: 0.145 }, - limit: { context: 1000000, output: 384000 }, - }, - "tencent/hy3-preview": { - id: "tencent/hy3-preview", - name: "Hy3 preview", - family: "Hy", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-20", - last_updated: "2026-04-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.172, output: 0.572, cache_read: 0.058, cache_write: 0 }, - limit: { context: 256000, output: 64000 }, - }, - "openai/gpt-5.5": { - id: "openai/gpt-5.5", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-23", - last_updated: "2026-04-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5, context_over_200k: { input: 10, output: 45, cache_read: 1 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - experimental: { - modes: { - fast: { - cost: { input: 12.5, output: 75, cache_read: 1.25 }, - provider: { body: { service_tier: "priority" } }, - }, - }, - }, - }, - "openai/gpt-5.5-pro": { - id: "openai/gpt-5.5-pro", - name: "GPT-5.5 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-23", - last_updated: "2026-04-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180, context_over_200k: { input: 60, output: 270 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "xiaomi/mimo-v2.5-pro": { - id: "xiaomi/mimo-v2.5-pro", - name: "MiMo-V2.5-Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3, cache_read: 0.2, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1048576, output: 131072 }, - }, - "xiaomi/mimo-v2-omni": { - id: "xiaomi/mimo-v2-omni", - name: "MiMo V2 Omni", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2, cache_read: 0.08 }, - limit: { context: 265000, output: 265000 }, - }, - "xiaomi/mimo-v2.5": { - id: "xiaomi/mimo-v2.5", - name: "MiMo-V2.5", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: true, - cost: { - input: 0.4, - output: 2, - cache_read: 0.08, - context_over_200k: { input: 0.8, output: 4, cache_read: 0.16 }, - }, - limit: { context: 1048576, output: 131072 }, - }, - "xiaomi/mimo-v2-pro": { - id: "xiaomi/mimo-v2-pro", - name: "MiMo V2 Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 3, cache_read: 0.2, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1000000, output: 256000 }, - }, - "xiaomi/mimo-v2-flash": { - id: "xiaomi/mimo-v2-flash", - name: "MiMo-V2-Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12-01", - release_date: "2025-12-16", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3, cache_read: 0.01 }, - limit: { context: 262144, output: 65536 }, - }, - }, - }, - upstage: { - id: "upstage", - env: ["UPSTAGE_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.upstage.ai/v1/solar", - name: "Upstage", - doc: "https://developers.upstage.ai/docs/apis/chat", - models: { - "solar-pro2": { - id: "solar-pro2", - name: "solar-pro2", - family: "solar-pro", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03", - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.25 }, - limit: { context: 65536, output: 8192 }, - }, - "solar-mini": { - id: "solar-mini", - name: "solar-mini", - family: "solar-mini", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2024-06-12", - last_updated: "2025-04-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 32768, output: 4096 }, - }, - "solar-pro3": { - id: "solar-pro3", - name: "solar-pro3", - family: "solar-pro", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03", - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.25 }, - limit: { context: 131072, output: 8192 }, - }, - }, - }, - "novita-ai": { - id: "novita-ai", - env: ["NOVITA_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.novita.ai/openai", - name: "NovitaAI", - doc: "https://novita.ai/docs/guides/introduction", - models: { - "deepseek/deepseek-r1-turbo": { - id: "deepseek/deepseek-r1-turbo", - name: "DeepSeek R1 (Turbo)\t", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-03-05", - last_updated: "2025-03-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 2.5 }, - limit: { context: 64000, output: 16000 }, - }, - "deepseek/deepseek-v3-0324": { - id: "deepseek/deepseek-v3-0324", - name: "DeepSeek V3 0324", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-03-25", - last_updated: "2025-03-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 1.12, cache_read: 0.135 }, - limit: { context: 163840, output: 163840 }, - }, - "deepseek/deepseek-ocr-2": { - id: "deepseek/deepseek-ocr-2", - name: "deepseek/deepseek-ocr-2", - attachment: true, - reasoning: false, - tool_call: false, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.03 }, - limit: { context: 8192, output: 8192 }, - }, - "deepseek/deepseek-ocr": { - id: "deepseek/deepseek-ocr", - name: "DeepSeek-OCR", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-10-24", - last_updated: "2025-10-24", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.03 }, - limit: { context: 8192, output: 8192 }, - }, - "deepseek/deepseek-r1-distill-llama-70b": { - id: "deepseek/deepseek-r1-distill-llama-70b", - name: "DeepSeek R1 Distill LLama 70B", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-01-27", - last_updated: "2025-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.8, output: 0.8 }, - limit: { context: 8192, output: 8192 }, - }, - "deepseek/deepseek-prover-v2-671b": { - id: "deepseek/deepseek-prover-v2-671b", - name: "Deepseek Prover V2 671B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-30", - last_updated: "2025-04-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 2.5 }, - limit: { context: 160000, output: 160000 }, - }, - "deepseek/deepseek-r1-0528-qwen3-8b": { - id: "deepseek/deepseek-r1-0528-qwen3-8b", - name: "DeepSeek R1 0528 Qwen3 8B", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-05-29", - last_updated: "2025-05-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.09 }, - limit: { context: 128000, output: 32000 }, - }, - "deepseek/deepseek-r1-distill-qwen-32b": { - id: "deepseek/deepseek-r1-distill-qwen-32b", - name: "DeepSeek R1 Distill Qwen 32B", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.3 }, - limit: { context: 64000, output: 32000 }, - }, - "deepseek/deepseek-v3.2-exp": { - id: "deepseek/deepseek-v3.2-exp", - name: "Deepseek V3.2 Exp", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 0.41 }, - limit: { context: 163840, output: 65536 }, - }, - "deepseek/deepseek-v3.1": { - id: "deepseek/deepseek-v3.1", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 1, cache_read: 0.135 }, - limit: { context: 131072, output: 32768 }, - }, - "deepseek/deepseek-v3.2": { - id: "deepseek/deepseek-v3.2", - name: "Deepseek V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.269, output: 0.4, cache_read: 0.1345 }, - limit: { context: 163840, output: 65536 }, - }, - "deepseek/deepseek-v3-turbo": { - id: "deepseek/deepseek-v3-turbo", - name: "DeepSeek V3 (Turbo)\t", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-03-05", - last_updated: "2025-03-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 1.3 }, - limit: { context: 64000, output: 16000 }, - }, - "deepseek/deepseek-r1-distill-qwen-14b": { - id: "deepseek/deepseek-r1-distill-qwen-14b", - name: "DeepSeek R1 Distill Qwen 14B", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 32768, output: 16384 }, - }, - "deepseek/deepseek-r1-0528": { - id: "deepseek/deepseek-r1-0528", - name: "DeepSeek R1 0528", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 2.5, cache_read: 0.35 }, - limit: { context: 163840, output: 32768 }, - }, - "deepseek/deepseek-v3.1-terminus": { - id: "deepseek/deepseek-v3.1-terminus", - name: "Deepseek V3.1 Terminus", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-22", - last_updated: "2025-09-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 1, cache_read: 0.135 }, - limit: { context: 131072, output: 32768 }, - }, - "inclusionai/ling-2.6-1t": { - id: "inclusionai/ling-2.6-1t", - name: "Ling-2.6-1T", - family: "ling", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-23", - last_updated: "2026-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 32768 }, - }, - "paddlepaddle/paddleocr-vl": { - id: "paddlepaddle/paddleocr-vl", - name: "PaddleOCR-VL", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-10-22", - last_updated: "2025-10-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.02 }, - limit: { context: 16384, output: 16384 }, - }, - "nousresearch/hermes-2-pro-llama-3-8b": { - id: "nousresearch/hermes-2-pro-llama-3-8b", - name: "Hermes 2 Pro Llama 3 8B", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2024-06-27", - last_updated: "2024-06-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.14 }, - limit: { context: 8192, output: 8192 }, - }, - "zai-org/glm-4.7": { - id: "zai-org/glm-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.11 }, - limit: { context: 204800, output: 131072 }, - }, - "zai-org/glm-5": { - id: "zai-org/glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2, cache_read: 0.2 }, - limit: { context: 202800, output: 131072 }, - }, - "zai-org/glm-5.1": { - id: "zai-org/glm-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-03-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.4, output: 4.4, cache_read: 0.26 }, - limit: { context: 204800, output: 131072 }, - }, - "zai-org/glm-4.5": { - id: "zai-org/glm-4.5", - name: "GLM-4.5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.11 }, - limit: { context: 131072, output: 98304 }, - }, - "zai-org/glm-4.5-air": { - id: "zai-org/glm-4.5-air", - name: "GLM 4.5 Air", - family: "glm-air", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-10-13", - last_updated: "2025-10-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.85 }, - limit: { context: 131072, output: 98304 }, - }, - "zai-org/glm-4.5v": { - id: "zai-org/glm-4.5v", - name: "GLM 4.5V", - family: "glmv", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-08-11", - last_updated: "2025-08-11", - modalities: { input: ["text", "video", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.8, cache_read: 0.11 }, - limit: { context: 65536, output: 16384 }, - }, - "zai-org/glm-4.6": { - id: "zai-org/glm-4.6", - name: "GLM 4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.2, cache_read: 0.11 }, - limit: { context: 204800, output: 131072 }, - }, - "zai-org/glm-4.6v": { - id: "zai-org/glm-4.6v", - name: "GLM 4.6V", - family: "glmv", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-08", - last_updated: "2025-12-08", - modalities: { input: ["text", "video", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.9, cache_read: 0.055 }, - limit: { context: 131072, output: 32768 }, - }, - "zai-org/glm-4.7-flash": { - id: "zai-org/glm-4.7-flash", - name: "GLM-4.7-Flash", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.4, cache_read: 0.01 }, - limit: { context: 200000, output: 128000 }, - }, - "zai-org/autoglm-phone-9b-multilingual": { - id: "zai-org/autoglm-phone-9b-multilingual", - name: "AutoGLM-Phone-9B-Multilingual", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-12-10", - last_updated: "2025-12-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.035, output: 0.138 }, - limit: { context: 65536, output: 65536 }, - }, - "mistralai/mistral-nemo": { - id: "mistralai/mistral-nemo", - name: "Mistral Nemo", - family: "mistral-nemo", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2024-07-30", - last_updated: "2024-07-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.17 }, - limit: { context: 60288, output: 16000 }, - }, - "baichuan/baichuan-m2-32b": { - id: "baichuan/baichuan-m2-32b", - name: "baichuan-m2-32b", - family: "baichuan", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - knowledge: "2024-12", - release_date: "2025-08-13", - last_updated: "2025-08-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.07 }, - limit: { context: 131072, output: 131072 }, - }, - "meta-llama/llama-4-scout-17b-16e-instruct": { - id: "meta-llama/llama-4-scout-17b-16e-instruct", - name: "Llama 4 Scout Instruct", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-06", - last_updated: "2025-04-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.18, output: 0.59 }, - limit: { context: 131072, output: 131072 }, - }, - "meta-llama/llama-3.3-70b-instruct": { - id: "meta-llama/llama-3.3-70b-instruct", - name: "Llama 3.3 70B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-07", - last_updated: "2024-12-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.135, output: 0.4 }, - limit: { context: 131072, output: 120000 }, - }, - "meta-llama/llama-3.2-3b-instruct": { - id: "meta-llama/llama-3.2-3b-instruct", - name: "Llama 3.2 3B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2024-09-18", - last_updated: "2024-09-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.05 }, - limit: { context: 32768, output: 32000 }, - }, - "meta-llama/llama-3-8b-instruct": { - id: "meta-llama/llama-3-8b-instruct", - name: "Llama 3 8B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-04-25", - last_updated: "2024-04-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.04 }, - limit: { context: 8192, output: 8192 }, - }, - "meta-llama/llama-3.1-8b-instruct": { - id: "meta-llama/llama-3.1-8b-instruct", - name: "Llama 3.1 8B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-07-24", - last_updated: "2024-07-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.05 }, - limit: { context: 16384, output: 16384 }, - }, - "meta-llama/llama-3-70b-instruct": { - id: "meta-llama/llama-3-70b-instruct", - name: "Llama3 70B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2024-04-25", - last_updated: "2024-04-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.51, output: 0.74 }, - limit: { context: 8192, output: 8000 }, - }, - "meta-llama/llama-4-maverick-17b-128e-instruct-fp8": { - id: "meta-llama/llama-4-maverick-17b-128e-instruct-fp8", - name: "Llama 4 Maverick Instruct", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-06", - last_updated: "2025-04-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 0.85 }, - limit: { context: 1048576, output: 8192 }, - }, - "gryphe/mythomax-l2-13b": { - id: "gryphe/mythomax-l2-13b", - name: "Mythomax L2 13B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-04-25", - last_updated: "2024-04-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.09 }, - limit: { context: 4096, output: 3200 }, - }, - "sao10k/l31-70b-euryale-v2.2": { - id: "sao10k/l31-70b-euryale-v2.2", - name: "L31 70B Euryale V2.2", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-09-19", - last_updated: "2024-09-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.48, output: 1.48 }, - limit: { context: 8192, output: 8192 }, - }, - "sao10k/l3-70b-euryale-v2.1": { - id: "sao10k/l3-70b-euryale-v2.1", - name: "L3 70B Euryale V2.1\t", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-06-18", - last_updated: "2024-06-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.48, output: 1.48 }, - limit: { context: 8192, output: 8192 }, - }, - "sao10k/L3-8B-Stheno-v3.2": { - id: "sao10k/L3-8B-Stheno-v3.2", - name: "L3 8B Stheno V3.2", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-11-29", - last_updated: "2024-11-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.05 }, - limit: { context: 8192, output: 32000 }, - }, - "sao10k/l3-8b-lunaris": { - id: "sao10k/l3-8b-lunaris", - name: "Sao10k L3 8B Lunaris\t", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2024-11-28", - last_updated: "2024-11-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.05 }, - limit: { context: 8192, output: 8192 }, - }, - "microsoft/wizardlm-2-8x22b": { - id: "microsoft/wizardlm-2-8x22b", - name: "Wizardlm 2 8x22B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-04-24", - last_updated: "2024-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.62, output: 0.62 }, - limit: { context: 65535, output: 8000 }, - }, - "openai/gpt-oss-20b": { - id: "openai/gpt-oss-20b", - name: "OpenAI: GPT OSS 20B", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-08-06", - last_updated: "2025-08-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.15 }, - limit: { context: 131072, output: 32768 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "OpenAI GPT OSS 120B", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-06", - last_updated: "2025-08-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.25 }, - limit: { context: 131072, output: 32768 }, - }, - "minimaxai/minimax-m1-80k": { - id: "minimaxai/minimax-m1-80k", - name: "MiniMax M1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.2 }, - limit: { context: 1000000, output: 40000 }, - }, - "xiaomimimo/mimo-v2-flash": { - id: "xiaomimimo/mimo-v2-flash", - name: "XiaomiMiMo/MiMo-V2-Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-12-19", - last_updated: "2025-12-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3, cache_read: 0.3 }, - limit: { context: 262144, output: 32000 }, - }, - "baidu/ernie-4.5-vl-28b-a3b-thinking": { - id: "baidu/ernie-4.5-vl-28b-a3b-thinking", - name: "ERNIE-4.5-VL-28B-A3B-Thinking", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-11-26", - last_updated: "2025-11-26", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.39, output: 0.39 }, - limit: { context: 131072, output: 65536 }, - }, - "baidu/ernie-4.5-vl-424b-a47b": { - id: "baidu/ernie-4.5-vl-424b-a47b", - name: "ERNIE 4.5 VL 424B A47B", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-06-30", - last_updated: "2025-06-30", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.42, output: 1.25 }, - limit: { context: 123000, output: 16000 }, - }, - "baidu/ernie-4.5-21B-a3b": { - id: "baidu/ernie-4.5-21B-a3b", - name: "ERNIE 4.5 21B A3B", - family: "ernie", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-03", - release_date: "2025-06-30", - last_updated: "2025-06-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.28 }, - limit: { context: 120000, output: 8000 }, - }, - "baidu/ernie-4.5-300b-a47b-paddle": { - id: "baidu/ernie-4.5-300b-a47b-paddle", - name: "ERNIE 4.5 300B A47B", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-06-30", - last_updated: "2025-06-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.28, output: 1.1 }, - limit: { context: 123000, output: 12000 }, - }, - "baidu/ernie-4.5-21B-a3b-thinking": { - id: "baidu/ernie-4.5-21B-a3b-thinking", - name: "ERNIE-4.5-21B-A3B-Thinking", - family: "ernie", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-03", - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.28 }, - limit: { context: 131072, output: 65536 }, - }, - "baidu/ernie-4.5-vl-28b-a3b": { - id: "baidu/ernie-4.5-vl-28b-a3b", - name: "ERNIE 4.5 VL 28B A3B", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-06-30", - last_updated: "2025-06-30", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 1.4, output: 5.6 }, - limit: { context: 30000, output: 8000 }, - }, - "minimax/minimax-m2.7": { - id: "minimax/minimax-m2.7", - name: "MiniMax M2.7", - family: "minimax-m2.7", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06 }, - limit: { context: 204800, output: 131072 }, - }, - "minimax/minimax-m2": { - id: "minimax/minimax-m2", - name: "MiniMax-M2", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2025-10-27", - last_updated: "2025-10-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.03 }, - limit: { context: 204800, output: 131072 }, - }, - "minimax/minimax-m2.1": { - id: "minimax/minimax-m2.1", - name: "Minimax M2.1", - family: "minimax", - attachment: false, - reasoning: false, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.03 }, - limit: { context: 204800, output: 131072 }, - }, - "minimax/minimax-m2.5": { - id: "minimax/minimax-m2.5", - name: "MiniMax M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2, cache_read: 0.03 }, - limit: { context: 204800, output: 131100 }, - }, - "minimax/minimax-m2.5-highspeed": { - id: "minimax/minimax-m2.5-highspeed", - name: "MiniMax M2.5 Highspeed", - family: "minimax-m2.5", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 2.4, cache_read: 0.03 }, - limit: { context: 204800, output: 131100 }, - }, - "qwen/qwen2.5-7b-instruct": { - id: "qwen/qwen2.5-7b-instruct", - name: "Qwen2.5 7B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.07 }, - limit: { context: 32000, output: 32000 }, - }, - "qwen/qwen3.5-122b-a10b": { - id: "qwen/qwen3.5-122b-a10b", - name: "Qwen3.5-122B-A10B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-26", - last_updated: "2026-02-26", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 3.2 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen3.6-27b": { - id: "qwen/qwen3.6-27b", - name: "Qwen3.6-27B", - family: "qwen3.6", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 3.6 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen3.5-27b": { - id: "qwen/qwen3.5-27b", - name: "Qwen3.5-27B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-26", - last_updated: "2026-02-26", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 2.4 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen3-235b-a22b-instruct-2507": { - id: "qwen/qwen3-235b-a22b-instruct-2507", - name: "Qwen3 235B A22B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-22", - last_updated: "2025-07-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.58 }, - limit: { context: 131072, output: 16384 }, - }, - "qwen/qwen3-omni-30b-a3b-instruct": { - id: "qwen/qwen3-omni-30b-a3b-instruct", - name: "Qwen3 Omni 30B A3B Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-09-24", - last_updated: "2025-09-24", - modalities: { input: ["text", "video", "audio", "image"], output: ["text", "audio"] }, - open_weights: true, - cost: { input: 0.25, output: 0.97, input_audio: 2.2, output_audio: 1.788 }, - limit: { context: 65536, output: 16384 }, - }, - "qwen/qwen3.5-397b-a17b": { - id: "qwen/qwen3.5-397b-a17b", - name: "Qwen3.5-397B-A17B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3.6 }, - limit: { context: 262144, output: 64000 }, - }, - "qwen/qwen2.5-vl-72b-instruct": { - id: "qwen/qwen2.5-vl-72b-instruct", - name: "Qwen2.5 VL 72B Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-03-25", - last_updated: "2025-03-25", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.8, output: 0.8 }, - limit: { context: 32768, output: 32768 }, - }, - "qwen/qwen3-vl-235b-a22b-thinking": { - id: "qwen/qwen3-vl-235b-a22b-thinking", - name: "Qwen3 VL 235B A22B Thinking", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-09-24", - last_updated: "2025-09-24", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.98, output: 3.95 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3-vl-30b-a3b-thinking": { - id: "qwen/qwen3-vl-30b-a3b-thinking", - name: "qwen/qwen3-vl-30b-a3b-thinking", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-11", - last_updated: "2025-10-11", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3-omni-30b-a3b-thinking": { - id: "qwen/qwen3-omni-30b-a3b-thinking", - name: "Qwen3 Omni 30B A3B Thinking", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-24", - last_updated: "2025-09-24", - modalities: { input: ["text", "audio", "video", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 0.97, input_audio: 2.2, output_audio: 1.788 }, - limit: { context: 65536, output: 16384 }, - }, - "qwen/qwen3-vl-8b-instruct": { - id: "qwen/qwen3-vl-8b-instruct", - name: "qwen/qwen3-vl-8b-instruct", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-17", - last_updated: "2025-10-17", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.5 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3-max": { - id: "qwen/qwen3-max", - name: "Qwen3 Max", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-24", - last_updated: "2025-09-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.11, output: 8.45 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen3-32b-fp8": { - id: "qwen/qwen3-32b-fp8", - name: "Qwen3 32B", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-04-29", - last_updated: "2025-04-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.45 }, - limit: { context: 40960, output: 20000 }, - }, - "qwen/qwen3-4b-fp8": { - id: "qwen/qwen3-4b-fp8", - name: "Qwen3 4B", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-04-29", - last_updated: "2025-04-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.03 }, - limit: { context: 128000, output: 20000 }, - }, - "qwen/qwen3-235b-a22b-thinking-2507": { - id: "qwen/qwen3-235b-a22b-thinking-2507", - name: "Qwen3 235B A22b Thinking 2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-25", - last_updated: "2025-07-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 3 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3-next-80b-a3b-thinking": { - id: "qwen/qwen3-next-80b-a3b-thinking", - name: "Qwen3 Next 80B A3B Thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-10", - last_updated: "2025-09-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 1.5 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen-mt-plus": { - id: "qwen/qwen-mt-plus", - name: "Qwen MT Plus", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-09-03", - last_updated: "2025-09-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 0.75 }, - limit: { context: 16384, output: 8192 }, - }, - "qwen/qwen3-next-80b-a3b-instruct": { - id: "qwen/qwen3-next-80b-a3b-instruct", - name: "Qwen3 Next 80B A3B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-10", - last_updated: "2025-09-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 1.5 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3-30b-a3b-fp8": { - id: "qwen/qwen3-30b-a3b-fp8", - name: "Qwen3 30B A3B", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-04-29", - last_updated: "2025-04-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.45 }, - limit: { context: 40960, output: 20000 }, - }, - "qwen/qwen3-coder-next": { - id: "qwen/qwen3-coder-next", - name: "Qwen3 Coder Next", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-03", - last_updated: "2026-02-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1.5 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen3-coder-480b-a35b-instruct": { - id: "qwen/qwen3-coder-480b-a35b-instruct", - name: "Qwen3 Coder 480B A35B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.3 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen3-vl-30b-a3b-instruct": { - id: "qwen/qwen3-vl-30b-a3b-instruct", - name: "qwen/qwen3-vl-30b-a3b-instruct", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-11", - last_updated: "2025-10-11", - modalities: { input: ["text", "video", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.7 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3-coder-30b-a3b-instruct": { - id: "qwen/qwen3-coder-30b-a3b-instruct", - name: "Qwen3 Coder 30b A3B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-09", - last_updated: "2025-10-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.27 }, - limit: { context: 160000, output: 32768 }, - }, - "qwen/qwen3-235b-a22b-fp8": { - id: "qwen/qwen3-235b-a22b-fp8", - name: "Qwen3 235B A22B", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-04-29", - last_updated: "2025-04-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 40960, output: 20000 }, - }, - "qwen/qwen3-8b-fp8": { - id: "qwen/qwen3-8b-fp8", - name: "Qwen3 8B", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-04-29", - last_updated: "2025-04-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.035, output: 0.138 }, - limit: { context: 128000, output: 20000 }, - }, - "qwen/qwen3-vl-235b-a22b-instruct": { - id: "qwen/qwen3-vl-235b-a22b-instruct", - name: "Qwen3 VL 235B A22B Instruct", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-24", - last_updated: "2025-09-24", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.5 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen-2.5-72b-instruct": { - id: "qwen/qwen-2.5-72b-instruct", - name: "Qwen 2.5 72B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-10-15", - last_updated: "2024-10-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.38, output: 0.4 }, - limit: { context: 32000, output: 8192 }, - }, - "qwen/qwen3.5-35b-a3b": { - id: "qwen/qwen3.5-35b-a3b", - name: "Qwen3.5-35B-A3B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-26", - last_updated: "2026-02-26", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 2 }, - limit: { context: 262144, output: 65536 }, - }, - "kwaipilot/kat-coder-pro": { - id: "kwaipilot/kat-coder-pro", - name: "Kat Coder Pro", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01-05", - last_updated: "2026-01-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06 }, - limit: { context: 256000, output: 128000 }, - }, - "google/gemma-4-31b-it": { - id: "google/gemma-4-31b-it", - name: "Gemma 4 31B", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.4 }, - limit: { context: 262144, output: 131072 }, - }, - "google/gemma-3-12b-it": { - id: "google/gemma-3-12b-it", - name: "Gemma 3 12B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.1 }, - limit: { context: 131072, output: 8192 }, - }, - "google/gemma-3-27b-it": { - id: "google/gemma-3-27b-it", - name: "Gemma 3 27B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-03-25", - last_updated: "2025-03-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.119, output: 0.2 }, - limit: { context: 98304, output: 16384 }, - }, - "google/gemma-4-26b-a4b-it": { - id: "google/gemma-4-26b-a4b-it", - name: "Gemma 4 26B A4B", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.4 }, - limit: { context: 262144, output: 131072 }, - }, - "moonshotai/kimi-k2.5": { - id: "moonshotai/kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.1 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/kimi-k2-instruct": { - id: "moonshotai/kimi-k2-instruct", - name: "Kimi K2 Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-11", - last_updated: "2025-07-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.57, output: 2.3 }, - limit: { context: 131072, output: 131072 }, - }, - "moonshotai/kimi-k2-0905": { - id: "moonshotai/kimi-k2-0905", - name: "Kimi K2 0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/kimi-k2.6": { - id: "moonshotai/kimi-k2.6", - name: "Kimi K2.6", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/kimi-k2-thinking": { - id: "moonshotai/kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-11-07", - last_updated: "2025-11-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5 }, - limit: { context: 262144, output: 262144 }, - }, - "deepseek/deepseek-v4-flash": { - id: "deepseek/deepseek-v4-flash", - name: "DeepSeek V4 Flash", - family: "deepseek-flash", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.28, cache_read: 0.028 }, - limit: { context: 1048576, output: 393216 }, - }, - "deepseek/deepseek-v4-pro": { - id: "deepseek/deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.69, output: 3.38, cache_read: 0.13 }, - limit: { context: 1048576, output: 393216 }, - }, - }, - }, - "xiaomi-token-plan-cn": { - id: "xiaomi-token-plan-cn", - env: ["XIAOMI_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://token-plan-cn.xiaomimimo.com/v1", - name: "Xiaomi Token Plan (China)", - doc: "https://platform.xiaomimimo.com/#/docs", - models: { - "mimo-v2-tts": { - id: "mimo-v2-tts", - name: "MiMo-V2-TTS", - family: "mimo", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["audio"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 16384 }, - }, - "mimo-v2.5-pro": { - id: "mimo-v2.5-pro", - name: "MiMo-V2.5-Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, context_over_200k: { input: 0, output: 0, cache_read: 0 } }, - limit: { context: 1048576, output: 131072 }, - }, - "mimo-v2-omni": { - id: "mimo-v2-omni", - name: "MiMo-V2-Omni", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 262144, output: 131072 }, - }, - "mimo-v2.5": { - id: "mimo-v2.5", - name: "MiMo-V2.5", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, context_over_200k: { input: 0, output: 0, cache_read: 0 } }, - limit: { context: 1048576, output: 131072 }, - }, - "mimo-v2-pro": { - id: "mimo-v2-pro", - name: "MiMo-V2-Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1048576, output: 131072 }, - }, - "mimo-v2-flash": { - id: "mimo-v2-flash", - name: "MiMo-V2-Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12-01", - release_date: "2025-12-16", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 262144, output: 65536 }, - }, - }, - }, - wandb: { - id: "wandb", - env: ["WANDB_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.inference.wandb.ai/v1", - name: "Weights & Biases", - doc: "https://docs.wandb.ai/guides/integrations/inference/", - models: { - "Qwen/Qwen3-30B-A3B-Instruct-2507": { - id: "Qwen/Qwen3-30B-A3B-Instruct-2507", - name: "Qwen3 30B A3B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-29", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 262144, output: 262144 }, - }, - "Qwen/Qwen3-235B-A22B-Instruct-2507": { - id: "Qwen/Qwen3-235B-A22B-Instruct-2507", - name: "Qwen3 235B A22B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04-28", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 262144, output: 262144 }, - }, - "Qwen/Qwen3-235B-A22B-Thinking-2507": { - id: "Qwen/Qwen3-235B-A22B-Thinking-2507", - name: "Qwen3-235B-A22B-Thinking-2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-25", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 262144, output: 262144 }, - }, - "Qwen/Qwen3-Coder-480B-A35B-Instruct": { - id: "Qwen/Qwen3-Coder-480B-A35B-Instruct", - name: "Qwen3-Coder-480B-A35B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 1.5 }, - limit: { context: 262144, output: 262144 }, - }, - "zai-org/GLM-5-FP8": { - id: "zai-org/GLM-5-FP8", - name: "GLM 5", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2 }, - limit: { context: 200000, output: 200000 }, - }, - "meta-llama/Llama-4-Scout-17B-16E-Instruct": { - id: "meta-llama/Llama-4-Scout-17B-16E-Instruct", - name: "Llama 4 Scout 17B 16E Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-31", - last_updated: "2026-03-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.17, output: 0.66 }, - limit: { context: 64000, output: 64000 }, - }, - "meta-llama/Llama-3.3-70B-Instruct": { - id: "meta-llama/Llama-3.3-70B-Instruct", - name: "Llama-3.3-70B-Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.71, output: 0.71 }, - limit: { context: 128000, output: 128000 }, - }, - "meta-llama/Llama-3.1-8B-Instruct": { - id: "meta-llama/Llama-3.1-8B-Instruct", - name: "Meta-Llama-3.1-8B-Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 0.22 }, - limit: { context: 128000, output: 128000 }, - }, - "meta-llama/Llama-3.1-70B-Instruct": { - id: "meta-llama/Llama-3.1-70B-Instruct", - name: "Llama 3.1 70B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-07-23", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.8, output: 0.8 }, - limit: { context: 128000, output: 128000 }, - }, - "OpenPipe/Qwen3-14B-Instruct": { - id: "OpenPipe/Qwen3-14B-Instruct", - name: "OpenPipe Qwen3 14B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-29", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.22 }, - limit: { context: 32768, output: 32768 }, - }, - "microsoft/Phi-4-mini-instruct": { - id: "microsoft/Phi-4-mini-instruct", - name: "Phi-4-mini-instruct", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.35 }, - limit: { context: 128000, output: 128000 }, - }, - "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8": { - id: "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8", - name: "NVIDIA Nemotron 3 Super 120B", - family: "nemotron", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-11", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 262144, output: 262144 }, - }, - "deepseek-ai/DeepSeek-V3.1": { - id: "deepseek-ai/DeepSeek-V3.1", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-21", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 1.65 }, - limit: { context: 161000, output: 161000 }, - }, - "openai/gpt-oss-20b": { - id: "openai/gpt-oss-20b", - name: "gpt-oss-20b", - family: "gpt-oss", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.2 }, - limit: { context: 131072, output: 131072 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "gpt-oss-120b", - family: "gpt-oss", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 131072, output: 131072 }, - }, - "moonshotai/Kimi-K2.5": { - id: "moonshotai/Kimi-K2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-03-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 2.85 }, - limit: { context: 262144, output: 262144 }, - }, - "MiniMaxAI/MiniMax-M2.5": { - id: "MiniMaxAI/MiniMax-M2.5", - name: "MiniMax M2.5", - family: "minimax", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 196608, output: 196608 }, - }, - "zai-org/GLM-5.1": { - id: "zai-org/GLM-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-03-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.4, output: 4.4, cache_read: 0.26, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - }, - }, - chutes: { - id: "chutes", - env: ["CHUTES_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://llm.chutes.ai/v1", - name: "Chutes", - doc: "https://llm.chutes.ai/v1/models", - models: { - "miromind-ai/MiroThinker-v1.5-235B": { - id: "miromind-ai/MiroThinker-v1.5-235B", - name: "MiroThinker V1.5 235B", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2026-01-10", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.15 }, - limit: { context: 262144, output: 8192 }, - }, - "OpenGVLab/InternVL3-78B-TEE": { - id: "OpenGVLab/InternVL3-78B-TEE", - name: "InternVL3 78B TEE", - family: "opengvlab", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-01-06", - last_updated: "2026-01-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.39 }, - limit: { context: 32768, output: 32768 }, - }, - "NousResearch/DeepHermes-3-Mistral-24B-Preview": { - id: "NousResearch/DeepHermes-3-Mistral-24B-Preview", - name: "DeepHermes 3 Mistral 24B Preview", - family: "nousresearch", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.1 }, - limit: { context: 32768, output: 32768 }, - }, - "NousResearch/Hermes-4-405B-FP8-TEE": { - id: "NousResearch/Hermes-4-405B-FP8-TEE", - name: "Hermes 4 405B FP8 TEE", - family: "nousresearch", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 131072, output: 65536 }, - }, - "NousResearch/Hermes-4.3-36B": { - id: "NousResearch/Hermes-4.3-36B", - name: "Hermes 4.3 36B", - family: "nousresearch", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.39 }, - limit: { context: 32768, output: 8192 }, - }, - "NousResearch/Hermes-4-14B": { - id: "NousResearch/Hermes-4-14B", - name: "Hermes 4 14B", - family: "nousresearch", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.01, output: 0.05 }, - limit: { context: 40960, output: 40960 }, - }, - "NousResearch/Hermes-4-70B": { - id: "NousResearch/Hermes-4-70B", - name: "Hermes 4 70B", - family: "nousresearch", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.11, output: 0.38 }, - limit: { context: 131072, output: 131072 }, - }, - "Qwen/Qwen3-30B-A3B": { - id: "Qwen/Qwen3-30B-A3B", - name: "Qwen3 30B A3B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.22 }, - limit: { context: 40960, output: 40960 }, - }, - "Qwen/Qwen3-Coder-Next": { - id: "Qwen/Qwen3-Coder-Next", - name: "Qwen3 Coder Next", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.3 }, - limit: { context: 262144, output: 65536 }, - }, - "Qwen/Qwen2.5-Coder-32B-Instruct": { - id: "Qwen/Qwen2.5-Coder-32B-Instruct", - name: "Qwen2.5 Coder 32B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.11 }, - limit: { context: 32768, output: 32768 }, - }, - "Qwen/Qwen3-235B-A22B": { - id: "Qwen/Qwen3-235B-A22B", - name: "Qwen3 235B A22B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 40960, output: 40960 }, - }, - "Qwen/Qwen2.5-VL-72B-Instruct-TEE": { - id: "Qwen/Qwen2.5-VL-72B-Instruct-TEE", - name: "Qwen2.5 VL 72B Instruct TEE", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 32768, output: 32768 }, - }, - "Qwen/Qwen3Guard-Gen-0.6B": { - id: "Qwen/Qwen3Guard-Gen-0.6B", - name: "Qwen3Guard Gen 0.6B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.01, output: 0.01, cache_read: 0.005 }, - limit: { context: 32768, output: 8192 }, - }, - "Qwen/Qwen3-Next-80B-A3B-Instruct": { - id: "Qwen/Qwen3-Next-80B-A3B-Instruct", - name: "Qwen3 Next 80B A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.8 }, - limit: { context: 262144, output: 262144 }, - }, - "Qwen/Qwen3-30B-A3B-Instruct-2507": { - id: "Qwen/Qwen3-30B-A3B-Instruct-2507", - name: "Qwen3 30B A3B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.33 }, - limit: { context: 262144, output: 262144 }, - }, - "Qwen/Qwen3-32B": { - id: "Qwen/Qwen3-32B", - name: "Qwen3 32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.24, cache_read: 0.04 }, - limit: { context: 40960, output: 40960 }, - }, - "Qwen/Qwen3-14B": { - id: "Qwen/Qwen3-14B", - name: "Qwen3 14B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.22 }, - limit: { context: 40960, output: 40960 }, - }, - "Qwen/Qwen3-235B-A22B-Instruct-2507-TEE": { - id: "Qwen/Qwen3-235B-A22B-Instruct-2507-TEE", - name: "Qwen3 235B A22B Instruct 2507 TEE", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.55, cache_read: 0.04 }, - limit: { context: 262144, output: 65536 }, - }, - "Qwen/Qwen3-235B-A22B-Thinking-2507": { - id: "Qwen/Qwen3-235B-A22B-Thinking-2507", - name: "Qwen3 235B A22B Thinking 2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.11, output: 0.6 }, - limit: { context: 262144, output: 262144 }, - }, - "Qwen/Qwen2.5-VL-32B-Instruct": { - id: "Qwen/Qwen2.5-VL-32B-Instruct", - name: "Qwen2.5 VL 32B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.22 }, - limit: { context: 16384, output: 16384 }, - }, - "Qwen/Qwen3.5-397B-A17B-TEE": { - id: "Qwen/Qwen3.5-397B-A17B-TEE", - name: "Qwen3.5 397B A17B TEE", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-18", - last_updated: "2026-02-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.39, output: 2.34, cache_read: 0.195 }, - limit: { context: 262144, output: 65536 }, - }, - "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8-TEE": { - id: "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8-TEE", - name: "Qwen3 Coder 480B A35B Instruct FP8 TEE", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 0.95, cache_read: 0.11 }, - limit: { context: 262144, output: 262144 }, - }, - "Qwen/Qwen3-VL-235B-A22B-Instruct": { - id: "Qwen/Qwen3-VL-235B-A22B-Instruct", - name: "Qwen3 VL 235B A22B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 262144, output: 262144 }, - }, - "Qwen/Qwen2.5-72B-Instruct": { - id: "Qwen/Qwen2.5-72B-Instruct", - name: "Qwen2.5 72B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.52 }, - limit: { context: 32768, output: 32768 }, - }, - "zai-org/GLM-5.1-TEE": { - id: "zai-org/GLM-5.1-TEE", - name: "GLM 5.1 TEE", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-08", - last_updated: "2026-04-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 3.15, cache_read: 0.475 }, - limit: { context: 202752, output: 65535 }, - }, - "zai-org/GLM-4.7-Flash": { - id: "zai-org/GLM-4.7-Flash", - name: "GLM 4.7 Flash", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.35 }, - limit: { context: 202752, output: 65535 }, - }, - "zai-org/GLM-4.5-TEE": { - id: "zai-org/GLM-4.5-TEE", - name: "GLM 4.5 TEE", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.35, output: 1.55 }, - limit: { context: 131072, output: 65536 }, - }, - "zai-org/GLM-4.6-FP8": { - id: "zai-org/GLM-4.6-FP8", - name: "GLM 4.6 FP8", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 202752, output: 65535 }, - }, - "zai-org/GLM-4.5-Air": { - id: "zai-org/GLM-4.5-Air", - name: "GLM 4.5 Air", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.22 }, - limit: { context: 131072, output: 131072 }, - }, - "zai-org/GLM-4.7-FP8": { - id: "zai-org/GLM-4.7-FP8", - name: "GLM 4.7 FP8", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 202752, output: 65535 }, - }, - "zai-org/GLM-5-TEE": { - id: "zai-org/GLM-5-TEE", - name: "GLM 5 TEE", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-14", - last_updated: "2026-02-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 3.15, cache_read: 0.475 }, - limit: { context: 202752, output: 65535 }, - }, - "zai-org/GLM-4.5-FP8": { - id: "zai-org/GLM-4.5-FP8", - name: "GLM 4.5 FP8", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 131072, output: 65536 }, - }, - "zai-org/GLM-4.7-TEE": { - id: "zai-org/GLM-4.7-TEE", - name: "GLM 4.7 TEE", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 1.5 }, - limit: { context: 202752, output: 65535 }, - }, - "zai-org/GLM-4.6V": { - id: "zai-org/GLM-4.6V", - name: "GLM 4.6V", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.9, cache_read: 0.15 }, - limit: { context: 131072, output: 65536 }, - }, - "zai-org/GLM-5-Turbo": { - id: "zai-org/GLM-5-Turbo", - name: "GLM 5 Turbo", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-11", - last_updated: "2026-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.49, output: 1.96, cache_read: 0.245 }, - limit: { context: 202752, output: 65535 }, - }, - "zai-org/GLM-4.6-TEE": { - id: "zai-org/GLM-4.6-TEE", - name: "GLM 4.6 TEE", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 1.7, cache_read: 0.2 }, - limit: { context: 202752, output: 65536 }, - }, - "mistralai/Devstral-2-123B-Instruct-2512-TEE": { - id: "mistralai/Devstral-2-123B-Instruct-2512-TEE", - name: "Devstral 2 123B Instruct 2512 TEE", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01-10", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.22 }, - limit: { context: 262144, output: 65536 }, - }, - "XiaomiMiMo/MiMo-V2-Flash": { - id: "XiaomiMiMo/MiMo-V2-Flash", - name: "MiMo V2 Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.29 }, - limit: { context: 262144, output: 32000 }, - }, - "chutesai/Mistral-Small-3.2-24B-Instruct-2506": { - id: "chutesai/Mistral-Small-3.2-24B-Instruct-2506", - name: "Mistral Small 3.2 24B Instruct 2506", - family: "chutesai", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.18 }, - limit: { context: 131072, output: 131072 }, - }, - "chutesai/Mistral-Small-3.1-24B-Instruct-2503": { - id: "chutesai/Mistral-Small-3.1-24B-Instruct-2503", - name: "Mistral Small 3.1 24B Instruct 2503", - family: "chutesai", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.11, cache_read: 0.015 }, - limit: { context: 131072, output: 131072 }, - }, - "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16": { - id: "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16", - name: "NVIDIA Nemotron 3 Nano 30B A3B BF16", - family: "nemotron", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.24 }, - limit: { context: 262144, output: 262144 }, - }, - "deepseek-ai/DeepSeek-R1-TEE": { - id: "deepseek-ai/DeepSeek-R1-TEE", - name: "DeepSeek R1 TEE", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: false, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 163840, output: 163840 }, - }, - "deepseek-ai/DeepSeek-V3": { - id: "deepseek-ai/DeepSeek-V3", - name: "DeepSeek V3", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 163840, output: 163840 }, - }, - "deepseek-ai/DeepSeek-R1-Distill-Llama-70B": { - id: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B", - name: "DeepSeek R1 Distill Llama 70B", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.11 }, - limit: { context: 131072, output: 131072 }, - }, - "deepseek-ai/DeepSeek-V3.1-TEE": { - id: "deepseek-ai/DeepSeek-V3.1-TEE", - name: "DeepSeek V3.1 TEE", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 163840, output: 65536 }, - }, - "deepseek-ai/DeepSeek-V3-0324-TEE": { - id: "deepseek-ai/DeepSeek-V3-0324-TEE", - name: "DeepSeek V3 0324 TEE", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.19, output: 0.87, cache_read: 0.095 }, - limit: { context: 163840, output: 65536 }, - }, - "deepseek-ai/DeepSeek-V3.2-Speciale-TEE": { - id: "deepseek-ai/DeepSeek-V3.2-Speciale-TEE", - name: "DeepSeek V3.2 Speciale TEE", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: false, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 0.41 }, - limit: { context: 163840, output: 65536 }, - }, - "deepseek-ai/DeepSeek-V3.1-Terminus-TEE": { - id: "deepseek-ai/DeepSeek-V3.1-Terminus-TEE", - name: "DeepSeek V3.1 Terminus TEE", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.23, output: 0.9 }, - limit: { context: 163840, output: 65536 }, - }, - "deepseek-ai/DeepSeek-R1-0528-TEE": { - id: "deepseek-ai/DeepSeek-R1-0528-TEE", - name: "DeepSeek R1 0528 TEE", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 1.75 }, - limit: { context: 163840, output: 65536 }, - }, - "deepseek-ai/DeepSeek-V3.2-TEE": { - id: "deepseek-ai/DeepSeek-V3.2-TEE", - name: "DeepSeek V3.2 TEE", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.28, output: 0.42, cache_read: 0.14 }, - limit: { context: 131072, output: 65536 }, - }, - "openai/gpt-oss-20b": { - id: "openai/gpt-oss-20b", - name: "gpt oss 20b", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.1 }, - limit: { context: 131072, output: 131072 }, - }, - "openai/gpt-oss-120b-TEE": { - id: "openai/gpt-oss-120b-TEE", - name: "gpt oss 120b TEE", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.18 }, - limit: { context: 131072, output: 65536 }, - }, - "unsloth/gemma-3-12b-it": { - id: "unsloth/gemma-3-12b-it", - name: "gemma 3 12b it", - family: "unsloth", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.1 }, - limit: { context: 131072, output: 131072 }, - }, - "unsloth/Llama-3.2-3B-Instruct": { - id: "unsloth/Llama-3.2-3B-Instruct", - name: "Llama 3.2 3B Instruct", - family: "unsloth", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-02-12", - last_updated: "2025-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.01, output: 0.01, cache_read: 0.005 }, - limit: { context: 16384, output: 16384 }, - }, - "unsloth/gemma-3-4b-it": { - id: "unsloth/gemma-3-4b-it", - name: "gemma 3 4b it", - family: "unsloth", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.01, output: 0.03 }, - limit: { context: 96000, output: 96000 }, - }, - "unsloth/Llama-3.2-1B-Instruct": { - id: "unsloth/Llama-3.2-1B-Instruct", - name: "Llama 3.2 1B Instruct", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.01, output: 0.01, cache_read: 0.005 }, - limit: { context: 32768, output: 8192 }, - }, - "unsloth/Mistral-Nemo-Instruct-2407": { - id: "unsloth/Mistral-Nemo-Instruct-2407", - name: "Mistral Nemo Instruct 2407", - family: "unsloth", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.04, cache_read: 0.01 }, - limit: { context: 131072, output: 131072 }, - }, - "unsloth/Mistral-Small-24B-Instruct-2501": { - id: "unsloth/Mistral-Small-24B-Instruct-2501", - name: "Mistral Small 24B Instruct 2501", - family: "unsloth", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.11 }, - limit: { context: 32768, output: 32768 }, - }, - "unsloth/gemma-3-27b-it": { - id: "unsloth/gemma-3-27b-it", - name: "gemma 3 27b it", - family: "unsloth", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.15, cache_read: 0.02 }, - limit: { context: 128000, output: 65536 }, - }, - "moonshotai/Kimi-K2-Thinking-TEE": { - id: "moonshotai/Kimi-K2-Thinking-TEE", - name: "Kimi K2 Thinking TEE", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 1.75 }, - limit: { context: 262144, output: 65535 }, - }, - "moonshotai/Kimi-K2-Instruct-0905": { - id: "moonshotai/Kimi-K2-Instruct-0905", - name: "Kimi K2 Instruct 0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.39, output: 1.9, cache_read: 0.195 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/Kimi-K2.6-TEE": { - id: "moonshotai/Kimi-K2.6-TEE", - name: "Kimi K2.6 TEE", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-12", - release_date: "2026-04-20", - last_updated: "2026-04-23", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.44, output: 2 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/Kimi-K2.5-TEE": { - id: "moonshotai/Kimi-K2.5-TEE", - name: "Kimi K2.5 TEE", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3 }, - limit: { context: 262144, output: 65535 }, - }, - "MiniMaxAI/MiniMax-M2.1-TEE": { - id: "MiniMaxAI/MiniMax-M2.1-TEE", - name: "MiniMax M2.1 TEE", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 1.12 }, - limit: { context: 196608, output: 65536 }, - }, - "MiniMaxAI/MiniMax-M2.5-TEE": { - id: "MiniMaxAI/MiniMax-M2.5-TEE", - name: "MiniMax M2.5 TEE", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-15", - last_updated: "2026-02-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.1, cache_read: 0.15 }, - limit: { context: 196608, output: 65536 }, - }, - "rednote-hilab/dots.ocr": { - id: "rednote-hilab/dots.ocr", - name: "dots.ocr", - family: "rednote", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.01, output: 0.01, cache_read: 0.005 }, - limit: { context: 131072, output: 131072 }, - }, - "tngtech/TNG-R1T-Chimera-Turbo": { - id: "tngtech/TNG-R1T-Chimera-Turbo", - name: "TNG R1T Chimera Turbo", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 0.6 }, - limit: { context: 163840, output: 65536 }, - }, - "tngtech/DeepSeek-TNG-R1T2-Chimera": { - id: "tngtech/DeepSeek-TNG-R1T2-Chimera", - name: "DeepSeek TNG R1T2 Chimera", - family: "tngtech", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 0.85 }, - limit: { context: 163840, output: 163840 }, - }, - "tngtech/DeepSeek-R1T-Chimera": { - id: "tngtech/DeepSeek-R1T-Chimera", - name: "DeepSeek R1T Chimera", - family: "tngtech", - attachment: false, - reasoning: true, - tool_call: false, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 163840, output: 163840 }, - }, - "tngtech/TNG-R1T-Chimera-TEE": { - id: "tngtech/TNG-R1T-Chimera-TEE", - name: "TNG R1T Chimera TEE", - family: "tngtech", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 0.85 }, - limit: { context: 163840, output: 65536 }, - }, - }, - }, - dinference: { - id: "dinference", - env: ["DINFERENCE_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.dinference.com/v1", - name: "DInference", - doc: "https://dinference.com", - models: { - "gpt-oss-120b": { - id: "gpt-oss-120b", - name: "GPT OSS 120B", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-08", - last_updated: "2025-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.0675, output: 0.27 }, - limit: { context: 131072, output: 32768 }, - }, - "glm-4.7": { - id: "glm-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 1.65 }, - limit: { context: 200000, output: 128000 }, - }, - "glm-5": { - id: "glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.75, output: 2.4 }, - limit: { context: 200000, output: 128000 }, - }, - "glm-5.1": { - id: "glm-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-03-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 3.89 }, - limit: { context: 200000, output: 128000 }, - }, - "minimax-m2.5": { - id: "minimax-m2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 0.88 }, - limit: { context: 200000, output: 32000 }, - }, - }, - }, - vivgrid: { - id: "vivgrid", - env: ["VIVGRID_API_KEY"], - npm: "@ai-sdk/openai", - api: "https://api.vivgrid.com/v1", - name: "Vivgrid", - doc: "https://docs.vivgrid.com/models", - models: { - "gpt-5.1-codex-max": { - id: "gpt-5.1-codex-max", - name: "GPT-5.1 Codex Max", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "gemini-3.1-flash-lite-preview": { - id: "gemini-3.1-flash-lite-preview", - name: "Gemini 3.1 Flash Lite Preview", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-03-03", - last_updated: "2026-03-03", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5, cache_read: 0.025, cache_write: 1 }, - limit: { context: 1048576, output: 65536 }, - provider: { npm: "@ai-sdk/openai-compatible" }, - }, - "gemini-3.1-pro-preview": { - id: "gemini-3.1-pro-preview", - name: "Gemini 3.1 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1048576, output: 65536 }, - provider: { npm: "@ai-sdk/openai-compatible" }, - }, - "gpt-5-mini": { - id: "gpt-5-mini", - name: "GPT-5 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.03 }, - limit: { context: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai-compatible" }, - }, - "gpt-5.3-codex": { - id: "gpt-5.3-codex", - name: "GPT-5.3 Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-24", - last_updated: "2026-02-24", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "gpt-5.4-mini": { - id: "gpt-5.4-mini", - name: "GPT-5.4 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5, cache_read: 0.075 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai-compatible" }, - }, - "gpt-5.4-nano": { - id: "gpt-5.4-nano", - name: "GPT-5.4 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.25, cache_read: 0.02 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai-compatible" }, - }, - "gpt-5.2-codex": { - id: "gpt-5.2-codex", - name: "GPT-5.2 Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-01-14", - last_updated: "2026-01-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "gpt-5.4": { - id: "gpt-5.4", - name: "GPT-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 15, cache_read: 0.25 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai-compatible" }, - }, - "deepseek-v3.2": { - id: "deepseek-v3.2", - name: "DeepSeek-V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.28, output: 0.42 }, - limit: { context: 128000, output: 128000 }, - provider: { npm: "@ai-sdk/openai-compatible" }, - }, - "gpt-5.1-codex": { - id: "gpt-5.1-codex", - name: "GPT-5.1 Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "gpt-5.5": { - id: "gpt-5.5", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-23", - last_updated: "2026-04-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5, context_over_200k: { input: 10, output: 45, cache_read: 1 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - provider: { npm: "@ai-sdk/openai-compatible" }, - }, - "deepseek-v4-pro": { - id: "deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.74, output: 3.48, cache_read: 0.145 }, - limit: { context: 1000000, output: 384000 }, - provider: { npm: "@ai-sdk/openai-compatible" }, - }, - }, - }, - deepinfra: { - id: "deepinfra", - env: ["DEEPINFRA_API_KEY"], - npm: "@ai-sdk/deepinfra", - name: "Deep Infra", - doc: "https://deepinfra.com/models", - models: { - "Qwen/Qwen3.5-397B-A17B": { - id: "Qwen/Qwen3.5-397B-A17B", - name: "Qwen 3.5 397B A17B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-01", - last_updated: "2026-04-20", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.54, output: 3.4 }, - limit: { context: 262144, output: 81920 }, - }, - "Qwen/Qwen3.5-35B-A3B": { - id: "Qwen/Qwen3.5-35B-A3B", - name: "Qwen 3.5 35B A3B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-01", - last_updated: "2026-04-20", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.95 }, - limit: { context: 262144, output: 81920 }, - }, - "Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo": { - id: "Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo", - name: "Qwen3 Coder 480B A35B Instruct Turbo", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 262144, output: 66536 }, - }, - "Qwen/Qwen3-Coder-480B-A35B-Instruct": { - id: "Qwen/Qwen3-Coder-480B-A35B-Instruct", - name: "Qwen3 Coder 480B A35B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 1.6 }, - limit: { context: 262144, output: 66536 }, - }, - "Qwen/Qwen3.6-35B-A3B": { - id: "Qwen/Qwen3.6-35B-A3B", - name: "Qwen3.6 35B A3B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1 }, - limit: { context: 262144, output: 81920 }, - }, - "zai-org/GLM-4.7-Flash": { - id: "zai-org/GLM-4.7-Flash", - name: "GLM-4.7-Flash", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.4 }, - limit: { context: 202752, output: 16384 }, - }, - "zai-org/GLM-4.5": { - id: "zai-org/GLM-4.5", - name: "GLM-4.5", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 131072, output: 98304 }, - status: "deprecated", - }, - "zai-org/GLM-4.7": { - id: "zai-org/GLM-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.43, output: 1.75, cache_read: 0.08 }, - limit: { context: 202752, output: 16384 }, - }, - "zai-org/GLM-5.1": { - id: "zai-org/GLM-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-07", - last_updated: "2026-04-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.4, output: 4.4, cache_read: 0.26 }, - limit: { context: 202752, output: 16384 }, - }, - "zai-org/GLM-5": { - id: "zai-org/GLM-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-12", - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.8, output: 2.56, cache_read: 0.16 }, - limit: { context: 202752, output: 16384 }, - }, - "zai-org/GLM-4.6V": { - id: "zai-org/GLM-4.6V", - name: "GLM-4.6V", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 204800, output: 131072 }, - }, - "zai-org/GLM-4.6": { - id: "zai-org/GLM-4.6", - name: "GLM-4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.43, output: 1.74, cache_read: 0.08 }, - limit: { context: 204800, output: 131072 }, - }, - "meta-llama/Llama-4-Scout-17B-16E-Instruct": { - id: "meta-llama/Llama-4-Scout-17B-16E-Instruct", - name: "Llama 4 Scout 17B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.3 }, - limit: { context: 10000000, output: 16384 }, - }, - "meta-llama/Llama-3.1-8B-Instruct": { - id: "meta-llama/Llama-3.1-8B-Instruct", - name: "Llama 3.1 8B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.05 }, - limit: { context: 131072, output: 16384 }, - }, - "meta-llama/Llama-3.1-70B-Instruct": { - id: "meta-llama/Llama-3.1-70B-Instruct", - name: "Llama 3.1 70B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 0.4 }, - limit: { context: 131072, output: 16384 }, - }, - "meta-llama/Llama-3.1-8B-Instruct-Turbo": { - id: "meta-llama/Llama-3.1-8B-Instruct-Turbo", - name: "Llama 3.1 8B Turbo", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.03 }, - limit: { context: 131072, output: 16384 }, - }, - "meta-llama/Llama-3.3-70B-Instruct-Turbo": { - id: "meta-llama/Llama-3.3-70B-Instruct-Turbo", - name: "Llama 3.3 70B Turbo", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.32 }, - limit: { context: 131072, output: 16384 }, - }, - "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": { - id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8", - name: "Llama 4 Maverick 17B FP8", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 1000000, output: 16384 }, - }, - "meta-llama/Llama-3.1-70B-Instruct-Turbo": { - id: "meta-llama/Llama-3.1-70B-Instruct-Turbo", - name: "Llama 3.1 70B Turbo", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 0.4 }, - limit: { context: 131072, output: 16384 }, - }, - "deepseek-ai/DeepSeek-R1-0528": { - id: "deepseek-ai/DeepSeek-R1-0528", - name: "DeepSeek-R1-0528", - attachment: false, - reasoning: true, - tool_call: false, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-07", - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 2.15, cache_read: 0.35 }, - limit: { context: 163840, output: 64000 }, - }, - "deepseek-ai/DeepSeek-V3.2": { - id: "deepseek-ai/DeepSeek-V3.2", - name: "DeepSeek-V3.2", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2025-12-02", - last_updated: "2025-12-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.26, output: 0.38, cache_read: 0.13 }, - limit: { context: 163840, output: 64000 }, - }, - "openai/gpt-oss-20b": { - id: "openai/gpt-oss-20b", - name: "GPT OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.14 }, - limit: { context: 131072, output: 16384 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.24 }, - limit: { context: 131072, output: 16384 }, - }, - "moonshotai/Kimi-K2-Thinking": { - id: "moonshotai/Kimi-K2-Thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-10", - release_date: "2025-11-06", - last_updated: "2025-11-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.47, output: 2 }, - limit: { context: 131072, output: 32768 }, - }, - "moonshotai/Kimi-K2.6": { - id: "moonshotai/Kimi-K2.6", - name: "Kimi K2.6", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.75, output: 3.5, cache_read: 0.15 }, - limit: { context: 262144, output: 16384 }, - }, - "moonshotai/Kimi-K2-Instruct": { - id: "moonshotai/Kimi-K2-Instruct", - name: "Kimi K2", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-07-11", - last_updated: "2025-07-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 2 }, - limit: { context: 131072, output: 32768 }, - }, - "moonshotai/Kimi-K2-Instruct-0905": { - id: "moonshotai/Kimi-K2-Instruct-0905", - name: "Kimi K2 0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2, cache_read: 0.15 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/Kimi-K2.5": { - id: "moonshotai/Kimi-K2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 2.8 }, - limit: { context: 262144, output: 32768 }, - }, - "MiniMaxAI/MiniMax-M2": { - id: "MiniMaxAI/MiniMax-M2", - name: "MiniMax M2", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-10", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.254, output: 1.02 }, - limit: { context: 262144, output: 32768 }, - }, - "MiniMaxAI/MiniMax-M2.5": { - id: "MiniMaxAI/MiniMax-M2.5", - name: "MiniMax M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-06", - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 0.95, cache_read: 0.03, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMaxAI/MiniMax-M2.1": { - id: "MiniMaxAI/MiniMax-M2.1", - name: "MiniMax M2.1", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-06", - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.28, output: 1.2 }, - limit: { context: 196608, output: 196608 }, - }, - "anthropic/claude-3-7-sonnet-latest": { - id: "anthropic/claude-3-7-sonnet-latest", - name: "Claude Sonnet 3.7 (Latest)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10-31", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3.3, output: 16.5, cache_read: 0.33 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-4-opus": { - id: "anthropic/claude-4-opus", - name: "Claude Opus 4", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-06-12", - last_updated: "2025-06-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 16.5, output: 82.5 }, - limit: { context: 200000, output: 32000 }, - }, - "deepseek-ai/DeepSeek-V4-Flash": { - id: "deepseek-ai/DeepSeek-V4-Flash", - name: "DeepSeek V4 Flash", - family: "deepseek-flash", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.28, cache_read: 0.028 }, - limit: { context: 1000000, output: 384000 }, - }, - "deepseek-ai/DeepSeek-V4-Pro": { - id: "deepseek-ai/DeepSeek-V4-Pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.74, output: 3.48, cache_read: 0.145 }, - limit: { context: 65536, output: 65536 }, - }, - "google/gemma-4-26B-A4B-it": { - id: "google/gemma-4-26B-A4B-it", - name: "Gemma 4 26B", - family: "gemma", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.34 }, - limit: { context: 256000, output: 8192 }, - }, - "google/gemma-4-31B-it": { - id: "google/gemma-4-31B-it", - name: "Gemma 4 31B", - family: "gemma", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.38 }, - limit: { context: 256000, output: 8192 }, - }, - }, - }, - "qiniu-ai": { - id: "qiniu-ai", - env: ["QINIU_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.qnaigc.com/v1", - name: "Qiniu", - doc: "https://developer.qiniu.com/aitokenapi", - models: { - "qwen3-235b-a22b": { - id: "qwen3-235b-a22b", - name: "Qwen 3 235B A22B", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 32000 }, - }, - "doubao-seed-1.6-flash": { - id: "doubao-seed-1.6-flash", - name: "Doubao-Seed 1.6 Flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-15", - last_updated: "2025-08-15", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 32000 }, - }, - "qwen3-235b-a22b-instruct-2507": { - id: "qwen3-235b-a22b-instruct-2507", - name: "Qwen3 235b A22B Instruct 2507", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-12", - last_updated: "2025-08-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 262144, output: 64000 }, - }, - "doubao-seed-2.0-code": { - id: "doubao-seed-2.0-code", - name: "Doubao Seed 2.0 Code", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-02-14", - last_updated: "2026-02-14", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 128000 }, - }, - "deepseek-v3-0324": { - id: "deepseek-v3-0324", - name: "DeepSeek-V3-0324", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 16000 }, - }, - "doubao-1.5-thinking-pro": { - id: "doubao-1.5-thinking-pro", - name: "Doubao 1.5 Thinking Pro", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 16000 }, - }, - "claude-3.7-sonnet": { - id: "claude-3.7-sonnet", - name: "Claude 3.7 Sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 128000 }, - }, - "qwen3.5-397b-a17b": { - id: "qwen3.5-397b-a17b", - name: "Qwen3.5 397B A17B", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-02-22", - last_updated: "2026-02-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 64000 }, - }, - "qwen-vl-max-2025-01-25": { - id: "qwen-vl-max-2025-01-25", - name: "Qwen VL-MAX-2025-01-25", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 4096 }, - }, - "qwen3-32b": { - id: "qwen3-32b", - name: "Qwen3 32B", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 40000, output: 4096 }, - }, - "doubao-1.5-pro-32k": { - id: "doubao-1.5-pro-32k", - name: "Doubao 1.5 Pro 32k", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 12000 }, - }, - "qwen2.5-vl-72b-instruct": { - id: "qwen2.5-vl-72b-instruct", - name: "Qwen 2.5 VL 72B Instruct", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 8192 }, - }, - "gemini-2.0-flash": { - id: "gemini-2.0-flash", - name: "Gemini 2.0 Flash", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 1048576, output: 8192 }, - }, - "qwen3-vl-30b-a3b-thinking": { - id: "qwen3-vl-30b-a3b-thinking", - name: "Qwen3-Vl 30b A3b Thinking", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-02-09", - last_updated: "2026-02-09", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 32000 }, - }, - "gemini-3.0-pro-image-preview": { - id: "gemini-3.0-pro-image-preview", - name: "Gemini 3.0 Pro Image Preview", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-11-20", - last_updated: "2025-11-20", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - limit: { context: 32768, output: 8192 }, - }, - "gemini-2.5-pro": { - id: "gemini-2.5-pro", - name: "Gemini 2.5 Pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - limit: { context: 1048576, output: 65536 }, - }, - "claude-4.5-opus": { - id: "claude-4.5-opus", - name: "Claude 4.5 Opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-11-25", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 200000 }, - }, - "deepseek-r1": { - id: "deepseek-r1", - name: "DeepSeek-R1", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 32000 }, - }, - "claude-4.0-opus": { - id: "claude-4.0-opus", - name: "Claude 4.0 Opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 32000 }, - }, - "claude-4.5-haiku": { - id: "claude-4.5-haiku", - name: "Claude 4.5 Haiku", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-10-16", - last_updated: "2025-10-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 64000 }, - }, - "qwen3-max": { - id: "qwen3-max", - name: "Qwen3 Max", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-09-24", - last_updated: "2025-09-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 262144, output: 65536 }, - }, - "gemini-3.0-flash-preview": { - id: "gemini-3.0-flash-preview", - name: "Gemini 3.0 Flash Preview", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-18", - last_updated: "2025-12-18", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - limit: { context: 1000000, output: 64000 }, - }, - "gemini-2.5-flash-image": { - id: "gemini-2.5-flash-image", - name: "Gemini 2.5 Flash Image", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-10-22", - last_updated: "2025-10-22", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - limit: { context: 32768, output: 8192 }, - }, - "glm-4.5": { - id: "glm-4.5", - name: "GLM 4.5", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 131072, output: 98304 }, - }, - "claude-3.5-sonnet": { - id: "claude-3.5-sonnet", - name: "Claude 3.5 Sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-09-09", - last_updated: "2025-09-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 8200 }, - }, - "claude-4.0-sonnet": { - id: "claude-4.0-sonnet", - name: "Claude 4.0 Sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 64000 }, - }, - "qwen3-30b-a3b-instruct-2507": { - id: "qwen3-30b-a3b-instruct-2507", - name: "Qwen3 30b A3b Instruct 2507", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-02-04", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 32000 }, - }, - "doubao-seed-1.6-thinking": { - id: "doubao-seed-1.6-thinking", - name: "Doubao-Seed 1.6 Thinking", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-15", - last_updated: "2025-08-15", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 32000 }, - }, - "gemini-2.5-flash": { - id: "gemini-2.5-flash", - name: "Gemini 2.5 Flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 1048576, output: 64000 }, - }, - "qwen3-235b-a22b-thinking-2507": { - id: "qwen3-235b-a22b-thinking-2507", - name: "Qwen3 235B A22B Thinking 2507", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-12", - last_updated: "2025-08-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 262144, output: 4096 }, - }, - "qwen3-next-80b-a3b-thinking": { - id: "qwen3-next-80b-a3b-thinking", - name: "Qwen3 Next 80B A3B Thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-09-12", - last_updated: "2025-09-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 131072, output: 32768 }, - }, - "qwen3-30b-a3b-thinking-2507": { - id: "qwen3-30b-a3b-thinking-2507", - name: "Qwen3 30b A3b Thinking 2507", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-02-04", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 126000, output: 32000 }, - }, - "glm-4.5-air": { - id: "glm-4.5-air", - name: "GLM 4.5 Air", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 131000, output: 4096 }, - }, - "deepseek-v3.1": { - id: "deepseek-v3.1", - name: "DeepSeek-V3.1", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-19", - last_updated: "2025-08-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 32000 }, - }, - "qwen3-30b-a3b": { - id: "qwen3-30b-a3b", - name: "Qwen3 30B A3B", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 40000, output: 4096 }, - }, - "claude-4.1-opus": { - id: "claude-4.1-opus", - name: "Claude 4.1 Opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-06", - last_updated: "2025-08-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 32000 }, - }, - "doubao-seed-2.0-mini": { - id: "doubao-seed-2.0-mini", - name: "Doubao Seed 2.0 Mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-02-14", - last_updated: "2026-02-14", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 32000 }, - }, - "qwen3-next-80b-a3b-instruct": { - id: "qwen3-next-80b-a3b-instruct", - name: "Qwen3 Next 80B A3B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-09-12", - last_updated: "2025-09-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 131072, output: 32768 }, - }, - "doubao-seed-1.6": { - id: "doubao-seed-1.6", - name: "Doubao-Seed 1.6", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-15", - last_updated: "2025-08-15", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 32000 }, - }, - "qwen2.5-vl-7b-instruct": { - id: "qwen2.5-vl-7b-instruct", - name: "Qwen 2.5 VL 7B Instruct", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 8192 }, - }, - "kling-v2-6": { - id: "kling-v2-6", - name: "Kling-V2 6", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2026-01-13", - last_updated: "2026-01-13", - modalities: { input: ["text", "image", "video"], output: ["video"] }, - open_weights: false, - limit: { context: 99999999, output: 99999999 }, - }, - "MiniMax-M1": { - id: "MiniMax-M1", - name: "MiniMax M1", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 1000000, output: 80000 }, - }, - "gemini-3.0-pro-preview": { - id: "gemini-3.0-pro-preview", - name: "Gemini 3.0 Pro Preview", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text", "image", "video", "pdf", "audio"], output: ["text"] }, - open_weights: false, - limit: { context: 1000000, output: 64000 }, - }, - "doubao-seed-2.0-lite": { - id: "doubao-seed-2.0-lite", - name: "Doubao Seed 2.0 Lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-02-14", - last_updated: "2026-02-14", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 32000 }, - }, - "qwen3-coder-480b-a35b-instruct": { - id: "qwen3-coder-480b-a35b-instruct", - name: "Qwen3 Coder 480B A35B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-14", - last_updated: "2025-08-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 262000, output: 4096 }, - }, - "claude-3.5-haiku": { - id: "claude-3.5-haiku", - name: "Claude 3.5 Haiku", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-26", - last_updated: "2025-08-26", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 8192 }, - }, - "gpt-oss-20b": { - id: "gpt-oss-20b", - name: "gpt-oss-20b", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-06", - last_updated: "2025-08-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 4096 }, - }, - "qwen-turbo": { - id: "qwen-turbo", - name: "Qwen-Turbo", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 1000000, output: 4096 }, - }, - "kimi-k2": { - id: "kimi-k2", - name: "Kimi K2", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 128000 }, - }, - "gemini-2.5-flash-lite": { - id: "gemini-2.5-flash-lite", - name: "Gemini 2.5 Flash Lite", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 1048576, output: 64000 }, - }, - "qwen3-max-preview": { - id: "qwen3-max-preview", - name: "Qwen3 Max Preview", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-09-06", - last_updated: "2025-09-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 64000 }, - }, - "gpt-oss-120b": { - id: "gpt-oss-120b", - name: "gpt-oss-120b", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-06", - last_updated: "2025-08-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 4096 }, - }, - "doubao-1.5-vision-pro": { - id: "doubao-1.5-vision-pro", - name: "Doubao 1.5 Vision Pro", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 16000 }, - }, - "claude-4.5-sonnet": { - id: "claude-4.5-sonnet", - name: "Claude 4.5 Sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 64000 }, - }, - "deepseek-v3": { - id: "deepseek-v3", - name: "DeepSeek-V3", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-08-13", - last_updated: "2025-08-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 16000 }, - }, - "deepseek-r1-0528": { - id: "deepseek-r1-0528", - name: "DeepSeek-R1-0528", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 32000 }, - }, - "gemini-2.0-flash-lite": { - id: "gemini-2.0-flash-lite", - name: "Gemini 2.0 Flash Lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 1048576, output: 8192 }, - }, - "qwen-max-2025-01-25": { - id: "qwen-max-2025-01-25", - name: "Qwen2.5-Max-2025-01-25", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 4096 }, - }, - "doubao-seed-2.0-pro": { - id: "doubao-seed-2.0-pro", - name: "Doubao Seed 2.0 Pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-02-14", - last_updated: "2026-02-14", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 128000 }, - }, - "deepseek/deepseek-v3.2-exp-thinking": { - id: "deepseek/deepseek-v3.2-exp-thinking", - name: "DeepSeek/DeepSeek-V3.2-Exp-Thinking", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 32000 }, - }, - "deepseek/deepseek-v3.1-terminus-thinking": { - id: "deepseek/deepseek-v3.1-terminus-thinking", - name: "DeepSeek/DeepSeek-V3.1-Terminus-Thinking", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-09-22", - last_updated: "2025-09-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 32000 }, - }, - "deepseek/deepseek-v3.2-exp": { - id: "deepseek/deepseek-v3.2-exp", - name: "DeepSeek/DeepSeek-V3.2-Exp", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 32000 }, - }, - "deepseek/deepseek-v3.2-251201": { - id: "deepseek/deepseek-v3.2-251201", - name: "Deepseek/DeepSeek-V3.2", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 32000 }, - }, - "deepseek/deepseek-math-v2": { - id: "deepseek/deepseek-math-v2", - name: "Deepseek/Deepseek-Math-V2", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-12-04", - last_updated: "2025-12-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 160000, output: 160000 }, - }, - "deepseek/deepseek-v3.1-terminus": { - id: "deepseek/deepseek-v3.1-terminus", - name: "DeepSeek/DeepSeek-V3.1-Terminus", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-09-22", - last_updated: "2025-09-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 32000 }, - }, - "stepfun-ai/gelab-zero-4b-preview": { - id: "stepfun-ai/gelab-zero-4b-preview", - name: "Stepfun-Ai/Gelab Zero 4b Preview", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 8192, output: 4096 }, - }, - "stepfun/step-3.5-flash": { - id: "stepfun/step-3.5-flash", - name: "Stepfun/Step-3.5 Flash", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2026-02-02", - last_updated: "2026-02-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 64000, output: 4096 }, - }, - "x-ai/grok-4-fast": { - id: "x-ai/grok-4-fast", - name: "x-AI/Grok-4-Fast", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-09-20", - last_updated: "2025-09-20", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 2000000, output: 2000000 }, - }, - "x-ai/grok-code-fast-1": { - id: "x-ai/grok-code-fast-1", - name: "x-AI/Grok-Code-Fast 1", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-09-02", - last_updated: "2025-09-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 10000 }, - }, - "x-ai/grok-4-fast-reasoning": { - id: "x-ai/grok-4-fast-reasoning", - name: "X-Ai/Grok-4-Fast-Reasoning", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-18", - last_updated: "2025-12-18", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 2000000, output: 2000000 }, - }, - "x-ai/grok-4.1-fast-non-reasoning": { - id: "x-ai/grok-4.1-fast-non-reasoning", - name: "X-Ai/Grok 4.1 Fast Non Reasoning", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-19", - last_updated: "2025-12-19", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 2000000, output: 2000000 }, - }, - "x-ai/grok-4.1-fast": { - id: "x-ai/grok-4.1-fast", - name: "x-AI/Grok-4.1-Fast", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-11-20", - last_updated: "2025-11-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 2000000, output: 2000000 }, - }, - "x-ai/grok-4-fast-non-reasoning": { - id: "x-ai/grok-4-fast-non-reasoning", - name: "X-Ai/Grok-4-Fast-Non-Reasoning", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-18", - last_updated: "2025-12-18", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 2000000, output: 2000000 }, - }, - "x-ai/grok-4.1-fast-reasoning": { - id: "x-ai/grok-4.1-fast-reasoning", - name: "X-Ai/Grok 4.1 Fast Reasoning", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-19", - last_updated: "2025-12-19", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 20000000, output: 2000000 }, - }, - "openai/gpt-5.2": { - id: "openai/gpt-5.2", - name: "OpenAI/GPT-5.2", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5": { - id: "openai/gpt-5", - name: "OpenAI/GPT-5", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 400000, output: 128000 }, - }, - "z-ai/glm-4.7": { - id: "z-ai/glm-4.7", - name: "Z-Ai/GLM 4.7", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 200000 }, - }, - "z-ai/glm-5": { - id: "z-ai/glm-5", - name: "Z-Ai/GLM 5", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 128000 }, - }, - "z-ai/autoglm-phone-9b": { - id: "z-ai/autoglm-phone-9b", - name: "Z-Ai/Autoglm Phone 9b", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 12800, output: 4096 }, - }, - "z-ai/glm-4.6": { - id: "z-ai/glm-4.6", - name: "Z-AI/GLM 4.6", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-10-11", - last_updated: "2025-10-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 200000 }, - }, - "minimax/minimax-m2": { - id: "minimax/minimax-m2", - name: "Minimax/Minimax-M2", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-10-28", - last_updated: "2025-10-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 128000 }, - }, - "minimax/minimax-m2.1": { - id: "minimax/minimax-m2.1", - name: "Minimax/Minimax-M2.1", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 204800, output: 128000 }, - }, - "minimax/minimax-m2.5": { - id: "minimax/minimax-m2.5", - name: "Minimax/Minimax-M2.5", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 204800, output: 128000 }, - }, - "minimax/minimax-m2.5-highspeed": { - id: "minimax/minimax-m2.5-highspeed", - name: "Minimax/Minimax-M2.5 Highspeed", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-02-14", - last_updated: "2026-02-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 204800, output: 128000 }, - }, - "moonshotai/kimi-k2.5": { - id: "moonshotai/kimi-k2.5", - name: "Moonshotai/Kimi-K2.5", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-01-28", - last_updated: "2026-01-28", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 256000 }, - }, - "moonshotai/kimi-k2-0905": { - id: "moonshotai/kimi-k2-0905", - name: "Kimi K2 0905", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-09-08", - last_updated: "2025-09-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 100000 }, - }, - "moonshotai/kimi-k2-thinking": { - id: "moonshotai/kimi-k2-thinking", - name: "Kimi K2 Thinking", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-11-07", - last_updated: "2025-11-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 100000 }, - }, - "meituan/longcat-flash-chat": { - id: "meituan/longcat-flash-chat", - name: "Meituan/Longcat-Flash-Chat", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-11-05", - last_updated: "2025-11-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 131072, output: 131072 }, - }, - "meituan/longcat-flash-lite": { - id: "meituan/longcat-flash-lite", - name: "Meituan/Longcat-Flash-Lite", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-02-06", - last_updated: "2026-02-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 320000 }, - }, - "mimo-v2-flash": { - id: "mimo-v2-flash", - name: "Mimo-V2-Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12-01", - release_date: "2025-12-16", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3, cache_read: 0.01 }, - limit: { context: 256000, output: 256000 }, - }, - "xiaomi/mimo-v2-flash": { - id: "xiaomi/mimo-v2-flash", - name: "Xiaomi/Mimo-V2-Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12-01", - release_date: "2025-12-16", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3, cache_read: 0.01 }, - limit: { context: 256000, output: 256000 }, - }, - }, - }, - kilo: { - id: "kilo", - env: ["KILO_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.kilo.ai/api/gateway", - name: "Kilo Gateway", - doc: "https://kilo.ai", - models: { - "rekaai/reka-edge": { - id: "rekaai/reka-edge", - name: "Reka Edge", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-03-20", - last_updated: "2026-04-11", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 16384, output: 16384 }, - }, - "rekaai/reka-flash-3": { - id: "rekaai/reka-flash-3", - name: "Reka Flash 3", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-03-12", - last_updated: "2026-04-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.2 }, - limit: { context: 65536, output: 65536 }, - }, - "ai21/jamba-large-1.7": { - id: "ai21/jamba-large-1.7", - name: "AI21: Jamba Large 1.7", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-08-09", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8 }, - limit: { context: 256000, output: 4096 }, - }, - "alibaba/tongyi-deepresearch-30b-a3b": { - id: "alibaba/tongyi-deepresearch-30b-a3b", - name: "Tongyi DeepResearch 30B A3B", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-09-18", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09, output: 0.45 }, - limit: { context: 131072, output: 131072 }, - }, - "inflection/inflection-3-pi": { - id: "inflection/inflection-3-pi", - name: "Inflection: Inflection 3 Pi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-10-11", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 8000, output: 1024 }, - }, - "inflection/inflection-3-productivity": { - id: "inflection/inflection-3-productivity", - name: "Inflection: Inflection 3 Productivity", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-10-11", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 8000, output: 1024 }, - }, - "liquid/lfm-2-24b-a2b": { - id: "liquid/lfm-2-24b-a2b", - name: "LiquidAI: LFM2-24B-A2B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-02-26", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.12 }, - limit: { context: 32768, output: 32768 }, - }, - "writer/palmyra-x5": { - id: "writer/palmyra-x5", - name: "Writer: Palmyra X5", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-28", - last_updated: "2025-04-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 6 }, - limit: { context: 1040000, output: 8192 }, - }, - "ibm-granite/granite-4.1-8b": { - id: "ibm-granite/granite-4.1-8b", - name: "IBM: Granite 4.1 8B", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-04-30", - last_updated: "2026-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.1, cache_read: 0.05 }, - limit: { context: 131072, output: 131072 }, - }, - "ibm-granite/granite-4.0-h-micro": { - id: "ibm-granite/granite-4.0-h-micro", - name: "IBM: Granite 4.0 Micro", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-10-20", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.017, output: 0.11 }, - limit: { context: 131000, output: 32768 }, - }, - "essentialai/rnj-1-instruct": { - id: "essentialai/rnj-1-instruct", - name: "EssentialAI: Rnj 1 Instruct", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-12-05", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 32768, output: 6554 }, - }, - "perplexity/sonar-pro": { - id: "perplexity/sonar-pro", - name: "Perplexity: Sonar Pro", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-01-01", - last_updated: "2025-09-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 8000 }, - }, - "perplexity/sonar-deep-research": { - id: "perplexity/sonar-deep-research", - name: "Perplexity: Sonar Deep Research", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-01-27", - last_updated: "2025-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8 }, - limit: { context: 128000, output: 25600 }, - }, - "perplexity/sonar": { - id: "perplexity/sonar", - name: "Perplexity: Sonar", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-01-01", - last_updated: "2025-09-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 1 }, - limit: { context: 127072, output: 25415 }, - }, - "perplexity/sonar-pro-search": { - id: "perplexity/sonar-pro-search", - name: "Perplexity: Sonar Pro Search", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-10-31", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 8000 }, - }, - "perplexity/sonar-reasoning-pro": { - id: "perplexity/sonar-reasoning-pro", - name: "Perplexity: Sonar Reasoning Pro", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2024-01-01", - last_updated: "2025-09-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8 }, - limit: { context: 128000, output: 25600 }, - }, - "deepseek/deepseek-chat-v3.1": { - id: "deepseek/deepseek-chat-v3.1", - name: "DeepSeek: DeepSeek V3.1", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.75 }, - limit: { context: 32768, output: 7168 }, - }, - "deepseek/deepseek-chat": { - id: "deepseek/deepseek-chat", - name: "DeepSeek: DeepSeek V3", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.32, output: 0.89, cache_read: 0.15 }, - limit: { context: 163840, output: 163840 }, - }, - "deepseek/deepseek-r1-distill-llama-70b": { - id: "deepseek/deepseek-r1-distill-llama-70b", - name: "DeepSeek: R1 Distill Llama 70B", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-01-23", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 0.8, cache_read: 0.015 }, - limit: { context: 131072, output: 16384 }, - }, - "deepseek/deepseek-r1": { - id: "deepseek/deepseek-r1", - name: "DeepSeek: R1", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 2.5 }, - limit: { context: 64000, output: 16000 }, - }, - "deepseek/deepseek-v3.2-speciale": { - id: "deepseek/deepseek-v3.2-speciale", - name: "DeepSeek: DeepSeek V3.2 Speciale", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-12-01", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 1.2, cache_read: 0.135 }, - limit: { context: 163840, output: 163840 }, - }, - "deepseek/deepseek-r1-distill-qwen-32b": { - id: "deepseek/deepseek-r1-distill-qwen-32b", - name: "DeepSeek: R1 Distill Qwen 32B", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-01-01", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.29, output: 0.29 }, - limit: { context: 32768, output: 32768 }, - }, - "deepseek/deepseek-v3.2-exp": { - id: "deepseek/deepseek-v3.2-exp", - name: "DeepSeek: DeepSeek V3.2 Exp", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-01-01", - last_updated: "2025-09-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 0.41 }, - limit: { context: 163840, output: 65536 }, - }, - "deepseek/deepseek-v4-flash": { - id: "deepseek/deepseek-v4-flash", - name: "DeepSeek: DeepSeek V4 Flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-24", - last_updated: "2026-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.28, cache_read: 0.0028 }, - limit: { context: 1048576, output: 384000 }, - }, - "deepseek/deepseek-v4-pro": { - id: "deepseek/deepseek-v4-pro", - name: "DeepSeek: DeepSeek V4 Pro", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-24", - last_updated: "2026-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.435, output: 0.87, cache_read: 0.003625 }, - limit: { context: 1048576, output: 384000 }, - }, - "deepseek/deepseek-v3.2": { - id: "deepseek/deepseek-v3.2", - name: "DeepSeek: DeepSeek V3.2", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-01", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.26, output: 0.38, cache_read: 0.125 }, - limit: { context: 163840, output: 65536 }, - }, - "deepseek/deepseek-chat-v3-0324": { - id: "deepseek/deepseek-chat-v3-0324", - name: "DeepSeek: DeepSeek V3 0324", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-03-24", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.77, cache_read: 0.095 }, - limit: { context: 163840, output: 65536 }, - }, - "deepseek/deepseek-r1-0528": { - id: "deepseek/deepseek-r1-0528", - name: "DeepSeek: R1 0528", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-05-28", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 2.15, cache_read: 0.2 }, - limit: { context: 163840, output: 65536 }, - }, - "deepseek/deepseek-v3.1-terminus": { - id: "deepseek/deepseek-v3.1-terminus", - name: "DeepSeek: DeepSeek V3.1 Terminus", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-09-22", - last_updated: "2025-09-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.21, output: 0.79, cache_read: 0.13 }, - limit: { context: 163840, output: 32768 }, - }, - "openrouter/auto": { - id: "openrouter/auto", - name: "Auto Router", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-15", - last_updated: "2026-03-15", - modalities: { input: ["audio", "image", "pdf", "text", "video"], output: ["image", "text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 2000000, output: 32768 }, - }, - "openrouter/bodybuilder": { - id: "openrouter/bodybuilder", - name: "Body Builder (beta)", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2026-03-15", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 32768 }, - status: "beta", - }, - "openrouter/owl-alpha": { - id: "openrouter/owl-alpha", - name: "Owl Alpha", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-28", - last_updated: "2026-04-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 1048756, output: 262144 }, - status: "alpha", - }, - "openrouter/pareto-code": { - id: "openrouter/pareto-code", - name: "Pareto Code Router", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2026-04-21", - last_updated: "2026-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 200000, output: 65536 }, - }, - "openrouter/free": { - id: "openrouter/free", - name: "Free Models Router", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-01", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 200000, output: 32768 }, - }, - "inclusionai/ling-2.6-1t:free": { - id: "inclusionai/ling-2.6-1t:free", - name: "inclusionAI: Ling-2.6-1T (free)", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-04-23", - last_updated: "2026-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 32768 }, - }, - "inclusionai/ling-2.6-flash": { - id: "inclusionai/ling-2.6-flash", - name: "inclusionAI: Ling-2.6 Flash", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-04-21", - last_updated: "2026-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.08, output: 0.24, cache_read: 0.016 }, - limit: { context: 262144, output: 32768 }, - }, - "arcee-ai/trinity-mini": { - id: "arcee-ai/trinity-mini", - name: "Arcee AI: Trinity Mini", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12", - last_updated: "2026-01-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.045, output: 0.15 }, - limit: { context: 131072, output: 131072 }, - }, - "arcee-ai/virtuoso-large": { - id: "arcee-ai/virtuoso-large", - name: "Arcee AI: Virtuoso Large", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-05-06", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.75, output: 1.2 }, - limit: { context: 131072, output: 64000 }, - }, - "arcee-ai/trinity-large-thinking": { - id: "arcee-ai/trinity-large-thinking", - name: "Arcee AI: Trinity Large Thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 0.85 }, - limit: { context: 262144, output: 262144 }, - }, - "arcee-ai/spotlight": { - id: "arcee-ai/spotlight", - name: "Arcee AI: Spotlight", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-05-06", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.18, output: 0.18 }, - limit: { context: 131072, output: 65537 }, - }, - "arcee-ai/maestro-reasoning": { - id: "arcee-ai/maestro-reasoning", - name: "Arcee AI: Maestro Reasoning", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-05-06", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.9, output: 3.3 }, - limit: { context: 131072, output: 32000 }, - }, - "arcee-ai/coder-large": { - id: "arcee-ai/coder-large", - name: "Arcee AI: Coder Large", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-05-06", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 0.8 }, - limit: { context: 32768, output: 32768 }, - }, - "arcee-ai/trinity-large-preview": { - id: "arcee-ai/trinity-large-preview", - name: "Arcee AI: Trinity Large Preview", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-01-28", - last_updated: "2026-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.45 }, - limit: { context: 131000, output: 32768 }, - }, - "deepcogito/cogito-v2.1-671b": { - id: "deepcogito/cogito-v2.1-671b", - name: "Deep Cogito: Cogito v2.1 671B", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-11-14", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.25, output: 1.25 }, - limit: { context: 128000, output: 32768 }, - }, - "upstage/solar-pro-3": { - id: "upstage/solar-pro-3", - name: "Upstage: Solar Pro 3", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 32768 }, - }, - "nex-agi/deepseek-v3.1-nex-n1": { - id: "nex-agi/deepseek-v3.1-nex-n1", - name: "Nex AGI: DeepSeek V3.1 Nex N1", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-01-01", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 1 }, - limit: { context: 131072, output: 163840 }, - }, - "bytedance-seed/seed-1.6": { - id: "bytedance-seed/seed-1.6", - name: "ByteDance Seed: Seed 1.6", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-09", - last_updated: "2025-09", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2 }, - limit: { context: 262144, output: 32768 }, - }, - "bytedance-seed/seed-2.0-lite": { - id: "bytedance-seed/seed-2.0-lite", - name: "ByteDance Seed: Seed-2.0-Lite", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-10", - last_updated: "2026-03-15", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 2 }, - limit: { context: 262144, output: 131072 }, - }, - "bytedance-seed/seed-1.6-flash": { - id: "bytedance-seed/seed-1.6-flash", - name: "ByteDance Seed: Seed 1.6 Flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-23", - last_updated: "2026-03-15", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 262144, output: 32768 }, - }, - "bytedance-seed/seed-2.0-mini": { - id: "bytedance-seed/seed-2.0-mini", - name: "ByteDance Seed: Seed-2.0-Mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-27", - last_updated: "2026-03-15", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 262144, output: 131072 }, - }, - "mancer/weaver": { - id: "mancer/weaver", - name: "Mancer: Weaver (alpha)", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2023-08-02", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 1 }, - limit: { context: 8000, output: 2000 }, - }, - "anthracite-org/magnum-v4-72b": { - id: "anthracite-org/magnum-v4-72b", - name: "Magnum v4 72B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-10-22", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 3, output: 5 }, - limit: { context: 16384, output: 2048 }, - }, - "~google/gemini-pro-latest": { - id: "~google/gemini-pro-latest", - name: "Google: Gemini Pro Latest", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-27", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, cache_write: 0.375 }, - limit: { context: 1048576, output: 65536 }, - }, - "~google/gemini-flash-latest": { - id: "~google/gemini-flash-latest", - name: "Google: Gemini Flash Latest", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-27", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3, cache_read: 0.05, cache_write: 0.08333333333333334 }, - limit: { context: 1048576, output: 65536 }, - }, - "kilo-auto/balanced": { - id: "kilo-auto/balanced", - name: "Kilo Auto Balanced", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-15", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 3 }, - limit: { context: 204800, output: 131072 }, - }, - "kilo-auto/frontier": { - id: "kilo-auto/frontier", - name: "Kilo Auto Frontier", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-15", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25 }, - limit: { context: 1000000, output: 128000 }, - }, - "kilo-auto/small": { - id: "kilo-auto/small", - name: "Kilo Auto Small", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-15", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4 }, - limit: { context: 400000, output: 128000 }, - }, - "kilo-auto/free": { - id: "kilo-auto/free", - name: "Kilo Auto Free", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-15", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "undi95/remm-slerp-l2-13b": { - id: "undi95/remm-slerp-l2-13b", - name: "ReMM SLERP 13B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2023-07-22", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 0.65 }, - limit: { context: 6144, output: 4096 }, - }, - "allenai/olmo-3-32b-think": { - id: "allenai/olmo-3-32b-think", - name: "AllenAI: Olmo 3 32B Think", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-11-22", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.5 }, - limit: { context: 65536, output: 65536 }, - }, - "nousresearch/hermes-2-pro-llama-3-8b": { - id: "nousresearch/hermes-2-pro-llama-3-8b", - name: "NousResearch: Hermes 2 Pro - Llama-3 8B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-05-27", - last_updated: "2024-06-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.14 }, - limit: { context: 8192, output: 8192 }, - }, - "nousresearch/hermes-4-405b": { - id: "nousresearch/hermes-4-405b", - name: "Nous: Hermes 4 405B", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-08-25", - last_updated: "2025-08-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3 }, - limit: { context: 131072, output: 26215 }, - }, - "nousresearch/hermes-3-llama-3.1-70b": { - id: "nousresearch/hermes-3-llama-3.1-70b", - name: "Nous: Hermes 3 70B Instruct", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-08-18", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.3 }, - limit: { context: 131072, output: 32768 }, - }, - "nousresearch/hermes-4-70b": { - id: "nousresearch/hermes-4-70b", - name: "Nous: Hermes 4 70B", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-08-25", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.4, cache_read: 0.055 }, - limit: { context: 131072, output: 131072 }, - }, - "nousresearch/hermes-3-llama-3.1-405b": { - id: "nousresearch/hermes-3-llama-3.1-405b", - name: "Nous: Hermes 3 405B Instruct", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-08-16", - last_updated: "2024-08-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 1 }, - limit: { context: 131072, output: 16384 }, - }, - "morph/morph-v3-fast": { - id: "morph/morph-v3-fast", - name: "Morph: Morph V3 Fast", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-08-15", - last_updated: "2024-08-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 1.2 }, - limit: { context: 81920, output: 38000 }, - }, - "morph/morph-v3-large": { - id: "morph/morph-v3-large", - name: "Morph: Morph V3 Large", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-08-15", - last_updated: "2024-08-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.9, output: 1.9 }, - limit: { context: 262144, output: 131072 }, - }, - "stepfun/step-3.5-flash:free": { - id: "stepfun/step-3.5-flash:free", - name: "StepFun: Step 3.5 Flash (free)", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-26", - last_updated: "2026-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 262144 }, - }, - "stepfun/step-3.5-flash": { - id: "stepfun/step-3.5-flash", - name: "StepFun: Step 3.5 Flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-01-29", - last_updated: "2026-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3, cache_read: 0.02 }, - limit: { context: 256000, output: 256000 }, - }, - "alpindale/goliath-120b": { - id: "alpindale/goliath-120b", - name: "Goliath 120B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2023-11-10", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 3.75, output: 7.5 }, - limit: { context: 6144, output: 1024 }, - }, - "mistralai/mistral-nemo": { - id: "mistralai/mistral-nemo", - name: "Mistral: Mistral Nemo", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-07-01", - last_updated: "2024-07-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.04 }, - limit: { context: 131072, output: 16384 }, - }, - "mistralai/mistral-saba": { - id: "mistralai/mistral-saba", - name: "Mistral: Saba", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-02-17", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 32768, output: 32768 }, - }, - "mistralai/mistral-large-2512": { - id: "mistralai/mistral-large-2512", - name: "Mistral: Mistral Large 3 2512", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-11-01", - last_updated: "2025-12-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 262144, output: 52429 }, - }, - "mistralai/devstral-medium": { - id: "mistralai/devstral-medium", - name: "Mistral: Devstral Medium", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-10", - last_updated: "2025-07-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2 }, - limit: { context: 131072, output: 26215 }, - }, - "mistralai/mistral-small-3.1-24b-instruct": { - id: "mistralai/mistral-small-3.1-24b-instruct", - name: "Mistral: Mistral Small 3.1 24B", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-03-17", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.35, output: 0.56, cache_read: 0.015 }, - limit: { context: 128000, output: 131072 }, - }, - "mistralai/mistral-medium-3-5": { - id: "mistralai/mistral-medium-3-5", - name: "Mistral: Mistral Medium 3.5", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-30", - last_updated: "2026-05-07", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5, output: 7.5 }, - limit: { context: 262144, output: 262144 }, - }, - "mistralai/pixtral-large-2411": { - id: "mistralai/pixtral-large-2411", - name: "Mistral: Pixtral Large 2411", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-11-19", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 6 }, - limit: { context: 131072, output: 32768 }, - }, - "mistralai/devstral-2512": { - id: "mistralai/devstral-2512", - name: "Mistral: Devstral 2 2512", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-09-12", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2, cache_read: 0.025 }, - limit: { context: 262144, output: 65536 }, - }, - "mistralai/codestral-2508": { - id: "mistralai/codestral-2508", - name: "Mistral: Codestral 2508", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-08-01", - last_updated: "2025-08-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 256000, output: 51200 }, - }, - "mistralai/mistral-small-24b-instruct-2501": { - id: "mistralai/mistral-small-24b-instruct-2501", - name: "Mistral: Mistral Small 3", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-12-29", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.08 }, - limit: { context: 32768, output: 16384 }, - }, - "mistralai/mistral-large-2411": { - id: "mistralai/mistral-large-2411", - name: "Mistral Large 2411", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-07-24", - last_updated: "2024-11-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 6 }, - limit: { context: 131072, output: 26215 }, - }, - "mistralai/mixtral-8x22b-instruct": { - id: "mistralai/mixtral-8x22b-instruct", - name: "Mistral: Mixtral 8x22B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-04-17", - last_updated: "2024-04-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 6 }, - limit: { context: 65536, output: 13108 }, - }, - "mistralai/mistral-large-2407": { - id: "mistralai/mistral-large-2407", - name: "Mistral Large 2407", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-11-19", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 6 }, - limit: { context: 131072, output: 32768 }, - }, - "mistralai/ministral-8b-2512": { - id: "mistralai/ministral-8b-2512", - name: "Mistral: Ministral 3 8B 2512", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-12-02", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 262144, output: 32768 }, - }, - "mistralai/mistral-medium-3.1": { - id: "mistralai/mistral-medium-3.1", - name: "Mistral: Mistral Medium 3.1", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-08-12", - last_updated: "2025-08-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 131072, output: 26215 }, - }, - "mistralai/mistral-small-2603": { - id: "mistralai/mistral-small-2603", - name: "Mistral: Mistral Small 4", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-16", - last_updated: "2026-04-11", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6, cache_read: 0.015 }, - limit: { context: 262144, output: 262144 }, - }, - "mistralai/ministral-3b-2512": { - id: "mistralai/ministral-3b-2512", - name: "Mistral: Ministral 3 3B 2512", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-12-02", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 131072, output: 32768 }, - }, - "mistralai/voxtral-small-24b-2507": { - id: "mistralai/voxtral-small-24b-2507", - name: "Mistral: Voxtral Small 24B 2507", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-01", - last_updated: "2025-07-01", - modalities: { input: ["text", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 32000, output: 6400 }, - }, - "mistralai/mixtral-8x7b-instruct": { - id: "mistralai/mixtral-8x7b-instruct", - name: "Mistral: Mixtral 8x7B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2023-12-10", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.54, output: 0.54 }, - limit: { context: 32768, output: 16384 }, - }, - "mistralai/mistral-medium-3": { - id: "mistralai/mistral-medium-3", - name: "Mistral: Mistral Medium 3", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-05-07", - last_updated: "2025-05-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 131072, output: 26215 }, - }, - "mistralai/mistral-small-3.2-24b-instruct": { - id: "mistralai/mistral-small-3.2-24b-instruct", - name: "Mistral: Mistral Small 3.2 24B", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-06-20", - last_updated: "2025-06-20", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.18, cache_read: 0.03 }, - limit: { context: 131072, output: 131072 }, - }, - "mistralai/devstral-small": { - id: "mistralai/devstral-small", - name: "Mistral: Devstral Small 1.1", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-05-07", - last_updated: "2025-07-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 131072, output: 26215 }, - }, - "mistralai/mistral-large": { - id: "mistralai/mistral-large", - name: "Mistral Large", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-07-24", - last_updated: "2025-12-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 6 }, - limit: { context: 128000, output: 25600 }, - }, - "mistralai/mistral-7b-instruct-v0.1": { - id: "mistralai/mistral-7b-instruct-v0.1", - name: "Mistral: Mistral 7B Instruct v0.1", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.11, output: 0.19 }, - limit: { context: 2824, output: 565 }, - }, - "mistralai/ministral-14b-2512": { - id: "mistralai/ministral-14b-2512", - name: "Mistral: Ministral 3 14B 2512", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-12-16", - last_updated: "2025-12-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 262144, output: 52429 }, - }, - "~anthropic/claude-haiku-latest": { - id: "~anthropic/claude-haiku-latest", - name: "Anthropic: Claude Haiku Latest", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-27", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "~anthropic/claude-sonnet-latest": { - id: "~anthropic/claude-sonnet-latest", - name: "Anthropic: Claude Sonnet Latest", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-27", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 128000 }, - }, - "~anthropic/claude-opus-latest": { - id: "~anthropic/claude-opus-latest", - name: "Anthropic: Claude Opus Latest", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-04-16", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "meta-llama/llama-3.3-70b-instruct": { - id: "meta-llama/llama-3.3-70b-instruct", - name: "Meta: Llama 3.3 70B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-08-01", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.32 }, - limit: { context: 131072, output: 16384 }, - }, - "meta-llama/llama-4-scout": { - id: "meta-llama/llama-4-scout", - name: "Meta: Llama 4 Scout", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.3 }, - limit: { context: 327680, output: 16384 }, - }, - "meta-llama/llama-guard-3-8b": { - id: "meta-llama/llama-guard-3-8b", - name: "Llama Guard 3 8B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-04-18", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.06 }, - limit: { context: 131072, output: 26215 }, - }, - "meta-llama/llama-4-maverick": { - id: "meta-llama/llama-4-maverick", - name: "Meta: Llama 4 Maverick", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-04-05", - last_updated: "2025-12-24", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 1048576, output: 16384 }, - }, - "meta-llama/llama-3.2-11b-vision-instruct": { - id: "meta-llama/llama-3.2-11b-vision-instruct", - name: "Meta: Llama 3.2 11B Vision Instruct", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-09-25", - last_updated: "2024-09-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.049, output: 0.049 }, - limit: { context: 131072, output: 16384 }, - }, - "meta-llama/llama-guard-4-12b": { - id: "meta-llama/llama-guard-4-12b", - name: "Meta: Llama Guard 4 12B", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.18, output: 0.18 }, - limit: { context: 163840, output: 32768 }, - }, - "meta-llama/llama-3.1-70b-instruct": { - id: "meta-llama/llama-3.1-70b-instruct", - name: "Meta: Llama 3.1 70B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-07-16", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 0.4 }, - limit: { context: 131072, output: 26215 }, - }, - "meta-llama/llama-3.2-1b-instruct": { - id: "meta-llama/llama-3.2-1b-instruct", - name: "Meta: Llama 3.2 1B Instruct", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-09-18", - last_updated: "2026-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.027, output: 0.2 }, - limit: { context: 60000, output: 12000 }, - }, - "meta-llama/llama-3.2-3b-instruct": { - id: "meta-llama/llama-3.2-3b-instruct", - name: "Meta: Llama 3.2 3B Instruct", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-09-18", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.051, output: 0.34 }, - limit: { context: 80000, output: 16384 }, - }, - "meta-llama/llama-3-8b-instruct": { - id: "meta-llama/llama-3-8b-instruct", - name: "Meta: Llama 3 8B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-04-25", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.04 }, - limit: { context: 8192, output: 16384 }, - }, - "meta-llama/llama-3.1-8b-instruct": { - id: "meta-llama/llama-3.1-8b-instruct", - name: "Meta: Llama 3.1 8B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-07-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.05 }, - limit: { context: 16384, output: 16384 }, - }, - "meta-llama/llama-3-70b-instruct": { - id: "meta-llama/llama-3-70b-instruct", - name: "Meta: Llama 3 70B Instruct", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.51, output: 0.74 }, - limit: { context: 8192, output: 8000 }, - }, - "x-ai/grok-4.20": { - id: "x-ai/grok-4.20", - name: "xAI: Grok 4.20", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-31", - last_updated: "2026-04-11", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.2 }, - limit: { context: 2000000, output: 2000000 }, - }, - "x-ai/grok-code-fast-1:optimized:free": { - id: "x-ai/grok-code-fast-1:optimized:free", - name: "xAI: Grok Code Fast 1 Optimized (experimental, free)", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-27", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 10000 }, - }, - "x-ai/grok-4.3": { - id: "x-ai/grok-4.3", - name: "xAI: Grok 4.3", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-05-01", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 2.5, cache_read: 0.2 }, - limit: { context: 1000000, output: 4096 }, - }, - "x-ai/grok-4-fast": { - id: "x-ai/grok-4-fast", - name: "xAI: Grok 4 Fast", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-19", - last_updated: "2025-08-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "x-ai/grok-code-fast-1": { - id: "x-ai/grok-code-fast-1", - name: "xAI: Grok Code Fast 1", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-26", - last_updated: "2025-08-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.5, cache_read: 0.02 }, - limit: { context: 256000, output: 10000 }, - }, - "x-ai/grok-3-beta": { - id: "x-ai/grok-3-beta", - name: "xAI: Grok 3 Beta", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75 }, - limit: { context: 131072, output: 26215 }, - }, - "x-ai/grok-4": { - id: "x-ai/grok-4", - name: "xAI: Grok 4", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75 }, - limit: { context: 256000, output: 51200 }, - }, - "x-ai/grok-3-mini": { - id: "x-ai/grok-3-mini", - name: "xAI: Grok 3 Mini", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.5, cache_read: 0.075 }, - limit: { context: 131072, output: 26215 }, - }, - "x-ai/grok-4.1-fast": { - id: "x-ai/grok-4.1-fast", - name: "xAI: Grok 4.1 Fast", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "x-ai/grok-3-mini-beta": { - id: "x-ai/grok-3-mini-beta", - name: "xAI: Grok 3 Mini Beta", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.5, cache_read: 0.075 }, - limit: { context: 131072, output: 26215 }, - }, - "x-ai/grok-4.20-multi-agent": { - id: "x-ai/grok-4.20-multi-agent", - name: "xAI: Grok 4.20 Multi-Agent", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2026-03-31", - last_updated: "2026-04-11", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.2 }, - limit: { context: 2000000, output: 2000000 }, - }, - "x-ai/grok-3": { - id: "x-ai/grok-3", - name: "xAI: Grok 3", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75 }, - limit: { context: 131072, output: 26215 }, - }, - "tencent/hy3-preview:free": { - id: "tencent/hy3-preview:free", - name: "Tencent: Hy3 Preview (free)", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-22", - last_updated: "2026-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 262144 }, - }, - "tencent/hunyuan-a13b-instruct": { - id: "tencent/hunyuan-a13b-instruct", - name: "Tencent: Hunyuan A13B Instruct", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-06-30", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.57 }, - limit: { context: 131072, output: 131072 }, - }, - "gryphe/mythomax-l2-13b": { - id: "gryphe/mythomax-l2-13b", - name: "MythoMax 13B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-04-25", - last_updated: "2024-04-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.06 }, - limit: { context: 4096, output: 4096 }, - }, - "sao10k/l3-euryale-70b": { - id: "sao10k/l3-euryale-70b", - name: "Sao10k: Llama 3 Euryale 70B v2.1", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-06-18", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.48, output: 1.48 }, - limit: { context: 8192, output: 8192 }, - }, - "sao10k/l3-lunaris-8b": { - id: "sao10k/l3-lunaris-8b", - name: "Sao10K: Llama 3 8B Lunaris", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-08-13", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.05 }, - limit: { context: 8192, output: 8192 }, - }, - "sao10k/l3.3-euryale-70b": { - id: "sao10k/l3.3-euryale-70b", - name: "Sao10K: Llama 3.3 Euryale 70B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-12-18", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.65, output: 0.75 }, - limit: { context: 131072, output: 16384 }, - }, - "sao10k/l3.1-70b-hanami-x1": { - id: "sao10k/l3.1-70b-hanami-x1", - name: "Sao10K: Llama 3.1 70B Hanami x1", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-01-08", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 3, output: 3 }, - limit: { context: 16000, output: 16000 }, - }, - "sao10k/l3.1-euryale-70b": { - id: "sao10k/l3.1-euryale-70b", - name: "Sao10K: Llama 3.1 Euryale 70B v2.2", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-08-28", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.85, output: 0.85 }, - limit: { context: 131072, output: 16384 }, - }, - "microsoft/wizardlm-2-8x22b": { - id: "microsoft/wizardlm-2-8x22b", - name: "WizardLM-2 8x22B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-04-24", - last_updated: "2024-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.62, output: 0.62 }, - limit: { context: 65535, output: 8000 }, - }, - "microsoft/phi-4-mini-instruct": { - id: "microsoft/phi-4-mini-instruct", - name: "Microsoft: Phi 4 Mini Instruct", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-10-17", - last_updated: "2026-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.35, cache_read: 0.08 }, - limit: { context: 128000, output: 128000 }, - }, - "microsoft/phi-4": { - id: "microsoft/phi-4", - name: "Microsoft: Phi 4", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.14 }, - limit: { context: 16384, output: 16384 }, - }, - "poolside/laguna-m.1:free": { - id: "poolside/laguna-m.1:free", - name: "Poolside: Laguna M.1 (free)", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-28", - last_updated: "2026-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 8192 }, - }, - "poolside/laguna-xs.2:free": { - id: "poolside/laguna-xs.2:free", - name: "Poolside: Laguna XS.2 (free)", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-28", - last_updated: "2026-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 8192 }, - }, - "cohere/command-r7b-12-2024": { - id: "cohere/command-r7b-12-2024", - name: "Cohere: Command R7B (12-2024)", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-02-27", - last_updated: "2024-02-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.0375, output: 0.15 }, - limit: { context: 128000, output: 4000 }, - }, - "cohere/command-a": { - id: "cohere/command-a", - name: "Cohere: Command A", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.5, output: 10 }, - limit: { context: 256000, output: 8192 }, - }, - "cohere/command-r-plus-08-2024": { - id: "cohere/command-r-plus-08-2024", - name: "Cohere: Command R+ (08-2024)", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-08-30", - last_updated: "2024-08-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.5, output: 10 }, - limit: { context: 128000, output: 4000 }, - }, - "cohere/command-r-08-2024": { - id: "cohere/command-r-08-2024", - name: "Cohere: Command R (08-2024)", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-08-30", - last_updated: "2024-08-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 4000 }, - }, - "prime-intellect/intellect-3": { - id: "prime-intellect/intellect-3", - name: "Prime Intellect: INTELLECT-3", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-11-26", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1.1 }, - limit: { context: 131072, output: 131072 }, - }, - "nvidia/llama-3.3-nemotron-super-49b-v1.5": { - id: "nvidia/llama-3.3-nemotron-super-49b-v1.5", - name: "NVIDIA: Llama 3.3 Nemotron Super 49B V1.5", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-03-16", - last_updated: "2025-03-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 131072, output: 26215 }, - }, - "nvidia/nemotron-3-super-120b-a12b": { - id: "nvidia/nemotron-3-super-120b-a12b", - name: "NVIDIA: Nemotron 3 Super", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-11", - last_updated: "2026-04-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.5, cache_read: 0.1 }, - limit: { context: 262144, output: 262144 }, - }, - "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free": { - id: "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free", - name: "NVIDIA: Nemotron 3 Nano Omni (free)", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-28", - last_updated: "2026-05-01", - modalities: { input: ["text", "audio", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 65536 }, - }, - "nvidia/nemotron-3-nano-30b-a3b": { - id: "nvidia/nemotron-3-nano-30b-a3b", - name: "NVIDIA: Nemotron 3 Nano 30B A3B", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2024-12", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.2 }, - limit: { context: 262144, output: 52429 }, - }, - "nvidia/nemotron-3-super-120b-a12b:free": { - id: "nvidia/nemotron-3-super-120b-a12b:free", - name: "NVIDIA: Nemotron 3 Super (free)", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-12", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 262144 }, - }, - "nvidia/nemotron-nano-9b-v2": { - id: "nvidia/nemotron-nano-9b-v2", - name: "NVIDIA: Nemotron Nano 9B V2", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-18", - last_updated: "2025-08-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.16 }, - limit: { context: 131072, output: 26215 }, - }, - "nvidia/llama-3.1-nemotron-70b-instruct": { - id: "nvidia/llama-3.1-nemotron-70b-instruct", - name: "NVIDIA: Llama 3.1 Nemotron 70B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-10-12", - last_updated: "2024-10-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 1.2 }, - limit: { context: 131072, output: 16384 }, - }, - "inception/mercury-2": { - id: "inception/mercury-2", - name: "Inception: Mercury 2", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-24", - last_updated: "2026-02-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.75, cache_read: 0.025 }, - limit: { context: 128000, output: 50000 }, - }, - "openai/gpt-5.1-codex-max": { - id: "openai/gpt-5.1-codex-max", - name: "OpenAI: GPT-5.1-Codex-Max", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.2-chat": { - id: "openai/gpt-5.2-chat", - name: "OpenAI: GPT-5.2 Chat", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-12-11", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-4o-mini-search-preview": { - id: "openai/gpt-4o-mini-search-preview", - name: "OpenAI: GPT-4o-mini Search Preview", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-01", - last_updated: "2025-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-5-chat": { - id: "openai/gpt-5-chat", - name: "OpenAI: GPT-5 Chat", - attachment: true, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-08-07", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-4o-2024-05-13": { - id: "openai/gpt-4o-2024-05-13", - name: "OpenAI: GPT-4o (2024-05-13)", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-05-13", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 15 }, - limit: { context: 128000, output: 4096 }, - }, - "openai/gpt-5.3-chat": { - id: "openai/gpt-5.3-chat", - name: "OpenAI: GPT-5.3 Chat", - attachment: true, - reasoning: false, - tool_call: true, - release_date: "2026-03-04", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-5.2-pro": { - id: "openai/gpt-5.2-pro", - name: "OpenAI: GPT-5.2 Pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-12-11", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 21, output: 168 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-4-1106-preview": { - id: "openai/gpt-4-1106-preview", - name: "OpenAI: GPT-4 Turbo (older v1106)", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2023-11-06", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 30 }, - limit: { context: 128000, output: 4096 }, - }, - "openai/gpt-chat-latest": { - id: "openai/gpt-chat-latest", - name: "OpenAI: GPT Chat Latest", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - release_date: "2026-05-05", - last_updated: "2026-05-07", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-4o-audio-preview": { - id: "openai/gpt-4o-audio-preview", - name: "OpenAI: GPT-4o Audio", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-08-15", - last_updated: "2026-03-15", - modalities: { input: ["audio", "text"], output: ["audio", "text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-5.5": { - id: "openai/gpt-5.5", - name: "OpenAI: GPT-5.5", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-04-24", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5 }, - limit: { context: 1050000, output: 128000 }, - }, - "openai/gpt-5-mini": { - id: "openai/gpt-5-mini", - name: "OpenAI: GPT-5 Mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-08-07", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5-nano": { - id: "openai/gpt-5-nano", - name: "OpenAI: GPT-5 Nano", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-08-07", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4, cache_read: 0.005 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.3-codex": { - id: "openai/gpt-5.3-codex", - name: "OpenAI: GPT-5.3-Codex", - attachment: true, - reasoning: true, - tool_call: true, - release_date: "2026-02-25", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-3.5-turbo-16k": { - id: "openai/gpt-3.5-turbo-16k", - name: "OpenAI: GPT-3.5 Turbo 16k", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2023-08-28", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 4 }, - limit: { context: 16385, output: 4096 }, - }, - "openai/gpt-4-turbo": { - id: "openai/gpt-4-turbo", - name: "OpenAI: GPT-4 Turbo", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2023-09-13", - last_updated: "2024-04-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 30 }, - limit: { context: 128000, output: 4096 }, - }, - "openai/gpt-5.2": { - id: "openai/gpt-5.2", - name: "OpenAI: GPT-5.2", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-12-11", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/o3-pro": { - id: "openai/o3-pro", - name: "OpenAI: o3 Pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-04-16", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 20, output: 80 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/o3-mini-high": { - id: "openai/o3-mini-high", - name: "OpenAI: o3 Mini High", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-01-31", - last_updated: "2026-03-15", - modalities: { input: ["pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.55 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-4o-mini": { - id: "openai/gpt-4o-mini", - name: "OpenAI: GPT-4o-mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-07-18", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.075 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/o4-mini-deep-research": { - id: "openai/o4-mini-deep-research", - name: "OpenAI: o4 Mini Deep Research", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2024-06-26", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-5.4-mini": { - id: "openai/gpt-5.4-mini", - name: "OpenAI: GPT-5.4 Mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-03-17", - last_updated: "2026-04-11", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5, cache_read: 0.075 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.1-chat": { - id: "openai/gpt-5.1-chat", - name: "OpenAI: GPT-5.1 Chat", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-11-13", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/o4-mini": { - id: "openai/o4-mini", - name: "OpenAI: o4 Mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-04-16", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.275 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-5.4-nano": { - id: "openai/gpt-5.4-nano", - name: "OpenAI: GPT-5.4 Nano", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-03-17", - last_updated: "2026-04-11", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.25, cache_read: 0.02 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.2-codex": { - id: "openai/gpt-5.2-codex", - name: "OpenAI: GPT-5.2-Codex", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-01-14", - last_updated: "2026-01-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-4o-mini-2024-07-18": { - id: "openai/gpt-4o-mini-2024-07-18", - name: "OpenAI: GPT-4o-mini (2024-07-18)", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-07-18", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-5.1-codex-mini": { - id: "openai/gpt-5.1-codex-mini", - name: "OpenAI: GPT-5.1-Codex-Mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, output: 100000 }, - }, - "openai/gpt-4o-2024-08-06": { - id: "openai/gpt-4o-2024-08-06", - name: "OpenAI: GPT-4o (2024-08-06)", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-08-06", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10, cache_read: 1.25 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-5-image": { - id: "openai/gpt-5-image", - name: "OpenAI: GPT-5 Image", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-10-14", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["image", "text"] }, - open_weights: false, - cost: { input: 10, output: 10 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.1": { - id: "openai/gpt-5.1", - name: "OpenAI: GPT-5.1", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-11-13", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/o1": { - id: "openai/o1", - name: "OpenAI: o1", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-12-05", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 60, cache_read: 7.5 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-5.4-pro": { - id: "openai/gpt-5.4-pro", - name: "OpenAI: GPT-5.4 Pro", - attachment: true, - reasoning: true, - tool_call: true, - release_date: "2026-03-06", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180 }, - limit: { context: 1050000, output: 128000 }, - }, - "openai/gpt-3.5-turbo": { - id: "openai/gpt-3.5-turbo", - name: "OpenAI: GPT-3.5 Turbo", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2023-03-01", - last_updated: "2023-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 16385, output: 4096 }, - }, - "openai/o3-deep-research": { - id: "openai/o3-deep-research", - name: "OpenAI: o3 Deep Research", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2024-06-26", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 40, cache_read: 2.5 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/o3-mini": { - id: "openai/o3-mini", - name: "OpenAI: o3 Mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-12-20", - last_updated: "2026-03-15", - modalities: { input: ["pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.55 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-4-turbo-preview": { - id: "openai/gpt-4-turbo-preview", - name: "OpenAI: GPT-4 Turbo Preview", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-01-25", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 30 }, - limit: { context: 128000, output: 4096 }, - }, - "openai/o1-pro": { - id: "openai/o1-pro", - name: "OpenAI: o1-pro", - attachment: true, - reasoning: true, - tool_call: false, - temperature: false, - release_date: "2025-03-19", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 150, output: 600 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-5.4-image-2": { - id: "openai/gpt-5.4-image-2", - name: "OpenAI: GPT-5.4 Image 2", - attachment: true, - reasoning: true, - tool_call: false, - temperature: false, - release_date: "2026-04-21", - last_updated: "2026-05-01", - modalities: { input: ["image", "text", "pdf"], output: ["image", "text"] }, - open_weights: false, - cost: { input: 8, output: 15, cache_read: 2 }, - limit: { context: 272000, output: 128000 }, - }, - "openai/gpt-4": { - id: "openai/gpt-4", - name: "OpenAI: GPT-4", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2023-03-14", - last_updated: "2024-04-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 60 }, - limit: { context: 8191, output: 4096 }, - }, - "openai/gpt-4-0314": { - id: "openai/gpt-4-0314", - name: "OpenAI: GPT-4 (older v0314)", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2023-05-28", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 60 }, - limit: { context: 8191, output: 4096 }, - }, - "openai/gpt-5-codex": { - id: "openai/gpt-5-codex", - name: "OpenAI: GPT-5 Codex", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.4": { - id: "openai/gpt-5.4", - name: "OpenAI: GPT-5.4", - attachment: true, - reasoning: true, - tool_call: true, - release_date: "2026-03-06", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 15 }, - limit: { context: 1050000, output: 128000 }, - }, - "openai/gpt-audio": { - id: "openai/gpt-audio", - name: "OpenAI: GPT Audio", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-01-20", - last_updated: "2026-03-15", - modalities: { input: ["audio", "text"], output: ["audio", "text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-4o-search-preview": { - id: "openai/gpt-4o-search-preview", - name: "OpenAI: GPT-4o Search Preview", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2025-03-13", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-4.1-nano": { - id: "openai/gpt-4.1-nano", - name: "OpenAI: GPT-4.1 Nano", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-04-14", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1047576, output: 32768 }, - }, - "openai/o4-mini-high": { - id: "openai/o4-mini-high", - name: "OpenAI: o4 Mini High", - attachment: true, - reasoning: true, - tool_call: true, - release_date: "2025-04-17", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/o3": { - id: "openai/o3", - name: "OpenAI: o3", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-04-16", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-oss-20b": { - id: "openai/gpt-oss-20b", - name: "OpenAI: gpt-oss-20b", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.14 }, - limit: { context: 131072, output: 26215 }, - }, - "openai/gpt-5-pro": { - id: "openai/gpt-5-pro", - name: "OpenAI: GPT-5 Pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-10-06", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 120 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-audio-mini": { - id: "openai/gpt-audio-mini", - name: "OpenAI: GPT Audio Mini", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-01-20", - last_updated: "2026-03-15", - modalities: { input: ["audio", "text"], output: ["audio", "text"] }, - open_weights: false, - cost: { input: 0.6, output: 2.4 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-4o": { - id: "openai/gpt-4o", - name: "OpenAI: GPT-4o", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-05-13", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10, cache_read: 1.25 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-3.5-turbo-0613": { - id: "openai/gpt-3.5-turbo-0613", - name: "OpenAI: GPT-3.5 Turbo (older v0613)", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2023-06-13", - last_updated: "2023-06-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 2 }, - limit: { context: 4095, output: 4096 }, - }, - "openai/gpt-5-image-mini": { - id: "openai/gpt-5-image-mini", - name: "OpenAI: GPT-5 Image Mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-10-16", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["image", "text"] }, - open_weights: false, - cost: { input: 2.5, output: 2 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5": { - id: "openai/gpt-5", - name: "OpenAI: GPT-5", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-08-07", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-oss-safeguard-20b": { - id: "openai/gpt-oss-safeguard-20b", - name: "OpenAI: gpt-oss-safeguard-20b", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-10-29", - last_updated: "2025-10-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.075, output: 0.3, cache_read: 0.037 }, - limit: { context: 131072, output: 65536 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "OpenAI: gpt-oss-120b", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.039, output: 0.19 }, - limit: { context: 131072, output: 26215 }, - }, - "openai/gpt-5.5-pro": { - id: "openai/gpt-5.5-pro", - name: "OpenAI: GPT-5.5 Pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-04-24", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180 }, - limit: { context: 1050000, output: 128000 }, - }, - "openai/gpt-3.5-turbo-instruct": { - id: "openai/gpt-3.5-turbo-instruct", - name: "OpenAI: GPT-3.5 Turbo Instruct", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2023-03-01", - last_updated: "2023-09-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5, output: 2 }, - limit: { context: 4095, output: 4096 }, - }, - "openai/gpt-4.1": { - id: "openai/gpt-4.1", - name: "OpenAI: GPT-4.1", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-04-14", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 1047576, output: 32768 }, - }, - "openai/gpt-4.1-mini": { - id: "openai/gpt-4.1-mini", - name: "OpenAI: GPT-4.1 Mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-04-14", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.6, cache_read: 0.1 }, - limit: { context: 1047576, output: 32768 }, - }, - "openai/gpt-5.1-codex": { - id: "openai/gpt-5.1-codex", - name: "OpenAI: GPT-5.1-Codex", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-4o-2024-11-20": { - id: "openai/gpt-4o-2024-11-20", - name: "OpenAI: GPT-4o (2024-11-20)", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-11-20", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10, cache_read: 1.25 }, - limit: { context: 128000, output: 16384 }, - }, - "amazon/nova-lite-v1": { - id: "amazon/nova-lite-v1", - name: "Amazon: Nova Lite 1.0", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-12-06", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.06, output: 0.24 }, - limit: { context: 300000, output: 5120 }, - }, - "amazon/nova-pro-v1": { - id: "amazon/nova-pro-v1", - name: "Amazon: Nova Pro 1.0", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-12-03", - last_updated: "2024-12-03", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 3.2 }, - limit: { context: 300000, output: 5120 }, - }, - "amazon/nova-premier-v1": { - id: "amazon/nova-premier-v1", - name: "Amazon: Nova Premier 1.0", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-11-01", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 12.5 }, - limit: { context: 1000000, output: 32000 }, - }, - "amazon/nova-2-lite-v1": { - id: "amazon/nova-2-lite-v1", - name: "Amazon: Nova 2 Lite", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5 }, - limit: { context: 1000000, output: 65535 }, - }, - "amazon/nova-micro-v1": { - id: "amazon/nova-micro-v1", - name: "Amazon: Nova Micro 1.0", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-12-06", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.035, output: 0.14 }, - limit: { context: 128000, output: 5120 }, - }, - "z-ai/glm-5v-turbo": { - id: "z-ai/glm-5v-turbo", - name: "Z.ai: GLM 5V Turbo", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-11", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 1.2, output: 4, cache_read: 0.24 }, - limit: { context: 202752, output: 131072 }, - }, - "z-ai/glm-4.7": { - id: "z-ai/glm-4.7", - name: "Z.ai: GLM 4.7", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-22", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.38, output: 1.98, cache_read: 0.2 }, - limit: { context: 202752, output: 65535 }, - }, - "z-ai/glm-5": { - id: "z-ai/glm-5", - name: "Z.ai: GLM 5", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.72, output: 2.3 }, - limit: { context: 202752, output: 131072 }, - }, - "z-ai/glm-4-32b": { - id: "z-ai/glm-4-32b", - name: "Z.ai: GLM 4 32B ", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-25", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 128000, output: 32768 }, - }, - "z-ai/glm-5.1": { - id: "z-ai/glm-5.1", - name: "Z.ai: GLM 5.1", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-03-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.26, output: 3.96 }, - limit: { context: 202752, output: 131072 }, - }, - "z-ai/glm-4.5": { - id: "z-ai/glm-4.5", - name: "Z.ai: GLM 4.5", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-07-28", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.175 }, - limit: { context: 131072, output: 98304 }, - }, - "z-ai/glm-4.5-air": { - id: "z-ai/glm-4.5-air", - name: "Z.ai: GLM 4.5 Air", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.85, cache_read: 0.025 }, - limit: { context: 131072, output: 98304 }, - }, - "z-ai/glm-5-turbo": { - id: "z-ai/glm-5-turbo", - name: "Z.ai: GLM 5 Turbo", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-15", - last_updated: "2026-04-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.2, output: 4, cache_read: 0.24 }, - limit: { context: 202752, output: 131072 }, - }, - "z-ai/glm-4.5v": { - id: "z-ai/glm-4.5v", - name: "Z.ai: GLM 4.5V", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-11", - last_updated: "2025-08-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.8, cache_read: 0.11 }, - limit: { context: 65536, output: 16384 }, - }, - "z-ai/glm-4.6": { - id: "z-ai/glm-4.6", - name: "Z.ai: GLM 4.6", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-09-30", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.39, output: 1.9, cache_read: 0.175 }, - limit: { context: 204800, output: 204800 }, - }, - "z-ai/glm-4.6v": { - id: "z-ai/glm-4.6v", - name: "Z.ai: GLM 4.6V", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-09-30", - last_updated: "2026-01-10", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 131072, output: 131072 }, - }, - "z-ai/glm-4.7-flash": { - id: "z-ai/glm-4.7-flash", - name: "Z.ai: GLM 4.7 Flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.4, cache_read: 0.01 }, - limit: { context: 202752, output: 40551 }, - }, - "baidu/ernie-4.5-vl-424b-a47b": { - id: "baidu/ernie-4.5-vl-424b-a47b", - name: "Baidu: ERNIE 4.5 VL 424B A47B ", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-06-30", - last_updated: "2026-01", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.42, output: 1.25 }, - limit: { context: 123000, output: 16000 }, - }, - "baidu/qianfan-ocr-fast:free": { - id: "baidu/qianfan-ocr-fast:free", - name: "Baidu: Qianfan-OCR-Fast (free)", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2026-04-20", - last_updated: "2026-05-01", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 65536, output: 28672 }, - }, - "baidu/cobuddy:free": { - id: "baidu/cobuddy:free", - name: "Baidu: CoBuddy (free)", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-05-06", - last_updated: "2026-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 65536 }, - }, - "baidu/ernie-4.5-vl-28b-a3b": { - id: "baidu/ernie-4.5-vl-28b-a3b", - name: "Baidu: ERNIE 4.5 VL 28B A3B", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-06-30", - last_updated: "2025-06-30", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.56 }, - limit: { context: 30000, output: 8000 }, - }, - "baidu/ernie-4.5-21b-a3b": { - id: "baidu/ernie-4.5-21b-a3b", - name: "Baidu: ERNIE 4.5 21B A3B", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-06-30", - last_updated: "2025-06-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.28 }, - limit: { context: 120000, output: 8000 }, - }, - "baidu/ernie-4.5-300b-a47b": { - id: "baidu/ernie-4.5-300b-a47b", - name: "Baidu: ERNIE 4.5 300B A47B ", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-06-30", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.28, output: 1.1 }, - limit: { context: 123000, output: 12000 }, - }, - "baidu/ernie-4.5-21b-a3b-thinking": { - id: "baidu/ernie-4.5-21b-a3b-thinking", - name: "Baidu: ERNIE 4.5 21B A3B Thinking", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.28 }, - limit: { context: 131072, output: 65536 }, - }, - "relace/relace-apply-3": { - id: "relace/relace-apply-3", - name: "Relace: Relace Apply 3", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2025-09-26", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.85, output: 1.25 }, - limit: { context: 256000, output: 128000 }, - }, - "relace/relace-search": { - id: "relace/relace-search", - name: "Relace: Relace Search", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-12-09", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 3 }, - limit: { context: 256000, output: 128000 }, - }, - "minimax/minimax-m2.7": { - id: "minimax/minimax-m2.7", - name: "MiniMax: MiniMax M2.7", - family: "minimax-m2.7", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06 }, - limit: { context: 204800, output: 131072 }, - }, - "minimax/minimax-m2": { - id: "minimax/minimax-m2", - name: "MiniMax: MiniMax M2", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-10-23", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.255, output: 1, cache_read: 0.03 }, - limit: { context: 196608, output: 196608 }, - }, - "minimax/minimax-01": { - id: "minimax/minimax-01", - name: "MiniMax: MiniMax-01", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-01-15", - last_updated: "2025-01-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1.1 }, - limit: { context: 1000192, output: 1000192 }, - }, - "minimax/minimax-m2.1": { - id: "minimax/minimax-m2.1", - name: "MiniMax: MiniMax M2.1", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 0.95, cache_read: 0.03 }, - limit: { context: 196608, output: 39322 }, - }, - "minimax/minimax-m1": { - id: "minimax/minimax-m1", - name: "MiniMax: MiniMax M1", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2.2 }, - limit: { context: 1000000, output: 40000 }, - }, - "minimax/minimax-m2-her": { - id: "minimax/minimax-m2-her", - name: "MiniMax: MiniMax M2-her", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-01-23", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 65536, output: 2048 }, - }, - "minimax/minimax-m2.5": { - id: "minimax/minimax-m2.5", - name: "MiniMax: MiniMax M2.5", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 1.2, cache_read: 0.029 }, - limit: { context: 196608, output: 196608 }, - }, - "~openai/gpt-latest": { - id: "~openai/gpt-latest", - name: "OpenAI: GPT Latest", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-04-27", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5 }, - limit: { context: 1050000, output: 128000 }, - }, - "~openai/gpt-mini-latest": { - id: "~openai/gpt-mini-latest", - name: "OpenAI: GPT Mini Latest", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-04-27", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5, cache_read: 0.075 }, - limit: { context: 400000, output: 128000 }, - }, - "qwen/qwen3-235b-a22b": { - id: "qwen/qwen3-235b-a22b", - name: "Qwen: Qwen3 235B A22B", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.455, output: 1.82, cache_read: 0.15 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen/qwen3.5-122b-a10b": { - id: "qwen/qwen3.5-122b-a10b", - name: "Qwen: Qwen3.5-122B-A10B", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-26", - last_updated: "2026-03-15", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.26, output: 2.08 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen3-coder-plus": { - id: "qwen/qwen3-coder-plus", - name: "Qwen: Qwen3 Coder Plus", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-01", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.65, output: 3.25, cache_read: 0.2 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen/qwen3.6-27b": { - id: "qwen/qwen3.6-27b", - name: "Qwen: Qwen3.6 27B", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-27", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.325, output: 3.25 }, - limit: { context: 256000, output: 65536 }, - }, - "qwen/qwen3.5-27b": { - id: "qwen/qwen3.5-27b", - name: "Qwen: Qwen3.5-27B", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-26", - last_updated: "2026-03-15", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.195, output: 1.56 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen3-235b-a22b-2507": { - id: "qwen/qwen3-235b-a22b-2507", - name: "Qwen: Qwen3 235B A22B Instruct 2507", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-04", - last_updated: "2026-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.071, output: 0.1 }, - limit: { context: 262144, output: 52429 }, - }, - "qwen/qwen3-8b": { - id: "qwen/qwen3-8b", - name: "Qwen: Qwen3 8B", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-04", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.4, cache_read: 0.05 }, - limit: { context: 40960, output: 8192 }, - }, - "qwen/qwen3.5-397b-a17b": { - id: "qwen/qwen3.5-397b-a17b", - name: "Qwen: Qwen3.5 397B A17B", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-15", - last_updated: "2026-03-15", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.39, output: 2.34 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen-vl-plus": { - id: "qwen/qwen-vl-plus", - name: "Qwen: Qwen VL Plus", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-01-25", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1365, output: 0.4095, cache_read: 0.042 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen/qwen3-32b": { - id: "qwen/qwen3-32b", - name: "Qwen: Qwen3 32B", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.24, cache_read: 0.04 }, - limit: { context: 40960, output: 40960 }, - }, - "qwen/qwen2.5-vl-72b-instruct": { - id: "qwen/qwen2.5-vl-72b-instruct", - name: "Qwen: Qwen2.5 VL 72B Instruct", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-02-01", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.8, output: 0.8, cache_read: 0.075 }, - limit: { context: 32768, output: 32768 }, - }, - "qwen/qwen-max": { - id: "qwen/qwen-max", - name: "Qwen: Qwen-Max ", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-04-03", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.04, output: 4.16, cache_read: 0.32 }, - limit: { context: 32768, output: 8192 }, - }, - "qwen/qwen-plus": { - id: "qwen/qwen-plus", - name: "Qwen: Qwen-Plus", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-01-25", - last_updated: "2025-09-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.2, cache_read: 0.08 }, - limit: { context: 1000000, output: 32768 }, - }, - "qwen/qwen3.6-35b-a3b": { - id: "qwen/qwen3.6-35b-a3b", - name: "Qwen: Qwen3.6 35B A3B", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2026-04-27", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1612, output: 0.96525, cache_read: 0.1612 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen3-vl-235b-a22b-thinking": { - id: "qwen/qwen3-vl-235b-a22b-thinking", - name: "Qwen: Qwen3 VL 235B A22B Thinking", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-09-24", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.26, output: 2.6 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3-vl-30b-a3b-thinking": { - id: "qwen/qwen3-vl-30b-a3b-thinking", - name: "Qwen: Qwen3 VL 30B A3B Thinking", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-10-11", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 1.56 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3-vl-8b-instruct": { - id: "qwen/qwen3-vl-8b-instruct", - name: "Qwen: Qwen3 VL 8B Instruct", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-10-15", - last_updated: "2025-11-25", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.5 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3.5-flash-02-23": { - id: "qwen/qwen3.5-flash-02-23", - name: "Qwen: Qwen3.5-Flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-26", - last_updated: "2026-03-15", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen/qwen3.6-plus": { - id: "qwen/qwen3.6-plus", - name: "Qwen: Qwen3.6 Plus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-26", - last_updated: "2026-04-11", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.325, output: 1.95, cache_read: 0.0325, cache_write: 0.40625 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen/qwen3-max": { - id: "qwen/qwen3-max", - name: "Qwen: Qwen3 Max", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-09-05", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 6, cache_read: 0.24 }, - limit: { context: 262144, output: 32768 }, - }, - "qwen/qwen-plus-2025-07-28": { - id: "qwen/qwen-plus-2025-07-28", - name: "Qwen: Qwen Plus 0728", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-09-09", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.26, output: 0.78 }, - limit: { context: 1000000, output: 32768 }, - }, - "qwen/qwen3-30b-a3b-instruct-2507": { - id: "qwen/qwen3-30b-a3b-instruct-2507", - name: "Qwen: Qwen3 30B A3B Instruct 2507", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-29", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.3, cache_read: 0.04 }, - limit: { context: 262144, output: 262144 }, - }, - "qwen/qwen3-vl-32b-instruct": { - id: "qwen/qwen3-vl-32b-instruct", - name: "Qwen: Qwen3 VL 32B Instruct", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-10-21", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.104, output: 0.416 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3-235b-a22b-thinking-2507": { - id: "qwen/qwen3-235b-a22b-thinking-2507", - name: "Qwen: Qwen3 235B A22B Thinking 2507", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-07-25", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.11, output: 0.6 }, - limit: { context: 262144, output: 262144 }, - }, - "qwen/qwen3-next-80b-a3b-thinking": { - id: "qwen/qwen3-next-80b-a3b-thinking", - name: "Qwen: Qwen3 Next 80B A3B Thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-09-11", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.0975, output: 0.78 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3-30b-a3b-thinking-2507": { - id: "qwen/qwen3-30b-a3b-thinking-2507", - name: "Qwen: Qwen3 30B A3B Thinking 2507", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-07-29", - last_updated: "2025-07-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.051, output: 0.34 }, - limit: { context: 32768, output: 6554 }, - }, - "qwen/qwen-2.5-7b-instruct": { - id: "qwen/qwen-2.5-7b-instruct", - name: "Qwen: Qwen2.5 7B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-09", - last_updated: "2025-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.1 }, - limit: { context: 32768, output: 6554 }, - }, - "qwen/qwen-vl-max": { - id: "qwen/qwen-vl-max", - name: "Qwen: Qwen VL Max", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-04-08", - last_updated: "2025-08-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 3.2 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3-coder-flash": { - id: "qwen/qwen3-coder-flash", - name: "Qwen: Qwen3 Coder Flash", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-23", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.195, output: 0.975, cache_read: 0.06 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen/qwen3-30b-a3b": { - id: "qwen/qwen3-30b-a3b", - name: "Qwen: Qwen3 30B A3B", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-04", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.28, cache_read: 0.03 }, - limit: { context: 40960, output: 40960 }, - }, - "qwen/qwen3-next-80b-a3b-instruct": { - id: "qwen/qwen3-next-80b-a3b-instruct", - name: "Qwen: Qwen3 Next 80B A3B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-09-11", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 1.1 }, - limit: { context: 131072, output: 52429 }, - }, - "qwen/qwen3.5-plus-20260420": { - id: "qwen/qwen3.5-plus-20260420", - name: "Qwen: Qwen3.5 Plus 2026-04-20", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-27", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2.4 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen/qwen3-coder-next": { - id: "qwen/qwen3-coder-next", - name: "Qwen: Qwen3 Coder Next", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-02-02", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.12, output: 0.75, cache_read: 0.035 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen-2.5-coder-32b-instruct": { - id: "qwen/qwen-2.5-coder-32b-instruct", - name: "Qwen2.5 Coder 32B Instruct", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-11-11", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.2, cache_read: 0.015 }, - limit: { context: 32768, output: 8192 }, - }, - "qwen/qwen3-vl-30b-a3b-instruct": { - id: "qwen/qwen3-vl-30b-a3b-instruct", - name: "Qwen: Qwen3 VL 30B A3B Instruct", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-10-05", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.52 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3-coder-30b-a3b-instruct": { - id: "qwen/qwen3-coder-30b-a3b-instruct", - name: "Qwen: Qwen3 Coder 30B A3B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-31", - last_updated: "2025-07-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.27 }, - limit: { context: 160000, output: 32768 }, - }, - "qwen/qwen3-max-thinking": { - id: "qwen/qwen3-max-thinking", - name: "Qwen: Qwen3 Max Thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-01-23", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.78, output: 3.9 }, - limit: { context: 262144, output: 32768 }, - }, - "qwen/qwen-turbo": { - id: "qwen/qwen-turbo", - name: "Qwen: Qwen-Turbo", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-11-01", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.0325, output: 0.13, cache_read: 0.01 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen/qwen3-vl-235b-a22b-instruct": { - id: "qwen/qwen3-vl-235b-a22b-instruct", - name: "Qwen: Qwen3 VL 235B A22B Instruct", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-09-23", - last_updated: "2026-01-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.88, cache_read: 0.11 }, - limit: { context: 262144, output: 52429 }, - }, - "qwen/qwen3-coder": { - id: "qwen/qwen3-coder", - name: "Qwen: Qwen3 Coder 480B A35B", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 1, cache_read: 0.022 }, - limit: { context: 262144, output: 52429 }, - }, - "qwen/qwen3.5-9b": { - id: "qwen/qwen3.5-9b", - name: "Qwen: Qwen3.5-9B", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-10", - last_updated: "2026-03-15", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.15 }, - limit: { context: 256000, output: 32768 }, - }, - "qwen/qwen3-vl-8b-thinking": { - id: "qwen/qwen3-vl-8b-thinking", - name: "Qwen: Qwen3 VL 8B Thinking", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-10-15", - last_updated: "2025-11-25", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.117, output: 1.365 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3.6-max-preview": { - id: "qwen/qwen3.6-max-preview", - name: "Qwen: Qwen3.6 Max Preview", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-27", - last_updated: "2026-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.04, output: 6.24, cache_write: 1.3 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen-plus-2025-07-28:thinking": { - id: "qwen/qwen-plus-2025-07-28:thinking", - name: "Qwen: Qwen Plus 0728 (thinking)", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-09-09", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.26, output: 0.78 }, - limit: { context: 1000000, output: 32768 }, - }, - "qwen/qwen-2.5-72b-instruct": { - id: "qwen/qwen-2.5-72b-instruct", - name: "Qwen2.5 72B Instruct", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-09", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.12, output: 0.39 }, - limit: { context: 32768, output: 16384 }, - }, - "qwen/qwen3-14b": { - id: "qwen/qwen3-14b", - name: "Qwen: Qwen3 14B", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-04", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.24, cache_read: 0.025 }, - limit: { context: 40960, output: 40960 }, - }, - "qwen/qwen3.5-35b-a3b": { - id: "qwen/qwen3.5-35b-a3b", - name: "Qwen: Qwen3.5-35B-A3B", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-26", - last_updated: "2026-03-15", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1625, output: 1.3 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen3.5-plus-02-15": { - id: "qwen/qwen3.5-plus-02-15", - name: "Qwen: Qwen3.5 Plus 2026-02-15", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-15", - last_updated: "2026-03-15", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.26, output: 1.56 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen/qwen3.6-flash": { - id: "qwen/qwen3.6-flash", - name: "Qwen: Qwen3.6 Flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-27", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5, cache_write: 0.3125 }, - limit: { context: 1000000, output: 65536 }, - }, - "alfredpros/codellama-7b-instruct-solidity": { - id: "alfredpros/codellama-7b-instruct-solidity", - name: "AlfredPros: CodeLLaMa 7B Instruct Solidity", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-14", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.8, output: 1.2 }, - limit: { context: 4096, output: 4096 }, - }, - "kwaipilot/kat-coder-pro-v2": { - id: "kwaipilot/kat-coder-pro-v2", - name: "Kwaipilot: KAT-Coder-Pro V2", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-04-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06 }, - limit: { context: 256000, output: 80000 }, - }, - "google/gemini-2.5-pro-preview-05-06": { - id: "google/gemini-2.5-pro-preview-05-06", - name: "Google: Gemini 2.5 Pro Preview 05-06", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-05-06", - last_updated: "2026-03-15", - modalities: { input: ["audio", "image", "pdf", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, reasoning: 10, cache_read: 0.125, cache_write: 0.375 }, - limit: { context: 1048576, output: 65535 }, - }, - "google/lyria-3-clip-preview": { - id: "google/lyria-3-clip-preview", - name: "Google: Lyria 3 Clip Preview", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-03-30", - last_updated: "2026-04-11", - modalities: { input: ["image", "text"], output: ["audio", "text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-3.1-pro-preview-customtools": { - id: "google/gemini-3.1-pro-preview-customtools", - name: "Google: Gemini 3.1 Pro Preview Custom Tools", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-26", - last_updated: "2026-03-15", - modalities: { input: ["audio", "image", "pdf", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, reasoning: 12 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-2.5-flash-lite-preview-09-2025": { - id: "google/gemini-2.5-flash-lite-preview-09-2025", - name: "Google: Gemini 2.5 Flash Lite Preview 09-2025", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-09-25", - last_updated: "2026-03-15", - modalities: { input: ["audio", "image", "pdf", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, reasoning: 0.4, cache_read: 0.01, cache_write: 0.083333 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-2.0-flash-001": { - id: "google/gemini-2.0-flash-001", - name: "Google: Gemini 2.0 Flash", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-12-11", - last_updated: "2026-03-15", - modalities: { input: ["audio", "image", "pdf", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025, cache_write: 0.083333 }, - limit: { context: 1048576, output: 8192 }, - }, - "google/lyria-3-pro-preview": { - id: "google/lyria-3-pro-preview", - name: "Google: Lyria 3 Pro Preview", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-03-30", - last_updated: "2026-04-11", - modalities: { input: ["image", "text"], output: ["audio", "text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemma-3n-e4b-it": { - id: "google/gemma-3n-e4b-it", - name: "Google: Gemma 3n 4B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.04 }, - limit: { context: 32768, output: 6554 }, - }, - "google/gemini-3.1-flash-lite-preview": { - id: "google/gemini-3.1-flash-lite-preview", - name: "Google: Gemini 3.1 Flash Lite Preview", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-03", - last_updated: "2026-03-15", - modalities: { input: ["audio", "image", "pdf", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5, reasoning: 1.5 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-3.1-pro-preview": { - id: "google/gemini-3.1-pro-preview", - name: "Google: Gemini 3.1 Pro Preview", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-19", - last_updated: "2026-03-15", - modalities: { input: ["audio", "image", "pdf", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, reasoning: 12 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-3-flash-preview": { - id: "google/gemini-3-flash-preview", - name: "Google: Gemini 3 Flash Preview", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-17", - last_updated: "2026-03-15", - modalities: { input: ["audio", "image", "pdf", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3, reasoning: 3, cache_read: 0.05, cache_write: 0.083333 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-2.5-pro": { - id: "google/gemini-2.5-pro", - name: "Google: Gemini 2.5 Pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-03-20", - last_updated: "2026-03-15", - modalities: { input: ["audio", "image", "pdf", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, reasoning: 10, cache_read: 0.125, cache_write: 0.375 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-3-pro-image-preview": { - id: "google/gemini-3-pro-image-preview", - name: "Google: Nano Banana Pro (Gemini 3 Pro Image Preview)", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-11-20", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["image", "text"] }, - open_weights: false, - cost: { input: 2, output: 12, reasoning: 12 }, - limit: { context: 65536, output: 32768 }, - }, - "google/gemma-4-31b-it": { - id: "google/gemma-4-31b-it", - name: "Google: Gemma 4 31B", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-11", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.4 }, - limit: { context: 262144, output: 131072 }, - }, - "google/gemini-2.5-flash-image": { - id: "google/gemini-2.5-flash-image", - name: "Google: Nano Banana (Gemini 2.5 Flash Image)", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-10-08", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["image", "text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5 }, - limit: { context: 32768, output: 32768 }, - }, - "google/gemma-3-12b-it": { - id: "google/gemma-3-12b-it", - name: "Google: Gemma 3 12B", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-03-13", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.13, cache_read: 0.015 }, - limit: { context: 131072, output: 131072 }, - }, - "google/gemini-2.5-flash": { - id: "google/gemini-2.5-flash", - name: "Google: Gemini 2.5 Flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-07-17", - last_updated: "2026-03-15", - modalities: { input: ["audio", "image", "pdf", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, reasoning: 2.5, cache_read: 0.03, cache_write: 0.083333 }, - limit: { context: 1048576, output: 65535 }, - }, - "google/gemini-3.1-flash-image-preview": { - id: "google/gemini-3.1-flash-image-preview", - name: "Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview)", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2026-02-26", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["image", "text"] }, - open_weights: false, - cost: { input: 0.5, output: 3 }, - limit: { context: 65536, output: 65536 }, - }, - "google/gemma-3-4b-it": { - id: "google/gemma-3-4b-it", - name: "Google: Gemma 3 4B", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-03-13", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.08 }, - limit: { context: 131072, output: 19200 }, - }, - "google/gemini-2.5-pro-preview": { - id: "google/gemini-2.5-pro-preview", - name: "Google: Gemini 2.5 Pro Preview 06-05", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-06-05", - last_updated: "2026-03-15", - modalities: { input: ["audio", "image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, reasoning: 10, cache_read: 0.125, cache_write: 0.375 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemma-2-27b-it": { - id: "google/gemma-2-27b-it", - name: "Google: Gemma 2 27B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-06-24", - last_updated: "2024-06-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.65, output: 0.65 }, - limit: { context: 8192, output: 2048 }, - }, - "google/gemma-3-27b-it": { - id: "google/gemma-3-27b-it", - name: "Google: Gemma 3 27B", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-03-12", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.11, cache_read: 0.02 }, - limit: { context: 128000, output: 65536 }, - }, - "google/gemma-4-26b-a4b-it": { - id: "google/gemma-4-26b-a4b-it", - name: "Google: Gemma 4 26B A4B", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-03", - last_updated: "2026-04-11", - modalities: { input: ["image", "text", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.12, output: 0.4 }, - limit: { context: 262144, output: 262144 }, - }, - "google/gemini-2.5-flash-lite": { - id: "google/gemini-2.5-flash-lite", - name: "Google: Gemini 2.5 Flash Lite", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-06-17", - last_updated: "2026-03-15", - modalities: { input: ["audio", "image", "pdf", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, reasoning: 0.4, cache_read: 0.01, cache_write: 0.083333 }, - limit: { context: 1048576, output: 65535 }, - }, - "google/gemini-2.0-flash-lite-001": { - id: "google/gemini-2.0-flash-lite-001", - name: "Google: Gemini 2.0 Flash Lite", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-12-11", - last_updated: "2026-03-15", - modalities: { input: ["audio", "image", "pdf", "text", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 1048576, output: 8192 }, - }, - "moonshotai/kimi-k2.5": { - id: "moonshotai/kimi-k2.5", - name: "MoonshotAI: Kimi K2.5", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 2.2 }, - limit: { context: 262144, output: 65535 }, - }, - "moonshotai/kimi-k2-0905": { - id: "moonshotai/kimi-k2-0905", - name: "MoonshotAI: Kimi K2 0905", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2, cache_read: 0.15 }, - limit: { context: 131072, output: 26215 }, - }, - "moonshotai/kimi-k2.6": { - id: "moonshotai/kimi-k2.6", - name: "MoonshotAI: Kimi K2.6", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - structured_output: true, - temperature: true, - release_date: "2026-04-20", - last_updated: "2026-04-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/kimi-k2": { - id: "moonshotai/kimi-k2", - name: "MoonshotAI: Kimi K2 0711", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-07-11", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.2 }, - limit: { context: 131000, output: 26215 }, - }, - "moonshotai/kimi-k2-thinking": { - id: "moonshotai/kimi-k2-thinking", - name: "MoonshotAI: Kimi K2 Thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-11-06", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.47, output: 2, cache_read: 0.2 }, - limit: { context: 131072, output: 65535 }, - }, - "aion-labs/aion-1.0": { - id: "aion-labs/aion-1.0", - name: "AionLabs: Aion-1.0", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-02-05", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 4, output: 8 }, - limit: { context: 131072, output: 32768 }, - }, - "aion-labs/aion-rp-llama-3.1-8b": { - id: "aion-labs/aion-rp-llama-3.1-8b", - name: "AionLabs: Aion-RP 1.0 (8B)", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-02-05", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 1.6 }, - limit: { context: 32768, output: 32768 }, - }, - "aion-labs/aion-2.0": { - id: "aion-labs/aion-2.0", - name: "AionLabs: Aion-2.0", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2026-02-24", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 1.6 }, - limit: { context: 131072, output: 32768 }, - }, - "aion-labs/aion-1.0-mini": { - id: "aion-labs/aion-1.0-mini", - name: "AionLabs: Aion-1.0-Mini", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-02-05", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7, output: 1.4 }, - limit: { context: 131072, output: 32768 }, - }, - "~moonshotai/kimi-latest": { - id: "~moonshotai/kimi-latest", - name: "MoonshotAI: Kimi Latest", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-27", - last_updated: "2026-05-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.74, output: 3.49, cache_read: 0.14 }, - limit: { context: 262142, output: 262142 }, - }, - "thedrummer/unslopnemo-12b": { - id: "thedrummer/unslopnemo-12b", - name: "TheDrummer: UnslopNemo 12B", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-11-09", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 0.4 }, - limit: { context: 32768, output: 32768 }, - }, - "thedrummer/cydonia-24b-v4.1": { - id: "thedrummer/cydonia-24b-v4.1", - name: "TheDrummer: Cydonia 24B V4.1", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-09-27", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.5 }, - limit: { context: 131072, output: 131072 }, - }, - "thedrummer/skyfall-36b-v2": { - id: "thedrummer/skyfall-36b-v2", - name: "TheDrummer: Skyfall 36B V2", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-03-11", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 0.8 }, - limit: { context: 32768, output: 32768 }, - }, - "thedrummer/rocinante-12b": { - id: "thedrummer/rocinante-12b", - name: "TheDrummer: Rocinante 12B", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-09-30", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.17, output: 0.43 }, - limit: { context: 32768, output: 32768 }, - }, - "anthropic/claude-opus-4.1": { - id: "anthropic/claude-opus-4.1", - name: "Anthropic: Claude Opus 4.1", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "anthropic/claude-3.7-sonnet:thinking": { - id: "anthropic/claude-3.7-sonnet:thinking", - name: "Anthropic: Claude 3.7 Sonnet (thinking)", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-02-19", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-opus-4.6-fast": { - id: "anthropic/claude-opus-4.6-fast", - name: "Anthropic: Claude Opus 4.6 (Fast)", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-04-07", - last_updated: "2026-04-11", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 150, cache_read: 3, cache_write: 37.5 }, - limit: { context: 1000000, output: 128000 }, - }, - "anthropic/claude-3.7-sonnet": { - id: "anthropic/claude-3.7-sonnet", - name: "Anthropic: Claude 3.7 Sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-02-19", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-opus-4.6": { - id: "anthropic/claude-opus-4.6", - name: "Anthropic: Claude Opus 4.6", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "anthropic/claude-opus-4.7": { - id: "anthropic/claude-opus-4.7", - name: "Anthropic: Claude Opus 4.7", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-04-16", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "anthropic/claude-sonnet-4": { - id: "anthropic/claude-sonnet-4", - name: "Anthropic: Claude Sonnet 4", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-05-22", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-sonnet-4.5": { - id: "anthropic/claude-sonnet-4.5", - name: "Anthropic: Claude Sonnet 4.5", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-09-29", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - }, - "anthropic/claude-opus-4.5": { - id: "anthropic/claude-opus-4.5", - name: "Anthropic: Claude Opus 4.5", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-11-24", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-3-haiku": { - id: "anthropic/claude-3-haiku", - name: "Anthropic: Claude 3 Haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-03-07", - last_updated: "2024-03-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.25, cache_read: 0.03, cache_write: 0.3 }, - limit: { context: 200000, output: 4096 }, - }, - "anthropic/claude-opus-4": { - id: "anthropic/claude-opus-4", - name: "Anthropic: Claude Opus 4", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-05-22", - last_updated: "2026-03-15", - modalities: { input: ["image", "pdf", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "anthropic/claude-3.5-haiku": { - id: "anthropic/claude-3.5-haiku", - name: "Anthropic: Claude 3.5 Haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4, cache_read: 0.08, cache_write: 1 }, - limit: { context: 200000, output: 8192 }, - }, - "anthropic/claude-haiku-4.5": { - id: "anthropic/claude-haiku-4.5", - name: "Anthropic: Claude Haiku 4.5", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-sonnet-4.6": { - id: "anthropic/claude-sonnet-4.6", - name: "Anthropic: Claude Sonnet 4.6", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 1000000, output: 128000 }, - }, - "switchpoint/router": { - id: "switchpoint/router", - name: "Switchpoint Router", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-07-12", - last_updated: "2026-03-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.85, output: 3.4 }, - limit: { context: 131072, output: 32768 }, - }, - "bytedance/ui-tars-1.5-7b": { - id: "bytedance/ui-tars-1.5-7b", - name: "ByteDance: UI-TARS 7B ", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-07-23", - last_updated: "2026-03-15", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.2 }, - limit: { context: 128000, output: 2048 }, - }, - "tngtech/deepseek-r1t2-chimera": { - id: "tngtech/deepseek-r1t2-chimera", - name: "TNG: DeepSeek R1T2 Chimera", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-07-08", - last_updated: "2025-07-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 0.85, cache_read: 0.125 }, - limit: { context: 163840, output: 163840 }, - }, - "xiaomi/mimo-v2.5-pro": { - id: "xiaomi/mimo-v2.5-pro", - name: "Xiaomi: MiMo V2.5 Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3, cache_read: 0.2, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1048576, output: 131072 }, - }, - "xiaomi/mimo-v2-omni": { - id: "xiaomi/mimo-v2-omni", - name: "Xiaomi: MiMo-V2-Omni", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2, cache_read: 0.08 }, - limit: { context: 262144, output: 65536 }, - }, - "xiaomi/mimo-v2.5": { - id: "xiaomi/mimo-v2.5", - name: "Xiaomi: MiMo-V2.5", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: true, - cost: { - input: 0.4, - output: 2, - cache_read: 0.08, - context_over_200k: { input: 0.8, output: 4, cache_read: 0.16 }, - }, - limit: { context: 1048576, output: 131072 }, - }, - "xiaomi/mimo-v2-pro": { - id: "xiaomi/mimo-v2-pro", - name: "Xiaomi: MiMo-V2-Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 3, cache_read: 0.2, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1048576, output: 131072 }, - }, - "xiaomi/mimo-v2-flash": { - id: "xiaomi/mimo-v2-flash", - name: "Xiaomi: MiMo-V2-Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12-01", - release_date: "2025-12-16", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.29, cache_read: 0.045 }, - limit: { context: 262144, output: 65536 }, - }, - }, - }, - "sap-ai-core": { - id: "sap-ai-core", - env: ["AICORE_SERVICE_KEY"], - npm: "@jerome-benoit/sap-ai-provider-v2", - name: "SAP AI Core", - doc: "https://help.sap.com/docs/sap-ai-core", - models: { - "anthropic--claude-4.6-opus": { - id: "anthropic--claude-4.6-opus", - name: "anthropic--claude-4.6-opus", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-02-05", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "anthropic--claude-3-haiku": { - id: "anthropic--claude-3-haiku", - name: "anthropic--claude-3-haiku", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-08-31", - release_date: "2024-03-13", - last_updated: "2024-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.25, cache_read: 0.03, cache_write: 0.3 }, - limit: { context: 200000, output: 4096 }, - }, - "anthropic--claude-3-opus": { - id: "anthropic--claude-3-opus", - name: "anthropic--claude-3-opus", - family: "claude-opus", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-08-31", - release_date: "2024-02-29", - last_updated: "2024-02-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 4096 }, - }, - "gpt-5-mini": { - id: "gpt-5-mini", - name: "gpt-5-mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, output: 128000 }, - }, - "gpt-5-nano": { - id: "gpt-5-nano", - name: "gpt-5-nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4, cache_read: 0.005 }, - limit: { context: 400000, output: 128000 }, - }, - "gemini-2.5-pro": { - id: "gemini-2.5-pro", - name: "gemini-2.5-pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-25", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 1048576, output: 65536 }, - }, - "anthropic--claude-3.7-sonnet": { - id: "anthropic--claude-3.7-sonnet", - name: "anthropic--claude-3.7-sonnet", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10-31", - release_date: "2025-02-24", - last_updated: "2025-02-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "sonar-pro": { - id: "sonar-pro", - name: "sonar-pro", - family: "sonar-pro", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-09-01", - release_date: "2024-01-01", - last_updated: "2025-09-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 8192 }, - }, - "anthropic--claude-4.5-sonnet": { - id: "anthropic--claude-4.5-sonnet", - name: "anthropic--claude-4.5-sonnet", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic--claude-4.6-sonnet": { - id: "anthropic--claude-4.6-sonnet", - name: "anthropic--claude-4.6-sonnet", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08", - release_date: "2026-02-17", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - }, - "sonar-deep-research": { - id: "sonar-deep-research", - name: "sonar-deep-research", - family: "sonar-deep-research", - attachment: false, - reasoning: true, - tool_call: false, - temperature: false, - knowledge: "2025-01", - release_date: "2025-02-01", - last_updated: "2025-09-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, reasoning: 3 }, - limit: { context: 128000, output: 32768 }, - }, - "gemini-2.5-flash": { - id: "gemini-2.5-flash", - name: "gemini-2.5-flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-25", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.03, input_audio: 1 }, - limit: { context: 1048576, output: 65536 }, - }, - "anthropic--claude-4.5-opus": { - id: "anthropic--claude-4.5-opus", - name: "anthropic--claude-4.5-opus", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-11-24", - last_updated: "2025-11-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - }, - sonar: { - id: "sonar", - name: "sonar", - family: "sonar", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-09-01", - release_date: "2024-01-01", - last_updated: "2025-09-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 1 }, - limit: { context: 128000, output: 4096 }, - }, - "anthropic--claude-4-opus": { - id: "anthropic--claude-4-opus", - name: "anthropic--claude-4-opus", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "anthropic--claude-3-sonnet": { - id: "anthropic--claude-3-sonnet", - name: "anthropic--claude-3-sonnet", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-08-31", - release_date: "2024-03-04", - last_updated: "2024-03-04", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 4096 }, - }, - "anthropic--claude-4-sonnet": { - id: "anthropic--claude-4-sonnet", - name: "anthropic--claude-4-sonnet", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "gemini-2.5-flash-lite": { - id: "gemini-2.5-flash-lite", - name: "gemini-2.5-flash-lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 65536 }, - }, - "anthropic--claude-4.5-haiku": { - id: "anthropic--claude-4.5-haiku", - name: "anthropic--claude-4.5-haiku", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "gpt-5": { - id: "gpt-5", - name: "gpt-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "gpt-4.1": { - id: "gpt-4.1", - name: "gpt-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 1047576, output: 32768 }, - }, - "gpt-4.1-mini": { - id: "gpt-4.1-mini", - name: "gpt-4.1-mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.6, cache_read: 0.1 }, - limit: { context: 1047576, output: 32768 }, - }, - "anthropic--claude-3.5-sonnet": { - id: "anthropic--claude-3.5-sonnet", - name: "anthropic--claude-3.5-sonnet", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04-30", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 8192 }, - }, - }, - }, - morph: { - id: "morph", - env: ["MORPH_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.morphllm.com/v1", - name: "Morph", - doc: "https://docs.morphllm.com/api-reference/introduction", - models: { - auto: { - id: "auto", - name: "Auto", - family: "auto", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-06-01", - last_updated: "2024-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.85, output: 1.55 }, - limit: { context: 32000, output: 32000 }, - }, - "morph-v3-fast": { - id: "morph-v3-fast", - name: "Morph v3 Fast", - family: "morph", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-08-15", - last_updated: "2024-08-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 1.2 }, - limit: { context: 16000, output: 16000 }, - }, - "morph-v3-large": { - id: "morph-v3-large", - name: "Morph v3 Large", - family: "morph", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-08-15", - last_updated: "2024-08-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.9, output: 1.9 }, - limit: { context: 32000, output: 32000 }, - }, - }, - }, - "cloudflare-ai-gateway": { - id: "cloudflare-ai-gateway", - env: ["CLOUDFLARE_API_TOKEN", "CLOUDFLARE_ACCOUNT_ID", "CLOUDFLARE_GATEWAY_ID"], - npm: "ai-gateway-provider", - name: "Cloudflare AI Gateway", - doc: "https://developers.cloudflare.com/ai-gateway/", - models: { - "workers-ai/@cf/myshell-ai/melotts": { - id: "workers-ai/@cf/myshell-ai/melotts", - name: "MyShell MeloTTS", - family: "melotts", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/ibm-granite/granite-4.0-h-micro": { - id: "workers-ai/@cf/ibm-granite/granite-4.0-h-micro", - name: "IBM Granite 4.0 H Micro", - family: "granite", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.017, output: 0.11 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/huggingface/distilbert-sst-2-int8": { - id: "workers-ai/@cf/huggingface/distilbert-sst-2-int8", - name: "DistilBERT SST-2 INT8", - family: "distilbert", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.026, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/zai-org/glm-4.7-flash": { - id: "workers-ai/@cf/zai-org/glm-4.7-flash", - name: "GLM-4.7-Flash", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.4 }, - limit: { context: 131072, output: 131072 }, - }, - "workers-ai/@cf/pipecat-ai/smart-turn-v2": { - id: "workers-ai/@cf/pipecat-ai/smart-turn-v2", - name: "Pipecat Smart Turn v2", - family: "smart-turn", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/mistralai/mistral-small-3.1-24b-instruct": { - id: "workers-ai/@cf/mistralai/mistral-small-3.1-24b-instruct", - name: "Mistral Small 3.1 24B Instruct", - family: "mistral-small", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-11", - last_updated: "2025-04-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.35, output: 0.56 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/facebook/bart-large-cnn": { - id: "workers-ai/@cf/facebook/bart-large-cnn", - name: "BART Large CNN", - family: "bart", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-09", - last_updated: "2025-04-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/aisingapore/gemma-sea-lion-v4-27b-it": { - id: "workers-ai/@cf/aisingapore/gemma-sea-lion-v4-27b-it", - name: "Gemma SEA-LION v4 27B IT", - family: "gemma", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.35, output: 0.56 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/nvidia/nemotron-3-120b-a12b": { - id: "workers-ai/@cf/nvidia/nemotron-3-120b-a12b", - name: "Nemotron 3 Super 120B", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-03-11", - last_updated: "2026-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 256000, output: 256000 }, - }, - "workers-ai/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b": { - id: "workers-ai/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b", - name: "DeepSeek R1 Distill Qwen 32B", - family: "deepseek-thinking", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 4.88 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/openai/gpt-oss-20b": { - id: "workers-ai/@cf/openai/gpt-oss-20b", - name: "GPT OSS 20B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.3 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/openai/gpt-oss-120b": { - id: "workers-ai/@cf/openai/gpt-oss-120b", - name: "GPT OSS 120B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.35, output: 0.75 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/mistral/mistral-7b-instruct-v0.1": { - id: "workers-ai/@cf/mistral/mistral-7b-instruct-v0.1", - name: "Mistral 7B Instruct v0.1", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.11, output: 0.19 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/meta/llama-4-scout-17b-16e-instruct": { - id: "workers-ai/@cf/meta/llama-4-scout-17b-16e-instruct", - name: "Llama 4 Scout 17B 16E Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 0.85 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/meta/llama-3-8b-instruct-awq": { - id: "workers-ai/@cf/meta/llama-3-8b-instruct-awq", - name: "Llama 3 8B Instruct AWQ", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.12, output: 0.27 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/meta/llama-guard-3-8b": { - id: "workers-ai/@cf/meta/llama-guard-3-8b", - name: "Llama Guard 3 8B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.48, output: 0.03 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/meta/m2m100-1.2b": { - id: "workers-ai/@cf/meta/m2m100-1.2b", - name: "M2M100 1.2B", - family: "m2m", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.34, output: 0.34 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/meta/llama-2-7b-chat-fp16": { - id: "workers-ai/@cf/meta/llama-2-7b-chat-fp16", - name: "Llama 2 7B Chat FP16", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.56, output: 6.67 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/meta/llama-3.2-11b-vision-instruct": { - id: "workers-ai/@cf/meta/llama-3.2-11b-vision-instruct", - name: "Llama 3.2 11B Vision Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.049, output: 0.68 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast": { - id: "workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast", - name: "Llama 3.3 70B Instruct FP8 Fast", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.29, output: 2.25 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/meta/llama-3.2-1b-instruct": { - id: "workers-ai/@cf/meta/llama-3.2-1b-instruct", - name: "Llama 3.2 1B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.027, output: 0.2 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/meta/llama-3.1-8b-instruct-fp8": { - id: "workers-ai/@cf/meta/llama-3.1-8b-instruct-fp8", - name: "Llama 3.1 8B Instruct FP8", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.29 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/meta/llama-3.2-3b-instruct": { - id: "workers-ai/@cf/meta/llama-3.2-3b-instruct", - name: "Llama 3.2 3B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.051, output: 0.34 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/meta/llama-3.1-8b-instruct-awq": { - id: "workers-ai/@cf/meta/llama-3.1-8b-instruct-awq", - name: "Llama 3.1 8B Instruct AWQ", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.12, output: 0.27 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/meta/llama-3-8b-instruct": { - id: "workers-ai/@cf/meta/llama-3-8b-instruct", - name: "Llama 3 8B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.28, output: 0.83 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/meta/llama-3.1-8b-instruct": { - id: "workers-ai/@cf/meta/llama-3.1-8b-instruct", - name: "Llama 3.1 8B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.28, output: 0.8299999999999998 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/qwen/qwen2.5-coder-32b-instruct": { - id: "workers-ai/@cf/qwen/qwen2.5-coder-32b-instruct", - name: "Qwen 2.5 Coder 32B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-11", - last_updated: "2025-04-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.66, output: 1 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/qwen/qwen3-embedding-0.6b": { - id: "workers-ai/@cf/qwen/qwen3-embedding-0.6b", - name: "Qwen3 Embedding 0.6B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.012, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/qwen/qwq-32b": { - id: "workers-ai/@cf/qwen/qwq-32b", - name: "QwQ 32B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-11", - last_updated: "2025-04-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.66, output: 1 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/qwen/qwen3-30b-a3b-fp8": { - id: "workers-ai/@cf/qwen/qwen3-30b-a3b-fp8", - name: "Qwen3 30B A3B FP8", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.051, output: 0.34 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/google/gemma-3-12b-it": { - id: "workers-ai/@cf/google/gemma-3-12b-it", - name: "Gemma 3 12B IT", - family: "gemma", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-11", - last_updated: "2025-04-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.35, output: 0.56 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/moonshotai/kimi-k2.5": { - id: "workers-ai/@cf/moonshotai/kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.1 }, - limit: { context: 256000, output: 256000 }, - }, - "workers-ai/@cf/moonshotai/kimi-k2.6": { - id: "workers-ai/@cf/moonshotai/kimi-k2.6", - name: "Kimi K2.6", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-20", - last_updated: "2026-04-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 256000, output: 256000 }, - }, - "workers-ai/@cf/ai4bharat/indictrans2-en-indic-1B": { - id: "workers-ai/@cf/ai4bharat/indictrans2-en-indic-1B", - name: "IndicTrans2 EN-Indic 1B", - family: "indictrans", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.34, output: 0.34 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/pfnet/plamo-embedding-1b": { - id: "workers-ai/@cf/pfnet/plamo-embedding-1b", - name: "PLaMo Embedding 1B", - family: "plamo", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.019, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/baai/bge-small-en-v1.5": { - id: "workers-ai/@cf/baai/bge-small-en-v1.5", - name: "BGE Small EN v1.5", - family: "bge", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.02, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/baai/bge-large-en-v1.5": { - id: "workers-ai/@cf/baai/bge-large-en-v1.5", - name: "BGE Large EN v1.5", - family: "bge", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/baai/bge-reranker-base": { - id: "workers-ai/@cf/baai/bge-reranker-base", - name: "BGE Reranker Base", - family: "bge", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-09", - last_updated: "2025-04-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.0031, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/baai/bge-base-en-v1.5": { - id: "workers-ai/@cf/baai/bge-base-en-v1.5", - name: "BGE Base EN v1.5", - family: "bge", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.067, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/baai/bge-m3": { - id: "workers-ai/@cf/baai/bge-m3", - name: "BGE M3", - family: "bge", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.012, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/deepgram/aura-2-en": { - id: "workers-ai/@cf/deepgram/aura-2-en", - name: "Deepgram Aura 2 (EN)", - family: "aura", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/deepgram/aura-2-es": { - id: "workers-ai/@cf/deepgram/aura-2-es", - name: "Deepgram Aura 2 (ES)", - family: "aura", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "workers-ai/@cf/deepgram/nova-3": { - id: "workers-ai/@cf/deepgram/nova-3", - name: "Deepgram Nova 3", - family: "nova", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-5.3-codex": { - id: "openai/gpt-5.3-codex", - name: "GPT-5.3 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "ai-gateway-provider" }, - }, - "openai/gpt-4-turbo": { - id: "openai/gpt-4-turbo", - name: "GPT-4 Turbo", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - knowledge: "2023-12", - release_date: "2023-11-06", - last_updated: "2024-04-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 30 }, - limit: { context: 128000, output: 4096 }, - }, - "openai/gpt-5.2": { - id: "openai/gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/o3-pro": { - id: "openai/o3-pro", - name: "o3-pro", - family: "o-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-06-10", - last_updated: "2025-06-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 20, output: 80 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-4o-mini": { - id: "openai/gpt-4o-mini", - name: "GPT-4o mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.08 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/o4-mini": { - id: "openai/o4-mini", - name: "o4-mini", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.28 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-5.2-codex": { - id: "openai/gpt-5.2-codex", - name: "GPT-5.2 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "ai-gateway-provider" }, - }, - "openai/gpt-5.1": { - id: "openai/gpt-5.1", - name: "GPT-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/o1": { - id: "openai/o1", - name: "o1", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2023-09", - release_date: "2024-12-05", - last_updated: "2024-12-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 60, cache_read: 7.5 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-3.5-turbo": { - id: "openai/gpt-3.5-turbo", - name: "GPT-3.5-turbo", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - knowledge: "2021-09-01", - release_date: "2023-03-01", - last_updated: "2023-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.5, cache_read: 1.25 }, - limit: { context: 16385, output: 4096 }, - }, - "openai/o3-mini": { - id: "openai/o3-mini", - name: "o3-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2024-12-20", - last_updated: "2025-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.55 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-4": { - id: "openai/gpt-4", - name: "GPT-4", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - knowledge: "2023-11", - release_date: "2023-11-06", - last_updated: "2024-04-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 60 }, - limit: { context: 8192, output: 8192 }, - }, - "openai/gpt-5.4": { - id: "openai/gpt-5.4", - name: "GPT-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 15, cache_read: 0.25 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - provider: { npm: "ai-gateway-provider" }, - }, - "openai/o3": { - id: "openai/o3", - name: "o3", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-4o": { - id: "openai/gpt-4o", - name: "GPT-4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-05-13", - last_updated: "2024-08-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10, cache_read: 1.25 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-5.1-codex": { - id: "openai/gpt-5.1-codex", - name: "GPT-5.1 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "anthropic/claude-haiku-4-5": { - id: "anthropic/claude-haiku-4-5", - name: "Claude Haiku 4.5 (latest)", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-sonnet-4-6": { - id: "anthropic/claude-sonnet-4-6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.6, cache_write: 7.5 }, - }, - limit: { context: 1000000, output: 64000 }, - provider: { npm: "ai-gateway-provider" }, - }, - "anthropic/claude-opus-4-7": { - id: "anthropic/claude-opus-4-7", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - "anthropic/claude-opus-4-1": { - id: "anthropic/claude-opus-4-1", - name: "Claude Opus 4.1 (latest)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "anthropic/claude-3-5-haiku": { - id: "anthropic/claude-3-5-haiku", - name: "Claude Haiku 3.5 (latest)", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07-31", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4, cache_read: 0.08, cache_write: 1 }, - limit: { context: 200000, output: 8192 }, - }, - "anthropic/claude-3.5-sonnet": { - id: "anthropic/claude-3.5-sonnet", - name: "Claude Sonnet 3.5 v2", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04-30", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 8192 }, - }, - "anthropic/claude-sonnet-4": { - id: "anthropic/claude-sonnet-4", - name: "Claude Sonnet 4 (latest)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-opus-4-5": { - id: "anthropic/claude-opus-4-5", - name: "Claude Opus 4.5 (latest)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-11-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-3-haiku": { - id: "anthropic/claude-3-haiku", - name: "Claude Haiku 3", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-08-31", - release_date: "2024-03-13", - last_updated: "2024-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.25, cache_read: 0.03, cache_write: 0.3 }, - limit: { context: 200000, output: 4096 }, - }, - "anthropic/claude-opus-4": { - id: "anthropic/claude-opus-4", - name: "Claude Opus 4 (latest)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "anthropic/claude-opus-4-6": { - id: "anthropic/claude-opus-4-6", - name: "Claude Opus 4.6 (latest)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 5, - output: 25, - cache_read: 0.5, - cache_write: 6.25, - context_over_200k: { input: 10, output: 37.5, cache_read: 1, cache_write: 12.5 }, - }, - limit: { context: 1000000, output: 128000 }, - }, - "anthropic/claude-3.5-haiku": { - id: "anthropic/claude-3.5-haiku", - name: "Claude Haiku 3.5 (latest)", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07-31", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4, cache_read: 0.08, cache_write: 1 }, - limit: { context: 200000, output: 8192 }, - }, - "anthropic/claude-sonnet-4-5": { - id: "anthropic/claude-sonnet-4-5", - name: "Claude Sonnet 4.5 (latest)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-3-sonnet": { - id: "anthropic/claude-3-sonnet", - name: "Claude Sonnet 3", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-08-31", - release_date: "2024-03-04", - last_updated: "2024-03-04", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 0.3 }, - limit: { context: 200000, output: 4096 }, - }, - "anthropic/claude-3-opus": { - id: "anthropic/claude-3-opus", - name: "Claude Opus 3", - family: "claude-opus", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-08-31", - release_date: "2024-02-29", - last_updated: "2024-02-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 4096 }, - }, - "openai/gpt-5.5": { - id: "openai/gpt-5.5", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-23", - last_updated: "2026-04-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5, context_over_200k: { input: 10, output: 45, cache_read: 1 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - }, - }, - "github-copilot": { - id: "github-copilot", - env: ["GITHUB_TOKEN"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.githubcopilot.com", - name: "GitHub Copilot", - doc: "https://docs.github.com/en/copilot", - models: { - "gpt-5.1-codex-max": { - id: "gpt-5.1-codex-max", - name: "GPT-5.1-Codex-max", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-12-04", - last_updated: "2025-12-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 128000, output: 128000 }, - status: "deprecated", - }, - "claude-opus-4.6": { - id: "claude-opus-4.6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 144000, input: 128000, output: 64000 }, - }, - "gemini-3.1-pro-preview": { - id: "gemini-3.1-pro-preview", - name: "Gemini 3.1 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, input: 128000, output: 64000 }, - }, - "gemini-3-flash-preview": { - id: "gemini-3-flash-preview", - name: "Gemini 3 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, input: 128000, output: 64000 }, - }, - "gpt-5.5": { - id: "gpt-5.5", - name: "GPT-5.5", - family: "gpt", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-5-mini": { - id: "gpt-5-mini", - name: "GPT-5-mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-08-13", - last_updated: "2025-08-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 264000, input: 128000, output: 64000 }, - }, - "gemini-3-pro-preview": { - id: "gemini-3-pro-preview", - name: "Gemini 3 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, input: 128000, output: 64000 }, - status: "deprecated", - }, - "gpt-5.3-codex": { - id: "gpt-5.3-codex", - name: "GPT-5.3-Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-24", - last_updated: "2026-02-24", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gemini-2.5-pro": { - id: "gemini-2.5-pro", - name: "Gemini 2.5 Pro", - family: "gemini-pro", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, input: 128000, output: 64000 }, - }, - "gpt-5.2": { - id: "gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 264000, input: 128000, output: 64000 }, - }, - "gpt-5.4-mini": { - id: "gpt-5.4-mini", - name: "GPT-5.4 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "claude-opus-4.7": { - id: "claude-opus-4.7", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 144000, input: 128000, output: 64000 }, - }, - "gpt-5.2-codex": { - id: "gpt-5.2-codex", - name: "GPT-5.2-Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-5.1-codex-mini": { - id: "gpt-5.1-codex-mini", - name: "GPT-5.1-Codex-mini", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 128000, output: 128000 }, - status: "deprecated", - }, - "claude-sonnet-4": { - id: "claude-sonnet-4", - name: "Claude Sonnet 4", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 216000, input: 128000, output: 16000 }, - status: "deprecated", - }, - "grok-code-fast-1": { - id: "grok-code-fast-1", - name: "Grok Code Fast 1", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08", - release_date: "2025-08-27", - last_updated: "2025-08-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, input: 128000, output: 64000 }, - }, - "gpt-5.1": { - id: "gpt-5.1", - name: "GPT-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 264000, input: 128000, output: 64000 }, - status: "deprecated", - }, - "claude-sonnet-4.5": { - id: "claude-sonnet-4.5", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 144000, input: 128000, output: 32000 }, - }, - "claude-opus-41": { - id: "claude-opus-41", - name: "Claude Opus 4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 80000, output: 16000 }, - status: "deprecated", - }, - "claude-opus-4.5": { - id: "claude-opus-4.5", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-08-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 160000, input: 128000, output: 32000 }, - }, - "gpt-5.4": { - id: "gpt-5.4", - name: "GPT-5.4", - family: "gpt", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-4o": { - id: "gpt-4o", - name: "GPT-4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-05-13", - last_updated: "2024-05-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, input: 64000, output: 4096 }, - }, - "gpt-5": { - id: "gpt-5", - name: "GPT-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 128000 }, - status: "deprecated", - }, - "claude-haiku-4.5": { - id: "claude-haiku-4.5", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 144000, input: 128000, output: 32000 }, - }, - "gpt-4.1": { - id: "gpt-4.1", - name: "GPT-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, input: 64000, output: 16384 }, - }, - "claude-sonnet-4.6": { - id: "claude-sonnet-4.6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 200000, input: 128000, output: 32000 }, - }, - "gpt-5.1-codex": { - id: "gpt-5.1-codex", - name: "GPT-5.1-Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 128000, output: 128000 }, - status: "deprecated", - }, - }, - }, - mixlayer: { - id: "mixlayer", - env: ["MIXLAYER_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://models.mixlayer.ai/v1", - name: "Mixlayer", - doc: "https://docs.mixlayer.com", - models: { - "qwen/qwen3.5-122b-a10b": { - id: "qwen/qwen3.5-122b-a10b", - name: "Qwen3.5 122B A10B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 3.2 }, - limit: { context: 262144, output: 262144 }, - }, - "qwen/qwen3.5-27b": { - id: "qwen/qwen3.5-27b", - name: "Qwen3.5 27B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 2.4 }, - limit: { context: 262144, output: 262144 }, - }, - "qwen/qwen3.5-397b-a17b": { - id: "qwen/qwen3.5-397b-a17b", - name: "Qwen3.5 397B A17B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3.6 }, - limit: { context: 262144, output: 262144 }, - }, - "qwen/qwen3.5-9b": { - id: "qwen/qwen3.5-9b", - name: "Qwen3.5 9B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 262144, output: 262144 }, - }, - "qwen/qwen3.5-35b-a3b": { - id: "qwen/qwen3.5-35b-a3b", - name: "Qwen3.5 35B A3B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 1.3 }, - limit: { context: 262144, output: 262144 }, - }, - }, - }, - "xiaomi-token-plan-sgp": { - id: "xiaomi-token-plan-sgp", - env: ["XIAOMI_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://token-plan-sgp.xiaomimimo.com/v1", - name: "Xiaomi Token Plan (Singapore)", - doc: "https://platform.xiaomimimo.com/#/docs", - models: { - "mimo-v2-tts": { - id: "mimo-v2-tts", - name: "MiMo-V2-TTS", - family: "mimo", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["audio"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 16384 }, - }, - "mimo-v2-flash": { - id: "mimo-v2-flash", - name: "MiMo-V2-Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12-01", - release_date: "2025-12-16", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 262144, output: 65536 }, - }, - "mimo-v2-pro": { - id: "mimo-v2-pro", - name: "MiMo-V2-Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1048576, output: 131072 }, - }, - "mimo-v2.5": { - id: "mimo-v2.5", - name: "MiMo-V2.5", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, context_over_200k: { input: 0, output: 0, cache_read: 0 } }, - limit: { context: 1048576, output: 131072 }, - }, - "mimo-v2-omni": { - id: "mimo-v2-omni", - name: "MiMo-V2-Omni", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 262144, output: 131072 }, - }, - "mimo-v2.5-pro": { - id: "mimo-v2.5-pro", - name: "MiMo-V2.5-Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, context_over_200k: { input: 0, output: 0, cache_read: 0 } }, - limit: { context: 1048576, output: 131072 }, - }, - }, - }, - zai: { - id: "zai", - env: ["ZHIPU_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.z.ai/api/paas/v4", - name: "Z.AI", - doc: "https://docs.z.ai/guides/overview/pricing", - models: { - "glm-5v-turbo": { - id: "glm-5v-turbo", - name: "GLM-5V-Turbo", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-01", - modalities: { input: ["text", "image", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 4, cache_read: 0.24, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "glm-4.7": { - id: "glm-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.11, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "glm-5": { - id: "glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2, cache_read: 0.2, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "glm-4.7-flashx": { - id: "glm-4.7-flashx", - name: "GLM-4.7-FlashX", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.4, cache_read: 0.01, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "glm-5.1": { - id: "glm-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-03-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.4, output: 4.4, cache_read: 0.26, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "glm-4.5": { - id: "glm-4.5", - name: "GLM-4.5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.11, cache_write: 0 }, - limit: { context: 131072, output: 98304 }, - }, - "glm-4.5-air": { - id: "glm-4.5-air", - name: "GLM-4.5-Air", - family: "glm-air", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1.1, cache_read: 0.03, cache_write: 0 }, - limit: { context: 131072, output: 98304 }, - }, - "glm-5-turbo": { - id: "glm-5-turbo", - name: "GLM-5-Turbo", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-16", - last_updated: "2026-03-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 4, cache_read: 0.24, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "glm-4.5v": { - id: "glm-4.5v", - name: "GLM-4.5V", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-08-11", - last_updated: "2025-08-11", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.8 }, - limit: { context: 64000, output: 16384 }, - }, - "glm-4.6": { - id: "glm-4.6", - name: "GLM-4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.11, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "glm-4.6v": { - id: "glm-4.6v", - name: "GLM-4.6V", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-08", - last_updated: "2025-12-08", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 128000, output: 32768 }, - }, - "glm-4.5-flash": { - id: "glm-4.5-flash", - name: "GLM-4.5-Flash", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 131072, output: 98304 }, - }, - "glm-4.7-flash": { - id: "glm-4.7-flash", - name: "GLM-4.7-Flash", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - }, - }, - opencode: { - id: "opencode", - env: ["OPENCODE_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://opencode.ai/zen/v1", - name: "OpenCode Zen", - doc: "https://opencode.ai/docs/zen", - models: { - "minimax-m2.7": { - id: "minimax-m2.7", - name: "MiniMax M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06 }, - limit: { context: 204800, output: 131072 }, - }, - "gpt-5.1-codex-max": { - id: "gpt-5.1-codex-max", - name: "GPT-5.1 Codex Max", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "claude-haiku-4-5": { - id: "claude-haiku-4-5", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-10", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.08 }, - limit: { context: 262144, output: 65536 }, - }, - "glm-4.7": { - id: "glm-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.1 }, - limit: { context: 204800, output: 131072 }, - status: "deprecated", - }, - "glm-5": { - id: "glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2, cache_read: 0.2 }, - limit: { context: 204800, output: 131072 }, - }, - "glm-4.7-free": { - id: "glm-4.7-free", - name: "GLM-4.7 Free", - family: "glm-free", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 204800, output: 131072 }, - status: "deprecated", - }, - "gemini-3.1-pro": { - id: "gemini-3.1-pro", - name: "Gemini 3.1 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1048576, output: 65536 }, - provider: { npm: "@ai-sdk/google" }, - }, - "claude-sonnet-4-6": { - id: "claude-sonnet-4-6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - "kimi-k2.5-free": { - id: "kimi-k2.5-free", - name: "Kimi K2.5 Free", - family: "kimi-free", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-10", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 262144, output: 262144 }, - status: "deprecated", - }, - "claude-opus-4-7": { - id: "claude-opus-4-7", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - "gpt-5-nano": { - id: "gpt-5-nano", - name: "GPT-5 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4, cache_read: 0.005 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "gpt-5.3-codex": { - id: "gpt-5.3-codex", - name: "GPT-5.3 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-24", - last_updated: "2026-02-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "minimax-m2.5-free": { - id: "minimax-m2.5-free", - name: "MiniMax M2.5 Free", - family: "minimax-free", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 204800, output: 131072 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - "ring-2.6-1t-free": { - id: "ring-2.6-1t-free", - name: "Ring 2.6 1T Free", - family: "ring-1t-free", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-06", - release_date: "2026-05-08", - last_updated: "2026-05-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262000, output: 66000 }, - }, - "gpt-5.2": { - id: "gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "big-pickle": { - id: "big-pickle", - name: "Big Pickle", - family: "big-pickle", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-10-17", - last_updated: "2025-10-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 200000, output: 128000 }, - }, - "claude-opus-4-1": { - id: "claude-opus-4-1", - name: "Claude Opus 4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - "qwen3.6-plus": { - id: "qwen3.6-plus", - name: "Qwen3.6 Plus", - family: "qwen3.6", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3, cache_read: 0.05, cache_write: 0.625 }, - limit: { context: 262144, output: 65536 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - "gpt-5.4-mini": { - id: "gpt-5.4-mini", - name: "GPT-5.4 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5, cache_read: 0.075 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "claude-3-5-haiku": { - id: "claude-3-5-haiku", - name: "Claude Haiku 3.5", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07-31", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4, cache_read: 0.08, cache_write: 1 }, - limit: { context: 200000, output: 8192 }, - status: "deprecated", - provider: { npm: "@ai-sdk/anthropic" }, - }, - "minimax-m2.1": { - id: "minimax-m2.1", - name: "MiniMax M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.1 }, - limit: { context: 204800, output: 131072 }, - status: "deprecated", - }, - "glm-5.1": { - id: "glm-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-07", - last_updated: "2026-04-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.4, output: 4.4, cache_read: 0.26 }, - limit: { context: 204800, output: 131072 }, - }, - "gpt-5.4-nano": { - id: "gpt-5.4-nano", - name: "GPT-5.4 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.25, cache_read: 0.02 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "gpt-5.2-codex": { - id: "gpt-5.2-codex", - name: "GPT-5.2 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-01-14", - last_updated: "2026-01-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "gpt-5.1-codex-mini": { - id: "gpt-5.1-codex-mini", - name: "GPT-5.1 Codex Mini", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "claude-sonnet-4": { - id: "claude-sonnet-4", - name: "Claude Sonnet 4", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.6, cache_write: 7.5 }, - }, - limit: { context: 1000000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - "gemini-3-flash": { - id: "gemini-3-flash", - name: "Gemini 3 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3, cache_read: 0.05 }, - limit: { context: 1048576, output: 65536 }, - provider: { npm: "@ai-sdk/google" }, - }, - "trinity-large-preview-free": { - id: "trinity-large-preview-free", - name: "Trinity Large Preview", - family: "trinity", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2026-01-28", - last_updated: "2026-01-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 131072 }, - status: "deprecated", - }, - "gpt-5.1": { - id: "gpt-5.1", - name: "GPT-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.07, output: 8.5, cache_read: 0.107 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "gpt-5.4-pro": { - id: "gpt-5.4-pro", - name: "GPT-5.4 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180, cache_read: 30 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "glm-5-free": { - id: "glm-5-free", - name: "GLM-5 Free", - family: "glm-free", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 204800, output: 131072 }, - status: "deprecated", - }, - "claude-opus-4-5": { - id: "claude-opus-4-5", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-11-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - "minimax-m2.1-free": { - id: "minimax-m2.1-free", - name: "MiniMax M2.1 Free", - family: "minimax-free", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 204800, output: 131072 }, - status: "deprecated", - provider: { npm: "@ai-sdk/anthropic" }, - }, - "qwen3.6-plus-free": { - id: "qwen3.6-plus-free", - name: "Qwen3.6 Plus Free", - family: "qwen-free", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-30", - last_updated: "2026-03-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 1048576, output: 64000 }, - status: "deprecated", - }, - "glm-4.6": { - id: "glm-4.6", - name: "GLM-4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.1 }, - limit: { context: 204800, output: 131072 }, - status: "deprecated", - }, - "ling-2.6-flash-free": { - id: "ling-2.6-flash-free", - name: "Ling 2.6 Flash Free", - family: "ling-flash-free", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262100, output: 32800 }, - status: "deprecated", - }, - "gemini-3-pro": { - id: "gemini-3-pro", - name: "Gemini 3 Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1048576, output: 65536 }, - status: "deprecated", - provider: { npm: "@ai-sdk/google" }, - }, - "kimi-k2.6": { - id: "kimi-k2.6", - name: "Kimi K2.6", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-10", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262144, output: 65536 }, - }, - "gpt-5-codex": { - id: "gpt-5-codex", - name: "GPT-5 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.07, output: 8.5, cache_read: 0.107 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "grok-code": { - id: "grok-code", - name: "Grok Code Fast 1", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-20", - last_updated: "2025-08-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 256000, output: 256000 }, - status: "deprecated", - }, - "mimo-v2-flash-free": { - id: "mimo-v2-flash-free", - name: "MiMo V2 Flash Free", - family: "mimo-flash-free", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2025-12-16", - last_updated: "2025-12-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 262144, output: 65536 }, - status: "deprecated", - }, - "gpt-5.3-codex-spark": { - id: "gpt-5.3-codex-spark", - name: "GPT-5.3 Codex Spark", - family: "gpt-codex-spark", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 128000, input: 128000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "hy3-preview-free": { - id: "hy3-preview-free", - name: "Hy3 preview Free", - family: "hy3-free", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2026-04-20", - last_updated: "2026-04-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 256000, output: 64000 }, - status: "deprecated", - }, - "minimax-m2.5": { - id: "minimax-m2.5", - name: "MiniMax M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06 }, - limit: { context: 204800, output: 131072 }, - }, - "kimi-k2": { - id: "kimi-k2", - name: "Kimi K2", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2.5, cache_read: 0.4 }, - limit: { context: 262144, output: 262144 }, - status: "deprecated", - }, - "claude-sonnet-4-5": { - id: "claude-sonnet-4-5", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.6, cache_write: 7.5 }, - }, - limit: { context: 1000000, output: 64000 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - "qwen3-coder": { - id: "qwen3-coder", - name: "Qwen3 Coder", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 1.8 }, - limit: { context: 262144, output: 65536 }, - status: "deprecated", - }, - "gpt-5": { - id: "gpt-5", - name: "GPT-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.07, output: 8.5, cache_read: 0.107 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "qwen3.5-plus": { - id: "qwen3.5-plus", - name: "Qwen3.5 Plus", - family: "qwen3.5", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.2, cache_read: 0.02, cache_write: 0.25 }, - limit: { context: 262144, output: 65536 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - "mimo-v2-pro-free": { - id: "mimo-v2-pro-free", - name: "MiMo V2 Pro Free", - family: "mimo-pro-free", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 1048576, output: 64000 }, - status: "deprecated", - }, - "nemotron-3-super-free": { - id: "nemotron-3-super-free", - name: "Nemotron 3 Super Free", - family: "nemotron-free", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2026-02", - release_date: "2026-03-11", - last_updated: "2026-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 204800, output: 128000 }, - }, - "gpt-5.5-pro": { - id: "gpt-5.5-pro", - name: "GPT-5.5 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180, cache_read: 30 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "kimi-k2-thinking": { - id: "kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2.5, cache_read: 0.4 }, - limit: { context: 262144, output: 262144 }, - status: "deprecated", - }, - "gpt-5.1-codex": { - id: "gpt-5.1-codex", - name: "GPT-5.1 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.07, output: 8.5, cache_read: 0.107 }, - limit: { context: 400000, input: 272000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "mimo-v2-omni-free": { - id: "mimo-v2-omni-free", - name: "MiMo V2 Omni Free", - family: "mimo-omni-free", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text", "image", "audio", "pdf"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 262144, output: 64000 }, - status: "deprecated", - }, - "gpt-5.5": { - id: "gpt-5.5", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-23", - last_updated: "2026-04-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5, context_over_200k: { input: 10, output: 45, cache_read: 1 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "gpt-5.4": { - id: "gpt-5.4", - name: "GPT-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 2.5, - output: 15, - cache_read: 0.25, - context_over_200k: { input: 5, output: 22.5, cache_read: 0.5 }, - }, - limit: { context: 1050000, input: 922000, output: 128000 }, - provider: { npm: "@ai-sdk/openai" }, - }, - "claude-opus-4-6": { - id: "claude-opus-4-6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - provider: { npm: "@ai-sdk/anthropic" }, - }, - }, - }, - stepfun: { - id: "stepfun", - env: ["STEPFUN_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.stepfun.com/v1", - name: "StepFun", - doc: "https://platform.stepfun.com/docs/zh/overview/concept", - models: { - "step-3.5-flash-2603": { - id: "step-3.5-flash-2603", - name: "Step 3.5 Flash 2603", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3, cache_read: 0.02 }, - limit: { context: 256000, input: 256000, output: 256000 }, - }, - "step-1-32k": { - id: "step-1-32k", - name: "Step 1 (32K)", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-01-01", - last_updated: "2026-02-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.05, output: 9.59, cache_read: 0.41 }, - limit: { context: 32768, input: 32768, output: 32768 }, - }, - "step-3.5-flash": { - id: "step-3.5-flash", - name: "Step 3.5 Flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-29", - last_updated: "2026-02-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.096, output: 0.288, cache_read: 0.019 }, - limit: { context: 256000, input: 256000, output: 256000 }, - }, - "step-2-16k": { - id: "step-2-16k", - name: "Step 2 (16K)", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-01-01", - last_updated: "2026-02-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 5.21, output: 16.44, cache_read: 1.04 }, - limit: { context: 16384, input: 16384, output: 8192 }, - }, - }, - }, - nebius: { - id: "nebius", - env: ["NEBIUS_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.tokenfactory.nebius.com/v1", - name: "Nebius Token Factory", - doc: "https://docs.tokenfactory.nebius.com/", - models: { - "NousResearch/Hermes-4-70B": { - id: "NousResearch/Hermes-4-70B", - name: "Hermes-4-70B", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-11", - release_date: "2026-01-30", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.4, reasoning: 0.4, cache_read: 0.013, cache_write: 0.16 }, - limit: { context: 128000, input: 120000, output: 8192 }, - }, - "NousResearch/Hermes-4-405B": { - id: "NousResearch/Hermes-4-405B", - name: "Hermes-4-405B", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-11", - release_date: "2026-01-30", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3, reasoning: 3, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 128000, input: 120000, output: 8192 }, - }, - "Qwen/Qwen2.5-VL-72B-Instruct": { - id: "Qwen/Qwen2.5-VL-72B-Instruct", - name: "Qwen2.5-VL-72B-Instruct", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-20", - last_updated: "2026-02-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 0.75, cache_read: 0.025, cache_write: 0.31 }, - limit: { context: 128000, input: 120000, output: 8192 }, - }, - "Qwen/Qwen3.5-397B-A17B": { - id: "Qwen/Qwen3.5-397B-A17B", - name: "Qwen3.5-397B-A17B", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-15", - last_updated: "2026-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3.6, cache_read: 0.06, cache_write: 0.75 }, - limit: { context: 262144, input: 250000, output: 8192 }, - }, - "Qwen/Qwen3-Embedding-8B": { - id: "Qwen/Qwen3-Embedding-8B", - name: "Qwen3-Embedding-8B", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: false, - knowledge: "2025-10", - release_date: "2026-01-10", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.01, output: 0 }, - limit: { context: 32768, input: 32768, output: 0 }, - }, - "Qwen/Qwen3-30B-A3B-Instruct-2507": { - id: "Qwen/Qwen3-30B-A3B-Instruct-2507", - name: "Qwen3-30B-A3B-Instruct-2507", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-12", - release_date: "2026-01-28", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3, cache_read: 0.01, cache_write: 0.125 }, - limit: { context: 128000, input: 120000, output: 8192 }, - }, - "Qwen/Qwen3-235B-A22B-Instruct-2507": { - id: "Qwen/Qwen3-235B-A22B-Instruct-2507", - name: "Qwen3 235B A22B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-25", - last_updated: "2025-10-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 262144, output: 8192 }, - }, - "Qwen/Qwen3-32B": { - id: "Qwen/Qwen3-32B", - name: "Qwen3-32B", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-12", - release_date: "2026-01-28", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3, cache_read: 0.01, cache_write: 0.125 }, - limit: { context: 128000, input: 120000, output: 8192 }, - }, - "Qwen/Qwen3-235B-A22B-Thinking-2507-fast": { - id: "Qwen/Qwen3-235B-A22B-Thinking-2507-fast", - name: "Qwen3-235B-A22B-Thinking-2507-fast", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-25", - last_updated: "2026-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 2, cache_read: 0.05, cache_write: 0.625 }, - limit: { context: 8000, input: 7000, output: 8192 }, - }, - "Qwen/Qwen3.5-397B-A17B-fast": { - id: "Qwen/Qwen3.5-397B-A17B-fast", - name: "Qwen3.5-397B-A17B-fast", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-15", - last_updated: "2026-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3.6, cache_read: 0.06, cache_write: 0.75 }, - limit: { context: 8000, input: 7000, output: 8192 }, - }, - "Qwen/Qwen3-Next-80B-A3B-Thinking-fast": { - id: "Qwen/Qwen3-Next-80B-A3B-Thinking-fast", - name: "Qwen3-Next-80B-A3B-Thinking-fast", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-25", - last_updated: "2026-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 1.2, cache_read: 0.015, cache_write: 0.1875 }, - limit: { context: 8000, input: 7000, output: 8192 }, - }, - "Qwen/Qwen3-Next-80B-A3B-Thinking": { - id: "Qwen/Qwen3-Next-80B-A3B-Thinking", - name: "Qwen3-Next-80B-A3B-Thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-12", - release_date: "2026-01-28", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 1.2, reasoning: 1.2, cache_read: 0.015, cache_write: 0.18 }, - limit: { context: 128000, input: 120000, output: 16384 }, - }, - "PrimeIntellect/INTELLECT-3": { - id: "PrimeIntellect/INTELLECT-3", - name: "INTELLECT-3", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-10", - release_date: "2026-01-25", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1.1, cache_read: 0.02, cache_write: 0.25 }, - limit: { context: 128000, input: 120000, output: 8192 }, - }, - "zai-org/GLM-5": { - id: "zai-org/GLM-5", - name: "GLM-5", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2026-01", - release_date: "2026-03-01", - last_updated: "2026-03-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 3.2, cache_read: 0.1, cache_write: 1 }, - limit: { context: 200000, input: 200000, output: 16384 }, - }, - "meta-llama/Llama-3.3-70B-Instruct": { - id: "meta-llama/Llama-3.3-70B-Instruct", - name: "Llama-3.3-70B-Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08", - release_date: "2025-12-05", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.4, cache_read: 0.013, cache_write: 0.16 }, - limit: { context: 128000, input: 120000, output: 8192 }, - }, - "meta-llama/Meta-Llama-3.1-8B-Instruct": { - id: "meta-llama/Meta-Llama-3.1-8B-Instruct", - name: "Meta-Llama-3.1-8B-Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-12", - release_date: "2024-07-23", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.06, cache_read: 0.002, cache_write: 0.025 }, - limit: { context: 128000, input: 120000, output: 4096 }, - }, - "nvidia/nemotron-3-super-120b-a12b": { - id: "nvidia/nemotron-3-super-120b-a12b", - name: "Nemotron-3-Super-120B-A12B", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2026-02", - release_date: "2026-03-11", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 256000, input: 256000, output: 32768 }, - }, - "nvidia/Llama-3_1-Nemotron-Ultra-253B-v1": { - id: "nvidia/Llama-3_1-Nemotron-Ultra-253B-v1", - name: "Llama-3.1-Nemotron-Ultra-253B-v1", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-15", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.8, cache_read: 0.06, cache_write: 0.75 }, - limit: { context: 128000, input: 120000, output: 4096 }, - }, - "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B": { - id: "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B", - name: "Nemotron-3-Nano-30B-A3B", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-08-10", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.24, cache_read: 0.006, cache_write: 0.075 }, - limit: { context: 32000, input: 30000, output: 4096 }, - }, - "nvidia/Nemotron-3-Nano-Omni": { - id: "nvidia/Nemotron-3-Nano-Omni", - name: "Nemotron-3-Nano-Omni", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-20", - last_updated: "2026-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.24, cache_read: 0.006, cache_write: 0.075 }, - limit: { context: 65536, input: 60000, output: 8192 }, - }, - "deepseek-ai/DeepSeek-V3.2-fast": { - id: "deepseek-ai/DeepSeek-V3.2-fast", - name: "DeepSeek-V3.2-fast", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-27", - last_updated: "2026-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2, cache_read: 0.04, cache_write: 0.5 }, - limit: { context: 8000, input: 7000, output: 8192 }, - }, - "deepseek-ai/DeepSeek-V3.2": { - id: "deepseek-ai/DeepSeek-V3.2", - name: "DeepSeek-V3.2", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-11", - release_date: "2026-01-20", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.45, reasoning: 0.45, cache_read: 0.03, cache_write: 0.375 }, - limit: { context: 163000, input: 160000, output: 16384 }, - }, - "openai/gpt-oss-120b-fast": { - id: "openai/gpt-oss-120b-fast", - name: "gpt-oss-120b-fast", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-06-10", - last_updated: "2026-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.5, cache_read: 0.01, cache_write: 0.125 }, - limit: { context: 8000, input: 7000, output: 8192 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "gpt-oss-120b", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-09", - release_date: "2026-01-10", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6, reasoning: 0.6, cache_read: 0.015, cache_write: 0.18 }, - limit: { context: 128000, input: 124000, output: 8192 }, - }, - "google/gemma-2-2b-it": { - id: "google/gemma-2-2b-it", - name: "Gemma-2-2b-it", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - knowledge: "2024-06", - release_date: "2024-07-31", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.06, cache_read: 0.002, cache_write: 0.025 }, - limit: { context: 8192, input: 8000, output: 4096 }, - }, - "google/gemma-3-27b-it": { - id: "google/gemma-3-27b-it", - name: "Gemma-3-27b-it", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-10", - release_date: "2026-01-20", - last_updated: "2026-02-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3, cache_read: 0.01, cache_write: 0.125 }, - limit: { context: 110000, input: 100000, output: 8192 }, - }, - "moonshotai/Kimi-K2.5-fast": { - id: "moonshotai/Kimi-K2.5-fast", - name: "Kimi-K2.5-fast", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-12-15", - last_updated: "2026-02-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 2.5, cache_read: 0.05, cache_write: 0.625 }, - limit: { context: 256000, input: 256000, output: 8192 }, - }, - "moonshotai/Kimi-K2.5": { - id: "moonshotai/Kimi-K2.5", - name: "Kimi-K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-12-15", - last_updated: "2026-02-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 2.5, reasoning: 2.5, cache_read: 0.05, cache_write: 0.625 }, - limit: { context: 256000, input: 256000, output: 8192 }, - }, - "MiniMaxAI/MiniMax-M2.5": { - id: "MiniMaxAI/MiniMax-M2.5", - name: "MiniMax-M2.5", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-20", - last_updated: "2026-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.03, cache_write: 0.375 }, - limit: { context: 196608, input: 190000, output: 8192 }, - }, - "MiniMaxAI/MiniMax-M2.5-fast": { - id: "MiniMaxAI/MiniMax-M2.5-fast", - name: "MiniMax-M2.5-fast", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-20", - last_updated: "2026-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.03, cache_write: 0.375 }, - limit: { context: 8000, input: 7000, output: 8192 }, - }, - "deepseek-ai/DeepSeek-V4-Pro": { - id: "deepseek-ai/DeepSeek-V4-Pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.75, output: 3.5, cache_read: 0.15 }, - limit: { context: 1000000, output: 384000 }, - }, - }, - }, - poe: { - id: "poe", - env: ["POE_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.poe.com/v1", - name: "Poe", - doc: "https://creator.poe.com/docs/external-applications/openai-compatible-api", - models: { - "topazlabs-co/topazlabs": { - id: "topazlabs-co/topazlabs", - name: "TopazLabs", - family: "topazlabs", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-12-03", - last_updated: "2024-12-03", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 204, output: 0 }, - }, - "novita/kimi-k2.5": { - id: "novita/kimi-k2.5", - name: "Kimi-K2.5", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 3, cache_read: 0.1 }, - limit: { context: 128000, output: 262144 }, - }, - "novita/glm-4.7": { - id: "novita/glm-4.7", - name: "glm-4.7", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 205000, output: 131072 }, - status: "deprecated", - }, - "novita/glm-5": { - id: "novita/glm-5", - name: "GLM-5", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-15", - last_updated: "2026-02-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 3.2, cache_read: 0.2 }, - limit: { context: 205000, output: 131072 }, - }, - "novita/minimax-m2.1": { - id: "novita/minimax-m2.1", - name: "minimax-m2.1", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-12-26", - last_updated: "2025-12-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 205000, output: 131072 }, - }, - "novita/glm-4.6": { - id: "novita/glm-4.6", - name: "GLM-4.6", - family: "glm", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "novita/kimi-k2.6": { - id: "novita/kimi-k2.6", - name: "Kimi-K2.6", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-20", - last_updated: "2026-05-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.96, output: 4.04, cache_read: 0.16 }, - limit: { context: 262144, input: 262144, output: 262144 }, - }, - "novita/glm-4.6v": { - id: "novita/glm-4.6v", - name: "glm-4.6v", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-12-09", - last_updated: "2025-12-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 131000, output: 32768 }, - }, - "novita/deepseek-v3.2": { - id: "novita/deepseek-v3.2", - name: "DeepSeek-V3.2", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 0.4, cache_read: 0.13 }, - limit: { context: 128000, output: 0 }, - }, - "novita/glm-4.7-flash": { - id: "novita/glm-4.7-flash", - name: "glm-4.7-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 200000, output: 65500 }, - }, - "novita/glm-4.7-n": { - id: "novita/glm-4.7-n", - name: "glm-4.7-n", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 205000, output: 131072 }, - }, - "novita/kimi-k2-thinking": { - id: "novita/kimi-k2-thinking", - name: "kimi-k2-thinking", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-11-07", - last_updated: "2025-11-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 0 }, - }, - "fireworks-ai/kimi-k2.5-fw": { - id: "fireworks-ai/kimi-k2.5-fw", - name: "Kimi-K2.5-FW", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 262144, input: 245760, output: 16384 }, - }, - "empiriolabs/deepseek-v4-pro-el": { - id: "empiriolabs/deepseek-v4-pro-el", - name: "DeepSeek-V4-Pro-EL", - attachment: true, - reasoning: true, - tool_call: true, - release_date: "2026-04-24", - last_updated: "2026-05-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.67, output: 3.33 }, - limit: { context: 1000000, input: 1000000, output: 384000 }, - }, - "empiriolabs/deepseek-v4-flash-el": { - id: "empiriolabs/deepseek-v4-flash-el", - name: "DeepSeek-V4-Flash-EL", - attachment: true, - reasoning: true, - tool_call: true, - release_date: "2026-04-24", - last_updated: "2026-05-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.28 }, - limit: { context: 1000000, input: 1000000, output: 384000 }, - }, - "elevenlabs/elevenlabs-v2.5-turbo": { - id: "elevenlabs/elevenlabs-v2.5-turbo", - name: "ElevenLabs-v2.5-Turbo", - family: "elevenlabs", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-10-28", - last_updated: "2024-10-28", - modalities: { input: ["text"], output: ["audio"] }, - open_weights: false, - limit: { context: 128000, output: 0 }, - }, - "elevenlabs/elevenlabs-v3": { - id: "elevenlabs/elevenlabs-v3", - name: "ElevenLabs-v3", - family: "elevenlabs", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-06-05", - last_updated: "2025-06-05", - modalities: { input: ["text"], output: ["audio"] }, - open_weights: false, - limit: { context: 128000, output: 0 }, - }, - "elevenlabs/elevenlabs-music": { - id: "elevenlabs/elevenlabs-music", - name: "ElevenLabs-Music", - family: "elevenlabs", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-08-29", - last_updated: "2025-08-29", - modalities: { input: ["text"], output: ["audio"] }, - open_weights: false, - limit: { context: 2000, output: 0 }, - }, - "cerebras/gpt-oss-120b-cs": { - id: "cerebras/gpt-oss-120b-cs", - name: "GPT-OSS-120B-CS", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-08-06", - last_updated: "2025-08-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.35, output: 0.75 }, - limit: { context: 128000, output: 0 }, - }, - "cerebras/llama-3.1-8b-cs": { - id: "cerebras/llama-3.1-8b-cs", - name: "Llama-3.1-8B-CS", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-05-13", - last_updated: "2025-05-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 128000, output: 0 }, - }, - "cerebras/qwen3-32b-cs": { - id: "cerebras/qwen3-32b-cs", - name: "qwen3-32b-cs", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-05-15", - last_updated: "2025-05-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - status: "deprecated", - }, - "cerebras/qwen3-235b-2507-cs": { - id: "cerebras/qwen3-235b-2507-cs", - name: "qwen3-235b-2507-cs", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-08-06", - last_updated: "2025-08-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - status: "deprecated", - }, - "cerebras/llama-3.3-70b-cs": { - id: "cerebras/llama-3.3-70b-cs", - name: "llama-3.3-70b-cs", - attachment: true, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-05-13", - last_updated: "2025-05-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - status: "deprecated", - }, - "stabilityai/stablediffusionxl": { - id: "stabilityai/stablediffusionxl", - name: "StableDiffusionXL", - family: "stable-diffusion", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2023-07-09", - last_updated: "2023-07-09", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - limit: { context: 200, output: 0 }, - }, - "xai/grok-code-fast-1": { - id: "xai/grok-code-fast-1", - name: "Grok Code Fast 1", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-08-22", - last_updated: "2025-08-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.5, cache_read: 0.02 }, - limit: { context: 256000, output: 128000 }, - }, - "xai/grok-4-fast-reasoning": { - id: "xai/grok-4-fast-reasoning", - name: "Grok-4-Fast-Reasoning", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-09-16", - last_updated: "2025-09-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 128000 }, - }, - "xai/grok-4.1-fast-non-reasoning": { - id: "xai/grok-4.1-fast-non-reasoning", - name: "Grok-4.1-Fast-Non-Reasoning", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 2000000, output: 30000 }, - }, - "xai/grok-4": { - id: "xai/grok-4", - name: "Grok-4", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-07-10", - last_updated: "2025-07-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75 }, - limit: { context: 256000, output: 128000 }, - }, - "xai/grok-3-mini": { - id: "xai/grok-3-mini", - name: "Grok 3 Mini", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-04-11", - last_updated: "2025-04-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.5, cache_read: 0.075 }, - limit: { context: 131072, output: 8192 }, - }, - "xai/grok-4.20-multi-agent": { - id: "xai/grok-4.20-multi-agent", - name: "Grok-4.20-Multi-Agent", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2026-03-13", - last_updated: "2026-03-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.2 }, - limit: { context: 128000, output: 0 }, - }, - "xai/grok-3": { - id: "xai/grok-3", - name: "Grok 3", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-04-11", - last_updated: "2025-04-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75 }, - limit: { context: 131072, output: 8192 }, - }, - "xai/grok-4-fast-non-reasoning": { - id: "xai/grok-4-fast-non-reasoning", - name: "Grok-4-Fast-Non-Reasoning", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-09-16", - last_updated: "2025-09-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 128000 }, - }, - "xai/grok-4.1-fast-reasoning": { - id: "xai/grok-4.1-fast-reasoning", - name: "Grok-4.1-Fast-Reasoning", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 2000000, output: 30000 }, - }, - "runwayml/runway": { - id: "runwayml/runway", - name: "Runway", - family: "runway", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-10-11", - last_updated: "2024-10-11", - modalities: { input: ["text", "image"], output: ["video"] }, - open_weights: false, - limit: { context: 256, output: 0 }, - }, - "runwayml/runway-gen-4-turbo": { - id: "runwayml/runway-gen-4-turbo", - name: "Runway-Gen-4-Turbo", - family: "runway", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-05-09", - last_updated: "2025-05-09", - modalities: { input: ["text", "image"], output: ["video"] }, - open_weights: false, - limit: { context: 256, output: 0 }, - }, - "openai/gpt-5.1-codex-max": { - id: "openai/gpt-5.1-codex-max", - name: "GPT-5.1-Codex-Max", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-12-08", - last_updated: "2025-12-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 9, cache_read: 0.11 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/sora-2-pro": { - id: "openai/sora-2-pro", - name: "Sora-2-Pro", - family: "sora", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-10-06", - last_updated: "2025-10-06", - modalities: { input: ["text", "image"], output: ["video"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "openai/chatgpt-4o-latest": { - id: "openai/chatgpt-4o-latest", - name: "ChatGPT-4o-Latest", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-08-14", - last_updated: "2024-08-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 4.5, output: 14 }, - limit: { context: 128000, output: 8192 }, - status: "deprecated", - }, - "openai/gpt-5-chat": { - id: "openai/gpt-5-chat", - name: "GPT-5-Chat", - family: "gpt-codex", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 9, cache_read: 0.11 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-5.2-pro": { - id: "openai/gpt-5.2-pro", - name: "GPT-5.2-Pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 19, output: 150 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-4o-aug": { - id: "openai/gpt-4o-aug", - name: "GPT-4o-Aug", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-11-21", - last_updated: "2024-11-21", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.2, output: 9, cache_read: 1.1 }, - limit: { context: 128000, output: 8192 }, - }, - "openai/gpt-image-2": { - id: "openai/gpt-image-2", - name: "GPT-Image-2", - attachment: true, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - cost: { input: 5.0505, output: 32.3232, cache_read: 1.2626 }, - limit: { context: 0, output: 0 }, - }, - "openai/gpt-4-classic-0314": { - id: "openai/gpt-4-classic-0314", - name: "GPT-4-Classic-0314", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-08-26", - last_updated: "2024-08-26", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 27, output: 54 }, - limit: { context: 8192, output: 4096 }, - status: "deprecated", - }, - "openai/gpt-5-mini": { - id: "openai/gpt-5-mini", - name: "GPT-5-mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-06-25", - last_updated: "2025-06-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.22, output: 1.8, cache_read: 0.022 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5-nano": { - id: "openai/gpt-5-nano", - name: "GPT-5-nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.045, output: 0.36, cache_read: 0.0045 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.3-codex": { - id: "openai/gpt-5.3-codex", - name: "GPT-5.3-Codex", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-02-10", - last_updated: "2026-02-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.6, output: 13, cache_read: 0.16 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-4-turbo": { - id: "openai/gpt-4-turbo", - name: "GPT-4-Turbo", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2023-09-13", - last_updated: "2023-09-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 9, output: 27 }, - limit: { context: 128000, output: 4096 }, - }, - "openai/gpt-5.2": { - id: "openai/gpt-5.2", - name: "GPT-5.2", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-12-08", - last_updated: "2025-12-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.6, output: 13, cache_read: 0.16 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/o3-pro": { - id: "openai/o3-pro", - name: "o3-pro", - family: "o-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-06-10", - last_updated: "2025-06-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 18, output: 72 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/o3-mini-high": { - id: "openai/o3-mini-high", - name: "o3-mini-high", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-01-31", - last_updated: "2025-01-31", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.99, output: 4 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-4o-mini": { - id: "openai/gpt-4o-mini", - name: "GPT-4o-mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.54, cache_read: 0.068 }, - limit: { context: 124096, output: 4096 }, - }, - "openai/o4-mini-deep-research": { - id: "openai/o4-mini-deep-research", - name: "o4-mini-deep-research", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-06-27", - last_updated: "2025-06-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.8, output: 7.2, cache_read: 0.45 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-5.4-mini": { - id: "openai/gpt-5.4-mini", - name: "GPT-5.4-Mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-03-12", - last_updated: "2026-03-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.68, output: 4, cache_read: 0.068 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/dall-e-3": { - id: "openai/dall-e-3", - name: "DALL-E-3", - family: "dall-e", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2023-11-06", - last_updated: "2023-11-06", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 800, output: 0 }, - }, - "openai/o4-mini": { - id: "openai/o4-mini", - name: "o4-mini", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.99, output: 4, cache_read: 0.25 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-5.4-nano": { - id: "openai/gpt-5.4-nano", - name: "GPT-5.4-Nano", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-03-11", - last_updated: "2026-03-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 1.1, cache_read: 0.018 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/gpt-image-1": { - id: "openai/gpt-image-1", - name: "GPT-Image-1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-03-31", - last_updated: "2025-03-31", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - limit: { context: 128000, output: 0 }, - }, - "openai/gpt-5.2-codex": { - id: "openai/gpt-5.2-codex", - name: "GPT-5.2-Codex", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-01-14", - last_updated: "2026-01-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.6, output: 13, cache_read: 0.16 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.1-codex-mini": { - id: "openai/gpt-5.1-codex-mini", - name: "GPT-5.1-Codex-Mini", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-11-12", - last_updated: "2025-11-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.22, output: 1.8, cache_read: 0.022 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.1": { - id: "openai/gpt-5.1", - name: "GPT-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-11-12", - last_updated: "2025-11-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 9, cache_read: 0.11 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-image-1-mini": { - id: "openai/gpt-image-1-mini", - name: "GPT-Image-1-Mini", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-08-26", - last_updated: "2025-08-26", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "openai/o1": { - id: "openai/o1", - name: "o1", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2024-12-18", - last_updated: "2024-12-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 14, output: 54 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-5.4-pro": { - id: "openai/gpt-5.4-pro", - name: "GPT-5.4-Pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - cost: { input: 27, output: 160 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "openai/gpt-3.5-turbo": { - id: "openai/gpt-3.5-turbo", - name: "GPT-3.5-Turbo", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2023-09-13", - last_updated: "2023-09-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.45, output: 1.4 }, - limit: { context: 16384, output: 2048 }, - }, - "openai/o3-deep-research": { - id: "openai/o3-deep-research", - name: "o3-deep-research", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-06-27", - last_updated: "2025-06-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 9, output: 36, cache_read: 2.2 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/o3-mini": { - id: "openai/o3-mini", - name: "o3-mini", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-01-31", - last_updated: "2025-01-31", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.99, output: 4 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/o1-pro": { - id: "openai/o1-pro", - name: "o1-pro", - family: "o-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-03-19", - last_updated: "2025-03-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 140, output: 540 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-4o-search": { - id: "openai/gpt-4o-search", - name: "GPT-4o-Search", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-03-11", - last_updated: "2025-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.2, output: 9 }, - limit: { context: 128000, output: 8192 }, - }, - "openai/gpt-5-codex": { - id: "openai/gpt-5-codex", - name: "GPT-5-Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 9 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.4": { - id: "openai/gpt-5.4", - name: "GPT-5.4", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-02-26", - last_updated: "2026-02-26", - modalities: { input: ["text", "image", "pdf"], output: ["image"] }, - open_weights: false, - cost: { input: 2.2, output: 14, cache_read: 0.22 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "openai/gpt-5.3-codex-spark": { - id: "openai/gpt-5.3-codex-spark", - name: "GPT-5.3-Codex-Spark", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-03-04", - last_updated: "2026-03-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-3.5-turbo-raw": { - id: "openai/gpt-3.5-turbo-raw", - name: "GPT-3.5-Turbo-Raw", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2023-09-27", - last_updated: "2023-09-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.45, output: 1.4 }, - limit: { context: 4524, output: 2048 }, - }, - "openai/gpt-4.1-nano": { - id: "openai/gpt-4.1-nano", - name: "GPT-4.1-nano", - family: "gpt-nano", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09, output: 0.36, cache_read: 0.022 }, - limit: { context: 1047576, output: 32768 }, - }, - "openai/o3": { - id: "openai/o3", - name: "o3", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.8, output: 7.2, cache_read: 0.45 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-5-pro": { - id: "openai/gpt-5-pro", - name: "GPT-5-Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-10-06", - last_updated: "2025-10-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 14, output: 110 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/sora-2": { - id: "openai/sora-2", - name: "Sora-2", - family: "sora", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-10-06", - last_updated: "2025-10-06", - modalities: { input: ["text", "image"], output: ["video"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "openai/gpt-4o": { - id: "openai/gpt-4o", - name: "GPT-4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-05-13", - last_updated: "2024-05-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 8192 }, - }, - "openai/gpt-5": { - id: "openai/gpt-5", - name: "GPT-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 9, cache_read: 0.11 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.2-instant": { - id: "openai/gpt-5.2-instant", - name: "GPT-5.2-Instant", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.6, output: 13, cache_read: 0.16 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-4o-mini-search": { - id: "openai/gpt-4o-mini-search", - name: "GPT-4o-mini-Search", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-03-11", - last_updated: "2025-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.54 }, - limit: { context: 128000, output: 8192 }, - }, - "openai/gpt-image-1.5": { - id: "openai/gpt-image-1.5", - name: "gpt-image-1.5", - attachment: true, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-12-16", - last_updated: "2025-12-16", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - limit: { context: 128000, output: 0 }, - }, - "openai/gpt-3.5-turbo-instruct": { - id: "openai/gpt-3.5-turbo-instruct", - name: "GPT-3.5-Turbo-Instruct", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2023-09-20", - last_updated: "2023-09-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.4, output: 1.8 }, - limit: { context: 3500, output: 1024 }, - }, - "openai/gpt-4.1": { - id: "openai/gpt-4.1", - name: "GPT-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.8, output: 7.2, cache_read: 0.45 }, - limit: { context: 1047576, output: 32768 }, - }, - "openai/gpt-5.1-instant": { - id: "openai/gpt-5.1-instant", - name: "GPT-5.1-Instant", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-11-12", - last_updated: "2025-11-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 9, cache_read: 0.11 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-4.1-mini": { - id: "openai/gpt-4.1-mini", - name: "GPT-4.1-mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.36, output: 1.4, cache_read: 0.09 }, - limit: { context: 1047576, output: 32768 }, - }, - "openai/gpt-4-classic": { - id: "openai/gpt-4-classic", - name: "GPT-4-Classic", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-03-25", - last_updated: "2024-03-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 27, output: 54 }, - limit: { context: 8192, output: 4096 }, - status: "deprecated", - }, - "openai/gpt-5.1-codex": { - id: "openai/gpt-5.1-codex", - name: "GPT-5.1-Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-11-12", - last_updated: "2025-11-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 9, cache_read: 0.11 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.3-instant": { - id: "openai/gpt-5.3-instant", - name: "GPT-5.3-Instant", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2026-03-03", - last_updated: "2026-03-03", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.6, output: 13, cache_read: 0.16 }, - limit: { context: 128000, input: 111616, output: 16384 }, - }, - "google/veo-3-fast": { - id: "google/veo-3-fast", - name: "Veo-3-Fast", - family: "veo", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-10-13", - last_updated: "2025-10-13", - modalities: { input: ["text"], output: ["video"] }, - open_weights: false, - limit: { context: 480, output: 0 }, - }, - "google/veo-3.1-fast": { - id: "google/veo-3.1-fast", - name: "Veo-3.1-Fast", - family: "veo", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image"], output: ["video"] }, - open_weights: false, - limit: { context: 480, output: 0 }, - }, - "google/gemini-3.1-pro": { - id: "google/gemini-3.1-pro", - name: "Gemini-3.1-Pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/imagen-3-fast": { - id: "google/imagen-3-fast", - name: "Imagen-3-Fast", - family: "imagen", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-10-17", - last_updated: "2024-10-17", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 480, output: 0 }, - }, - "google/gemini-2.0-flash": { - id: "google/gemini-2.0-flash", - name: "Gemini-2.0-Flash", - family: "gemini-flash", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.42 }, - limit: { context: 990000, output: 8192 }, - }, - "google/gemini-deep-research": { - id: "google/gemini-deep-research", - name: "gemini-deep-research", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 1.6, output: 9.6 }, - limit: { context: 1048576, output: 0 }, - status: "deprecated", - }, - "google/gemini-2.5-pro": { - id: "google/gemini-2.5-pro", - name: "Gemini-2.5-Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-02-05", - last_updated: "2025-02-05", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.87, output: 7, cache_read: 0.087 }, - limit: { context: 1065535, output: 65535 }, - }, - "google/imagen-3": { - id: "google/imagen-3", - name: "Imagen-3", - family: "imagen", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-10-15", - last_updated: "2024-10-15", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 480, output: 0 }, - }, - "google/nano-banana": { - id: "google/nano-banana", - name: "Nano-Banana", - family: "nano-banana", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 0.21, output: 1.8, cache_read: 0.021 }, - limit: { context: 65536, output: 0 }, - }, - "google/gemini-2.5-flash": { - id: "google/gemini-2.5-flash", - name: "Gemini-2.5-Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-04-26", - last_updated: "2025-04-26", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.21, output: 1.8, cache_read: 0.021 }, - limit: { context: 1065535, output: 65535 }, - }, - "google/gemini-3.1-flash-lite": { - id: "google/gemini-3.1-flash-lite", - name: "Gemini-3.1-Flash-Lite", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-02-18", - last_updated: "2026-02-18", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-3-flash": { - id: "google/gemini-3-flash", - name: "Gemini-3-Flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-10-07", - last_updated: "2025-10-07", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2.4, cache_read: 0.04 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/veo-3.1": { - id: "google/veo-3.1", - name: "Veo-3.1", - family: "veo", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text"], output: ["video"] }, - open_weights: false, - limit: { context: 480, output: 0 }, - }, - "google/lyria": { - id: "google/lyria", - name: "Lyria", - family: "lyria", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-06-04", - last_updated: "2025-06-04", - modalities: { input: ["text"], output: ["audio"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "google/imagen-4-ultra": { - id: "google/imagen-4-ultra", - name: "Imagen-4-Ultra", - family: "imagen", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-05-24", - last_updated: "2025-05-24", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 480, output: 0 }, - }, - "google/nano-banana-pro": { - id: "google/nano-banana-pro", - name: "Nano-Banana-Pro", - family: "nano-banana", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2 }, - limit: { context: 65536, output: 0 }, - }, - "google/gemini-3-pro": { - id: "google/gemini-3-pro", - name: "Gemini-3-Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-10-22", - last_updated: "2025-10-22", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 1.6, output: 9.6, cache_read: 0.16 }, - limit: { context: 1048576, output: 65536 }, - status: "deprecated", - }, - "google/imagen-4-fast": { - id: "google/imagen-4-fast", - name: "Imagen-4-Fast", - family: "imagen", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-06-25", - last_updated: "2025-06-25", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 480, output: 0 }, - }, - "google/veo-3": { - id: "google/veo-3", - name: "Veo-3", - family: "veo", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-05-21", - last_updated: "2025-05-21", - modalities: { input: ["text"], output: ["video"] }, - open_weights: false, - limit: { context: 480, output: 0 }, - }, - "google/gemini-2.5-flash-lite": { - id: "google/gemini-2.5-flash-lite", - name: "Gemini-2.5-Flash-Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-06-19", - last_updated: "2025-06-19", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.28 }, - limit: { context: 1024000, output: 64000 }, - }, - "google/imagen-4": { - id: "google/imagen-4", - name: "Imagen-4", - family: "imagen", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 480, output: 0 }, - }, - "google/gemma-4-31b": { - id: "google/gemma-4-31b", - name: "Gemma-4-31B", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 8192 }, - }, - "google/gemini-2.0-flash-lite": { - id: "google/gemini-2.0-flash-lite", - name: "Gemini-2.0-Flash-Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-02-05", - last_updated: "2025-02-05", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.052, output: 0.21 }, - limit: { context: 990000, output: 8192 }, - }, - "google/veo-2": { - id: "google/veo-2", - name: "Veo-2", - family: "veo", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-12-02", - last_updated: "2024-12-02", - modalities: { input: ["text"], output: ["video"] }, - open_weights: false, - limit: { context: 480, output: 0 }, - }, - "lumalabs/ray2": { - id: "lumalabs/ray2", - name: "Ray2", - family: "ray", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-02-20", - last_updated: "2025-02-20", - modalities: { input: ["text", "image"], output: ["video"] }, - open_weights: false, - limit: { context: 5000, output: 0 }, - }, - "anthropic/claude-opus-4.1": { - id: "anthropic/claude-opus-4.1", - name: "Claude-Opus-4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 13, output: 64, cache_read: 1.3, cache_write: 16 }, - limit: { context: 196608, output: 32000 }, - }, - "anthropic/claude-sonnet-3.5": { - id: "anthropic/claude-sonnet-3.5", - name: "Claude-Sonnet-3.5", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-06-05", - last_updated: "2024-06-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.6, output: 13, cache_read: 0.26, cache_write: 3.2 }, - limit: { context: 189096, output: 8192 }, - status: "deprecated", - }, - "anthropic/claude-haiku-3": { - id: "anthropic/claude-haiku-3", - name: "Claude-Haiku-3", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-03-09", - last_updated: "2024-03-09", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.21, output: 1.1, cache_read: 0.021, cache_write: 0.26 }, - limit: { context: 189096, output: 8192 }, - }, - "anthropic/claude-opus-4.6": { - id: "anthropic/claude-opus-4.6", - name: "Claude-Opus-4.6", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-02-04", - last_updated: "2026-02-04", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 4.3, output: 21, cache_read: 0.43, cache_write: 5.3 }, - limit: { context: 983040, output: 128000 }, - }, - "anthropic/claude-opus-4.7": { - id: "anthropic/claude-opus-4.7", - name: "Claude-Opus-4.7", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-04-15", - last_updated: "2026-04-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 4.3, output: 21, cache_read: 0.43, cache_write: 5.4 }, - limit: { context: 1048576, output: 128000 }, - }, - "anthropic/claude-sonnet-4": { - id: "anthropic/claude-sonnet-4", - name: "Claude-Sonnet-4", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-05-21", - last_updated: "2025-05-21", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.6, output: 13, cache_read: 0.26, cache_write: 3.2 }, - limit: { context: 983040, output: 64000 }, - }, - "anthropic/claude-sonnet-4.5": { - id: "anthropic/claude-sonnet-4.5", - name: "Claude-Sonnet-4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-09-26", - last_updated: "2025-09-26", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.6, output: 13, cache_read: 0.26, cache_write: 3.2 }, - limit: { context: 983040, output: 32768 }, - }, - "anthropic/claude-opus-4.5": { - id: "anthropic/claude-opus-4.5", - name: "Claude-Opus-4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-11-21", - last_updated: "2025-11-21", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 4.3, output: 21, cache_read: 0.43, cache_write: 5.3 }, - limit: { context: 196608, output: 64000 }, - }, - "anthropic/claude-sonnet-3.7": { - id: "anthropic/claude-sonnet-3.7", - name: "Claude-Sonnet-3.7", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.6, output: 13, cache_read: 0.26, cache_write: 3.2 }, - limit: { context: 196608, output: 128000 }, - }, - "anthropic/claude-opus-4": { - id: "anthropic/claude-opus-4", - name: "Claude-Opus-4", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-05-21", - last_updated: "2025-05-21", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 13, output: 64, cache_read: 1.3, cache_write: 16 }, - limit: { context: 192512, output: 28672 }, - }, - "anthropic/claude-haiku-3.5": { - id: "anthropic/claude-haiku-3.5", - name: "Claude-Haiku-3.5", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-10-01", - last_updated: "2024-10-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.68, output: 3.4, cache_read: 0.068, cache_write: 0.85 }, - limit: { context: 189096, output: 8192 }, - }, - "anthropic/claude-haiku-4.5": { - id: "anthropic/claude-haiku-4.5", - name: "Claude-Haiku-4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.85, output: 4.3, cache_read: 0.085, cache_write: 1.1 }, - limit: { context: 192000, output: 64000 }, - }, - "anthropic/claude-sonnet-3.5-june": { - id: "anthropic/claude-sonnet-3.5-june", - name: "Claude-Sonnet-3.5-June", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-11-18", - last_updated: "2024-11-18", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.6, output: 13, cache_read: 0.26, cache_write: 3.2 }, - limit: { context: 189096, output: 8192 }, - status: "deprecated", - }, - "anthropic/claude-sonnet-4.6": { - id: "anthropic/claude-sonnet-4.6", - name: "Claude-Sonnet-4.6", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.6, output: 13, cache_read: 0.26, cache_write: 3.2 }, - limit: { context: 983040, output: 128000 }, - }, - "ideogramai/ideogram": { - id: "ideogramai/ideogram", - name: "Ideogram", - family: "ideogram", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-04-03", - last_updated: "2024-04-03", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - limit: { context: 150, output: 0 }, - }, - "ideogramai/ideogram-v2": { - id: "ideogramai/ideogram-v2", - name: "Ideogram-v2", - family: "ideogram", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-08-21", - last_updated: "2024-08-21", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - limit: { context: 150, output: 0 }, - }, - "ideogramai/ideogram-v2a-turbo": { - id: "ideogramai/ideogram-v2a-turbo", - name: "Ideogram-v2a-Turbo", - family: "ideogram", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-02-27", - last_updated: "2025-02-27", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 150, output: 0 }, - }, - "ideogramai/ideogram-v2a": { - id: "ideogramai/ideogram-v2a", - name: "Ideogram-v2a", - family: "ideogram", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2025-02-27", - last_updated: "2025-02-27", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 150, output: 0 }, - }, - "trytako/tako": { - id: "trytako/tako", - name: "Tako", - family: "tako", - attachment: true, - reasoning: false, - tool_call: true, - temperature: false, - release_date: "2024-08-15", - last_updated: "2024-08-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 2048, output: 0 }, - }, - "poetools/claude-code": { - id: "poetools/claude-code", - name: "claude-code", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2025-11-27", - last_updated: "2025-11-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "openai/gpt-5.5": { - id: "openai/gpt-5.5", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-08", - last_updated: "2026-04-08", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 4.5455, output: 27.2727, cache_read: 0.4545 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.5-pro": { - id: "openai/gpt-5.5-pro", - name: "GPT-5.5-Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-08", - last_updated: "2026-04-08", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 27.2727, output: 163.6364 }, - limit: { context: 400000, output: 128000 }, - }, - }, - }, - helicone: { - id: "helicone", - env: ["HELICONE_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://ai-gateway.helicone.ai/v1", - name: "Helicone", - doc: "https://helicone.ai/models", - models: { - "mistral-nemo": { - id: "mistral-nemo", - name: "Mistral Nemo", - family: "mistral-nemo", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-07", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 20, output: 40 }, - limit: { context: 128000, output: 16400 }, - }, - "grok-4-1-fast-reasoning": { - id: "grok-4-1-fast-reasoning", - name: "xAI Grok 4.1 Fast Reasoning", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-11", - release_date: "2025-11-17", - last_updated: "2025-11-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.19999999999999998, output: 0.5, cache_read: 0.049999999999999996 }, - limit: { context: 2000000, output: 2000000 }, - }, - "gemma2-9b-it": { - id: "gemma2-9b-it", - name: "Google Gemma 2", - family: "gemma", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-06", - release_date: "2024-06-25", - last_updated: "2024-06-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.01, output: 0.03 }, - limit: { context: 8192, output: 8192 }, - }, - "llama-3.3-70b-instruct": { - id: "llama-3.3-70b-instruct", - name: "Meta Llama 3.3 70B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.13, output: 0.39 }, - limit: { context: 128000, output: 16400 }, - }, - "llama-4-scout": { - id: "llama-4-scout", - name: "Meta Llama 4 Scout 17B 16E", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.08, output: 0.3 }, - limit: { context: 131072, output: 8192 }, - }, - "chatgpt-4o-latest": { - id: "chatgpt-4o-latest", - name: "OpenAI ChatGPT-4o", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2024-08-14", - last_updated: "2024-08-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 20, cache_read: 2.5 }, - limit: { context: 128000, output: 16384 }, - }, - "claude-3.5-sonnet-v2": { - id: "claude-3.5-sonnet-v2", - name: "Anthropic: Claude 3.5 Sonnet v2", - family: "claude-sonnet", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.30000000000000004, cache_write: 3.75 }, - limit: { context: 200000, output: 8192 }, - }, - "hermes-2-pro-llama-3-8b": { - id: "hermes-2-pro-llama-3-8b", - name: "Hermes 2 Pro Llama 3 8B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-05", - release_date: "2024-05-27", - last_updated: "2024-05-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.14 }, - limit: { context: 131072, output: 131072 }, - }, - "claude-3.7-sonnet": { - id: "claude-3.7-sonnet", - name: "Anthropic: Claude 3.7 Sonnet", - family: "claude-sonnet", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-02", - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.30000000000000004, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "llama-prompt-guard-2-22m": { - id: "llama-prompt-guard-2-22m", - name: "Meta Llama Prompt Guard 2 22M", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2024-10-01", - last_updated: "2024-10-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.01, output: 0.01 }, - limit: { context: 512, output: 2 }, - }, - "o1-mini": { - id: "o1-mini", - name: "OpenAI: o1-mini", - family: "o-mini", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.55 }, - limit: { context: 128000, output: 65536 }, - }, - "gpt-4.1-mini-2025-04-14": { - id: "gpt-4.1-mini-2025-04-14", - name: "OpenAI GPT-4.1 Mini", - family: "gpt-mini", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.39999999999999997, output: 1.5999999999999999, cache_read: 0.09999999999999999 }, - limit: { context: 1047576, output: 32768 }, - }, - "deepseek-r1-distill-llama-70b": { - id: "deepseek-r1-distill-llama-70b", - name: "DeepSeek R1 Distill Llama 70B", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.03, output: 0.13 }, - limit: { context: 128000, output: 4096 }, - }, - "qwen3-32b": { - id: "qwen3-32b", - name: "Qwen3 32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04-28", - last_updated: "2025-04-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.29, output: 0.59 }, - limit: { context: 131072, output: 40960 }, - }, - "llama-3.3-70b-versatile": { - id: "llama-3.3-70b-versatile", - name: "Meta Llama 3.3 70B Versatile", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.59, output: 0.7899999999999999 }, - limit: { context: 131072, output: 32678 }, - }, - "gpt-5-mini": { - id: "gpt-5-mini", - name: "OpenAI GPT-5 Mini", - family: "gpt-mini", - attachment: false, - reasoning: false, - tool_call: true, - temperature: false, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.024999999999999998 }, - limit: { context: 400000, output: 128000 }, - }, - "gpt-5-nano": { - id: "gpt-5-nano", - name: "OpenAI GPT-5 Nano", - family: "gpt-nano", - attachment: false, - reasoning: false, - tool_call: true, - temperature: false, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.049999999999999996, output: 0.39999999999999997, cache_read: 0.005 }, - limit: { context: 400000, output: 128000 }, - }, - "gemini-3-pro-preview": { - id: "gemini-3-pro-preview", - name: "Google Gemini 3 Pro Preview", - family: "gemini-pro", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-11", - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.19999999999999998 }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-3-haiku-20240307": { - id: "claude-3-haiku-20240307", - name: "Anthropic: Claude 3 Haiku", - family: "claude-haiku", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2024-03-07", - last_updated: "2024-03-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.25, cache_read: 0.03, cache_write: 0.3 }, - limit: { context: 200000, output: 4096 }, - }, - "llama-4-maverick": { - id: "llama-4-maverick", - name: "Meta Llama 4 Maverick 17B 128E", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 131072, output: 8192 }, - }, - "claude-sonnet-4-5-20250929": { - id: "claude-sonnet-4-5-20250929", - name: "Anthropic: Claude Sonnet 4.5 (20250929)", - family: "claude-sonnet", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.30000000000000004, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "gemini-2.5-pro": { - id: "gemini-2.5-pro", - name: "Google Gemini 2.5 Pro", - family: "gemini-pro", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.3125, cache_write: 1.25 }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-4.5-opus": { - id: "claude-4.5-opus", - name: "Anthropic: Claude Opus 4.5", - family: "claude-opus", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-11", - release_date: "2025-11-24", - last_updated: "2025-11-24", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - }, - "grok-4-1-fast-non-reasoning": { - id: "grok-4-1-fast-non-reasoning", - name: "xAI Grok 4.1 Fast Non-Reasoning", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-11", - release_date: "2025-11-17", - last_updated: "2025-11-17", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 0.19999999999999998, output: 0.5, cache_read: 0.049999999999999996 }, - limit: { context: 2000000, output: 30000 }, - }, - "sonar-pro": { - id: "sonar-pro", - name: "Perplexity Sonar Pro", - family: "sonar-pro", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-27", - last_updated: "2025-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 4096 }, - }, - "mistral-large-2411": { - id: "mistral-large-2411", - name: "Mistral-Large", - family: "mistral-large", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-07-24", - last_updated: "2024-07-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6 }, - limit: { context: 128000, output: 32768 }, - }, - "o3-pro": { - id: "o3-pro", - name: "OpenAI o3 Pro", - family: "o-pro", - attachment: false, - reasoning: false, - tool_call: true, - temperature: false, - knowledge: "2024-06", - release_date: "2024-06-01", - last_updated: "2024-06-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 20, output: 80 }, - limit: { context: 200000, output: 100000 }, - }, - "claude-opus-4-1": { - id: "claude-opus-4-1", - name: "Anthropic: Claude Opus 4.1", - family: "claude-opus", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "gpt-4o-mini": { - id: "gpt-4o-mini", - name: "OpenAI GPT-4o-mini", - family: "gpt-mini", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.075 }, - limit: { context: 128000, output: 16384 }, - }, - "claude-4.5-haiku": { - id: "claude-4.5-haiku", - name: "Anthropic: Claude 4.5 Haiku", - family: "claude-haiku", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-10", - release_date: "2025-10-01", - last_updated: "2025-10-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.09999999999999999, cache_write: 1.25 }, - limit: { context: 200000, output: 8192 }, - }, - "kimi-k2-0711": { - id: "kimi-k2-0711", - name: "Kimi K2 (07/11)", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5700000000000001, output: 2.3 }, - limit: { context: 131072, output: 16384 }, - }, - "o4-mini": { - id: "o4-mini", - name: "OpenAI o4 Mini", - family: "o-mini", - attachment: false, - reasoning: false, - tool_call: true, - temperature: false, - knowledge: "2024-06", - release_date: "2024-06-01", - last_updated: "2024-06-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.275 }, - limit: { context: 200000, output: 100000 }, - }, - "sonar-deep-research": { - id: "sonar-deep-research", - name: "Perplexity Sonar Deep Research", - family: "sonar-deep-research", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-27", - last_updated: "2025-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8 }, - limit: { context: 127000, output: 4096 }, - }, - "gemma-3-12b-it": { - id: "gemma-3-12b-it", - name: "Google Gemma 3 12B", - family: "gemma", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-12", - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.049999999999999996, output: 0.09999999999999999 }, - limit: { context: 131072, output: 8192 }, - }, - "gemini-2.5-flash": { - id: "gemini-2.5-flash", - name: "Google Gemini 2.5 Flash", - family: "gemini-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.075, cache_write: 0.3 }, - limit: { context: 1048576, output: 65535 }, - }, - "deepseek-tng-r1t2-chimera": { - id: "deepseek-tng-r1t2-chimera", - name: "DeepSeek TNG R1T2 Chimera", - family: "deepseek-thinking", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-02", - last_updated: "2025-07-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 130000, output: 163840 }, - }, - "gpt-5.1-codex-mini": { - id: "gpt-5.1-codex-mini", - name: "OpenAI: GPT-5.1 Codex Mini", - family: "gpt-codex", - attachment: false, - reasoning: false, - tool_call: true, - temperature: false, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.024999999999999998 }, - limit: { context: 400000, output: 128000 }, - }, - "claude-sonnet-4": { - id: "claude-sonnet-4", - name: "Anthropic: Claude Sonnet 4", - family: "claude-sonnet", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-05-14", - last_updated: "2025-05-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.30000000000000004, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "grok-code-fast-1": { - id: "grok-code-fast-1", - name: "xAI Grok Code Fast 1", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2024-08-25", - last_updated: "2024-08-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.19999999999999998, output: 1.5, cache_read: 0.02 }, - limit: { context: 256000, output: 10000 }, - }, - "gpt-5.1": { - id: "gpt-5.1", - name: "OpenAI GPT-5.1", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: true, - temperature: false, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.12500000000000003 }, - limit: { context: 400000, output: 128000 }, - }, - "deepseek-reasoner": { - id: "deepseek-reasoner", - name: "DeepSeek Reasoner", - family: "deepseek-thinking", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.56, output: 1.68, cache_read: 0.07 }, - limit: { context: 128000, output: 64000 }, - }, - "grok-4-fast-reasoning": { - id: "grok-4-fast-reasoning", - name: "xAI: Grok 4 Fast Reasoning", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-09-01", - last_updated: "2025-09-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.19999999999999998, output: 0.5, cache_read: 0.049999999999999996 }, - limit: { context: 2000000, output: 2000000 }, - }, - o1: { - id: "o1", - name: "OpenAI: o1", - family: "o", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 60, cache_read: 7.5 }, - limit: { context: 200000, output: 100000 }, - }, - "llama-3.1-8b-instant": { - id: "llama-3.1-8b-instant", - name: "Meta Llama 3.1 8B Instant", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.049999999999999996, output: 0.08 }, - limit: { context: 131072, output: 32678 }, - }, - "o3-mini": { - id: "o3-mini", - name: "OpenAI o3 Mini", - family: "o-mini", - attachment: false, - reasoning: false, - tool_call: true, - temperature: false, - knowledge: "2023-10", - release_date: "2023-10-01", - last_updated: "2023-10-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.55 }, - limit: { context: 200000, output: 100000 }, - }, - sonar: { - id: "sonar", - name: "Perplexity Sonar", - family: "sonar", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-27", - last_updated: "2025-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 1 }, - limit: { context: 127000, output: 4096 }, - }, - "kimi-k2-0905": { - id: "kimi-k2-0905", - name: "Kimi K2 (09/05)", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 2, cache_read: 0.39999999999999997 }, - limit: { context: 262144, output: 16384 }, - }, - "mistral-small": { - id: "mistral-small", - name: "Mistral Small", - family: "mistral-small", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-02", - release_date: "2024-02-26", - last_updated: "2024-02-26", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 75, output: 200 }, - limit: { context: 128000, output: 128000 }, - }, - "qwen3-30b-a3b": { - id: "qwen3-30b-a3b", - name: "Qwen3 30B A3B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-06-01", - last_updated: "2025-06-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.08, output: 0.29 }, - limit: { context: 41000, output: 41000 }, - }, - "grok-4": { - id: "grok-4", - name: "xAI Grok 4", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-07-09", - last_updated: "2024-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75 }, - limit: { context: 256000, output: 256000 }, - }, - "qwen3-235b-a22b-thinking": { - id: "qwen3-235b-a22b-thinking", - name: "Qwen3 235B A22B Thinking", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-25", - last_updated: "2025-07-25", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.9000000000000004 }, - limit: { context: 262144, output: 81920 }, - }, - "qwen2.5-coder-7b-fast": { - id: "qwen2.5-coder-7b-fast", - name: "Qwen2.5 Coder 7B fast", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-09", - release_date: "2024-09-15", - last_updated: "2024-09-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.03, output: 0.09 }, - limit: { context: 32000, output: 8192 }, - }, - "llama-3.1-8b-instruct-turbo": { - id: "llama-3.1-8b-instruct-turbo", - name: "Meta Llama 3.1 8B Instruct Turbo", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.02, output: 0.03 }, - limit: { context: 128000, output: 128000 }, - }, - "qwen3-next-80b-a3b-instruct": { - id: "qwen3-next-80b-a3b-instruct", - name: "Qwen3 Next 80B A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 1.4 }, - limit: { context: 262000, output: 16384 }, - }, - "glm-4.6": { - id: "glm-4.6", - name: "Zai GLM-4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.44999999999999996, output: 1.5 }, - limit: { context: 204800, output: 131072 }, - }, - "gpt-5-codex": { - id: "gpt-5-codex", - name: "OpenAI: GPT-5 Codex", - family: "gpt-codex", - attachment: false, - reasoning: false, - tool_call: true, - temperature: false, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.12500000000000003 }, - limit: { context: 400000, output: 128000 }, - }, - "claude-opus-4-1-20250805": { - id: "claude-opus-4-1-20250805", - name: "Anthropic: Claude Opus 4.1 (20250805)", - family: "claude-opus", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "gpt-5.1-chat-latest": { - id: "gpt-5.1-chat-latest", - name: "OpenAI GPT-5.1 Chat", - family: "gpt-codex", - attachment: false, - reasoning: false, - tool_call: true, - temperature: false, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.12500000000000003 }, - limit: { context: 128000, output: 16384 }, - }, - "claude-haiku-4-5-20251001": { - id: "claude-haiku-4-5-20251001", - name: "Anthropic: Claude 4.5 Haiku (20251001)", - family: "claude-haiku", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-10", - release_date: "2025-10-01", - last_updated: "2025-10-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.09999999999999999, cache_write: 1.25 }, - limit: { context: 200000, output: 8192 }, - }, - "sonar-reasoning": { - id: "sonar-reasoning", - name: "Perplexity Sonar Reasoning", - family: "sonar-reasoning", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-27", - last_updated: "2025-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5 }, - limit: { context: 127000, output: 4096 }, - }, - "claude-opus-4": { - id: "claude-opus-4", - name: "Anthropic: Claude Opus 4", - family: "claude-opus", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-05-14", - last_updated: "2025-05-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "llama-prompt-guard-2-86m": { - id: "llama-prompt-guard-2-86m", - name: "Meta Llama Prompt Guard 2 86M", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2024-10-01", - last_updated: "2024-10-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.01, output: 0.01 }, - limit: { context: 512, output: 2 }, - }, - "gpt-4.1-nano": { - id: "gpt-4.1-nano", - name: "OpenAI GPT-4.1 Nano", - family: "gpt-nano", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09999999999999999, output: 0.39999999999999997, cache_read: 0.024999999999999998 }, - limit: { context: 1047576, output: 32768 }, - }, - "qwen3-coder-30b-a3b-instruct": { - id: "qwen3-coder-30b-a3b-instruct", - name: "Qwen3 Coder 30B A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-31", - last_updated: "2025-07-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09999999999999999, output: 0.3 }, - limit: { context: 262144, output: 262144 }, - }, - "claude-3.5-haiku": { - id: "claude-3.5-haiku", - name: "Anthropic: Claude 3.5 Haiku", - family: "claude-haiku", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7999999999999999, output: 4, cache_read: 0.08, cache_write: 1 }, - limit: { context: 200000, output: 8192 }, - }, - "grok-3-mini": { - id: "grok-3-mini", - name: "xAI Grok 3 Mini", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-06-01", - last_updated: "2024-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.5, cache_read: 0.075 }, - limit: { context: 131072, output: 131072 }, - }, - o3: { - id: "o3", - name: "OpenAI o3", - family: "o", - attachment: false, - reasoning: false, - tool_call: true, - temperature: false, - knowledge: "2024-06", - release_date: "2024-06-01", - last_updated: "2024-06-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 200000, output: 100000 }, - }, - "deepseek-v3.2": { - id: "deepseek-v3.2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-09-22", - last_updated: "2025-09-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 0.41 }, - limit: { context: 163840, output: 65536 }, - }, - "gpt-oss-20b": { - id: "gpt-oss-20b", - name: "OpenAI GPT-OSS 20b", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-06-01", - last_updated: "2024-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.049999999999999996, output: 0.19999999999999998 }, - limit: { context: 131072, output: 131072 }, - }, - "gpt-5-pro": { - id: "gpt-5-pro", - name: "OpenAI: GPT-5 Pro", - family: "gpt-pro", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 120 }, - limit: { context: 128000, output: 32768 }, - }, - "llama-guard-4": { - id: "llama-guard-4", - name: "Meta Llama Guard 4 12B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.21, output: 0.21 }, - limit: { context: 131072, output: 1024 }, - }, - "gpt-4o": { - id: "gpt-4o", - name: "OpenAI GPT-4o", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-05", - release_date: "2024-05-13", - last_updated: "2024-05-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10, cache_read: 1.25 }, - limit: { context: 128000, output: 16384 }, - }, - "qwen3-vl-235b-a22b-instruct": { - id: "qwen3-vl-235b-a22b-instruct", - name: "Qwen3 VL 235B A22B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.5 }, - limit: { context: 256000, output: 16384 }, - }, - "gemini-2.5-flash-lite": { - id: "gemini-2.5-flash-lite", - name: "Google Gemini 2.5 Flash Lite", - family: "gemini-flash-lite", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-22", - last_updated: "2025-07-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { - input: 0.09999999999999999, - output: 0.39999999999999997, - cache_read: 0.024999999999999998, - cache_write: 0.09999999999999999, - }, - limit: { context: 1048576, output: 65535 }, - }, - "qwen3-coder": { - id: "qwen3-coder", - name: "Qwen3 Coder 480B A35B Instruct Turbo", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.22, output: 0.95 }, - limit: { context: 262144, output: 16384 }, - }, - "gpt-5": { - id: "gpt-5", - name: "OpenAI GPT-5", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: true, - temperature: false, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.12500000000000003 }, - limit: { context: 400000, output: 128000 }, - }, - "ernie-4.5-21b-a3b-thinking": { - id: "ernie-4.5-21b-a3b-thinking", - name: "Baidu Ernie 4.5 21B A3B Thinking", - family: "ernie", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-03", - release_date: "2025-03-16", - last_updated: "2025-03-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.28 }, - limit: { context: 128000, output: 8000 }, - }, - "gpt-oss-120b": { - id: "gpt-oss-120b", - name: "OpenAI GPT-OSS 120b", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-06-01", - last_updated: "2024-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.04, output: 0.16 }, - limit: { context: 131072, output: 131072 }, - }, - "gpt-5-chat-latest": { - id: "gpt-5-chat-latest", - name: "OpenAI GPT-5 Chat Latest", - family: "gpt-codex", - attachment: false, - reasoning: false, - tool_call: true, - temperature: false, - knowledge: "2024-09", - release_date: "2024-09-30", - last_updated: "2024-09-30", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.12500000000000003 }, - limit: { context: 128000, output: 16384 }, - }, - "claude-4.5-sonnet": { - id: "claude-4.5-sonnet", - name: "Anthropic: Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.30000000000000004, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "deepseek-v3": { - id: "deepseek-v3", - name: "DeepSeek V3", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2024-12-26", - last_updated: "2024-12-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.56, output: 1.68, cache_read: 0.07 }, - limit: { context: 128000, output: 8192 }, - }, - "llama-3.1-8b-instruct": { - id: "llama-3.1-8b-instruct", - name: "Meta Llama 3.1 8B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.02, output: 0.049999999999999996 }, - limit: { context: 16384, output: 16384 }, - }, - "gpt-4.1": { - id: "gpt-4.1", - name: "OpenAI GPT-4.1", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 1047576, output: 32768 }, - }, - "kimi-k2-thinking": { - id: "kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-11", - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.48, output: 2 }, - limit: { context: 256000, output: 262144 }, - }, - "gpt-4.1-mini": { - id: "gpt-4.1-mini", - name: "OpenAI GPT-4.1 Mini", - family: "gpt-mini", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.39999999999999997, output: 1.5999999999999999, cache_read: 0.09999999999999999 }, - limit: { context: 1047576, output: 32768 }, - }, - "deepseek-v3.1-terminus": { - id: "deepseek-v3.1-terminus", - name: "DeepSeek V3.1 Terminus", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-09-22", - last_updated: "2025-09-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 1, cache_read: 0.21600000000000003 }, - limit: { context: 128000, output: 16384 }, - }, - "gpt-5.1-codex": { - id: "gpt-5.1-codex", - name: "OpenAI: GPT-5.1 Codex", - family: "gpt-codex", - attachment: false, - reasoning: false, - tool_call: true, - temperature: false, - knowledge: "2025-01", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.12500000000000003 }, - limit: { context: 400000, output: 128000 }, - }, - "grok-3": { - id: "grok-3", - name: "xAI Grok 3", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-06-01", - last_updated: "2024-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75 }, - limit: { context: 131072, output: 131072 }, - }, - "grok-4-fast-non-reasoning": { - id: "grok-4-fast-non-reasoning", - name: "xAI Grok 4 Fast Non-Reasoning", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text", "image", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.19999999999999998, output: 0.5, cache_read: 0.049999999999999996 }, - limit: { context: 2000000, output: 2000000 }, - }, - "sonar-reasoning-pro": { - id: "sonar-reasoning-pro", - name: "Perplexity Sonar Reasoning Pro", - family: "sonar-reasoning", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-27", - last_updated: "2025-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8 }, - limit: { context: 127000, output: 4096 }, - }, - }, - }, - "ollama-cloud": { - id: "ollama-cloud", - env: ["OLLAMA_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://ollama.com/v1", - name: "Ollama Cloud", - doc: "https://docs.ollama.com/cloud", - models: { - "minimax-m2.7": { - id: "minimax-m2.7", - name: "minimax-m2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 196608, output: 196608 }, - }, - "gpt-oss:20b": { - id: "gpt-oss:20b", - name: "gpt-oss:20b", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2025-08-05", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 131072, output: 32768 }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "kimi-k2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 262144 }, - }, - "glm-4.7": { - id: "glm-4.7", - name: "glm-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2025-12-22", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 202752, output: 131072 }, - }, - "gemma4:31b": { - id: "gemma4:31b", - name: "gemma4:31b", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - knowledge: "2025-01", - release_date: "2026-04-02", - last_updated: "2026-04-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 262144 }, - }, - "gpt-oss:120b": { - id: "gpt-oss:120b", - name: "gpt-oss:120b", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2025-08-05", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 131072, output: 32768 }, - }, - "qwen3.5:397b": { - id: "qwen3.5:397b", - name: "qwen3.5:397b", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - release_date: "2026-02-15", - last_updated: "2026-02-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 65536 }, - }, - "deepseek-v3.1:671b": { - id: "deepseek-v3.1:671b", - name: "deepseek-v3.1:671b", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2025-08-21", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 163840, output: 163840 }, - }, - "glm-5": { - id: "glm-5", - name: "glm-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 202752, output: 131072 }, - }, - "qwen3-vl:235b-instruct": { - id: "qwen3-vl:235b-instruct", - name: "qwen3-vl:235b-instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - release_date: "2025-09-22", - last_updated: "2026-01-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 131072 }, - }, - "gemma3:4b": { - id: "gemma3:4b", - name: "gemma3:4b", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - release_date: "2024-12-01", - last_updated: "2026-01-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 131072, output: 131072 }, - }, - "gemini-3-flash-preview": { - id: "gemini-3-flash-preview", - name: "gemini-3-flash-preview", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - knowledge: "2025-01", - release_date: "2025-12-17", - last_updated: "2026-04-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 1048576, output: 65536 }, - }, - "ministral-3:14b": { - id: "ministral-3:14b", - name: "ministral-3:14b", - family: "ministral", - attachment: true, - reasoning: false, - tool_call: true, - release_date: "2024-12-01", - last_updated: "2026-01-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 128000 }, - }, - "minimax-m2": { - id: "minimax-m2", - name: "minimax-m2", - family: "minimax", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2025-10-23", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 204800, output: 128000 }, - }, - "qwen3-next:80b": { - id: "qwen3-next:80b", - name: "qwen3-next:80b", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2025-09-15", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 32768 }, - }, - "qwen3-vl:235b": { - id: "qwen3-vl:235b", - name: "qwen3-vl:235b", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - release_date: "2025-09-22", - last_updated: "2026-01-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 32768 }, - }, - "rnj-1:8b": { - id: "rnj-1:8b", - name: "rnj-1:8b", - family: "rnj", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2025-12-06", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 32768, output: 4096 }, - }, - "minimax-m2.1": { - id: "minimax-m2.1", - name: "minimax-m2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2025-12-23", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 204800, output: 131072 }, - }, - "glm-5.1": { - id: "glm-5.1", - name: "glm-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - release_date: "2026-03-27", - last_updated: "2026-04-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 202752, output: 131072 }, - }, - "mistral-large-3:675b": { - id: "mistral-large-3:675b", - name: "mistral-large-3:675b", - family: "mistral-large", - attachment: true, - reasoning: false, - tool_call: true, - release_date: "2025-12-02", - last_updated: "2026-01-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 262144 }, - }, - "ministral-3:8b": { - id: "ministral-3:8b", - name: "ministral-3:8b", - family: "ministral", - attachment: true, - reasoning: false, - tool_call: true, - release_date: "2024-12-01", - last_updated: "2026-01-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 128000 }, - }, - "gemma3:12b": { - id: "gemma3:12b", - name: "gemma3:12b", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - release_date: "2024-12-01", - last_updated: "2026-01-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 131072, output: 131072 }, - }, - "qwen3-coder:480b": { - id: "qwen3-coder:480b", - name: "qwen3-coder:480b", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2025-07-22", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 65536 }, - }, - "kimi-k2.6:cloud": { - id: "kimi-k2.6:cloud", - name: "kimi-k2.6:cloud", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - release_date: "2026-04-20", - last_updated: "2026-04-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 262144 }, - }, - "nemotron-3-nano:30b": { - id: "nemotron-3-nano:30b", - name: "nemotron-3-nano:30b", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2025-12-15", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 1048576, output: 131072 }, - }, - "deepseek-v4-flash": { - id: "deepseek-v4-flash", - name: "deepseek-v4-flash", - family: "deepseek-flash", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 1048576, output: 1048576 }, - }, - "glm-4.6": { - id: "glm-4.6", - name: "glm-4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2025-09-29", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 202752, output: 131072 }, - }, - "ministral-3:3b": { - id: "ministral-3:3b", - name: "ministral-3:3b", - family: "ministral", - attachment: true, - reasoning: false, - tool_call: true, - release_date: "2024-10-22", - last_updated: "2026-01-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 128000 }, - }, - "gemma3:27b": { - id: "gemma3:27b", - name: "gemma3:27b", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - release_date: "2025-07-27", - last_updated: "2026-01-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 131072, output: 131072 }, - }, - "devstral-2:123b": { - id: "devstral-2:123b", - name: "devstral-2:123b", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2025-12-09", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 262144 }, - }, - "cogito-2.1:671b": { - id: "cogito-2.1:671b", - name: "cogito-2.1:671b", - family: "cogito", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2025-11-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 163840, output: 32000 }, - }, - "qwen3-coder-next": { - id: "qwen3-coder-next", - name: "qwen3-coder-next", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2026-02-02", - last_updated: "2026-02-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 65536 }, - }, - "nemotron-3-super": { - id: "nemotron-3-super", - name: "nemotron-3-super", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2026-03-11", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 65536 }, - }, - "deepseek-v4-pro": { - id: "deepseek-v4-pro", - name: "deepseek-v4-pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 1048576, output: 1048576 }, - }, - "minimax-m2.5": { - id: "minimax-m2.5", - name: "minimax-m2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - knowledge: "2025-01", - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 204800, output: 131072 }, - }, - "deepseek-v3.2": { - id: "deepseek-v3.2", - name: "deepseek-v3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2025-06-15", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 163840, output: 65536 }, - }, - "kimi-k2-thinking": { - id: "kimi-k2-thinking", - name: "kimi-k2-thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 262144 }, - }, - "devstral-small-2:24b": { - id: "devstral-small-2:24b", - name: "devstral-small-2:24b", - family: "devstral", - attachment: true, - reasoning: false, - tool_call: true, - release_date: "2025-12-09", - last_updated: "2026-01-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 262144 }, - }, - "kimi-k2:1t": { - id: "kimi-k2:1t", - name: "kimi-k2:1t", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - knowledge: "2024-10", - release_date: "2025-07-11", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 262144 }, - }, - }, - }, - "zai-coding-plan": { - id: "zai-coding-plan", - env: ["ZHIPU_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.z.ai/api/coding/paas/v4", - name: "Z.AI Coding Plan", - doc: "https://docs.z.ai/devpack/overview", - models: { - "glm-4.7": { - id: "glm-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "glm-5.1": { - id: "glm-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-03-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "glm-4.5-air": { - id: "glm-4.5-air", - name: "GLM-4.5-Air", - family: "glm-air", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 131072, output: 98304 }, - }, - "glm-5-turbo": { - id: "glm-5-turbo", - name: "GLM-5-Turbo", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-16", - last_updated: "2026-03-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "glm-5v-turbo": { - id: "glm-5v-turbo", - name: "GLM-5V-Turbo", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-01", - modalities: { input: ["text", "image", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - }, - }, - "amazon-bedrock": { - id: "amazon-bedrock", - env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_REGION", "AWS_BEARER_TOKEN_BEDROCK"], - npm: "@ai-sdk/amazon-bedrock", - name: "Amazon Bedrock", - doc: "https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html", - models: { - "openai.gpt-oss-safeguard-120b": { - id: "openai.gpt-oss-safeguard-120b", - name: "GPT OSS Safeguard 120B", - family: "gpt-oss", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 4096 }, - }, - "nvidia.nemotron-nano-3-30b": { - id: "nvidia.nemotron-nano-3-30b", - name: "NVIDIA Nemotron Nano 3 30B", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.24 }, - limit: { context: 128000, output: 4096 }, - }, - "nvidia.nemotron-super-3-120b": { - id: "nvidia.nemotron-super-3-120b", - name: "NVIDIA Nemotron 3 Super 120B A12B", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-11", - last_updated: "2026-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.65 }, - limit: { context: 262144, output: 131072 }, - }, - "writer.palmyra-x5-v1:0": { - id: "writer.palmyra-x5-v1:0", - name: "Palmyra X5", - family: "palmyra", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-04-28", - last_updated: "2025-04-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 6 }, - limit: { context: 1040000, output: 8192 }, - }, - "mistral.ministral-3-8b-instruct": { - id: "mistral.ministral-3-8b-instruct", - name: "Ministral 3 8B", - family: "ministral", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 128000, output: 4096 }, - }, - "au.anthropic.claude-opus-4-6-v1": { - id: "au.anthropic.claude-opus-4-6-v1", - name: "AU Anthropic Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 16.5, output: 82.5, cache_read: 1.65, cache_write: 20.625 }, - limit: { context: 1000000, output: 128000 }, - }, - "mistral.ministral-3-3b-instruct": { - id: "mistral.ministral-3-3b-instruct", - name: "Ministral 3 3B", - family: "ministral", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-02", - last_updated: "2025-12-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 256000, output: 8192 }, - }, - "anthropic.claude-sonnet-4-5-20250929-v1:0": { - id: "anthropic.claude-sonnet-4-5-20250929-v1:0", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "mistral.devstral-2-123b": { - id: "mistral.devstral-2-123b", - name: "Devstral 2 123B", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2 }, - limit: { context: 256000, output: 8192 }, - }, - "global.anthropic.claude-opus-4-5-20251101-v1:0": { - id: "global.anthropic.claude-opus-4-5-20251101-v1:0", - name: "Claude Opus 4.5 (Global)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-08-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - }, - "mistral.voxtral-small-24b-2507": { - id: "mistral.voxtral-small-24b-2507", - name: "Voxtral Small 24B 2507", - family: "mistral", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-01", - last_updated: "2025-07-01", - modalities: { input: ["text", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.35 }, - limit: { context: 32000, output: 8192 }, - }, - "google.gemma-3-12b-it": { - id: "google.gemma-3-12b-it", - name: "Google Gemma 3 12B", - family: "gemma", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - knowledge: "2024-12", - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.049999999999999996, output: 0.09999999999999999 }, - limit: { context: 131072, output: 8192 }, - }, - "amazon.nova-pro-v1:0": { - id: "amazon.nova-pro-v1:0", - name: "Nova Pro", - family: "nova-pro", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-03", - last_updated: "2024-12-03", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 3.2, cache_read: 0.2 }, - limit: { context: 300000, output: 8192 }, - }, - "anthropic.claude-haiku-4-5-20251001-v1:0": { - id: "anthropic.claude-haiku-4-5-20251001-v1:0", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "minimax.minimax-m2": { - id: "minimax.minimax-m2", - name: "MiniMax M2", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-10-27", - last_updated: "2025-10-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204608, output: 128000 }, - }, - "global.anthropic.claude-opus-4-7": { - id: "global.anthropic.claude-opus-4-7", - name: "Claude Opus 4.7 (Global)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "mistral.pixtral-large-2502-v1:0": { - id: "mistral.pixtral-large-2502-v1:0", - name: "Pixtral Large (25.02)", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-04-08", - last_updated: "2025-04-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6 }, - limit: { context: 128000, output: 8192 }, - }, - "meta.llama4-maverick-17b-instruct-v1:0": { - id: "meta.llama4-maverick-17b-instruct-v1:0", - name: "Llama 4 Maverick 17B Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.24, output: 0.97 }, - limit: { context: 1000000, output: 16384 }, - }, - "us.anthropic.claude-sonnet-4-5-20250929-v1:0": { - id: "us.anthropic.claude-sonnet-4-5-20250929-v1:0", - name: "Claude Sonnet 4.5 (US)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "us.anthropic.claude-haiku-4-5-20251001-v1:0": { - id: "us.anthropic.claude-haiku-4-5-20251001-v1:0", - name: "Claude Haiku 4.5 (US)", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "amazon.nova-micro-v1:0": { - id: "amazon.nova-micro-v1:0", - name: "Nova Micro", - family: "nova-micro", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-03", - last_updated: "2024-12-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.035, output: 0.14, cache_read: 0.00875 }, - limit: { context: 128000, output: 8192 }, - }, - "global.anthropic.claude-sonnet-4-5-20250929-v1:0": { - id: "global.anthropic.claude-sonnet-4-5-20250929-v1:0", - name: "Claude Sonnet 4.5 (Global)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "openai.gpt-oss-20b-1:0": { - id: "openai.gpt-oss-20b-1:0", - name: "gpt-oss-20b", - family: "gpt-oss", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.3 }, - limit: { context: 128000, output: 4096 }, - }, - "zai.glm-5": { - id: "zai.glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2 }, - limit: { context: 202752, output: 101376 }, - }, - "qwen.qwen3-32b-v1:0": { - id: "qwen.qwen3-32b-v1:0", - name: "Qwen3 32B (dense)", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-09-18", - last_updated: "2025-09-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 16384, output: 16384 }, - }, - "deepseek.v3.2": { - id: "deepseek.v3.2", - name: "DeepSeek-V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2026-02-06", - last_updated: "2026-02-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.62, output: 1.85 }, - limit: { context: 163840, output: 81920 }, - }, - "eu.anthropic.claude-haiku-4-5-20251001-v1:0": { - id: "eu.anthropic.claude-haiku-4-5-20251001-v1:0", - name: "Claude Haiku 4.5 (EU)", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "zai.glm-4.7-flash": { - id: "zai.glm-4.7-flash", - name: "GLM-4.7-Flash", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.4 }, - limit: { context: 200000, output: 131072 }, - }, - "us.anthropic.claude-opus-4-7": { - id: "us.anthropic.claude-opus-4-7", - name: "Claude Opus 4.7 (US)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "amazon.nova-2-lite-v1:0": { - id: "amazon.nova-2-lite-v1:0", - name: "Nova 2 Lite", - family: "nova", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.33, output: 2.75 }, - limit: { context: 128000, output: 4096 }, - }, - "anthropic.claude-opus-4-5-20251101-v1:0": { - id: "anthropic.claude-opus-4-5-20251101-v1:0", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-08-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - }, - "qwen.qwen3-coder-480b-a35b-v1:0": { - id: "qwen.qwen3-coder-480b-a35b-v1:0", - name: "Qwen3 Coder 480B A35B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-09-18", - last_updated: "2025-09-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 1.8 }, - limit: { context: 131072, output: 65536 }, - }, - "amazon.nova-lite-v1:0": { - id: "amazon.nova-lite-v1:0", - name: "Nova Lite", - family: "nova-lite", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-03", - last_updated: "2024-12-03", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.06, output: 0.24, cache_read: 0.015 }, - limit: { context: 300000, output: 8192 }, - }, - "meta.llama3-1-8b-instruct-v1:0": { - id: "meta.llama3-1-8b-instruct-v1:0", - name: "Llama 3.1 8B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 0.22 }, - limit: { context: 128000, output: 4096 }, - }, - "anthropic.claude-opus-4-7": { - id: "anthropic.claude-opus-4-7", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "google.gemma-3-27b-it": { - id: "google.gemma-3-27b-it", - name: "Google Gemma 3 27B Instruct", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-27", - last_updated: "2025-07-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.12, output: 0.2 }, - limit: { context: 202752, output: 8192 }, - }, - "global.anthropic.claude-haiku-4-5-20251001-v1:0": { - id: "global.anthropic.claude-haiku-4-5-20251001-v1:0", - name: "Claude Haiku 4.5 (Global)", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "google.gemma-3-4b-it": { - id: "google.gemma-3-4b-it", - name: "Gemma 3 4B IT", - family: "gemma", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.04, output: 0.08 }, - limit: { context: 128000, output: 4096 }, - }, - "meta.llama4-scout-17b-instruct-v1:0": { - id: "meta.llama4-scout-17b-instruct-v1:0", - name: "Llama 4 Scout 17B Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.17, output: 0.66 }, - limit: { context: 3500000, output: 16384 }, - }, - "deepseek.v3-v1:0": { - id: "deepseek.v3-v1:0", - name: "DeepSeek-V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-09-18", - last_updated: "2025-09-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.58, output: 1.68 }, - limit: { context: 163840, output: 81920 }, - }, - "mistral.magistral-small-2509": { - id: "mistral.magistral-small-2509", - name: "Magistral Small 1.2", - family: "magistral", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-02", - last_updated: "2025-12-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 128000, output: 40000 }, - }, - "qwen.qwen3-next-80b-a3b": { - id: "qwen.qwen3-next-80b-a3b", - name: "Qwen/Qwen3-Next-80B-A3B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 1.4 }, - limit: { context: 262000, output: 262000 }, - }, - "zai.glm-4.7": { - id: "zai.glm-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 204800, output: 131072 }, - }, - "moonshot.kimi-k2-thinking": { - id: "moonshot.kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - structured_output: true, - temperature: true, - release_date: "2025-12-02", - last_updated: "2025-12-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5 }, - limit: { context: 256000, output: 256000 }, - }, - "us.anthropic.claude-opus-4-5-20251101-v1:0": { - id: "us.anthropic.claude-opus-4-5-20251101-v1:0", - name: "Claude Opus 4.5 (US)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-08-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - }, - "mistral.ministral-3-14b-instruct": { - id: "mistral.ministral-3-14b-instruct", - name: "Ministral 14B 3.0", - family: "ministral", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 128000, output: 4096 }, - }, - "deepseek.r1-v1:0": { - id: "deepseek.r1-v1:0", - name: "DeepSeek-R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-01-20", - last_updated: "2025-05-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.35, output: 5.4 }, - limit: { context: 128000, output: 32768 }, - }, - "mistral.voxtral-mini-3b-2507": { - id: "mistral.voxtral-mini-3b-2507", - name: "Voxtral Mini 3B 2507", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["audio", "text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.04, output: 0.04 }, - limit: { context: 128000, output: 4096 }, - }, - "openai.gpt-oss-120b-1:0": { - id: "openai.gpt-oss-120b-1:0", - name: "gpt-oss-120b", - family: "gpt-oss", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 4096 }, - }, - "nvidia.nemotron-nano-12b-v2": { - id: "nvidia.nemotron-nano-12b-v2", - name: "NVIDIA Nemotron Nano 12B v2 VL BF16", - family: "nemotron", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 128000, output: 4096 }, - }, - "eu.anthropic.claude-opus-4-7": { - id: "eu.anthropic.claude-opus-4-7", - name: "Claude Opus 4.7 (EU)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "minimax.minimax-m2.5": { - id: "minimax.minimax-m2.5", - name: "MiniMax M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 196608, output: 98304 }, - }, - "meta.llama3-3-70b-instruct-v1:0": { - id: "meta.llama3-3-70b-instruct-v1:0", - name: "Llama 3.3 70B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.72, output: 0.72 }, - limit: { context: 128000, output: 4096 }, - }, - "meta.llama3-1-70b-instruct-v1:0": { - id: "meta.llama3-1-70b-instruct-v1:0", - name: "Llama 3.1 70B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.72, output: 0.72 }, - limit: { context: 128000, output: 4096 }, - }, - "eu.anthropic.claude-sonnet-4-5-20250929-v1:0": { - id: "eu.anthropic.claude-sonnet-4-5-20250929-v1:0", - name: "Claude Sonnet 4.5 (EU)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "eu.anthropic.claude-opus-4-5-20251101-v1:0": { - id: "eu.anthropic.claude-opus-4-5-20251101-v1:0", - name: "Claude Opus 4.5 (EU)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-08-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - }, - "moonshotai.kimi-k2.5": { - id: "moonshotai.kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - release_date: "2026-02-06", - last_updated: "2026-02-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3 }, - limit: { context: 256000, output: 256000 }, - }, - "au.anthropic.claude-sonnet-4-6": { - id: "au.anthropic.claude-sonnet-4-6", - name: "AU Anthropic Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3.3, output: 16.5, cache_read: 0.33, cache_write: 4.125 }, - limit: { context: 1000000, output: 128000 }, - }, - "openai.gpt-oss-safeguard-20b": { - id: "openai.gpt-oss-safeguard-20b", - name: "GPT OSS Safeguard 20B", - family: "gpt-oss", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.2 }, - limit: { context: 128000, output: 4096 }, - }, - "qwen.qwen3-coder-30b-a3b-v1:0": { - id: "qwen.qwen3-coder-30b-a3b-v1:0", - name: "Qwen3 Coder 30B A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-09-18", - last_updated: "2025-09-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 262144, output: 131072 }, - }, - "minimax.minimax-m2.1": { - id: "minimax.minimax-m2.1", - name: "MiniMax M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204800, output: 131072 }, - }, - "qwen.qwen3-vl-235b-a22b": { - id: "qwen.qwen3-vl-235b-a22b", - name: "Qwen/Qwen3-VL-235B-A22B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-04", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.5 }, - limit: { context: 262000, output: 262000 }, - }, - "qwen.qwen3-coder-next": { - id: "qwen.qwen3-coder-next", - name: "Qwen3 Coder Next", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-06", - last_updated: "2026-02-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 1.8 }, - limit: { context: 131072, output: 65536 }, - }, - "nvidia.nemotron-nano-9b-v2": { - id: "nvidia.nemotron-nano-9b-v2", - name: "NVIDIA Nemotron Nano 9B v2", - family: "nemotron", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.06, output: 0.23 }, - limit: { context: 128000, output: 4096 }, - }, - "mistral.mistral-large-3-675b-instruct": { - id: "mistral.mistral-large-3-675b-instruct", - name: "Mistral Large 3", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-02", - last_updated: "2025-12-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 256000, output: 8192 }, - }, - "qwen.qwen3-235b-a22b-2507-v1:0": { - id: "qwen.qwen3-235b-a22b-2507-v1:0", - name: "Qwen3 235B A22B 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-09-18", - last_updated: "2025-09-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 0.88 }, - limit: { context: 262144, output: 131072 }, - }, - "writer.palmyra-x4-v1:0": { - id: "writer.palmyra-x4-v1:0", - name: "Palmyra X4", - family: "palmyra", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-04-28", - last_updated: "2025-04-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 122880, output: 8192 }, - }, - "anthropic.claude-opus-4-1-20250805-v1:0": { - id: "anthropic.claude-opus-4-1-20250805-v1:0", - name: "Claude Opus 4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "us.deepseek.r1-v1:0": { - id: "us.deepseek.r1-v1:0", - name: "DeepSeek-R1 (US)", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-01-20", - last_updated: "2025-05-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.35, output: 5.4 }, - limit: { context: 128000, output: 32768 }, - }, - "eu.anthropic.claude-opus-4-6-v1": { - id: "eu.anthropic.claude-opus-4-6-v1", - name: "Claude Opus 4.6 (EU)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "us.meta.llama4-maverick-17b-instruct-v1:0": { - id: "us.meta.llama4-maverick-17b-instruct-v1:0", - name: "Llama 4 Maverick 17B Instruct (US)", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.24, output: 0.97 }, - limit: { context: 1000000, output: 16384 }, - }, - "au.anthropic.claude-haiku-4-5-20251001-v1:0": { - id: "au.anthropic.claude-haiku-4-5-20251001-v1:0", - name: "Claude Haiku 4.5 (AU)", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "jp.anthropic.claude-sonnet-4-5-20250929-v1:0": { - id: "jp.anthropic.claude-sonnet-4-5-20250929-v1:0", - name: "Claude Sonnet 4.5 (JP)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic.claude-sonnet-4-6": { - id: "anthropic.claude-sonnet-4-6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - }, - "jp.anthropic.claude-sonnet-4-6": { - id: "jp.anthropic.claude-sonnet-4-6", - name: "Claude Sonnet 4.6 (JP)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - }, - "global.anthropic.claude-sonnet-4-6": { - id: "global.anthropic.claude-sonnet-4-6", - name: "Claude Sonnet 4.6 (Global)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - }, - "us.anthropic.claude-sonnet-4-6": { - id: "us.anthropic.claude-sonnet-4-6", - name: "Claude Sonnet 4.6 (US)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - }, - "global.anthropic.claude-opus-4-6-v1": { - id: "global.anthropic.claude-opus-4-6-v1", - name: "Claude Opus 4.6 (Global)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "us.anthropic.claude-opus-4-6-v1": { - id: "us.anthropic.claude-opus-4-6-v1", - name: "Claude Opus 4.6 (US)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "us.anthropic.claude-opus-4-1-20250805-v1:0": { - id: "us.anthropic.claude-opus-4-1-20250805-v1:0", - name: "Claude Opus 4.1 (US)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "au.anthropic.claude-sonnet-4-5-20250929-v1:0": { - id: "au.anthropic.claude-sonnet-4-5-20250929-v1:0", - name: "Claude Sonnet 4.5 (AU)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "eu.anthropic.claude-sonnet-4-6": { - id: "eu.anthropic.claude-sonnet-4-6", - name: "Claude Sonnet 4.6 (EU)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - }, - "us.meta.llama4-scout-17b-instruct-v1:0": { - id: "us.meta.llama4-scout-17b-instruct-v1:0", - name: "Llama 4 Scout 17B Instruct (US)", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.17, output: 0.66 }, - limit: { context: 3500000, output: 16384 }, - }, - "anthropic.claude-opus-4-6-v1": { - id: "anthropic.claude-opus-4-6-v1", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "jp.anthropic.claude-opus-4-7": { - id: "jp.anthropic.claude-opus-4-7", - name: "Claude Opus 4.7 (JP)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - }, - }, - "the-grid-ai": { - id: "the-grid-ai", - env: ["THEGRIDAI_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.thegrid.ai/v1", - name: "The Grid AI", - doc: "https://thegrid.ai/docs", - models: { - "text-prime": { - id: "text-prime", - name: "Text Prime", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-26", - last_updated: "2026-02-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 30000 }, - status: "beta", - }, - "text-standard": { - id: "text-standard", - name: "Text Standard", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-26", - last_updated: "2026-02-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 16000 }, - status: "beta", - }, - "text-max": { - id: "text-max", - name: "Text Max", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-24", - last_updated: "2026-03-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 1000000, output: 128000 }, - status: "beta", - }, - }, - }, - baseten: { - id: "baseten", - env: ["BASETEN_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://inference.baseten.co/v1", - name: "Baseten", - doc: "https://docs.baseten.co/development/model-apis/overview", - models: { - "zai-org/GLM-4.7": { - id: "zai-org/GLM-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 204800, output: 131072 }, - }, - "zai-org/GLM-5": { - id: "zai-org/GLM-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2026-01", - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 3.15 }, - limit: { context: 202752, output: 131072 }, - }, - "zai-org/GLM-4.6": { - id: "zai-org/GLM-4.6", - name: "GLM 4.6", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2025-09-16", - last_updated: "2025-09-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 200000, output: 200000 }, - }, - "nvidia/Nemotron-120B-A12B": { - id: "nvidia/Nemotron-120B-A12B", - name: "Nemotron 3 Super", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2026-02", - release_date: "2026-03-11", - last_updated: "2026-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.75 }, - limit: { context: 262144, output: 32678 }, - }, - "deepseek-ai/DeepSeek-V3.1": { - id: "deepseek-ai/DeepSeek-V3.1", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-25", - last_updated: "2025-08-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 164000, output: 131000 }, - }, - "deepseek-ai/DeepSeek-V3-0324": { - id: "deepseek-ai/DeepSeek-V3-0324", - name: "DeepSeek V3 0324", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-03-24", - last_updated: "2025-03-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.77, output: 0.77 }, - limit: { context: 164000, output: 131000 }, - }, - "deepseek-ai/DeepSeek-V3.2": { - id: "deepseek-ai/DeepSeek-V3.2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-10", - release_date: "2025-12-01", - last_updated: "2026-03-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.45 }, - limit: { context: 163800, output: 131100 }, - status: "deprecated", - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.5 }, - limit: { context: 128000, output: 128000 }, - }, - "moonshotai/Kimi-K2-Thinking": { - id: "moonshotai/Kimi-K2-Thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2026-03-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5 }, - limit: { context: 262144, output: 262144 }, - status: "deprecated", - }, - "moonshotai/Kimi-K2.6": { - id: "moonshotai/Kimi-K2.6", - name: "Kimi K2.6", - family: "kimi-k2.6", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/Kimi-K2-Instruct-0905": { - id: "moonshotai/Kimi-K2-Instruct-0905", - name: "Kimi K2 Instruct 0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-08", - release_date: "2025-09-05", - last_updated: "2026-03-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5 }, - limit: { context: 262144, output: 262144 }, - status: "deprecated", - }, - "moonshotai/Kimi-K2.5": { - id: "moonshotai/Kimi-K2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-12", - release_date: "2026-01-30", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3 }, - limit: { context: 262144, output: 8192 }, - }, - "MiniMaxAI/MiniMax-M2.5": { - id: "MiniMaxAI/MiniMax-M2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2026-01", - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204000, output: 204000 }, - }, - "deepseek-ai/DeepSeek-V4-Pro": { - id: "deepseek-ai/DeepSeek-V4-Pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.74, output: 3.48, cache_read: 0.15 }, - limit: { context: 1000000, output: 384000 }, - }, - }, - }, - frogbot: { - id: "frogbot", - env: ["FROGBOT_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://app.frogbot.ai/api/v1", - name: "FrogBot", - doc: "https://docs.frogbot.ai", - models: { - "grok-4-1-fast-reasoning": { - id: "grok-4-1-fast-reasoning", - name: "Grok 4.1 Fast (Reasoning)", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-11", - release_date: "2025-11-25", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 128000 }, - }, - "claude-haiku-4-5": { - id: "claude-haiku-4-5", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi-K2.5", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "1970-01-01", - last_updated: "1970-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 3, cache_read: 0.1 }, - limit: { context: 256000, output: 128000 }, - }, - "claude-sonnet-4-6": { - id: "claude-sonnet-4-6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "gemini-3-flash-preview": { - id: "gemini-3-flash-preview", - name: "Gemini 3 Flash Preview", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3, cache_read: 0.05 }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-opus-4-7": { - id: "claude-opus-4-7", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 128000 }, - }, - "zai-glm-5-1": { - id: "zai-glm-5-1", - name: "Z.AI GLM-5.1", - family: "glm", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-01-20", - last_updated: "2025-02-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.4, output: 4.4, cache_read: 0.26 }, - limit: { context: 198000, output: 8192 }, - }, - "gemini-2.5-pro": { - id: "gemini-2.5-pro", - name: "Gemini 2.5 Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.31 }, - limit: { context: 1048576, output: 65536 }, - }, - "grok-4-1-fast-non-reasoning": { - id: "grok-4-1-fast-non-reasoning", - name: "Grok 4.1 Fast (Non-Reasoning)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-11", - release_date: "2025-11-25", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 128000 }, - }, - "gpt-5-4-nano": { - id: "gpt-5-4-nano", - name: "GPT-5.4 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.25, cache_read: 0.02 }, - limit: { context: 400000, output: 128000 }, - }, - "gemini-2.5-flash": { - id: "gemini-2.5-flash", - name: "Gemini 2.5 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-07-17", - last_updated: "2025-07-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.075 }, - limit: { context: 1048576, output: 65536 }, - }, - "grok-code-fast-1": { - id: "grok-code-fast-1", - name: "Grok 4.1 Fast (Reasoning)", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2025-08-28", - last_updated: "2025-08-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.5, cache_read: 0.02 }, - limit: { context: 256000, output: 128000 }, - }, - "gpt-5-5": { - id: "gpt-5-5", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 15, cache_read: 0.25 }, - limit: { context: 272000, output: 128000 }, - }, - "grok-4-3": { - id: "grok-4-3", - name: "Grok 4.3", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-11", - release_date: "2026-04-30", - last_updated: "2026-04-30", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 2.5, cache_read: 0.2 }, - limit: { context: 1000000, output: 128000 }, - }, - "gpt-5-4-mini": { - id: "gpt-5-4-mini", - name: "GPT-5.4 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5, cache_read: 0.075 }, - limit: { context: 400000, output: 128000 }, - }, - "claude-opus-4-6": { - id: "claude-opus-4-6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 128000 }, - }, - "deepseek-v4-pro": { - id: "deepseek-v4-pro", - name: "DeepSeek v4 Pro", - family: "deepseek", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2026-01", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.74, output: 3.48, cache_read: 0.14 }, - limit: { context: 128000, output: 8192 }, - }, - "gpt-oss-20b": { - id: "gpt-oss-20b", - name: "GPT OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "1970-01-01", - last_updated: "1970-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.2 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen-3-6-plus": { - id: "qwen-3-6-plus", - name: "Qwen 3.6 Plus", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-03", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3, cache_read: 0.1 }, - limit: { context: 1000000, output: 64000 }, - }, - "minimax-m2-7": { - id: "minimax-m2-7", - name: "MiniMax-M2.7", - family: "minimax", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2, cache_read: 0.06 }, - limit: { context: 192000, output: 8192 }, - }, - "minimax-m2-5": { - id: "minimax-m2-5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2025-01-15", - last_updated: "2025-02-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2, cache_read: 0.03 }, - limit: { context: 192000, output: 8192 }, - }, - "gpt-4o": { - id: "gpt-4o", - name: "GPT-4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-05-13", - last_updated: "2024-08-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10, cache_read: 1.25 }, - limit: { context: 128000, output: 16384 }, - }, - "gpt-oss-120b": { - id: "gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "1970-01-01", - last_updated: "1970-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 131072, output: 32768 }, - }, - "gemini-3-1-pro-preview": { - id: "gemini-3-1-pro-preview", - name: "Gemini 3.1 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2026-01", - release_date: "2026-02-18", - last_updated: "2026-02-18", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2 }, - limit: { context: 1000000, output: 64000 }, - }, - "kimi-k2-6": { - id: "kimi-k2-6", - name: "Kimi-K2.6", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "1970-01-01", - last_updated: "1970-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 256000, output: 128000 }, - }, - "gpt-5-3-codex": { - id: "gpt-5-3-codex", - name: "GPT-5.3 Codex", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-02-15", - last_updated: "2026-02-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - }, - }, - "zhipuai-coding-plan": { - id: "zhipuai-coding-plan", - env: ["ZHIPU_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://open.bigmodel.cn/api/coding/paas/v4", - name: "Zhipu AI Coding Plan", - doc: "https://docs.bigmodel.cn/cn/coding-plan/overview", - models: { - "glm-5v-turbo": { - id: "glm-5v-turbo", - name: "GLM-5V-Turbo", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-01", - modalities: { input: ["text", "image", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "glm-5.1": { - id: "glm-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-03-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "glm-5-turbo": { - id: "glm-5-turbo", - name: "GLM-5-Turbo", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-16", - last_updated: "2026-03-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "glm-4.5-air": { - id: "glm-4.5-air", - name: "GLM-4.5-Air", - family: "glm-air", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 131072, output: 98304 }, - }, - "glm-4.7": { - id: "glm-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - }, - }, - "alibaba-coding-plan": { - id: "alibaba-coding-plan", - env: ["ALIBABA_CODING_PLAN_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://coding-intl.dashscope.aliyuncs.com/v1", - name: "Alibaba Coding Plan", - doc: "https://www.alibabacloud.com/help/en/model-studio/coding-plan", - models: { - "qwen3-coder-plus": { - id: "qwen3-coder-plus", - name: "Qwen3 Coder Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 1000000, output: 65536 }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 262144, output: 32768 }, - }, - "glm-4.7": { - id: "glm-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 202752, output: 16384 }, - }, - "glm-5": { - id: "glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 202752, output: 16384 }, - }, - "MiniMax-M2.5": { - id: "MiniMax-M2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 196608, input: 196601, output: 24576 }, - }, - "qwen3.6-plus": { - id: "qwen3.6-plus", - name: "Qwen3.6 Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen3-max-2026-01-23": { - id: "qwen3-max-2026-01-23", - name: "Qwen3 Max", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-23", - last_updated: "2026-01-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 262144, output: 32768 }, - }, - "qwen3-coder-next": { - id: "qwen3-coder-next", - name: "Qwen3 Coder Next", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-03", - last_updated: "2026-02-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen3.5-plus": { - id: "qwen3.5-plus", - name: "Qwen3.5 Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 1000000, output: 65536 }, - }, - }, - }, - venice: { - id: "venice", - env: ["VENICE_API_KEY"], - npm: "venice-ai-sdk-provider", - name: "Venice AI", - doc: "https://docs.venice.ai", - models: { - "openai-gpt-4o-mini-2024-07-18": { - id: "openai-gpt-4o-mini-2024-07-18", - name: "GPT-4o Mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-28", - last_updated: "2026-03-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1875, output: 0.75, cache_read: 0.09375 }, - limit: { context: 128000, output: 16384 }, - }, - "qwen3-next-80b": { - id: "qwen3-next-80b", - name: "Qwen 3 Next 80b", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-04-29", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.35, output: 1.9 }, - limit: { context: 256000, output: 16384 }, - }, - "grok-4-20-multi-agent": { - id: "grok-4-20-multi-agent", - name: "Grok 4.20 Multi-Agent", - family: "grok", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2026-03-12", - last_updated: "2026-05-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { - input: 1.42, - output: 2.83, - cache_read: 0.23, - context_over_200k: { input: 2.83, output: 5.67, cache_read: 0.45 }, - }, - limit: { context: 2000000, output: 128000 }, - }, - "qwen3-235b-a22b-instruct-2507": { - id: "qwen3-235b-a22b-instruct-2507", - name: "Qwen 3 235B A22B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-04-29", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.75 }, - limit: { context: 128000, output: 16384 }, - }, - "z-ai-glm-5v-turbo": { - id: "z-ai-glm-5v-turbo", - name: "GLM 5V Turbo", - family: "glmv", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5, output: 5, cache_read: 0.3 }, - limit: { context: 200000, output: 32768 }, - }, - "gemma-4-uncensored": { - id: "gemma-4-uncensored", - name: "Gemma 4 Uncensored", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-13", - last_updated: "2026-04-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1625, output: 0.5 }, - limit: { context: 256000, output: 8192 }, - }, - "grok-41-fast": { - id: "grok-41-fast", - name: "Grok 4.1 Fast", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-12-01", - last_updated: "2026-04-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.23, output: 0.57, cache_read: 0.06 }, - limit: { context: 1000000, output: 30000 }, - }, - "claude-sonnet-4-6": { - id: "claude-sonnet-4-6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-03-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3.6, output: 18, cache_read: 0.36, cache_write: 4.5 }, - limit: { context: 1000000, output: 64000 }, - }, - "nvidia-nemotron-cascade-2-30b-a3b": { - id: "nvidia-nemotron-cascade-2-30b-a3b", - name: "Nemotron Cascade 2 30B A3B", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-24", - last_updated: "2026-04-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.8 }, - limit: { context: 256000, output: 32768 }, - }, - "gemini-3-flash-preview": { - id: "gemini-3-flash-preview", - name: "Gemini 3 Flash Preview", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-19", - last_updated: "2026-03-12", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7, output: 3.75, cache_read: 0.07 }, - limit: { context: 256000, output: 65536 }, - }, - "grok-4-20": { - id: "grok-4-20", - name: "Grok 4.20", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-12", - last_updated: "2026-05-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { - input: 1.42, - output: 2.83, - cache_read: 0.23, - context_over_200k: { input: 2.83, output: 5.67, cache_read: 0.45 }, - }, - limit: { context: 2000000, output: 128000 }, - }, - "google-gemma-4-26b-a4b-it": { - id: "google-gemma-4-26b-a4b-it", - name: "Google Gemma 4 26B A4B Instruct", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-12", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1625, output: 0.5 }, - limit: { context: 256000, output: 8192 }, - }, - "claude-opus-4-7": { - id: "claude-opus-4-7", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 6, output: 30, cache_read: 0.6, cache_write: 7.5 }, - limit: { context: 1000000, output: 128000 }, - }, - "qwen3-coder-480b-a35b-instruct-turbo": { - id: "qwen3-coder-480b-a35b-instruct-turbo", - name: "Qwen 3 Coder 480B Turbo", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-02-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.35, output: 1.5, cache_read: 0.04 }, - limit: { context: 256000, output: 65536 }, - }, - "qwen3-5-397b-a17b": { - id: "qwen3-5-397b-a17b", - name: "Qwen 3.5 397B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.75, output: 4.5 }, - limit: { context: 128000, output: 32768 }, - }, - "zai-org-glm-4.7": { - id: "zai-org-glm-4.7", - name: "GLM 4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-24", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.65, cache_read: 0.11 }, - limit: { context: 198000, output: 16384 }, - }, - "openai-gpt-54": { - id: "openai-gpt-54", - name: "GPT-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-05", - last_updated: "2026-03-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3.13, output: 18.8, cache_read: 0.313 }, - limit: { context: 1000000, output: 131072 }, - }, - "zai-org-glm-4.7-flash": { - id: "zai-org-glm-4.7-flash", - name: "GLM 4.7 Flash", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01-29", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.125, output: 0.5 }, - limit: { context: 128000, output: 16384 }, - }, - "nvidia-nemotron-3-nano-30b-a3b": { - id: "nvidia-nemotron-3-nano-30b-a3b", - name: "NVIDIA Nemotron 3 Nano 30B", - family: "nemotron", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 128000, output: 16384 }, - }, - "qwen3-vl-235b-a22b": { - id: "qwen3-vl-235b-a22b", - name: "Qwen3 VL 235B", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01-16", - last_updated: "2026-03-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 1.5 }, - limit: { context: 256000, output: 16384 }, - }, - "openai-gpt-53-codex": { - id: "openai-gpt-53-codex", - name: "GPT-5.3 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-24", - last_updated: "2026-03-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.19, output: 17.5, cache_read: 0.219 }, - limit: { context: 400000, output: 128000 }, - }, - "venice-uncensored-1-2": { - id: "venice-uncensored-1-2", - name: "Venice Uncensored 1.2", - family: "venice", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.9 }, - limit: { context: 128000, output: 8192 }, - }, - "openai-gpt-52": { - id: "openai-gpt-52", - name: "GPT-5.2", - family: "gpt", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2025-12-13", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.19, output: 17.5, cache_read: 0.219 }, - limit: { context: 256000, output: 65536 }, - }, - "mistral-small-3-2-24b-instruct": { - id: "mistral-small-3-2-24b-instruct", - name: "Mistral Small 3.2 24B Instruct", - family: "mistral-small", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01-15", - last_updated: "2026-03-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09375, output: 0.25 }, - limit: { context: 256000, output: 16384 }, - }, - "minimax-m27": { - id: "minimax-m27", - name: "MiniMax M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-04-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.375, output: 1.5, cache_read: 0.075 }, - limit: { context: 198000, output: 32768 }, - }, - "qwen3-235b-a22b-thinking-2507": { - id: "qwen3-235b-a22b-thinking-2507", - name: "Qwen 3 235B A22B Thinking 2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-04-29", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 3.5 }, - limit: { context: 128000, output: 16384 }, - }, - "qwen3-5-35b-a3b": { - id: "qwen3-5-35b-a3b", - name: "Qwen 3.5 35B A3B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-25", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3125, output: 1.25, cache_read: 0.15625 }, - limit: { context: 256000, output: 65536 }, - }, - "mercury-2": { - id: "mercury-2", - name: "Mercury 2", - family: "mercury", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-20", - last_updated: "2026-04-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3125, output: 0.9375, cache_read: 0.03125 }, - limit: { context: 128000, output: 50000 }, - }, - "google-gemma-3-27b-it": { - id: "google-gemma-3-27b-it", - name: "Google Gemma 3 27B Instruct", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-11-04", - last_updated: "2026-03-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.12, output: 0.2 }, - limit: { context: 198000, output: 16384 }, - }, - "olafangensan-glm-4.7-flash-heretic": { - id: "olafangensan-glm-4.7-flash-heretic", - name: "GLM 4.7 Flash Heretic", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-04", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.8 }, - limit: { context: 200000, output: 24000 }, - }, - "openai-gpt-55-pro": { - id: "openai-gpt-55-pro", - name: "GPT-5.5 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-24", - last_updated: "2026-04-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 37.5, output: 225 }, - limit: { context: 1000000, output: 128000 }, - }, - "openai-gpt-52-codex": { - id: "openai-gpt-52-codex", - name: "GPT-5.2 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08", - release_date: "2025-01-15", - last_updated: "2026-03-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.19, output: 17.5, cache_read: 0.219 }, - limit: { context: 256000, output: 65536 }, - }, - "venice-uncensored-role-play": { - id: "venice-uncensored-role-play", - name: "Venice Role Play Uncensored", - family: "venice", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-20", - last_updated: "2026-03-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 2 }, - limit: { context: 128000, output: 4096 }, - }, - "zai-org-glm-5": { - id: "zai-org-glm-5", - name: "GLM 5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2, cache_read: 0.2 }, - limit: { context: 198000, output: 32000 }, - }, - "zai-org-glm-4.6": { - id: "zai-org-glm-4.6", - name: "GLM 4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2024-04-01", - last_updated: "2026-04-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.85, output: 2.75, cache_read: 0.3 }, - limit: { context: 198000, output: 16384 }, - }, - "grok-4-3": { - id: "grok-4-3", - name: "Grok 4.3", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-18", - last_updated: "2026-05-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { - input: 1.42, - output: 2.83, - cache_read: 0.23, - context_over_200k: { input: 2.83, output: 5.67, cache_read: 0.45 }, - }, - limit: { context: 1000000, output: 32000 }, - }, - "mistral-small-2603": { - id: "mistral-small-2603", - name: "Mistral Small 4", - family: "mistral-small", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-16", - last_updated: "2026-04-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1875, output: 0.75 }, - limit: { context: 256000, output: 65536 }, - }, - "openai-gpt-oss-120b": { - id: "openai-gpt-oss-120b", - name: "OpenAI GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-11-06", - last_updated: "2026-05-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.3 }, - limit: { context: 128000, output: 16384 }, - }, - "claude-opus-4-5": { - id: "claude-opus-4-5", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-06", - last_updated: "2026-04-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 6, output: 30, cache_read: 0.6, cache_write: 7.5 }, - limit: { context: 198000, output: 32768 }, - }, - "qwen3-5-9b": { - id: "qwen3-5-9b", - name: "Qwen 3.5 9B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-05", - last_updated: "2026-04-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.15 }, - limit: { context: 256000, output: 32768 }, - }, - "deepseek-v4-flash": { - id: "deepseek-v4-flash", - name: "DeepSeek V4 Flash", - family: "deepseek-flash", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-24", - last_updated: "2026-04-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.17, output: 0.35, cache_read: 0.028 }, - limit: { context: 1000000, output: 32768 }, - }, - "openai-gpt-54-pro": { - id: "openai-gpt-54-pro", - name: "GPT-5.4 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-05", - last_updated: "2026-03-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 37.5, output: 225, context_over_200k: { input: 75, output: 337.5 } }, - limit: { context: 1000000, output: 128000 }, - }, - "openai-gpt-54-mini": { - id: "openai-gpt-54-mini", - name: "GPT-5.4 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-03-31", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.9375, output: 5.625, cache_read: 0.09375 }, - limit: { context: 400000, output: 128000 }, - }, - "minimax-m25": { - id: "minimax-m25", - name: "MiniMax M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-04-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.34, output: 1.19, cache_read: 0.04 }, - limit: { context: 198000, output: 32768 }, - }, - "zai-org-glm-5-1": { - id: "zai-org-glm-5-1", - name: "GLM 5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-07", - last_updated: "2026-04-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.75, output: 5.5, cache_read: 0.325 }, - limit: { context: 200000, output: 24000 }, - }, - "openai-gpt-55": { - id: "openai-gpt-55", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-23", - last_updated: "2026-04-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { - input: 6.25, - output: 37.5, - cache_read: 0.625, - context_over_200k: { input: 12.5, output: 56.25, cache_read: 1.25 }, - }, - limit: { context: 1000000, output: 131072 }, - }, - "qwen3-6-27b": { - id: "qwen3-6-27b", - name: "Qwen 3.6 27B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-24", - last_updated: "2026-04-29", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.325, output: 3.25 }, - limit: { context: 256000, output: 65536 }, - }, - "claude-opus-4-6": { - id: "claude-opus-4-6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-03-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 6, output: 30, cache_read: 0.6, cache_write: 7.5 }, - limit: { context: 1000000, output: 128000 }, - }, - "deepseek-v4-pro": { - id: "deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-24", - last_updated: "2026-04-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.73, output: 3.796, cache_read: 0.33 }, - limit: { context: 1000000, output: 32768 }, - }, - "deepseek-v3.2": { - id: "deepseek-v3.2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-10", - release_date: "2025-12-04", - last_updated: "2026-03-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.33, output: 0.48, cache_read: 0.16 }, - limit: { context: 160000, output: 32768 }, - }, - "qwen-3-6-plus": { - id: "qwen-3-6-plus", - name: "Qwen 3.6 Plus Uncensored", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-06", - last_updated: "2026-04-12", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { - input: 0.625, - output: 3.75, - cache_read: 0.0625, - cache_write: 0.78, - context_over_200k: { input: 2.5, output: 7.5, cache_read: 0.0625, cache_write: 0.78 }, - }, - limit: { context: 1000000, output: 65536 }, - }, - "aion-labs-aion-2-0": { - id: "aion-labs-aion-2-0", - name: "Aion 2.0", - family: "o", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2026-03-24", - last_updated: "2026-04-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 2, cache_read: 0.25 }, - limit: { context: 128000, output: 32768 }, - }, - "claude-sonnet-4-5": { - id: "claude-sonnet-4-5", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-01-15", - last_updated: "2026-04-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3.75, output: 18.75, cache_read: 0.375, cache_write: 4.69 }, - limit: { context: 198000, output: 64000 }, - }, - "openai-gpt-4o-2024-11-20": { - id: "openai-gpt-4o-2024-11-20", - name: "GPT-4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-28", - last_updated: "2026-03-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3.125, output: 12.5 }, - limit: { context: 128000, output: 16384 }, - }, - "llama-3.3-70b": { - id: "llama-3.3-70b", - name: "Llama 3.3 70B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2025-04-06", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 2.8 }, - limit: { context: 128000, output: 4096 }, - }, - "kimi-k2-5": { - id: "kimi-k2-5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2026-01-27", - last_updated: "2026-04-30", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.56, output: 3.5, cache_read: 0.22 }, - limit: { context: 256000, output: 65536 }, - }, - "llama-3.2-3b": { - id: "llama-3.2-3b", - name: "Llama 3.2 3B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-10-03", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 4096 }, - }, - "arcee-trinity-large-thinking": { - id: "arcee-trinity-large-thinking", - name: "Trinity Large Thinking", - family: "trinity", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3125, output: 1.125, cache_read: 0.075 }, - limit: { context: 256000, output: 65536 }, - }, - "hermes-3-llama-3.1-405b": { - id: "hermes-3-llama-3.1-405b", - name: "Hermes 3 Llama 3.1 405b", - family: "hermes", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-04", - release_date: "2025-09-25", - last_updated: "2026-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.1, output: 3 }, - limit: { context: 128000, output: 16384 }, - }, - "gemini-3-1-pro-preview": { - id: "gemini-3-1-pro-preview", - name: "Gemini 3.1 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-19", - last_updated: "2026-03-12", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - cost: { - input: 2.5, - output: 15, - cache_read: 0.5, - cache_write: 0.5, - context_over_200k: { input: 5, output: 22.5, cache_read: 0.5 }, - }, - limit: { context: 1000000, output: 32768 }, - }, - "kimi-k2-6": { - id: "kimi-k2-6", - name: "Kimi K2.6", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-20", - last_updated: "2026-04-30", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.85, output: 4.655, cache_read: 0.22 }, - limit: { context: 256000, output: 65536 }, - }, - "claude-opus-4-6-fast": { - id: "claude-opus-4-6-fast", - name: "Claude Opus 4.6 Fast", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-04-08", - last_updated: "2026-04-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 36, output: 180, cache_read: 3.6, cache_write: 45 }, - limit: { context: 1000000, output: 128000 }, - }, - "z-ai-glm-5-turbo": { - id: "z-ai-glm-5-turbo", - name: "GLM 5 Turbo", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-15", - last_updated: "2026-04-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.2, output: 4, cache_read: 0.24 }, - limit: { context: 200000, output: 32768 }, - }, - "google-gemma-4-31b-it": { - id: "google-gemma-4-31b-it", - name: "Google Gemma 4 31B Instruct", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-03", - last_updated: "2026-04-12", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.175, output: 0.5 }, - limit: { context: 256000, output: 8192 }, - }, - }, - }, - aihubmix: { - id: "aihubmix", - env: ["AIHUBMIX_API_KEY"], - npm: "@aihubmix/ai-sdk-provider", - name: "AIHubMix", - doc: "https://docs.aihubmix.com", - models: { - "minimax-m2.7": { - id: "minimax-m2.7", - name: "MiniMax-M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2958, output: 1.1832, cache_read: 0.05916 }, - limit: { context: 200000, output: 128000 }, - }, - "coding-glm-5.1-free": { - id: "coding-glm-5.1-free", - name: "Coding GLM 5.1 (free)", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-11", - last_updated: "2026-04-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 204800, output: 128000 }, - }, - "gemini-3.1-pro-preview-customtools": { - id: "gemini-3.1-pro-preview-customtools", - name: "Gemini 3.1 Pro Preview Custom Tools", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1048576, output: 65536 }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi K2.5", - family: "kimi-k2.5", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: false, - knowledge: "2025-01", - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.105 }, - limit: { context: 256000, output: 0 }, - }, - "glm-5v-turbo": { - id: "glm-5v-turbo", - name: "GLM 5 Vision Turbo", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-05-09", - last_updated: "2026-05-09", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.7042, output: 3.09848, cache_read: 0.169008 }, - limit: { context: 200000, output: 128000 }, - }, - "grok-4.3": { - id: "grok-4.3", - name: "Grok 4.3", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-05-01", - last_updated: "2026-05-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { - input: 1.25, - output: 2.5, - cache_read: 0.2, - context_over_200k: { input: 2.5, output: 5, cache_read: 0.4 }, - }, - limit: { context: 1000000, output: 1000000 }, - }, - "coding-minimax-m2.7-highspeed": { - id: "coding-minimax-m2.7-highspeed", - name: "Coding MiniMax M2.7 Highspeed", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 204800, output: 13100 }, - }, - "claude-sonnet-4-6": { - id: "claude-sonnet-4-6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.6, cache_write: 7.5 }, - }, - limit: { context: 200000, output: 64000 }, - }, - "gemini-3.1-pro-preview": { - id: "gemini-3.1-pro-preview", - name: "Gemini 3.1 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2 }, - limit: { context: 1048576, output: 65536 }, - }, - "coding-glm-5.1": { - id: "coding-glm-5.1", - name: "Coding-GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-11", - last_updated: "2026-04-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.06, output: 0.22 }, - limit: { context: 200000, output: 128000 }, - }, - "gemini-3-flash-preview": { - id: "gemini-3-flash-preview", - name: "Gemini 3 Flash Preview", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3, cache_read: 0.05 }, - limit: { context: 1048576, output: 65536 }, - }, - "gpt-5.5": { - id: "gpt-5.5", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-23", - last_updated: "2026-04-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5 }, - limit: { context: 1050000, output: 128000 }, - }, - "claude-opus-4-7": { - id: "claude-opus-4-7", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "deepseek-v4-flash-think": { - id: "deepseek-v4-flash-think", - name: "DeepSeek V4 Flash Think", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.154, output: 0.308, cache_read: 0.0308 }, - limit: { context: 1000000, output: 384000 }, - }, - "gpt-5.3-codex": { - id: "gpt-5.3-codex", - name: "GPT-5.3 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gemini-2.5-pro": { - id: "gemini-2.5-pro", - name: "Gemini 2.5 Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 1048576, output: 65536 }, - }, - "gpt-5.2": { - id: "gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "qwen3.6-plus": { - id: "qwen3.6-plus", - name: "Qwen3.6 Plus", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-05-09", - last_updated: "2026-05-09", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.282, output: 1.692, cache_read: 0.0282, cache_write: 0.3525 }, - limit: { context: 991000, output: 64000 }, - }, - "gpt-5.4-mini": { - id: "gpt-5.4-mini", - name: "GPT-5.4-Mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: false, - release_date: "2026-03-11", - last_updated: "2026-03-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5, cache_read: 0.075 }, - limit: { context: 400000, output: 128000 }, - }, - "glm-5.1": { - id: "glm-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-03-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.845, output: 3.38, cache_read: 0.183112 }, - limit: { context: 200000, output: 128000 }, - }, - "o4-mini": { - id: "o4-mini", - name: "o4-mini", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.275 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-5.2-codex": { - id: "gpt-5.2-codex", - name: "GPT-5.2-Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - knowledge: "2025-08-31", - release_date: "2026-01-14", - last_updated: "2026-01-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "gemini-2.5-flash": { - id: "gemini-2.5-flash", - name: "Gemini 2.5 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.499, cache_read: 0.03 }, - limit: { context: 1048576, output: 65536 }, - }, - "gpt-5.1-codex-mini": { - id: "gpt-5.1-codex-mini", - name: "GPT-5.1 Codex mini", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gemini-3.1-flash-lite": { - id: "gemini-3.1-flash-lite", - name: "Gemini 3.1 Flash Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-03-03", - last_updated: "2026-03-03", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5, cache_read: 0.25 }, - limit: { context: 1048576, output: 65536 }, - }, - "gpt-5.1": { - id: "gpt-5.1", - name: "GPT-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-11", - release_date: "2025-11-15", - last_updated: "2025-11-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "claude-opus-4-6-think": { - id: "claude-opus-4-6-think", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 32000 }, - }, - "coding-minimax-m2.7-free": { - id: "coding-minimax-m2.7-free", - name: "Coding-MiniMax-M2.7-Free", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 204800, output: 13100 }, - }, - "deepseek-v4-flash": { - id: "deepseek-v4-flash", - name: "DeepSeek V4 Flash", - family: "deepseek-flash", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.154, output: 0.308, cache_read: 0.0308 }, - limit: { context: 1000000, output: 384000 }, - }, - "kimi-k2.6": { - id: "kimi-k2.6", - name: "Kimi K2.6", - family: "kimi-k2.6", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 3.9995, cache_read: 0.160835 }, - limit: { context: 262144, output: 262144 }, - }, - "gpt-5.4": { - id: "gpt-5.4", - name: "GPT-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - release_date: "2026-03-11", - last_updated: "2026-03-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 15, cache_read: 0.25 }, - limit: { context: 400000, output: 128000 }, - }, - "claude-opus-4-6": { - id: "claude-opus-4-6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "deepseek-v4-pro": { - id: "deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.478, output: 0.956, cache_read: 0.004302 }, - limit: { context: 1000000, output: 384000 }, - }, - "claude-opus-4-7-think": { - id: "claude-opus-4-7-think", - name: "Claude Opus 4.7 Thinking", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 32000 }, - }, - "coding-minimax-m2.7": { - id: "coding-minimax-m2.7", - name: "Coding MiniMax M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 204800, output: 13100 }, - }, - "qwen3.6-max-preview": { - id: "qwen3.6-max-preview", - name: "Qwen3.6 Max Preview", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-05-09", - last_updated: "2026-05-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.268, output: 7.608, cache_read: 0.1268, cache_write: 1.585 }, - limit: { context: 240000, output: 64000 }, - }, - "gpt-4.1": { - id: "gpt-4.1", - name: "GPT-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 1047576, output: 32768 }, - }, - "gpt-4.1-mini": { - id: "gpt-4.1-mini", - name: "GPT-4.1 mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.6, cache_read: 0.1 }, - limit: { context: 1047576, output: 32768 }, - }, - "gpt-5.1-codex": { - id: "gpt-5.1-codex", - name: "GPT-5.1 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "claude-sonnet-4-6-think": { - id: "claude-sonnet-4-6-think", - name: "Claude Sonnet 4.6 Think", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.6, cache_write: 7.5 }, - }, - limit: { context: 200000, output: 64000 }, - }, - "qwen3.6-flash": { - id: "qwen3.6-flash", - name: "Qwen3.6 Flash", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.169, output: 1.014, cache_read: 0.0169, cache_write: 0.21125 }, - limit: { context: 991000, output: 64000 }, - }, - }, - }, - cerebras: { - id: "cerebras", - env: ["CEREBRAS_API_KEY"], - npm: "@ai-sdk/cerebras", - name: "Cerebras", - doc: "https://inference-docs.cerebras.ai/models/overview", - models: { - "llama3.1-8b": { - id: "llama3.1-8b", - name: "Llama 3.1 8B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 32000, output: 8000 }, - }, - "qwen-3-235b-a22b-instruct-2507": { - id: "qwen-3-235b-a22b-instruct-2507", - name: "Qwen 3 235B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-22", - last_updated: "2025-07-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.2 }, - limit: { context: 131000, output: 32000 }, - }, - "zai-glm-4.7": { - id: "zai-glm-4.7", - name: "Z.AI GLM-4.7", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-01-10", - last_updated: "2026-01-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.25, output: 2.75, cache_read: 0, cache_write: 0 }, - limit: { context: 131072, output: 40000 }, - }, - "gpt-oss-120b": { - id: "gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 0.69 }, - limit: { context: 131072, output: 32768 }, - }, - }, - }, - lmstudio: { - id: "lmstudio", - env: ["LMSTUDIO_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "http://127.0.0.1:1234/v1", - name: "LMStudio", - doc: "https://lmstudio.ai/models", - models: { - "openai/gpt-oss-20b": { - id: "openai/gpt-oss-20b", - name: "GPT OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 32768 }, - }, - "qwen/qwen3-coder-30b": { - id: "qwen/qwen3-coder-30b", - name: "Qwen3 Coder 30B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwen3-30b-a3b-2507": { - id: "qwen/qwen3-30b-a3b-2507", - name: "Qwen3 30B A3B 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-30", - last_updated: "2025-07-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 16384 }, - }, - }, - }, - lucidquery: { - id: "lucidquery", - env: ["LUCIDQUERY_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://lucidquery.com/api/v1", - name: "LucidQuery AI", - doc: "https://lucidquery.com/api/docs", - models: { - "lucidnova-rf1-100b": { - id: "lucidnova-rf1-100b", - name: "LucidNova RF1 100B", - family: "nova", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-09-16", - release_date: "2024-12-28", - last_updated: "2025-09-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 5 }, - limit: { context: 120000, output: 8000 }, - }, - "lucidquery-nexus-coder": { - id: "lucidquery-nexus-coder", - name: "LucidQuery Nexus Coder", - family: "lucid", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-01", - release_date: "2025-09-01", - last_updated: "2025-09-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 5 }, - limit: { context: 250000, output: 60000 }, - }, - }, - }, - "moonshotai-cn": { - id: "moonshotai-cn", - env: ["MOONSHOT_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.moonshot.cn/v1", - name: "Moonshot AI (China)", - doc: "https://platform.moonshot.cn/docs/api/chat", - models: { - "kimi-k2-thinking": { - id: "kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5, cache_read: 0.15 }, - limit: { context: 262144, output: 262144 }, - }, - "kimi-k2-0711-preview": { - id: "kimi-k2-0711-preview", - name: "Kimi K2 0711", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-07-14", - last_updated: "2025-07-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5, cache_read: 0.15 }, - limit: { context: 131072, output: 16384 }, - }, - "kimi-k2-turbo-preview": { - id: "kimi-k2-turbo-preview", - name: "Kimi K2 Turbo", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.4, output: 10, cache_read: 0.6 }, - limit: { context: 262144, output: 262144 }, - }, - "kimi-k2.6": { - id: "kimi-k2.6", - name: "Kimi K2.6", - family: "kimi-k2.6", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262144, output: 262144 }, - }, - "kimi-k2-thinking-turbo": { - id: "kimi-k2-thinking-turbo", - name: "Kimi K2 Thinking Turbo", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.15, output: 8, cache_read: 0.15 }, - limit: { context: 262144, output: 262144 }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi K2.5", - family: "kimi-k2.5", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: false, - knowledge: "2025-01", - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.1 }, - limit: { context: 262144, output: 262144 }, - }, - "kimi-k2-0905-preview": { - id: "kimi-k2-0905-preview", - name: "Kimi K2 0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5, cache_read: 0.15 }, - limit: { context: 262144, output: 262144 }, - }, - }, - }, - "azure-cognitive-services": { - id: "azure-cognitive-services", - env: ["AZURE_COGNITIVE_SERVICES_RESOURCE_NAME", "AZURE_COGNITIVE_SERVICES_API_KEY"], - npm: "@ai-sdk/azure", - name: "Azure Cognitive Services", - doc: "https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models", - models: { - "claude-haiku-4-5": { - id: "claude-haiku-4-5", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-02-31", - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - provider: { - npm: "@ai-sdk/anthropic", - api: "https://${AZURE_COGNITIVE_SERVICES_RESOURCE_NAME}.services.ai.azure.com/anthropic/v1", - }, - }, - "claude-opus-4-1": { - id: "claude-opus-4-1", - name: "Claude Opus 4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - provider: { - npm: "@ai-sdk/anthropic", - api: "https://${AZURE_COGNITIVE_SERVICES_RESOURCE_NAME}.services.ai.azure.com/anthropic/v1", - }, - }, - "claude-opus-4-5": { - id: "claude-opus-4-5", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-08-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - provider: { - npm: "@ai-sdk/anthropic", - api: "https://${AZURE_COGNITIVE_SERVICES_RESOURCE_NAME}.services.ai.azure.com/anthropic/v1", - }, - }, - "kimi-k2.6": { - id: "kimi-k2.6", - name: "Kimi K2.6", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4 }, - limit: { context: 262144, output: 262144 }, - provider: { - npm: "@ai-sdk/openai-compatible", - api: "https://${AZURE_RESOURCE_NAME}.services.ai.azure.com/models", - shape: "completions", - }, - }, - "claude-opus-4-6": { - id: "claude-opus-4-6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 5, - output: 25, - cache_read: 0.5, - cache_write: 6.25, - context_over_200k: { input: 10, output: 37.5, cache_read: 1, cache_write: 12.5 }, - }, - limit: { context: 200000, output: 128000 }, - provider: { - npm: "@ai-sdk/anthropic", - api: "https://${AZURE_COGNITIVE_SERVICES_RESOURCE_NAME}.services.ai.azure.com/anthropic/v1", - }, - }, - "claude-sonnet-4-5": { - id: "claude-sonnet-4-5", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - provider: { - npm: "@ai-sdk/anthropic", - api: "https://${AZURE_COGNITIVE_SERVICES_RESOURCE_NAME}.services.ai.azure.com/anthropic/v1", - }, - }, - "mai-ds-r1": { - id: "mai-ds-r1", - name: "MAI-DS-R1", - family: "mai", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2024-06", - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.35, output: 5.4 }, - limit: { context: 128000, output: 8192 }, - }, - "llama-4-maverick-17b-128e-instruct-fp8": { - id: "llama-4-maverick-17b-128e-instruct-fp8", - name: "Llama 4 Maverick 17B 128E Instruct FP8", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 1 }, - limit: { context: 128000, output: 8192 }, - }, - "codestral-2501": { - id: "codestral-2501", - name: "Codestral 25.01", - family: "codestral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 256000, output: 256000 }, - }, - "gpt-5.1-codex": { - id: "gpt-5.1-codex", - name: "GPT-5.1 Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text", "image", "audio"], output: ["text", "image", "audio"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "kimi-k2-thinking": { - id: "kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2025-12-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5, cache_read: 0.15 }, - limit: { context: 262144, output: 262144 }, - }, - "deepseek-r1-0528": { - id: "deepseek-r1-0528", - name: "DeepSeek-R1-0528", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.35, output: 5.4 }, - limit: { context: 163840, output: 163840 }, - }, - "gpt-3.5-turbo-instruct": { - id: "gpt-3.5-turbo-instruct", - name: "GPT-3.5 Turbo Instruct", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2021-08", - release_date: "2023-09-21", - last_updated: "2023-09-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5, output: 2 }, - limit: { context: 4096, output: 4096 }, - }, - "mistral-medium-2505": { - id: "mistral-medium-2505", - name: "Mistral Medium 3", - family: "mistral-medium", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-05-07", - last_updated: "2025-05-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 128000, output: 128000 }, - }, - "phi-4-reasoning-plus": { - id: "phi-4-reasoning-plus", - name: "Phi-4-reasoning-plus", - family: "phi", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.125, output: 0.5 }, - limit: { context: 32000, output: 4096 }, - }, - "cohere-embed-v3-english": { - id: "cohere-embed-v3-english", - name: "Embed v3 English", - family: "cohere-embed", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2023-11-07", - last_updated: "2023-11-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0 }, - limit: { context: 512, output: 1024 }, - }, - "gpt-4-32k": { - id: "gpt-4-32k", - name: "GPT-4 32K", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-11", - release_date: "2023-03-14", - last_updated: "2023-03-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 60, output: 120 }, - limit: { context: 32768, output: 32768 }, - }, - "gpt-5": { - id: "gpt-5", - name: "GPT-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 272000, output: 128000 }, - }, - "phi-4": { - id: "phi-4", - name: "Phi-4", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.125, output: 0.5 }, - limit: { context: 128000, output: 4096 }, - }, - "gpt-3.5-turbo-0613": { - id: "gpt-3.5-turbo-0613", - name: "GPT-3.5 Turbo 0613", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2021-08", - release_date: "2023-06-13", - last_updated: "2023-06-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 4 }, - limit: { context: 16384, output: 16384 }, - }, - "phi-3-medium-128k-instruct": { - id: "phi-3-medium-128k-instruct", - name: "Phi-3-medium-instruct (128k)", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.17, output: 0.68 }, - limit: { context: 128000, output: 4096 }, - }, - "deepseek-v3.2": { - id: "deepseek-v3.2", - name: "DeepSeek-V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.58, output: 1.68 }, - limit: { context: 128000, output: 128000 }, - }, - "phi-3-small-128k-instruct": { - id: "phi-3-small-128k-instruct", - name: "Phi-3-small-instruct (128k)", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 4096 }, - }, - "gpt-3.5-turbo-0301": { - id: "gpt-3.5-turbo-0301", - name: "GPT-3.5 Turbo 0301", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2021-08", - release_date: "2023-03-01", - last_updated: "2023-03-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5, output: 2 }, - limit: { context: 4096, output: 4096 }, - }, - "phi-4-mini": { - id: "phi-4-mini", - name: "Phi-4-mini", - family: "phi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 128000, output: 4096 }, - }, - "gpt-5-codex": { - id: "gpt-5-codex", - name: "GPT-5-Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 400000, output: 128000 }, - }, - "meta-llama-3-8b-instruct": { - id: "meta-llama-3-8b-instruct", - name: "Meta-Llama-3-8B-Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-12", - release_date: "2024-04-18", - last_updated: "2024-04-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.61 }, - limit: { context: 8192, output: 2048 }, - }, - "gpt-4": { - id: "gpt-4", - name: "GPT-4", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-11", - release_date: "2023-03-14", - last_updated: "2023-03-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 60, output: 120 }, - limit: { context: 8192, output: 8192 }, - }, - "phi-4-mini-reasoning": { - id: "phi-4-mini-reasoning", - name: "Phi-4-mini-reasoning", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 128000, output: 4096 }, - }, - "meta-llama-3.1-70b-instruct": { - id: "meta-llama-3.1-70b-instruct", - name: "Meta-Llama-3.1-70B-Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.68, output: 3.54 }, - limit: { context: 128000, output: 32768 }, - }, - "phi-3-mini-4k-instruct": { - id: "phi-3-mini-4k-instruct", - name: "Phi-3-mini-instruct (4k)", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.52 }, - limit: { context: 4096, output: 1024 }, - }, - "deepseek-v3.1": { - id: "deepseek-v3.1", - name: "DeepSeek-V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.56, output: 1.68 }, - limit: { context: 131072, output: 131072 }, - }, - "text-embedding-3-small": { - id: "text-embedding-3-small", - name: "text-embedding-3-small", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2024-01-25", - last_updated: "2024-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.02, output: 0 }, - limit: { context: 8191, output: 1536 }, - }, - "gpt-3.5-turbo-1106": { - id: "gpt-3.5-turbo-1106", - name: "GPT-3.5 Turbo 1106", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2021-08", - release_date: "2023-11-06", - last_updated: "2023-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 2 }, - limit: { context: 16384, output: 16384 }, - }, - "model-router": { - id: "model-router", - name: "Model Router", - family: "model-router", - attachment: true, - reasoning: false, - tool_call: true, - release_date: "2025-05-19", - last_updated: "2025-11-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "mistral-small-2503": { - id: "mistral-small-2503", - name: "Mistral Small 3.1", - family: "mistral-small", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2025-03-01", - last_updated: "2025-03-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 128000, output: 32768 }, - }, - o1: { - id: "o1", - name: "o1", - family: "o", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2023-09", - release_date: "2024-12-05", - last_updated: "2024-12-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 60, cache_read: 7.5 }, - limit: { context: 200000, output: 100000 }, - }, - "grok-4-fast-reasoning": { - id: "grok-4-fast-reasoning", - name: "Grok 4 Fast (Reasoning)", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "gpt-5.1": { - id: "gpt-5.1", - name: "GPT-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text", "image", "audio"], output: ["text", "image", "audio"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 272000, output: 128000 }, - }, - "cohere-embed-v3-multilingual": { - id: "cohere-embed-v3-multilingual", - name: "Embed v3 Multilingual", - family: "cohere-embed", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2023-11-07", - last_updated: "2023-11-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0 }, - limit: { context: 512, output: 1024 }, - }, - "o1-preview": { - id: "o1-preview", - name: "o1-preview", - family: "o", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2023-09", - release_date: "2024-09-12", - last_updated: "2024-09-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 16.5, output: 66, cache_read: 8.25 }, - limit: { context: 128000, output: 32768 }, - }, - "gpt-3.5-turbo-0125": { - id: "gpt-3.5-turbo-0125", - name: "GPT-3.5 Turbo 0125", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2021-08", - release_date: "2024-01-25", - last_updated: "2024-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 16384, output: 16384 }, - }, - "gpt-5.1-codex-mini": { - id: "gpt-5.1-codex-mini", - name: "GPT-5.1 Codex Mini", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, output: 128000 }, - }, - "cohere-embed-v-4-0": { - id: "cohere-embed-v-4-0", - name: "Embed v4", - family: "cohere-embed", - attachment: true, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.12, output: 0 }, - limit: { context: 128000, output: 1536 }, - }, - "gpt-5.2-codex": { - id: "gpt-5.2-codex", - name: "GPT-5.2 Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-01-14", - last_updated: "2026-01-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "gpt-4-turbo-vision": { - id: "gpt-4-turbo-vision", - name: "GPT-4 Turbo Vision", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-11", - release_date: "2023-11-06", - last_updated: "2024-04-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 30 }, - limit: { context: 128000, output: 4096 }, - }, - "gpt-5.1-chat": { - id: "gpt-5.1-chat", - name: "GPT-5.1 Chat", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text", "image", "audio"], output: ["text", "image", "audio"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 128000, output: 16384 }, - }, - "meta-llama-3.1-405b-instruct": { - id: "meta-llama-3.1-405b-instruct", - name: "Meta-Llama-3.1-405B-Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 5.33, output: 16 }, - limit: { context: 128000, output: 32768 }, - }, - "llama-3.2-11b-vision-instruct": { - id: "llama-3.2-11b-vision-instruct", - name: "Llama-3.2-11B-Vision-Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-25", - last_updated: "2024-09-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.37, output: 0.37 }, - limit: { context: 128000, output: 8192 }, - }, - "cohere-command-a": { - id: "cohere-command-a", - name: "Command A", - family: "command-a", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-06-01", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.5, output: 10 }, - limit: { context: 256000, output: 8000 }, - }, - "mistral-large-2411": { - id: "mistral-large-2411", - name: "Mistral Large 24.11", - family: "mistral-large", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2024-11-01", - last_updated: "2024-11-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6 }, - limit: { context: 128000, output: 32768 }, - }, - "gpt-5.2": { - id: "gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "deepseek-v3.2-speciale": { - id: "deepseek-v3.2-speciale", - name: "DeepSeek-V3.2-Speciale", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2024-07", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.58, output: 1.68 }, - limit: { context: 128000, output: 128000 }, - }, - "deepseek-r1": { - id: "deepseek-r1", - name: "DeepSeek-R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2024-07", - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.35, output: 5.4 }, - limit: { context: 163840, output: 163840 }, - }, - "llama-3.2-90b-vision-instruct": { - id: "llama-3.2-90b-vision-instruct", - name: "Llama-3.2-90B-Vision-Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-25", - last_updated: "2024-09-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 2.04, output: 2.04 }, - limit: { context: 128000, output: 8192 }, - }, - "text-embedding-ada-002": { - id: "text-embedding-ada-002", - name: "text-embedding-ada-002", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2022-12-15", - last_updated: "2022-12-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "gpt-5.3-codex": { - id: "gpt-5.3-codex", - name: "GPT-5.3 Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-24", - last_updated: "2026-02-24", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "phi-3-small-8k-instruct": { - id: "phi-3-small-8k-instruct", - name: "Phi-3-small-instruct (8k)", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 8192, output: 2048 }, - }, - "meta-llama-3-70b-instruct": { - id: "meta-llama-3-70b-instruct", - name: "Meta-Llama-3-70B-Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-12", - release_date: "2024-04-18", - last_updated: "2024-04-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.68, output: 3.54 }, - limit: { context: 8192, output: 2048 }, - }, - "gpt-5-nano": { - id: "gpt-5-nano", - name: "GPT-5 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4, cache_read: 0.01 }, - limit: { context: 272000, output: 128000 }, - }, - "gpt-5-mini": { - id: "gpt-5-mini", - name: "GPT-5 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.03 }, - limit: { context: 272000, output: 128000 }, - }, - "phi-4-reasoning": { - id: "phi-4-reasoning", - name: "Phi-4-reasoning", - family: "phi", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.125, output: 0.5 }, - limit: { context: 32000, output: 4096 }, - }, - "phi-3-mini-128k-instruct": { - id: "phi-3-mini-128k-instruct", - name: "Phi-3-mini-instruct (128k)", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.52 }, - limit: { context: 128000, output: 4096 }, - }, - "text-embedding-3-large": { - id: "text-embedding-3-large", - name: "text-embedding-3-large", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2024-01-25", - last_updated: "2024-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.13, output: 0 }, - limit: { context: 8191, output: 3072 }, - }, - "o1-mini": { - id: "o1-mini", - name: "o1-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2023-09", - release_date: "2024-09-12", - last_updated: "2024-09-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.55 }, - limit: { context: 128000, output: 65536 }, - }, - "phi-3.5-moe-instruct": { - id: "phi-3.5-moe-instruct", - name: "Phi-3.5-MoE-instruct", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-08-20", - last_updated: "2024-08-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.16, output: 0.64 }, - limit: { context: 128000, output: 4096 }, - }, - "gpt-5-chat": { - id: "gpt-5-chat", - name: "GPT-5 Chat", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: false, - temperature: false, - knowledge: "2024-10-24", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 128000, output: 16384 }, - }, - "deepseek-v3-0324": { - id: "deepseek-v3-0324", - name: "DeepSeek-V3-0324", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-03-24", - last_updated: "2025-03-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.14, output: 4.56 }, - limit: { context: 131072, output: 131072 }, - }, - "llama-3.3-70b-instruct": { - id: "llama-3.3-70b-instruct", - name: "Llama-3.3-70B-Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.71, output: 0.71 }, - limit: { context: 128000, output: 32768 }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-06", - last_updated: "2026-02-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3 }, - limit: { context: 262144, output: 262144 }, - provider: { - npm: "@ai-sdk/openai-compatible", - api: "https://${AZURE_RESOURCE_NAME}.services.ai.azure.com/models", - shape: "completions", - }, - }, - "meta-llama-3.1-8b-instruct": { - id: "meta-llama-3.1-8b-instruct", - name: "Meta-Llama-3.1-8B-Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.61 }, - limit: { context: 128000, output: 32768 }, - }, - "ministral-3b": { - id: "ministral-3b", - name: "Ministral 3B", - family: "ministral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.04 }, - limit: { context: 128000, output: 8192 }, - }, - "phi-3-medium-4k-instruct": { - id: "phi-3-medium-4k-instruct", - name: "Phi-3-medium-instruct (4k)", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.17, output: 0.68 }, - limit: { context: 4096, output: 1024 }, - }, - "llama-4-scout-17b-16e-instruct": { - id: "llama-4-scout-17b-16e-instruct", - name: "Llama 4 Scout 17B 16E Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.78 }, - limit: { context: 128000, output: 8192 }, - }, - "phi-3.5-mini-instruct": { - id: "phi-3.5-mini-instruct", - name: "Phi-3.5-mini-instruct", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-08-20", - last_updated: "2024-08-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.52 }, - limit: { context: 128000, output: 4096 }, - }, - "phi-4-multimodal": { - id: "phi-4-multimodal", - name: "Phi-4-multimodal", - family: "phi", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.32, input_audio: 4 }, - limit: { context: 128000, output: 4096 }, - }, - "codex-mini": { - id: "codex-mini", - name: "Codex Mini", - family: "gpt-codex-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-04", - release_date: "2025-05-16", - last_updated: "2025-05-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5, output: 6, cache_read: 0.375 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-5.2-chat": { - id: "gpt-5.2-chat", - name: "GPT-5.2 Chat", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 128000, output: 16384 }, - }, - "mistral-nemo": { - id: "mistral-nemo", - name: "Mistral Nemo", - family: "mistral-nemo", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 128000, output: 128000 }, - }, - "gpt-5.4-mini": { - id: "gpt-5.4-mini", - name: "GPT-5.4 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5, cache_read: 0.075 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-5.4-nano": { - id: "gpt-5.4-nano", - name: "GPT-5.4 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.25, cache_read: 0.02 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-5.4-pro": { - id: "gpt-5.4-pro", - name: "GPT-5.4 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180, context_over_200k: { input: 60, output: 270 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "gpt-5.4": { - id: "gpt-5.4", - name: "GPT-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 2.5, - output: 15, - cache_read: 0.25, - context_over_200k: { input: 5, output: 22.5, cache_read: 0.5 }, - }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "grok-4-fast-non-reasoning": { - id: "grok-4-fast-non-reasoning", - name: "Grok 4 Fast (Non-Reasoning)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "grok-3": { - id: "grok-3", - name: "Grok 3", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75 }, - limit: { context: 131072, output: 8192 }, - }, - "gpt-4.1-mini": { - id: "gpt-4.1-mini", - name: "GPT-4.1 mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.6, cache_read: 0.1 }, - limit: { context: 1047576, output: 32768 }, - }, - "gpt-4.1": { - id: "gpt-4.1", - name: "GPT-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 1047576, output: 32768 }, - }, - "cohere-command-r-plus-08-2024": { - id: "cohere-command-r-plus-08-2024", - name: "Command R+", - family: "command-r", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06-01", - release_date: "2024-08-30", - last_updated: "2024-08-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.5, output: 10 }, - limit: { context: 128000, output: 4000 }, - }, - "gpt-4o": { - id: "gpt-4o", - name: "GPT-4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-05-13", - last_updated: "2024-08-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10, cache_read: 1.25 }, - limit: { context: 128000, output: 16384 }, - }, - "gpt-5-pro": { - id: "gpt-5-pro", - name: "GPT-5 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-10-06", - last_updated: "2025-10-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 120 }, - limit: { context: 400000, output: 272000 }, - }, - o3: { - id: "o3", - name: "o3", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 200000, output: 100000 }, - }, - "grok-3-mini": { - id: "grok-3-mini", - name: "Grok 3 Mini", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.5, reasoning: 0.5, cache_read: 0.075 }, - limit: { context: 131072, output: 8192 }, - }, - "gpt-4.1-nano": { - id: "gpt-4.1-nano", - name: "GPT-4.1 nano", - family: "gpt-nano", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.03 }, - limit: { context: 1047576, output: 32768 }, - }, - "grok-4": { - id: "grok-4", - name: "Grok 4", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, reasoning: 15, cache_read: 0.75 }, - limit: { context: 256000, output: 64000 }, - }, - "o3-mini": { - id: "o3-mini", - name: "o3-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05", - release_date: "2024-12-20", - last_updated: "2025-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.55 }, - limit: { context: 200000, output: 100000 }, - }, - "grok-code-fast-1": { - id: "grok-code-fast-1", - name: "Grok Code Fast 1", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2025-08-28", - last_updated: "2025-08-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.5, cache_read: 0.02 }, - limit: { context: 256000, output: 10000 }, - }, - "o4-mini": { - id: "o4-mini", - name: "o4-mini", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.28 }, - limit: { context: 200000, output: 100000 }, - }, - "cohere-command-r-08-2024": { - id: "cohere-command-r-08-2024", - name: "Command R", - family: "command-r", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06-01", - release_date: "2024-08-30", - last_updated: "2024-08-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 4000 }, - }, - "gpt-4o-mini": { - id: "gpt-4o-mini", - name: "GPT-4o mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.08 }, - limit: { context: 128000, output: 16384 }, - }, - "gpt-4-turbo": { - id: "gpt-4-turbo", - name: "GPT-4 Turbo", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2023-11-06", - last_updated: "2024-04-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 30 }, - limit: { context: 128000, output: 4096 }, - }, - "gpt-5.5": { - id: "gpt-5.5", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5, context_over_200k: { input: 10, output: 45, cache_read: 1 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - }, - }, - "abliteration-ai": { - id: "abliteration-ai", - env: ["ABLIT_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.abliteration.ai/v1", - name: "abliteration.ai", - doc: "https://docs.abliteration.ai/models", - models: { - "abliterated-model": { - id: "abliterated-model", - name: "Abliterated Model", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-01-06", - last_updated: "2026-01-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 3, output: 3 }, - limit: { context: 150000, input: 150000, output: 8192 }, - }, - }, - }, - "wafer.ai": { - id: "wafer.ai", - env: ["WAFER_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://pass.wafer.ai/v1", - name: "Wafer", - doc: "https://docs.wafer.ai/wafer-pass", - models: { - "Qwen3.5-397B-A17B": { - id: "Qwen3.5-397B-A17B", - name: "Qwen3.5 397B A17B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 262144, output: 65536 }, - }, - "GLM-5.1": { - id: "GLM-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-07", - last_updated: "2026-04-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 202752, output: 131072 }, - }, - "MiniMax-M2.7": { - id: "MiniMax-M2.7", - name: "MiniMax-M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "DeepSeek-V4-Pro": { - id: "DeepSeek-V4-Pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 1000000, output: 384000 }, - }, - }, - }, - cohere: { - id: "cohere", - env: ["COHERE_API_KEY"], - npm: "@ai-sdk/cohere", - name: "Cohere", - doc: "https://docs.cohere.com/docs/models", - models: { - "command-a-reasoning-08-2025": { - id: "command-a-reasoning-08-2025", - name: "Command A Reasoning", - family: "command-a", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-06-01", - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.5, output: 10 }, - limit: { context: 256000, output: 32000 }, - }, - "command-r7b-12-2024": { - id: "command-r7b-12-2024", - name: "Command R7B", - family: "command-r", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06-01", - release_date: "2024-02-27", - last_updated: "2024-02-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.0375, output: 0.15 }, - limit: { context: 128000, output: 4000 }, - }, - "c4ai-aya-vision-8b": { - id: "c4ai-aya-vision-8b", - name: "Aya Vision 8B", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-03-04", - last_updated: "2025-05-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 16000, output: 4000 }, - }, - "command-r-plus-08-2024": { - id: "command-r-plus-08-2024", - name: "Command R+", - family: "command-r", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06-01", - release_date: "2024-08-30", - last_updated: "2024-08-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.5, output: 10 }, - limit: { context: 128000, output: 4000 }, - }, - "c4ai-aya-expanse-8b": { - id: "c4ai-aya-expanse-8b", - name: "Aya Expanse 8B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-10-24", - last_updated: "2024-10-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 8000, output: 4000 }, - }, - "command-r7b-arabic-02-2025": { - id: "command-r7b-arabic-02-2025", - name: "Command R7B Arabic", - family: "command-r", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06-01", - release_date: "2025-02-27", - last_updated: "2025-02-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.0375, output: 0.15 }, - limit: { context: 128000, output: 4000 }, - }, - "command-a-vision-07-2025": { - id: "command-a-vision-07-2025", - name: "Command A Vision", - family: "command-a", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-06-01", - release_date: "2025-07-31", - last_updated: "2025-07-31", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 2.5, output: 10 }, - limit: { context: 128000, output: 8000 }, - }, - "c4ai-aya-vision-32b": { - id: "c4ai-aya-vision-32b", - name: "Aya Vision 32B", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-03-04", - last_updated: "2025-05-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 16000, output: 4000 }, - }, - "command-a-translate-08-2025": { - id: "command-a-translate-08-2025", - name: "Command A Translate", - family: "command-a", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06-01", - release_date: "2025-08-28", - last_updated: "2025-08-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.5, output: 10 }, - limit: { context: 8000, output: 8000 }, - }, - "command-r-08-2024": { - id: "command-r-08-2024", - name: "Command R", - family: "command-r", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06-01", - release_date: "2024-08-30", - last_updated: "2024-08-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 4000 }, - }, - "c4ai-aya-expanse-32b": { - id: "c4ai-aya-expanse-32b", - name: "Aya Expanse 32B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-10-24", - last_updated: "2024-10-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 128000, output: 4000 }, - }, - "command-a-03-2025": { - id: "command-a-03-2025", - name: "Command A", - family: "command-a", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06-01", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.5, output: 10 }, - limit: { context: 256000, output: 8000 }, - }, - }, - }, - "cloudferro-sherlock": { - id: "cloudferro-sherlock", - env: ["CLOUDFERRO_SHERLOCK_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api-sherlock.cloudferro.com/openai/v1/", - name: "CloudFerro Sherlock", - doc: "https://docs.sherlock.cloudferro.com/", - models: { - "meta-llama/Llama-3.3-70B-Instruct": { - id: "meta-llama/Llama-3.3-70B-Instruct", - name: "Llama 3.3 70B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10-09", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.92, output: 2.92 }, - limit: { context: 70000, output: 70000 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "OpenAI GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-28", - last_updated: "2025-08-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.92, output: 2.92 }, - limit: { context: 131000, output: 131000 }, - }, - "speakleash/Bielik-11B-v3.0-Instruct": { - id: "speakleash/Bielik-11B-v3.0-Instruct", - name: "Bielik 11B v3.0 Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-03", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.67, output: 0.67 }, - limit: { context: 32000, output: 32000 }, - }, - "speakleash/Bielik-11B-v2.6-Instruct": { - id: "speakleash/Bielik-11B-v2.6-Instruct", - name: "Bielik 11B v2.6 Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-03", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.67, output: 0.67 }, - limit: { context: 32000, output: 32000 }, - }, - "MiniMaxAI/MiniMax-M2.5": { - id: "MiniMaxAI/MiniMax-M2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2026-01", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 196000, input: 180000, output: 16000 }, - }, - }, - }, - "kuae-cloud-coding-plan": { - id: "kuae-cloud-coding-plan", - env: ["KUAE_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://coding-plan-endpoint.kuaecloud.net/v1", - name: "KUAE Cloud Coding Plan", - doc: "https://docs.mthreads.com/kuaecloud/kuaecloud-doc-online/coding_plan/", - models: { - "GLM-4.7": { - id: "GLM-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - }, - }, - xai: { - id: "xai", - env: ["XAI_API_KEY"], - npm: "@ai-sdk/xai", - name: "xAI", - doc: "https://docs.x.ai/docs/models", - models: { - "grok-2-1212": { - id: "grok-2-1212", - name: "Grok 2 (1212)", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2024-12-12", - last_updated: "2024-12-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 10, cache_read: 2 }, - limit: { context: 131072, output: 8192 }, - }, - "grok-vision-beta": { - id: "grok-vision-beta", - name: "Grok Vision Beta", - family: "grok-vision", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2024-11-01", - last_updated: "2024-11-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 15, cache_read: 5 }, - limit: { context: 8192, output: 4096 }, - }, - "grok-4.3": { - id: "grok-4.3", - name: "Grok 4.3", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-05-01", - last_updated: "2026-05-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { - input: 1.25, - output: 2.5, - cache_read: 0.2, - context_over_200k: { input: 2.5, output: 5, cache_read: 0.4 }, - }, - limit: { context: 1000000, output: 30000 }, - }, - "grok-3-mini-fast": { - id: "grok-3-mini-fast", - name: "Grok 3 Mini Fast", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 4, reasoning: 4, cache_read: 0.15 }, - limit: { context: 131072, output: 8192 }, - }, - "grok-3-mini-latest": { - id: "grok-3-mini-latest", - name: "Grok 3 Mini Latest", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.5, reasoning: 0.5, cache_read: 0.075 }, - limit: { context: 131072, output: 8192 }, - }, - "grok-3-fast": { - id: "grok-3-fast", - name: "Grok 3 Fast", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 1.25 }, - limit: { context: 131072, output: 8192 }, - }, - "grok-2-vision-latest": { - id: "grok-2-vision-latest", - name: "Grok 2 Vision Latest", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2024-08-20", - last_updated: "2024-12-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 10, cache_read: 2 }, - limit: { context: 8192, output: 4096 }, - }, - "grok-4.20-0309-reasoning": { - id: "grok-4.20-0309-reasoning", - name: "Grok 4.20 (Reasoning)", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-09", - last_updated: "2026-03-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.2, context_over_200k: { input: 4, output: 12, cache_read: 0.4 } }, - limit: { context: 2000000, output: 30000 }, - }, - "grok-4-1-fast-non-reasoning": { - id: "grok-4-1-fast-non-reasoning", - name: "Grok 4.1 Fast (Non-Reasoning)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "grok-3-mini-fast-latest": { - id: "grok-3-mini-fast-latest", - name: "Grok 3 Mini Fast Latest", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 4, reasoning: 4, cache_read: 0.15 }, - limit: { context: 131072, output: 8192 }, - }, - "grok-4-fast": { - id: "grok-4-fast", - name: "Grok 4 Fast", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "grok-3-latest": { - id: "grok-3-latest", - name: "Grok 3 Latest", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75 }, - limit: { context: 131072, output: 8192 }, - }, - "grok-2": { - id: "grok-2", - name: "Grok 2", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2024-08-20", - last_updated: "2024-08-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 10, cache_read: 2 }, - limit: { context: 131072, output: 8192 }, - }, - "grok-code-fast-1": { - id: "grok-code-fast-1", - name: "Grok Code Fast 1", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2025-08-28", - last_updated: "2025-08-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.5, cache_read: 0.02 }, - limit: { context: 256000, output: 10000 }, - }, - "grok-4.20-0309-non-reasoning": { - id: "grok-4.20-0309-non-reasoning", - name: "Grok 4.20 (Non-Reasoning)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-03-09", - last_updated: "2026-03-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.2, context_over_200k: { input: 4, output: 12, cache_read: 0.4 } }, - limit: { context: 2000000, output: 30000 }, - }, - "grok-3-fast-latest": { - id: "grok-3-fast-latest", - name: "Grok 3 Fast Latest", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 1.25 }, - limit: { context: 131072, output: 8192 }, - }, - "grok-4.20-multi-agent-0309": { - id: "grok-4.20-multi-agent-0309", - name: "Grok 4.20 Multi-Agent", - family: "grok", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2026-03-09", - last_updated: "2026-03-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.2, context_over_200k: { input: 4, output: 12, cache_read: 0.4 } }, - limit: { context: 2000000, output: 30000 }, - }, - "grok-4": { - id: "grok-4", - name: "Grok 4", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, reasoning: 15, cache_read: 0.75 }, - limit: { context: 256000, output: 64000 }, - }, - "grok-2-latest": { - id: "grok-2-latest", - name: "Grok 2 Latest", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2024-08-20", - last_updated: "2024-12-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 10, cache_read: 2 }, - limit: { context: 131072, output: 8192 }, - }, - "grok-beta": { - id: "grok-beta", - name: "Grok Beta", - family: "grok-beta", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2024-11-01", - last_updated: "2024-11-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 15, cache_read: 5 }, - limit: { context: 131072, output: 4096 }, - }, - "grok-2-vision": { - id: "grok-2-vision", - name: "Grok 2 Vision", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2024-08-20", - last_updated: "2024-08-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 10, cache_read: 2 }, - limit: { context: 8192, output: 4096 }, - }, - "grok-4-1-fast": { - id: "grok-4-1-fast", - name: "Grok 4.1 Fast", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "grok-3-mini": { - id: "grok-3-mini", - name: "Grok 3 Mini", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.5, reasoning: 0.5, cache_read: 0.075 }, - limit: { context: 131072, output: 8192 }, - }, - "grok-2-vision-1212": { - id: "grok-2-vision-1212", - name: "Grok 2 Vision (1212)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2024-08-20", - last_updated: "2024-12-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 10, cache_read: 2 }, - limit: { context: 8192, output: 4096 }, - }, - "grok-3": { - id: "grok-3", - name: "Grok 3", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75 }, - limit: { context: 131072, output: 8192 }, - }, - "grok-4-fast-non-reasoning": { - id: "grok-4-fast-non-reasoning", - name: "Grok 4 Fast (Non-Reasoning)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - }, - }, - meganova: { - id: "meganova", - env: ["MEGANOVA_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.meganova.ai/v1", - name: "Meganova", - doc: "https://docs.meganova.ai", - models: { - "Qwen/Qwen3-235B-A22B-Instruct-2507": { - id: "Qwen/Qwen3-235B-A22B-Instruct-2507", - name: "Qwen3 235B A22B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.6 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3.5-Plus": { - id: "Qwen/Qwen3.5-Plus", - name: "Qwen3.5 Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02", - last_updated: "2026-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2.4, reasoning: 2.4 }, - limit: { context: 1000000, output: 65536 }, - }, - "Qwen/Qwen2.5-VL-32B-Instruct": { - id: "Qwen/Qwen2.5-VL-32B-Instruct", - name: "Qwen2.5 VL 32B Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-03-24", - last_updated: "2025-03-24", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 16384, output: 16384 }, - }, - "zai-org/GLM-4.7": { - id: "zai-org/GLM-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 202752, output: 131072 }, - }, - "zai-org/GLM-5": { - id: "zai-org/GLM-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.8, output: 2.56 }, - limit: { context: 202752, output: 131072 }, - }, - "zai-org/GLM-4.6": { - id: "zai-org/GLM-4.6", - name: "GLM-4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 1.9 }, - limit: { context: 202752, output: 131072 }, - }, - "mistralai/Mistral-Small-3.2-24B-Instruct-2506": { - id: "mistralai/Mistral-Small-3.2-24B-Instruct-2506", - name: "Mistral Small 3.2 24B Instruct", - family: "mistral-small", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-06-20", - last_updated: "2025-06-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 32768, output: 8192 }, - }, - "mistralai/Mistral-Nemo-Instruct-2407": { - id: "mistralai/Mistral-Nemo-Instruct-2407", - name: "Mistral Nemo Instruct 2407", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.04 }, - limit: { context: 131072, output: 65536 }, - }, - "XiaomiMiMo/MiMo-V2-Flash": { - id: "XiaomiMiMo/MiMo-V2-Flash", - name: "MiMo V2 Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 262144, output: 32000 }, - }, - "meta-llama/Llama-3.3-70B-Instruct": { - id: "meta-llama/Llama-3.3-70B-Instruct", - name: "Llama 3.3 70B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 131072, output: 16384 }, - }, - "deepseek-ai/DeepSeek-V3.1": { - id: "deepseek-ai/DeepSeek-V3.1", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-25", - last_updated: "2025-08-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 1 }, - limit: { context: 164000, output: 164000 }, - }, - "deepseek-ai/DeepSeek-V3-0324": { - id: "deepseek-ai/DeepSeek-V3-0324", - name: "DeepSeek V3 0324", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-03-24", - last_updated: "2025-03-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 0.88 }, - limit: { context: 163840, output: 163840 }, - }, - "deepseek-ai/DeepSeek-V3.2-Exp": { - id: "deepseek-ai/DeepSeek-V3.2-Exp", - name: "DeepSeek V3.2 Exp", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-10", - last_updated: "2025-10-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 0.4 }, - limit: { context: 164000, output: 164000 }, - }, - "deepseek-ai/DeepSeek-R1-0528": { - id: "deepseek-ai/DeepSeek-R1-0528", - name: "DeepSeek R1 0528", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: false, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-07", - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 2.15 }, - limit: { context: 163840, output: 64000 }, - }, - "deepseek-ai/DeepSeek-V3.2": { - id: "deepseek-ai/DeepSeek-V3.2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-03", - last_updated: "2025-12-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.26, output: 0.38 }, - limit: { context: 164000, output: 164000 }, - }, - "moonshotai/Kimi-K2-Thinking": { - id: "moonshotai/Kimi-K2-Thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.6 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/Kimi-K2.5": { - id: "moonshotai/Kimi-K2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2026-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 2.8 }, - limit: { context: 262144, output: 262144 }, - }, - "MiniMaxAI/MiniMax-M2.5": { - id: "MiniMaxAI/MiniMax-M2.5", - name: "MiniMax M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMaxAI/MiniMax-M2.1": { - id: "MiniMaxAI/MiniMax-M2.1", - name: "MiniMax M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.28, output: 1.2 }, - limit: { context: 196608, output: 131072 }, - }, - }, - }, - "google-vertex-anthropic": { - id: "google-vertex-anthropic", - env: ["GOOGLE_VERTEX_PROJECT", "GOOGLE_VERTEX_LOCATION", "GOOGLE_APPLICATION_CREDENTIALS"], - npm: "@ai-sdk/google-vertex/anthropic", - name: "Vertex (Anthropic)", - doc: "https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/claude", - models: { - "claude-haiku-4-5@20251001": { - id: "claude-haiku-4-5@20251001", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-sonnet-4-6@default": { - id: "claude-sonnet-4-6@default", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.6, cache_write: 7.5 }, - }, - limit: { context: 200000, output: 64000 }, - }, - "claude-3-5-haiku@20241022": { - id: "claude-3-5-haiku@20241022", - name: "Claude Haiku 3.5", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07-31", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4, cache_read: 0.08, cache_write: 1 }, - limit: { context: 200000, output: 8192 }, - }, - "claude-3-5-sonnet@20241022": { - id: "claude-3-5-sonnet@20241022", - name: "Claude Sonnet 3.5 v2", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04-30", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 8192 }, - }, - "claude-opus-4-1@20250805": { - id: "claude-opus-4-1@20250805", - name: "Claude Opus 4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "claude-sonnet-4@20250514": { - id: "claude-sonnet-4@20250514", - name: "Claude Sonnet 4", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-3-7-sonnet@20250219": { - id: "claude-3-7-sonnet@20250219", - name: "Claude Sonnet 3.7", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10-31", - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-opus-4@20250514": { - id: "claude-opus-4@20250514", - name: "Claude Opus 4", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "claude-opus-4-5@20251101": { - id: "claude-opus-4-5@20251101", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-01", - last_updated: "2025-11-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-sonnet-4-5@20250929": { - id: "claude-sonnet-4-5@20250929", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-opus-4-6@default": { - id: "claude-opus-4-6@default", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 5, - output: 25, - cache_read: 0.5, - cache_write: 6.25, - context_over_200k: { input: 10, output: 37.5, cache_read: 1, cache_write: 12.5 }, - }, - limit: { context: 1000000, output: 128000 }, - }, - "claude-opus-4-7@default": { - id: "claude-opus-4-7@default", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 5, - output: 25, - cache_read: 0.5, - cache_write: 6.25, - context_over_200k: { input: 10, output: 37.5, cache_read: 1, cache_write: 12.5 }, - }, - limit: { context: 1000000, output: 128000 }, - }, - }, - }, - evroc: { - id: "evroc", - env: ["EVROC_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://models.think.evroc.com/v1", - name: "evroc", - doc: "https://docs.evroc.com/products/think/overview.html", - models: { - "Qwen/Qwen3-VL-30B-A3B-Instruct": { - id: "Qwen/Qwen3-VL-30B-A3B-Instruct", - name: "Qwen3 VL 30B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2025-07-30", - last_updated: "2025-07-30", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.24, output: 0.94 }, - limit: { context: 100000, output: 100000 }, - }, - "Qwen/Qwen3-Embedding-8B": { - id: "Qwen/Qwen3-Embedding-8B", - name: "Qwen3 Embedding 8B", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2025-07-30", - last_updated: "2025-07-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.12, output: 0.12 }, - limit: { context: 40960, output: 40960 }, - }, - "Qwen/Qwen3-30B-A3B-Instruct-2507-FP8": { - id: "Qwen/Qwen3-30B-A3B-Instruct-2507-FP8", - name: "Qwen3 30B 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2025-07-30", - last_updated: "2025-07-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.35, output: 1.42 }, - limit: { context: 64000, output: 64000 }, - }, - "mistralai/devstral-small-2-24b-instruct-2512": { - id: "mistralai/devstral-small-2-24b-instruct-2512", - name: "Devstral Small 2 24B Instruct 2512", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.12, output: 0.47 }, - limit: { context: 32768, output: 32768 }, - }, - "mistralai/Voxtral-Small-24B-2507": { - id: "mistralai/Voxtral-Small-24B-2507", - name: "Voxtral Small 24B", - family: "voxtral", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2025-03-01", - last_updated: "2025-03-01", - modalities: { input: ["audio", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.00236, output: 0.00236, output_audio: 2.36 }, - limit: { context: 32000, output: 32000 }, - }, - "mistralai/Magistral-Small-2509": { - id: "mistralai/Magistral-Small-2509", - name: "Magistral Small 1.2 24B", - family: "magistral-small", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2025-06-01", - last_updated: "2025-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.59, output: 2.36 }, - limit: { context: 131072, output: 131072 }, - }, - "microsoft/Phi-4-multimodal-instruct": { - id: "microsoft/Phi-4-multimodal-instruct", - name: "Phi-4 15B", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.24, output: 0.47 }, - limit: { context: 32000, output: 32000 }, - }, - "KBLab/kb-whisper-large": { - id: "KBLab/kb-whisper-large", - name: "KB Whisper", - family: "whisper", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2024-10-01", - last_updated: "2024-10-01", - modalities: { input: ["audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.00236, output: 0.00236, output_audio: 2.36 }, - limit: { context: 448, output: 448 }, - }, - "nvidia/Llama-3.3-70B-Instruct-FP8": { - id: "nvidia/Llama-3.3-70B-Instruct-FP8", - name: "Llama 3.3 70B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.18, output: 1.18 }, - limit: { context: 131072, output: 32768 }, - }, - "openai/whisper-large-v3": { - id: "openai/whisper-large-v3", - name: "Whisper 3 Large", - family: "whisper", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2024-10-01", - last_updated: "2024-10-01", - modalities: { input: ["audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.00236, output: 0.00236, output_audio: 2.36 }, - limit: { context: 448, output: 4096 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.24, output: 0.94 }, - limit: { context: 65536, output: 65536 }, - }, - "moonshotai/Kimi-K2.5": { - id: "moonshotai/Kimi-K2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 1.47, output: 5.9 }, - limit: { context: 262144, output: 262144 }, - }, - "intfloat/multilingual-e5-large-instruct": { - id: "intfloat/multilingual-e5-large-instruct", - name: "E5 Multi-Lingual Large Embeddings 0.6B", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2024-06-01", - last_updated: "2024-06-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.12, output: 0.12 }, - limit: { context: 512, output: 512 }, - }, - }, - }, - synthetic: { - id: "synthetic", - env: ["SYNTHETIC_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.synthetic.new/openai/v1", - name: "Synthetic", - doc: "https://synthetic.new/pricing", - models: { - "hf:meta-llama/Llama-3.1-405B-Instruct": { - id: "hf:meta-llama/Llama-3.1-405B-Instruct", - name: "Llama-3.1-405B-Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 3, output: 3 }, - limit: { context: 128000, output: 32768 }, - }, - "hf:meta-llama/Llama-4-Scout-17B-16E-Instruct": { - id: "hf:meta-llama/Llama-4-Scout-17B-16E-Instruct", - name: "Llama-4-Scout-17B-16E-Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 328000, output: 4096 }, - }, - "hf:meta-llama/Llama-3.3-70B-Instruct": { - id: "hf:meta-llama/Llama-3.3-70B-Instruct", - name: "Llama-3.3-70B-Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.9, output: 0.9 }, - limit: { context: 128000, output: 32768 }, - }, - "hf:meta-llama/Llama-3.1-8B-Instruct": { - id: "hf:meta-llama/Llama-3.1-8B-Instruct", - name: "Llama-3.1-8B-Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 128000, output: 32768 }, - }, - "hf:meta-llama/Llama-3.1-70B-Instruct": { - id: "hf:meta-llama/Llama-3.1-70B-Instruct", - name: "Llama-3.1-70B-Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.9, output: 0.9 }, - limit: { context: 128000, output: 32768 }, - }, - "hf:meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": { - id: "hf:meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8", - name: "Llama-4-Maverick-17B-128E-Instruct-FP8", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 0.88 }, - limit: { context: 524000, output: 4096 }, - }, - "hf:MiniMaxAI/MiniMax-M2": { - id: "hf:MiniMaxAI/MiniMax-M2", - name: "MiniMax-M2", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-10-27", - last_updated: "2025-10-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.19 }, - limit: { context: 196608, output: 131000 }, - }, - "hf:MiniMaxAI/MiniMax-M2.5": { - id: "hf:MiniMaxAI/MiniMax-M2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-07", - last_updated: "2026-02-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.6 }, - limit: { context: 191488, output: 65536 }, - }, - "hf:MiniMaxAI/MiniMax-M2.1": { - id: "hf:MiniMaxAI/MiniMax-M2.1", - name: "MiniMax-M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.19 }, - limit: { context: 204800, output: 131072 }, - }, - "hf:Qwen/Qwen3.5-397B-A17B": { - id: "hf:Qwen/Qwen3.5-397B-A17B", - name: "Qwen3.5-97B-A17B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.6 }, - limit: { context: 262144, output: 65536 }, - status: "beta", - }, - "hf:Qwen/Qwen2.5-Coder-32B-Instruct": { - id: "hf:Qwen/Qwen2.5-Coder-32B-Instruct", - name: "Qwen2.5-Coder-32B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2024-11-11", - last_updated: "2024-11-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.8, output: 0.8 }, - limit: { context: 32768, output: 32768 }, - }, - "hf:Qwen/Qwen3-235B-A22B-Instruct-2507": { - id: "hf:Qwen/Qwen3-235B-A22B-Instruct-2507", - name: "Qwen 3 235B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04-28", - last_updated: "2025-07-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 256000, output: 32000 }, - }, - "hf:Qwen/Qwen3-235B-A22B-Thinking-2507": { - id: "hf:Qwen/Qwen3-235B-A22B-Thinking-2507", - name: "Qwen3 235B A22B Thinking 2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-25", - last_updated: "2025-07-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.65, output: 3 }, - limit: { context: 256000, output: 32000 }, - }, - "hf:Qwen/Qwen3-Coder-480B-A35B-Instruct": { - id: "hf:Qwen/Qwen3-Coder-480B-A35B-Instruct", - name: "Qwen 3 Coder 480B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 2 }, - limit: { context: 256000, output: 32000 }, - }, - "hf:deepseek-ai/DeepSeek-V3.1": { - id: "hf:deepseek-ai/DeepSeek-V3.1", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.56, output: 1.68 }, - limit: { context: 128000, output: 128000 }, - }, - "hf:deepseek-ai/DeepSeek-V3-0324": { - id: "hf:deepseek-ai/DeepSeek-V3-0324", - name: "DeepSeek V3 (0324)", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-08-01", - last_updated: "2025-08-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 1.2 }, - limit: { context: 128000, output: 128000 }, - }, - "hf:deepseek-ai/DeepSeek-V3": { - id: "hf:deepseek-ai/DeepSeek-V3", - name: "DeepSeek V3", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-01-20", - last_updated: "2025-05-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.25, output: 1.25 }, - limit: { context: 128000, output: 128000 }, - }, - "hf:deepseek-ai/DeepSeek-R1": { - id: "hf:deepseek-ai/DeepSeek-R1", - name: "DeepSeek R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.19 }, - limit: { context: 128000, output: 128000 }, - }, - "hf:deepseek-ai/DeepSeek-R1-0528": { - id: "hf:deepseek-ai/DeepSeek-R1-0528", - name: "DeepSeek R1 (0528)", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-01", - last_updated: "2025-08-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 8 }, - limit: { context: 128000, output: 128000 }, - }, - "hf:deepseek-ai/DeepSeek-V3.2": { - id: "hf:deepseek-ai/DeepSeek-V3.2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 0.4, cache_read: 0.27, cache_write: 0 }, - limit: { context: 162816, input: 162816, output: 8000 }, - }, - "hf:deepseek-ai/DeepSeek-V3.1-Terminus": { - id: "hf:deepseek-ai/DeepSeek-V3.1-Terminus", - name: "DeepSeek V3.1 Terminus", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-09-22", - last_updated: "2025-09-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 1.2 }, - limit: { context: 128000, output: 128000 }, - }, - "hf:openai/gpt-oss-120b": { - id: "hf:openai/gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 128000, output: 32768 }, - }, - "hf:moonshotai/Kimi-K2-Thinking": { - id: "hf:moonshotai/Kimi-K2-Thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-11", - release_date: "2025-11-07", - last_updated: "2025-11-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.19 }, - limit: { context: 262144, output: 262144 }, - }, - "hf:moonshotai/Kimi-K2-Instruct-0905": { - id: "hf:moonshotai/Kimi-K2-Instruct-0905", - name: "Kimi K2 0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.2, output: 1.2 }, - limit: { context: 262144, output: 32768 }, - }, - "hf:moonshotai/Kimi-K2.5": { - id: "hf:moonshotai/Kimi-K2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.19 }, - limit: { context: 262144, output: 65536 }, - }, - "hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4": { - id: "hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4", - name: "Nemotron 3 Super 120B", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2026-03-11", - last_updated: "2026-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1, cache_read: 0.3 }, - limit: { context: 262144, output: 65536 }, - }, - "hf:nvidia/Kimi-K2.5-NVFP4": { - id: "hf:nvidia/Kimi-K2.5-NVFP4", - name: "Kimi K2.5 (NVFP4)", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.19 }, - limit: { context: 262144, output: 65536 }, - }, - "hf:zai-org/GLM-4.7-Flash": { - id: "hf:zai-org/GLM-4.7-Flash", - name: "GLM-4.7-Flash", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-01-18", - last_updated: "2026-01-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.4, cache_read: 0.06 }, - limit: { context: 196608, output: 65536 }, - }, - "hf:zai-org/GLM-4.7": { - id: "hf:zai-org/GLM-4.7", - name: "GLM 4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.19 }, - limit: { context: 200000, output: 64000 }, - }, - "hf:zai-org/GLM-5.1": { - id: "hf:zai-org/GLM-5.1", - name: "GLM 5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-04-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3, cache_read: 1 }, - limit: { context: 196608, output: 65536 }, - }, - "hf:zai-org/GLM-5": { - id: "hf:zai-org/GLM-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-04-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3, cache_read: 1 }, - limit: { context: 196608, output: 65536 }, - }, - "hf:zai-org/GLM-4.6": { - id: "hf:zai-org/GLM-4.6", - name: "GLM 4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.19 }, - limit: { context: 200000, output: 64000 }, - }, - "hf:moonshotai/Kimi-K2.6": { - id: "hf:moonshotai/Kimi-K2.6", - name: "Kimi K2.6", - family: "kimi-k2.6", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.95 }, - limit: { context: 262144, output: 65536 }, - }, - }, - }, - nvidia: { - id: "nvidia", - env: ["NVIDIA_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://integrate.api.nvidia.com/v1", - name: "Nvidia", - doc: "https://docs.api.nvidia.com/nim/", - models: { - "black-forest-labs/flux.1-dev": { - id: "black-forest-labs/flux.1-dev", - name: "FLUX.1-dev", - family: "flux", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-08", - release_date: "2024-08-01", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 4096, output: 0 }, - }, - "stepfun-ai/step-3.5-flash": { - id: "stepfun-ai/step-3.5-flash", - name: "Step 3.5 Flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-02", - last_updated: "2026-02-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 16384 }, - }, - "mistralai/codestral-22b-instruct-v0.1": { - id: "mistralai/codestral-22b-instruct-v0.1", - name: "Codestral 22b Instruct V0.1", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-05-29", - last_updated: "2024-05-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "mistralai/mistral-large-3-675b-instruct-2512": { - id: "mistralai/mistral-large-3-675b-instruct-2512", - name: "Mistral Large 3 675B Instruct 2512", - family: "mistral-large", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-02", - last_updated: "2025-12-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 262144 }, - }, - "mistralai/devstral-2-123b-instruct-2512": { - id: "mistralai/devstral-2-123b-instruct-2512", - name: "Devstral-2-123B-Instruct-2512", - family: "devstral", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-12", - release_date: "2025-12-08", - last_updated: "2025-12-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 262144 }, - }, - "mistralai/ministral-14b-instruct-2512": { - id: "mistralai/ministral-14b-instruct-2512", - name: "Ministral 3 14B Instruct 2512", - family: "ministral", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-12", - release_date: "2025-12-01", - last_updated: "2025-12-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 262144 }, - }, - "mistralai/mistral-small-3.1-24b-instruct-2503": { - id: "mistralai/mistral-small-3.1-24b-instruct-2503", - name: "Mistral Small 3.1 24b Instruct 2503", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-03-11", - last_updated: "2025-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "mistralai/mamba-codestral-7b-v0.1": { - id: "mistralai/mamba-codestral-7b-v0.1", - name: "Mamba Codestral 7b V0.1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2024-07-16", - last_updated: "2024-07-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "mistralai/mistral-large-2-instruct": { - id: "mistralai/mistral-large-2-instruct", - name: "Mistral Large 2 Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-07-24", - last_updated: "2024-07-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/phi-3-medium-4k-instruct": { - id: "microsoft/phi-3-medium-4k-instruct", - name: "Phi 3 Medium 4k Instruct", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-05-07", - last_updated: "2024-05-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 4000, output: 4096 }, - }, - "microsoft/phi-3.5-moe-instruct": { - id: "microsoft/phi-3.5-moe-instruct", - name: "Phi 3.5 Moe Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-08-17", - last_updated: "2024-08-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/phi-4-mini-instruct": { - id: "microsoft/phi-4-mini-instruct", - name: "Phi-4-Mini", - family: "phi", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2024-12-01", - last_updated: "2025-09-05", - modalities: { input: ["text", "image", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 8192 }, - }, - "microsoft/phi-3-small-8k-instruct": { - id: "microsoft/phi-3-small-8k-instruct", - name: "Phi 3 Small 8k Instruct", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-05-07", - last_updated: "2024-05-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8000, output: 4096 }, - }, - "microsoft/phi-3-vision-128k-instruct": { - id: "microsoft/phi-3-vision-128k-instruct", - name: "Phi 3 Vision 128k Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-05-19", - last_updated: "2024-05-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/phi-3.5-vision-instruct": { - id: "microsoft/phi-3.5-vision-instruct", - name: "Phi 3.5 Vision Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-08-16", - last_updated: "2024-08-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/phi-3-small-128k-instruct": { - id: "microsoft/phi-3-small-128k-instruct", - name: "Phi 3 Small 128k Instruct", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-05-07", - last_updated: "2024-05-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/phi-3-medium-128k-instruct": { - id: "microsoft/phi-3-medium-128k-instruct", - name: "Phi 3 Medium 128k Instruct", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-05-07", - last_updated: "2024-05-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning": { - id: "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning", - name: "Nemotron 3 Nano Omni", - family: "nemotron", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-28", - last_updated: "2026-04-28", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 65536 }, - }, - "nvidia/llama-3.3-nemotron-super-49b-v1": { - id: "nvidia/llama-3.3-nemotron-super-49b-v1", - name: "Llama 3.3 Nemotron Super 49b V1", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-03-16", - last_updated: "2025-03-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "nvidia/nemotron-4-340b-instruct": { - id: "nvidia/nemotron-4-340b-instruct", - name: "Nemotron 4 340b Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-06-13", - last_updated: "2024-06-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "nvidia/llama3-chatqa-1.5-70b": { - id: "nvidia/llama3-chatqa-1.5-70b", - name: "Llama3 Chatqa 1.5 70b", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-04-28", - last_updated: "2024-04-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "nvidia/llama-3.3-nemotron-super-49b-v1.5": { - id: "nvidia/llama-3.3-nemotron-super-49b-v1.5", - name: "Llama 3.3 Nemotron Super 49b V1.5", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-03-16", - last_updated: "2025-03-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "nvidia/nemotron-3-super-120b-a12b": { - id: "nvidia/nemotron-3-super-120b-a12b", - name: "Nemotron 3 Super", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2026-03-11", - last_updated: "2026-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 262144, output: 262144 }, - }, - "nvidia/parakeet-tdt-0.6b-v2": { - id: "nvidia/parakeet-tdt-0.6b-v2", - name: "Parakeet TDT 0.6B v2", - family: "parakeet", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2024-01", - release_date: "2024-01-01", - last_updated: "2025-09-05", - modalities: { input: ["audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 0, output: 4096 }, - }, - "nvidia/nemotron-3-nano-30b-a3b": { - id: "nvidia/nemotron-3-nano-30b-a3b", - name: "nemotron-3-nano-30b-a3b", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2024-12", - last_updated: "2024-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 131072 }, - }, - "nvidia/llama-3.1-nemotron-ultra-253b-v1": { - id: "nvidia/llama-3.1-nemotron-ultra-253b-v1", - name: "Llama-3.1-Nemotron-Ultra-253B-v1", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-07-01", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 8192 }, - }, - "nvidia/nvidia-nemotron-nano-9b-v2": { - id: "nvidia/nvidia-nemotron-nano-9b-v2", - name: "nvidia-nemotron-nano-9b-v2", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2025-08-18", - last_updated: "2025-08-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 131072 }, - }, - "nvidia/cosmos-nemotron-34b": { - id: "nvidia/cosmos-nemotron-34b", - name: "Cosmos Nemotron 34B", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2024-01", - release_date: "2024-01-01", - last_updated: "2025-09-05", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 8192 }, - }, - "nvidia/llama-embed-nemotron-8b": { - id: "nvidia/llama-embed-nemotron-8b", - name: "Llama Embed Nemotron 8B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2025-03", - release_date: "2025-03-18", - last_updated: "2025-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 32768, output: 2048 }, - }, - "nvidia/llama-3.1-nemotron-51b-instruct": { - id: "nvidia/llama-3.1-nemotron-51b-instruct", - name: "Llama 3.1 Nemotron 51b Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-09-22", - last_updated: "2024-09-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "nvidia/llama-3.1-nemotron-70b-instruct": { - id: "nvidia/llama-3.1-nemotron-70b-instruct", - name: "Llama 3.1 Nemotron 70b Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-10-12", - last_updated: "2024-10-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "nvidia/nemoretriever-ocr-v1": { - id: "nvidia/nemoretriever-ocr-v1", - name: "NeMo Retriever OCR v1", - family: "nemoretriever", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2024-01", - release_date: "2024-01-01", - last_updated: "2025-09-05", - modalities: { input: ["image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 0, output: 4096 }, - }, - "deepseek-ai/deepseek-r1": { - id: "deepseek-ai/deepseek-r1", - name: "Deepseek R1", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "deepseek-ai/deepseek-v3.1": { - id: "deepseek-ai/deepseek-v3.1", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-08-20", - last_updated: "2025-08-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "deepseek-ai/deepseek-coder-6.7b-instruct": { - id: "deepseek-ai/deepseek-coder-6.7b-instruct", - name: "Deepseek Coder 6.7b Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2023-10-29", - last_updated: "2023-10-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "deepseek-ai/deepseek-v3.2": { - id: "deepseek-ai/deepseek-v3.2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 163840, output: 65536 }, - }, - "deepseek-ai/deepseek-r1-0528": { - id: "deepseek-ai/deepseek-r1-0528", - name: "Deepseek R1 0528", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "deepseek-ai/deepseek-v3.1-terminus": { - id: "deepseek-ai/deepseek-v3.1-terminus", - name: "DeepSeek V3.1 Terminus", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-22", - last_updated: "2025-09-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "openai/whisper-large-v3": { - id: "openai/whisper-large-v3", - name: "Whisper Large v3", - family: "whisper", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2023-09", - release_date: "2023-09-01", - last_updated: "2025-09-05", - modalities: { input: ["audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 0, output: 4096 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT-OSS-120B", - family: "gpt-oss", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-08", - release_date: "2025-08-04", - last_updated: "2025-08-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "minimaxai/minimax-m2.7": { - id: "minimaxai/minimax-m2.7", - name: "MiniMax-M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-04-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "minimaxai/minimax-m2.1": { - id: "minimaxai/minimax-m2.1", - name: "MiniMax-M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "minimaxai/minimax-m2.5": { - id: "minimaxai/minimax-m2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08", - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "z-ai/glm4.7": { - id: "z-ai/glm4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "z-ai/glm5": { - id: "z-ai/glm5", - name: "GLM5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 202752, output: 131000 }, - }, - "z-ai/glm-5.1": { - id: "z-ai/glm-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-03-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 131072 }, - }, - "meta/llama-4-scout-17b-16e-instruct": { - id: "meta/llama-4-scout-17b-16e-instruct", - name: "Llama 4 Scout 17b 16e Instruct", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-02", - release_date: "2025-04-02", - last_updated: "2025-04-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "meta/llama-3.3-70b-instruct": { - id: "meta/llama-3.3-70b-instruct", - name: "Llama 3.3 70b Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-11-26", - last_updated: "2024-11-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "meta/llama3-8b-instruct": { - id: "meta/llama3-8b-instruct", - name: "Llama3 8b Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-04-17", - last_updated: "2024-04-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "meta/llama3-70b-instruct": { - id: "meta/llama3-70b-instruct", - name: "Llama3 70b Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-04-17", - last_updated: "2024-04-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "meta/codellama-70b": { - id: "meta/codellama-70b", - name: "Codellama 70b", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2024-01-29", - last_updated: "2024-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "meta/llama-3.2-11b-vision-instruct": { - id: "meta/llama-3.2-11b-vision-instruct", - name: "Llama 3.2 11b Vision Instruct", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-18", - last_updated: "2024-09-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "meta/llama-3.1-70b-instruct": { - id: "meta/llama-3.1-70b-instruct", - name: "Llama 3.1 70b Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-07-16", - last_updated: "2024-07-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "meta/llama-3.2-1b-instruct": { - id: "meta/llama-3.2-1b-instruct", - name: "Llama 3.2 1b Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-18", - last_updated: "2024-09-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "meta/llama-4-maverick-17b-128e-instruct": { - id: "meta/llama-4-maverick-17b-128e-instruct", - name: "Llama 4 Maverick 17b 128e Instruct", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-02", - release_date: "2025-04-01", - last_updated: "2025-04-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "meta/llama-3.1-405b-instruct": { - id: "meta/llama-3.1-405b-instruct", - name: "Llama 3.1 405b Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-07-16", - last_updated: "2024-07-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "qwen/qwen3-235b-a22b": { - id: "qwen/qwen3-235b-a22b", - name: "Qwen3-235B-A22B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2024-12-01", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen/qwen2.5-coder-7b-instruct": { - id: "qwen/qwen2.5-coder-7b-instruct", - name: "Qwen2.5 Coder 7b Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-09-17", - last_updated: "2024-09-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "qwen/qwen2.5-coder-32b-instruct": { - id: "qwen/qwen2.5-coder-32b-instruct", - name: "Qwen2.5 Coder 32b Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-11-06", - last_updated: "2024-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "qwen/qwen3.5-397b-a17b": { - id: "qwen/qwen3.5-397b-a17b", - name: "Qwen3.5-397B-A17B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2026-01", - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 8192 }, - }, - "qwen/qwen3-next-80b-a3b-thinking": { - id: "qwen/qwen3-next-80b-a3b-thinking", - name: "Qwen3-Next-80B-A3B-Thinking", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2024-12-01", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 16384 }, - }, - "qwen/qwq-32b": { - id: "qwen/qwq-32b", - name: "Qwq 32b", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-03-05", - last_updated: "2025-03-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "qwen/qwen3-next-80b-a3b-instruct": { - id: "qwen/qwen3-next-80b-a3b-instruct", - name: "Qwen3-Next-80B-A3B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2024-12-01", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 16384 }, - }, - "qwen/qwen3-coder-480b-a35b-instruct": { - id: "qwen/qwen3-coder-480b-a35b-instruct", - name: "Qwen3 Coder 480B A35B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 66536 }, - }, - "google/gemma-2-2b-it": { - id: "google/gemma-2-2b-it", - name: "Gemma 2 2b It", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-07-16", - last_updated: "2024-07-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "google/gemma-3n-e4b-it": { - id: "google/gemma-3n-e4b-it", - name: "Gemma 3n E4b It", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-06-03", - last_updated: "2025-06-03", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "google/gemma-3-1b-it": { - id: "google/gemma-3-1b-it", - name: "Gemma 3 1b It", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-03-10", - last_updated: "2025-03-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "google/codegemma-7b": { - id: "google/codegemma-7b", - name: "Codegemma 7b", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2024-03-21", - last_updated: "2024-03-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "google/gemma-4-31b-it": { - id: "google/gemma-4-31b-it", - name: "Gemma-4-31B-IT", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 16384 }, - }, - "google/gemma-3-12b-it": { - id: "google/gemma-3-12b-it", - name: "Gemma 3 12b It", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-03-01", - last_updated: "2025-03-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "google/codegemma-1.1-7b": { - id: "google/codegemma-1.1-7b", - name: "Codegemma 1.1 7b", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2024-04-30", - last_updated: "2024-04-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "google/gemma-3n-e2b-it": { - id: "google/gemma-3n-e2b-it", - name: "Gemma 3n E2b It", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-06-12", - last_updated: "2025-06-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "google/gemma-2-27b-it": { - id: "google/gemma-2-27b-it", - name: "Gemma 2 27b It", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-06-24", - last_updated: "2024-06-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "google/gemma-3-27b-it": { - id: "google/gemma-3-27b-it", - name: "Gemma-3-27B-IT", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2024-12-01", - last_updated: "2025-09-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 8192 }, - }, - "moonshotai/kimi-k2.5": { - id: "moonshotai/kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-07", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/kimi-k2-instruct": { - id: "moonshotai/kimi-k2-instruct", - name: "Kimi K2 Instruct", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-01", - release_date: "2025-01-01", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "moonshotai/kimi-k2.6": { - id: "moonshotai/kimi-k2.6", - name: "Kimi K2.6", - family: "kimi-k2.6", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/kimi-k2-instruct-0905": { - id: "moonshotai/kimi-k2-instruct-0905", - name: "Kimi K2 0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/kimi-k2-thinking": { - id: "moonshotai/kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - structured_output: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-11", - last_updated: "2025-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 262144, output: 262144 }, - }, - "mistralai/mistral-medium-3.5-128b": { - id: "mistralai/mistral-medium-3.5-128b", - name: "Mistral Medium 3.5 128B", - family: "mistral-medium", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-29", - last_updated: "2026-04-29", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 262144 }, - }, - "deepseek-ai/deepseek-v4-flash": { - id: "deepseek-ai/deepseek-v4-flash", - name: "DeepSeek V4 Flash", - family: "deepseek-flash", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.28, cache_read: 0.028 }, - limit: { context: 1048576, output: 393216 }, - }, - "deepseek-ai/deepseek-v4-pro": { - id: "deepseek-ai/deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.74, output: 3.48, cache_read: 0.145 }, - limit: { context: 1048576, output: 393216 }, - }, - }, - }, - inference: { - id: "inference", - env: ["INFERENCE_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://inference.net/v1", - name: "Inference", - doc: "https://inference.net/models", - models: { - "mistral/mistral-nemo-12b-instruct": { - id: "mistral/mistral-nemo-12b-instruct", - name: "Mistral Nemo 12B Instruct", - family: "mistral-nemo", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.038, output: 0.1 }, - limit: { context: 16000, output: 4096 }, - }, - "meta/llama-3.2-11b-vision-instruct": { - id: "meta/llama-3.2-11b-vision-instruct", - name: "Llama 3.2 11B Vision Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.055, output: 0.055 }, - limit: { context: 16000, output: 4096 }, - }, - "meta/llama-3.2-1b-instruct": { - id: "meta/llama-3.2-1b-instruct", - name: "Llama 3.2 1B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.01, output: 0.01 }, - limit: { context: 16000, output: 4096 }, - }, - "meta/llama-3.2-3b-instruct": { - id: "meta/llama-3.2-3b-instruct", - name: "Llama 3.2 3B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.02 }, - limit: { context: 16000, output: 4096 }, - }, - "meta/llama-3.1-8b-instruct": { - id: "meta/llama-3.1-8b-instruct", - name: "Llama 3.1 8B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.025, output: 0.025 }, - limit: { context: 16000, output: 4096 }, - }, - "qwen/qwen-2.5-7b-vision-instruct": { - id: "qwen/qwen-2.5-7b-vision-instruct", - name: "Qwen 2.5 7B Vision Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 125000, output: 4096 }, - }, - "qwen/qwen3-embedding-4b": { - id: "qwen/qwen3-embedding-4b", - name: "Qwen 3 Embedding 4B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2024-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.01, output: 0 }, - limit: { context: 32000, output: 2048 }, - }, - "google/gemma-3": { - id: "google/gemma-3", - name: "Google Gemma 3", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.3 }, - limit: { context: 125000, output: 4096 }, - }, - "osmosis/osmosis-structure-0.6b": { - id: "osmosis/osmosis-structure-0.6b", - name: "Osmosis Structure 0.6B", - family: "osmosis", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.5 }, - limit: { context: 4000, output: 2048 }, - }, - }, - }, - inception: { - id: "inception", - env: ["INCEPTION_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.inceptionlabs.ai/v1/", - name: "Inception", - doc: "https://platform.inceptionlabs.ai/docs", - models: { - "mercury-edit-2": { - id: "mercury-edit-2", - name: "Mercury Edit 2", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2026-03-30", - last_updated: "2026-03-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.75, cache_read: 0.025 }, - limit: { context: 128000, output: 8192 }, - }, - "mercury-2": { - id: "mercury-2", - name: "Mercury 2", - family: "mercury", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01-01", - release_date: "2026-02-24", - last_updated: "2026-02-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.75, cache_read: 0.025 }, - limit: { context: 128000, output: 50000 }, - }, - }, - }, - openai: { - id: "openai", - env: ["OPENAI_API_KEY"], - npm: "@ai-sdk/openai", - name: "OpenAI", - doc: "https://platform.openai.com/docs/models", - models: { - "gpt-5.1-codex-max": { - id: "gpt-5.1-codex-max", - name: "GPT-5.1 Codex Max", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-4o-2024-05-13": { - id: "gpt-4o-2024-05-13", - name: "GPT-4o (2024-05-13)", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-05-13", - last_updated: "2024-05-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 15 }, - limit: { context: 128000, output: 4096 }, - }, - "o1-mini": { - id: "o1-mini", - name: "o1-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: true, - temperature: false, - knowledge: "2023-09", - release_date: "2024-09-12", - last_updated: "2024-09-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.55 }, - limit: { context: 128000, output: 65536 }, - }, - "gpt-5.2-pro": { - id: "gpt-5.2-pro", - name: "GPT-5.2 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 21, output: 168 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "text-embedding-3-large": { - id: "text-embedding-3-large", - name: "text-embedding-3-large", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2024-01", - release_date: "2024-01-25", - last_updated: "2024-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.13, output: 0 }, - limit: { context: 8191, output: 3072 }, - }, - "gpt-5.3-chat-latest": { - id: "gpt-5.3-chat-latest", - name: "GPT-5.3 Chat (latest)", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-03-03", - last_updated: "2026-03-03", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 128000, output: 16384 }, - }, - "gpt-5.5": { - id: "gpt-5.5", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-23", - last_updated: "2026-04-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5, context_over_200k: { input: 10, output: 45, cache_read: 1 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - experimental: { - modes: { - fast: { - cost: { input: 12.5, output: 75, cache_read: 1.25 }, - provider: { body: { service_tier: "priority" } }, - }, - }, - }, - }, - "gpt-5-mini": { - id: "gpt-5-mini", - name: "GPT-5 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-5-nano": { - id: "gpt-5-nano", - name: "GPT-5 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4, cache_read: 0.005 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-5.3-codex": { - id: "gpt-5.3-codex", - name: "GPT-5.3 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-4-turbo": { - id: "gpt-4-turbo", - name: "GPT-4 Turbo", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - knowledge: "2023-12", - release_date: "2023-11-06", - last_updated: "2024-04-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 30 }, - limit: { context: 128000, output: 4096 }, - }, - "text-embedding-ada-002": { - id: "text-embedding-ada-002", - name: "text-embedding-ada-002", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2022-12", - release_date: "2022-12-15", - last_updated: "2022-12-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "gpt-5.2": { - id: "gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "o3-pro": { - id: "o3-pro", - name: "o3-pro", - family: "o-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-06-10", - last_updated: "2025-06-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 20, output: 80 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-4o-mini": { - id: "gpt-4o-mini", - name: "GPT-4o mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.08 }, - limit: { context: 128000, output: 16384 }, - }, - "o4-mini-deep-research": { - id: "o4-mini-deep-research", - name: "o4-mini-deep-research", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05", - release_date: "2024-06-26", - last_updated: "2024-06-26", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-5.4-mini": { - id: "gpt-5.4-mini", - name: "GPT-5.4 mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5, cache_read: 0.075 }, - limit: { context: 400000, input: 272000, output: 128000 }, - experimental: { - modes: { - fast: { - cost: { input: 1.5, output: 9, cache_read: 0.15 }, - provider: { body: { service_tier: "priority" } }, - }, - }, - }, - }, - "o4-mini": { - id: "o4-mini", - name: "o4-mini", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.28 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-5.4-nano": { - id: "gpt-5.4-nano", - name: "GPT-5.4 nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.25, cache_read: 0.02 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-image-1": { - id: "gpt-image-1", - name: "gpt-image-1", - family: "gpt-image", - attachment: true, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-04-24", - last_updated: "2025-04-24", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - limit: { context: 0, input: 0, output: 0 }, - }, - "gpt-5.2-codex": { - id: "gpt-5.2-codex", - name: "GPT-5.2 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-5.2-chat-latest": { - id: "gpt-5.2-chat-latest", - name: "GPT-5.2 Chat", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 128000, output: 16384 }, - }, - "gpt-5.1-codex-mini": { - id: "gpt-5.1-codex-mini", - name: "GPT-5.1 Codex mini", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "o1-preview": { - id: "o1-preview", - name: "o1-preview", - family: "o", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2023-09", - release_date: "2024-09-12", - last_updated: "2024-09-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 60, cache_read: 7.5 }, - limit: { context: 128000, output: 32768 }, - }, - "gpt-4o-2024-08-06": { - id: "gpt-4o-2024-08-06", - name: "GPT-4o (2024-08-06)", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-08-06", - last_updated: "2024-08-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10, cache_read: 1.25 }, - limit: { context: 128000, output: 16384 }, - }, - "gpt-5.1": { - id: "gpt-5.1", - name: "GPT-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-image-1-mini": { - id: "gpt-image-1-mini", - name: "gpt-image-1-mini", - family: "gpt-image", - attachment: true, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-09-26", - last_updated: "2025-09-26", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - limit: { context: 0, input: 0, output: 0 }, - }, - o1: { - id: "o1", - name: "o1", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2023-09", - release_date: "2024-12-05", - last_updated: "2024-12-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 60, cache_read: 7.5 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-5.4-pro": { - id: "gpt-5.4-pro", - name: "GPT-5.4 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180, context_over_200k: { input: 60, output: 270 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "gpt-3.5-turbo": { - id: "gpt-3.5-turbo", - name: "GPT-3.5-turbo", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - knowledge: "2021-09-01", - release_date: "2023-03-01", - last_updated: "2023-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.5, cache_read: 1.25 }, - limit: { context: 16385, output: 4096 }, - }, - "o3-deep-research": { - id: "o3-deep-research", - name: "o3-deep-research", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05", - release_date: "2024-06-26", - last_updated: "2024-06-26", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 40, cache_read: 2.5 }, - limit: { context: 200000, output: 100000 }, - }, - "o3-mini": { - id: "o3-mini", - name: "o3-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2024-12-20", - last_updated: "2025-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.55 }, - limit: { context: 200000, output: 100000 }, - }, - "text-embedding-3-small": { - id: "text-embedding-3-small", - name: "text-embedding-3-small", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2024-01", - release_date: "2024-01-25", - last_updated: "2024-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.02, output: 0 }, - limit: { context: 8191, output: 1536 }, - }, - "o1-pro": { - id: "o1-pro", - name: "o1-pro", - family: "o-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2023-09", - release_date: "2025-03-19", - last_updated: "2025-03-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 150, output: 600 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-4": { - id: "gpt-4", - name: "GPT-4", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - knowledge: "2023-11", - release_date: "2023-11-06", - last_updated: "2024-04-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 60 }, - limit: { context: 8192, output: 8192 }, - }, - "gpt-5-codex": { - id: "gpt-5-codex", - name: "GPT-5-Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-5.4": { - id: "gpt-5.4", - name: "GPT-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 2.5, - output: 15, - cache_read: 0.25, - context_over_200k: { input: 5, output: 22.5, cache_read: 0.5 }, - }, - limit: { context: 1050000, input: 922000, output: 128000 }, - experimental: { - modes: { - fast: { cost: { input: 5, output: 30, cache_read: 0.5 }, provider: { body: { service_tier: "priority" } } }, - }, - }, - }, - "gpt-5.1-chat-latest": { - id: "gpt-5.1-chat-latest", - name: "GPT-5.1 Chat", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 128000, output: 16384 }, - }, - "gpt-5.3-codex-spark": { - id: "gpt-5.3-codex-spark", - name: "GPT-5.3 Codex Spark", - family: "gpt-codex-spark", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 128000, input: 100000, output: 32000 }, - }, - "chatgpt-image-latest": { - id: "chatgpt-image-latest", - name: "chatgpt-image-latest", - family: "gpt-image", - attachment: true, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-12-16", - last_updated: "2025-12-16", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - limit: { context: 0, input: 0, output: 0 }, - }, - "gpt-4.1-nano": { - id: "gpt-4.1-nano", - name: "GPT-4.1 nano", - family: "gpt-nano", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.03 }, - limit: { context: 1047576, output: 32768 }, - }, - o3: { - id: "o3", - name: "o3", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-5-pro": { - id: "gpt-5-pro", - name: "GPT-5 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-10-06", - last_updated: "2025-10-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 120 }, - limit: { context: 400000, input: 272000, output: 272000 }, - }, - "gpt-4o": { - id: "gpt-4o", - name: "GPT-4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-05-13", - last_updated: "2024-08-06", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10, cache_read: 1.25 }, - limit: { context: 128000, output: 16384 }, - }, - "gpt-5": { - id: "gpt-5", - name: "GPT-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-5-chat-latest": { - id: "gpt-5-chat-latest", - name: "GPT-5 Chat (latest)", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-image-1.5": { - id: "gpt-image-1.5", - name: "gpt-image-1.5", - family: "gpt-image", - attachment: true, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-11-25", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - limit: { context: 0, input: 0, output: 0 }, - }, - "gpt-5.5-pro": { - id: "gpt-5.5-pro", - name: "GPT-5.5 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-23", - last_updated: "2026-04-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180, context_over_200k: { input: 60, output: 270 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "gpt-4.1": { - id: "gpt-4.1", - name: "GPT-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 1047576, output: 32768 }, - }, - "gpt-4.1-mini": { - id: "gpt-4.1-mini", - name: "GPT-4.1 mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.6, cache_read: 0.1 }, - limit: { context: 1047576, output: 32768 }, - }, - "gpt-5.1-codex": { - id: "gpt-5.1-codex", - name: "GPT-5.1 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-4o-2024-11-20": { - id: "gpt-4o-2024-11-20", - name: "GPT-4o (2024-11-20)", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-11-20", - last_updated: "2024-11-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10, cache_read: 1.25 }, - limit: { context: 128000, output: 16384 }, - }, - }, - }, - requesty: { - id: "requesty", - env: ["REQUESTY_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://router.requesty.ai/v1", - name: "Requesty", - doc: "https://requesty.ai/solution/llm-routing/models", - models: { - "xai/grok-4-fast": { - id: "xai/grok-4-fast", - name: "Grok 4 Fast", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05, cache_write: 0.2 }, - limit: { context: 2000000, output: 64000 }, - }, - "xai/grok-4": { - id: "xai/grok-4", - name: "Grok 4", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-09", - last_updated: "2025-09-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75, cache_write: 3 }, - limit: { context: 256000, output: 64000 }, - }, - "openai/gpt-5.1-codex-max": { - id: "openai/gpt-5.1-codex-max", - name: "GPT-5.1-Codex-Max", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 9, cache_read: 0.11 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5-chat": { - id: "openai/gpt-5-chat", - name: "GPT-5 Chat (latest)", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.2-pro": { - id: "openai/gpt-5.2-pro", - name: "GPT-5.2 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 21, output: 168 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5-mini": { - id: "openai/gpt-5-mini", - name: "GPT-5 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.03 }, - limit: { context: 128000, output: 32000 }, - }, - "openai/gpt-5-nano": { - id: "openai/gpt-5-nano", - name: "GPT-5 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4, cache_read: 0.01 }, - limit: { context: 16000, output: 4000 }, - }, - "openai/gpt-5.3-codex": { - id: "openai/gpt-5.3-codex", - name: "GPT-5.3-Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-24", - last_updated: "2026-02-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-4o-mini": { - id: "openai/gpt-4o-mini", - name: "GPT-4o Mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.08 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-5.1-chat": { - id: "openai/gpt-5.1-chat", - name: "GPT-5.1 Chat", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/o4-mini": { - id: "openai/o4-mini", - name: "o4 Mini", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.28 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-5.2-codex": { - id: "openai/gpt-5.2-codex", - name: "GPT-5.2-Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-01-14", - last_updated: "2026-01-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.1-codex-mini": { - id: "openai/gpt-5.1-codex-mini", - name: "GPT-5.1-Codex-Mini", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, output: 100000 }, - }, - "openai/gpt-5-image": { - id: "openai/gpt-5-image", - name: "GPT-5 Image", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10-01", - release_date: "2025-10-14", - last_updated: "2025-10-14", - modalities: { input: ["text", "image", "pdf"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 5, output: 10, cache_read: 1.25 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.1": { - id: "openai/gpt-5.1", - name: "GPT-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.4-pro": { - id: "openai/gpt-5.4-pro", - name: "GPT-5.4 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180, cache_read: 30 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "openai/gpt-5-codex": { - id: "openai/gpt-5-codex", - name: "GPT-5 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10-01", - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5": { - id: "openai/gpt-5", - name: "GPT-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "audio", "image", "video"], output: ["text", "audio", "image"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-4.1-mini": { - id: "openai/gpt-4.1-mini", - name: "GPT-4.1 Mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.6, cache_read: 0.1 }, - limit: { context: 1047576, output: 32768 }, - }, - "openai/gpt-5.1-codex": { - id: "openai/gpt-5.1-codex", - name: "GPT-5.1-Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "google/gemini-3-flash-preview": { - id: "google/gemini-3-flash-preview", - name: "Gemini 3 Flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3, cache_read: 0.05, cache_write: 1 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-3-pro-preview": { - id: "google/gemini-3-pro-preview", - name: "Gemini 3 Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, cache_write: 4.5 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-2.5-flash": { - id: "google/gemini-2.5-flash", - name: "Gemini 2.5 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.075, cache_write: 0.55 }, - limit: { context: 1048576, output: 65536 }, - }, - "anthropic/claude-haiku-4-5": { - id: "anthropic/claude-haiku-4-5", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-01", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 62000 }, - }, - "anthropic/claude-sonnet-4-6": { - id: "anthropic/claude-sonnet-4-6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.6, cache_write: 7.5 }, - }, - limit: { context: 1000000, output: 128000 }, - }, - "anthropic/claude-3-7-sonnet": { - id: "anthropic/claude-3-7-sonnet", - name: "Claude Sonnet 3.7", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-01", - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-opus-4-5": { - id: "anthropic/claude-opus-4-5", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-11-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-opus-4": { - id: "anthropic/claude-opus-4", - name: "Claude Opus 4", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "anthropic/claude-opus-4-6": { - id: "anthropic/claude-opus-4-6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 5, - output: 25, - cache_read: 0.5, - cache_write: 6.25, - context_over_200k: { input: 10, output: 37.5, cache_read: 1, cache_write: 12.5 }, - }, - limit: { context: 1000000, output: 128000 }, - }, - "openai/gpt-5.2-chat": { - id: "openai/gpt-5.2-chat", - name: "GPT-5.2 Chat", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-5.2": { - id: "openai/gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5.4": { - id: "openai/gpt-5.4", - name: "GPT-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 2.5, - output: 15, - cache_read: 0.25, - context_over_200k: { input: 5, output: 22.5, cache_read: 0.5 }, - }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "openai/gpt-5-pro": { - id: "openai/gpt-5-pro", - name: "GPT-5 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-10-06", - last_updated: "2025-10-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 120 }, - limit: { context: 400000, output: 272000 }, - }, - "openai/gpt-4.1": { - id: "openai/gpt-4.1", - name: "GPT-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 1047576, output: 32768 }, - }, - "google/gemini-2.5-pro": { - id: "google/gemini-2.5-pro", - name: "Gemini 2.5 Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 1.25, - output: 10, - cache_read: 0.31, - cache_write: 2.375, - context_over_200k: { input: 2.5, output: 15, cache_read: 0.25 }, - }, - limit: { context: 1048576, output: 65536 }, - }, - "anthropic/claude-opus-4-1": { - id: "anthropic/claude-opus-4-1", - name: "Claude Opus 4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "anthropic/claude-sonnet-4": { - id: "anthropic/claude-sonnet-4", - name: "Claude Sonnet 4", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-sonnet-4-5": { - id: "anthropic/claude-sonnet-4-5", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - }, - }, - }, - digitalocean: { - id: "digitalocean", - env: ["DIGITALOCEAN_ACCESS_TOKEN"], - npm: "@ai-sdk/openai-compatible", - api: "https://inference.do-ai.run/v1", - name: "DigitalOcean", - doc: "https://docs.digitalocean.com/products/gradient-ai-platform/details/models/", - models: { - "openai-gpt-4o-mini": { - id: "openai-gpt-4o-mini", - name: "GPT-4o mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.075 }, - limit: { context: 128000, output: 16384 }, - }, - "multi-qa-mpnet-base-dot-v1": { - id: "multi-qa-mpnet-base-dot-v1", - name: "Multi-QA-mpnet-base-dot-v1", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2021-08-30", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.009, output: 0 }, - limit: { context: 512, output: 768 }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: false, - knowledge: "2025-01", - release_date: "2026-01", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 2.7 }, - limit: { context: 262144, output: 32768 }, - }, - "nemotron-3-nano-omni": { - id: "nemotron-3-nano-omni", - name: "Nemotron Nano 3 Omni", - family: "nemotron", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-28", - last_updated: "2026-04-30", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 0.9 }, - limit: { context: 65536, output: 65536 }, - }, - "llama3-8b-instruct": { - id: "llama3-8b-instruct", - name: "Llama 3.1 Instruct (8B)", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.198, output: 0.198 }, - limit: { context: 131072, output: 131072 }, - }, - "anthropic-claude-opus-4.7": { - id: "anthropic-claude-opus-4.7", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "anthropic-claude-sonnet-4": { - id: "anthropic-claude-sonnet-4", - name: "Claude Sonnet 4", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.3, cache_write: 3.75 }, - }, - limit: { context: 1000000, output: 64000 }, - }, - "wan2-2-t2v-a14b": { - id: "wan2-2-t2v-a14b", - name: "Wan2.2-T2V-A14B", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-07-28", - last_updated: "2026-04-30", - modalities: { input: ["text"], output: ["video"] }, - open_weights: true, - cost: { input: 0.6, output: 0 }, - limit: { context: 100, output: 1 }, - }, - "qwen-2.5-14b-instruct": { - id: "qwen-2.5-14b-instruct", - name: "Qwen 2.5 14B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2024-09-19", - last_updated: "2024-09-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 131072, output: 131072 }, - }, - "openai-gpt-5.4": { - id: "openai-gpt-5.4", - name: "GPT-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 15, cache_read: 0.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "qwen3.5-397b-a17b": { - id: "qwen3.5-397b-a17b", - name: "Qwen 3.5 397B A17B", - family: "qwen3.5", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-15", - last_updated: "2026-04-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 3.5 }, - limit: { context: 262144, output: 81920 }, - }, - "openai-o3": { - id: "openai-o3", - name: "o3", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 200000, output: 100000 }, - }, - "e5-large-v2": { - id: "e5-large-v2", - name: "E5 Large v2", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2023-05-19", - last_updated: "2026-04-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0 }, - limit: { context: 512, output: 1024 }, - }, - "openai-gpt-5.2-pro": { - id: "openai-gpt-5.2-pro", - name: "GPT-5.2 pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 21, output: 168 }, - limit: { context: 400000, output: 128000 }, - }, - "glm-5": { - id: "glm-5", - name: "GLM 5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - release_date: "2026-02-11", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2 }, - limit: { context: 202752, output: 128000 }, - }, - "openai-gpt-5.4-nano": { - id: "openai-gpt-5.4-nano", - name: "GPT-5.4 nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.25, cache_read: 0.02 }, - limit: { context: 400000, output: 128000 }, - }, - "mistral-7b-instruct-v0.3": { - id: "mistral-7b-instruct-v0.3", - name: "Mistral 7B Instruct v0.3", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-05-22", - last_updated: "2024-05-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 32768, output: 32768 }, - }, - "llama3.3-70b-instruct": { - id: "llama3.3-70b-instruct", - name: "Llama 3.3 Instruct 70B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.65, output: 0.65 }, - limit: { context: 128000, output: 128000 }, - }, - "mistral-3-14B": { - id: "mistral-3-14B", - name: "Ministral 3 14B Instruct", - family: "ministral", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-15", - last_updated: "2026-04-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 262144, output: 128000 }, - }, - "deepseek-r1-distill-llama-70b": { - id: "deepseek-r1-distill-llama-70b", - name: "DeepSeek R1 Distill Llama 70B", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-01-30", - last_updated: "2025-01-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.99, output: 0.99 }, - limit: { context: 131072, output: 32768 }, - }, - "alibaba-qwen3-32b": { - id: "alibaba-qwen3-32b", - name: "Qwen3-32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-30", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 0.55 }, - limit: { context: 131000, output: 40960 }, - }, - "anthropic-claude-opus-4.5": { - id: "anthropic-claude-opus-4.5", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-11-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - }, - "openai-o1": { - id: "openai-o1", - name: "o1", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2023-09", - release_date: "2024-12-05", - last_updated: "2024-12-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 60, cache_read: 7.5 }, - limit: { context: 200000, output: 100000 }, - }, - "anthropic-claude-3-opus": { - id: "anthropic-claude-3-opus", - name: "Claude 3 Opus", - family: "claude-opus", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-08", - release_date: "2024-02-29", - last_updated: "2024-02-29", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 4096 }, - status: "deprecated", - }, - "stable-diffusion-3.5-large": { - id: "stable-diffusion-3.5-large", - name: "Stable Diffusion 3.5 Large", - family: "stable-diffusion", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-10-22", - last_updated: "2026-04-30", - modalities: { input: ["text"], output: ["image"] }, - open_weights: true, - cost: { input: 0.08, output: 0 }, - limit: { context: 256, output: 1 }, - }, - "openai-gpt-5-nano": { - id: "openai-gpt-5-nano", - name: "GPT-5 nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4, cache_read: 0.005 }, - limit: { context: 400000, output: 128000 }, - }, - "llama-4-maverick": { - id: "llama-4-maverick", - name: "Llama 4 Maverick 17B 128E Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2026-04-30", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 0.87 }, - limit: { context: 1000000, output: 16384 }, - }, - "anthropic-claude-4.5-sonnet": { - id: "anthropic-claude-4.5-sonnet", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.3, cache_write: 3.75 }, - }, - limit: { context: 1000000, output: 64000 }, - }, - "qwen3-embedding-0.6b": { - id: "qwen3-embedding-0.6b", - name: "Qwen3 Embedding 0.6B", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-06-03", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0 }, - limit: { context: 8000, output: 1024 }, - status: "beta", - }, - "anthropic-claude-4.5-haiku": { - id: "anthropic-claude-4.5-haiku", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "gte-large-en-v1.5": { - id: "gte-large-en-v1.5", - name: "GTE Large (v1.5)", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-03-27", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0 }, - limit: { context: 8192, output: 1024 }, - }, - "openai-gpt-4.1": { - id: "openai-gpt-4.1", - name: "GPT-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 1047576, output: 32768 }, - }, - "anthropic-claude-3.5-haiku": { - id: "anthropic-claude-3.5-haiku", - name: "Claude 3.5 Haiku", - family: "claude-haiku", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-11-05", - last_updated: "2024-11-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4, cache_read: 0.08, cache_write: 1 }, - limit: { context: 200000, output: 8192 }, - status: "deprecated", - }, - "openai-gpt-5.2": { - id: "openai-gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "deepseek-3.2": { - id: "deepseek-3.2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2025-12-02", - last_updated: "2026-04-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.6 }, - limit: { context: 128000, output: 64000 }, - }, - "nemotron-3-nano-30b": { - id: "nemotron-3-nano-30b", - name: "Nemotron 3 Nano 30B A3B", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 262144 }, - }, - "anthropic-claude-opus-4": { - id: "anthropic-claude-opus-4", - name: "Claude Opus 4", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "openai-gpt-oss-20b": { - id: "openai-gpt-oss-20b", - name: "gpt-oss-20b", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-08-05", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.45 }, - limit: { context: 131072, output: 131072 }, - }, - "qwen3-coder-flash": { - id: "qwen3-coder-flash", - name: "Qwen3 Coder Flash", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2026-04-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 1.7 }, - limit: { context: 262144, output: 65536 }, - }, - "openai-o3-mini": { - id: "openai-o3-mini", - name: "o3-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2024-12-20", - last_updated: "2025-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.55 }, - limit: { context: 200000, output: 100000 }, - }, - "openai-gpt-oss-120b": { - id: "openai-gpt-oss-120b", - name: "gpt-oss-120b", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-08-05", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.7 }, - limit: { context: 131072, output: 131072 }, - }, - "gemma-4-31B-it": { - id: "gemma-4-31B-it", - name: "Gemma 4 31B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-22", - last_updated: "2026-04-30", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.18, output: 0.5 }, - limit: { context: 256000, output: 8192 }, - }, - "nemotron-nano-12b-v2-vl": { - id: "nemotron-nano-12b-v2-vl", - name: "Nemotron Nano 12B v2 VL", - family: "nemotron", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-12-01", - last_updated: "2026-04-30", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 128000, output: 16384 }, - }, - "anthropic-claude-4.1-opus": { - id: "anthropic-claude-4.1-opus", - name: "Claude Opus 4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "kimi-k2.6": { - id: "kimi-k2.6", - name: "Kimi K2.6", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: false, - knowledge: "2025-01", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4 }, - limit: { context: 262144, output: 262144 }, - }, - "openai-gpt-image-2": { - id: "openai-gpt-image-2", - name: "GPT Image 2", - family: "gpt-image", - attachment: true, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-04-24", - last_updated: "2025-04-24", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "anthropic-claude-4.6-sonnet": { - id: "anthropic-claude-4.6-sonnet", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.3, cache_write: 3.75 }, - }, - limit: { context: 1000000, output: 64000 }, - }, - "openai-gpt-5-mini": { - id: "openai-gpt-5-mini", - name: "GPT-5 mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, output: 128000 }, - }, - "anthropic-claude-haiku-4.5": { - id: "anthropic-claude-haiku-4.5", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "deepseek-v4-pro": { - id: "deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.74, output: 3.48 }, - limit: { context: 1048576, output: 393216 }, - }, - "ministral-3-8b-instruct-2512": { - id: "ministral-3-8b-instruct-2512", - name: "Ministral 3 8B", - family: "ministral", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-12-15", - last_updated: "2025-12-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 262144, output: 262144 }, - }, - "minimax-m2.5": { - id: "minimax-m2.5", - name: "MiniMax M2.5", - family: "minimax-m2.5", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08", - release_date: "2026-02-12", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204800, output: 128000 }, - status: "beta", - }, - "openai-gpt-image-1": { - id: "openai-gpt-image-1", - name: "GPT Image 1", - family: "gpt-image", - attachment: true, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-04-24", - last_updated: "2025-04-24", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - cost: { input: 5, output: 40, cache_read: 1.25 }, - limit: { context: 0, output: 0 }, - }, - "openai-gpt-5.5": { - id: "openai-gpt-5.5", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-23", - last_updated: "2026-04-30", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5, context_over_200k: { input: 10, output: 45, cache_read: 1 } }, - limit: { context: 1000000, output: 128000 }, - }, - "nvidia-nemotron-3-super-120b": { - id: "nvidia-nemotron-3-super-120b", - name: "Nemotron-3-Super-120B", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2026-02", - release_date: "2026-03-11", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.65 }, - limit: { context: 256000, output: 32768 }, - status: "beta", - }, - "openai-gpt-5.4-pro": { - id: "openai-gpt-5.4-pro", - name: "GPT-5.4 pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180 }, - limit: { context: 400000, output: 128000 }, - }, - "all-mini-lm-l6-v2": { - id: "all-mini-lm-l6-v2", - name: "All-MiniLM-L6-v2", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2021-08-30", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.009, output: 0 }, - limit: { context: 256, output: 384 }, - }, - "bge-m3": { - id: "bge-m3", - name: "BGE M3", - family: "bge", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-01-30", - last_updated: "2026-04-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0 }, - limit: { context: 8192, output: 1024 }, - }, - "openai-gpt-5.1-codex-max": { - id: "openai-gpt-5.1-codex-max", - name: "GPT-5.1 Codex Max", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "anthropic-claude-opus-4.6": { - id: "anthropic-claude-opus-4.6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 5, - output: 25, - cache_read: 0.5, - cache_write: 6.25, - context_over_200k: { input: 10, output: 37.5, cache_read: 0.5, cache_write: 6.25 }, - }, - limit: { context: 1000000, output: 128000 }, - }, - "openai-gpt-4o": { - id: "openai-gpt-4o", - name: "GPT-4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-05-13", - last_updated: "2024-08-06", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10, cache_read: 1.25 }, - limit: { context: 128000, output: 16384 }, - }, - "openai-gpt-5.4-mini": { - id: "openai-gpt-5.4-mini", - name: "GPT-5.4 mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5, cache_read: 0.075 }, - limit: { context: 400000, output: 128000 }, - }, - "openai-gpt-5": { - id: "openai-gpt-5", - name: "GPT-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "arcee-trinity-large-thinking": { - id: "arcee-trinity-large-thinking", - name: "Trinity Large Thinking", - family: "trinity", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 0.9, cache_read: 0.06 }, - limit: { context: 256000, output: 128000 }, - status: "beta", - }, - "mistral-nemo-instruct-2407": { - id: "mistral-nemo-instruct-2407", - name: "Mistral Nemo Instruct", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.3 }, - limit: { context: 128000, output: 16384 }, - status: "deprecated", - }, - "deepseek-v3": { - id: "deepseek-v3", - name: "DeepSeek V3", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-12-26", - last_updated: "2025-03-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - limit: { context: 163840, output: 131072 }, - }, - "bge-reranker-v2-m3": { - id: "bge-reranker-v2-m3", - name: "BGE Reranker v2 M3", - family: "bge", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-03-12", - last_updated: "2026-04-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.01, output: 0 }, - limit: { context: 8192, output: 1 }, - }, - "anthropic-claude-3.7-sonnet": { - id: "anthropic-claude-3.7-sonnet", - name: "Claude 3.7 Sonnet", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-24", - last_updated: "2025-02-24", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - status: "deprecated", - }, - "qwen3-tts-voicedesign": { - id: "qwen3-tts-voicedesign", - name: "Qwen3 TTS VoiceDesign", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2026-04-21", - last_updated: "2026-04-30", - modalities: { input: ["text"], output: ["audio"] }, - open_weights: true, - limit: { context: 32768, output: 1 }, - }, - "openai-gpt-image-1.5": { - id: "openai-gpt-image-1.5", - name: "GPT Image 1.5", - family: "gpt-image", - attachment: true, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-11-25", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["image"] }, - open_weights: false, - cost: { input: 5, output: 10, cache_read: 1 }, - limit: { context: 0, output: 0 }, - }, - "openai-gpt-5.3-codex": { - id: "openai-gpt-5.3-codex", - name: "GPT-5.3 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "anthropic-claude-3.5-sonnet": { - id: "anthropic-claude-3.5-sonnet", - name: "Claude 3.5 Sonnet", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-06-20", - last_updated: "2024-10-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 8192 }, - status: "deprecated", - }, - "fal-ai/fast-sdxl": { - id: "fal-ai/fast-sdxl", - name: "Fast SDXL", - family: "stable-diffusion", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2023-07-26", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["image"] }, - open_weights: true, - limit: { context: 0, output: 0 }, - }, - "fal-ai/flux/schnell": { - id: "fal-ai/flux/schnell", - name: "FLUX.1 [schnell]", - family: "flux", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-08-01", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["image"] }, - open_weights: true, - limit: { context: 0, output: 0 }, - }, - "fal-ai/elevenlabs/tts/multilingual-v2": { - id: "fal-ai/elevenlabs/tts/multilingual-v2", - name: "ElevenLabs Multilingual TTS v2", - family: "elevenlabs", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2023-08-22", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["audio"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "fal-ai/stable-audio-25/text-to-audio": { - id: "fal-ai/stable-audio-25/text-to-audio", - name: "Stable Audio 2.5 (Text-to-Audio)", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-10-08", - last_updated: "2026-04-16", - modalities: { input: ["text"], output: ["audio"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - }, - }, - vultr: { - id: "vultr", - env: ["VULTR_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.vultrinference.com/v1", - name: "Vultr", - doc: "https://api.vultrinference.com/", - models: { - "MiniMax-M2.5": { - id: "MiniMax-M2.5", - name: "MiniMax M2.5", - family: "minimax", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2025-02-11", - last_updated: "2025-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 194000, output: 4096 }, - }, - "GLM-5-FP8": { - id: "GLM-5-FP8", - name: "GLM 5 FP8", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.85, output: 3.1 }, - limit: { context: 200000, output: 131072 }, - }, - "DeepSeek-V3.2": { - id: "DeepSeek-V3.2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 1.65 }, - limit: { context: 127000, output: 4096 }, - }, - "gpt-oss-120b": { - id: "gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 129000, output: 4096 }, - }, - "Kimi-K2.5": { - id: "Kimi-K2.5", - name: "Kimi K2 Instruct", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.75 }, - limit: { context: 254000, output: 32768 }, - }, - }, - }, - "alibaba-coding-plan-cn": { - id: "alibaba-coding-plan-cn", - env: ["ALIBABA_CODING_PLAN_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://coding.dashscope.aliyuncs.com/v1", - name: "Alibaba Coding Plan (China)", - doc: "https://help.aliyun.com/zh/model-studio/coding-plan", - models: { - "qwen3-coder-plus": { - id: "qwen3-coder-plus", - name: "Qwen3 Coder Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 1000000, output: 65536 }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 262144, output: 32768 }, - }, - "glm-4.7": { - id: "glm-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 202752, output: 16384 }, - }, - "glm-5": { - id: "glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 202752, output: 16384 }, - }, - "MiniMax-M2.5": { - id: "MiniMax-M2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 196608, output: 24576 }, - }, - "qwen3.6-plus": { - id: "qwen3.6-plus", - name: "Qwen3.6 Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 1000000, output: 65536 }, - }, - "qwen3-max-2026-01-23": { - id: "qwen3-max-2026-01-23", - name: "Qwen3 Max", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-23", - last_updated: "2026-01-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 262144, output: 32768 }, - }, - "qwen3-coder-next": { - id: "qwen3-coder-next", - name: "Qwen3 Coder Next", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-03", - last_updated: "2026-02-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen3.5-plus": { - id: "qwen3.5-plus", - name: "Qwen3.5 Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 1000000, output: 65536 }, - }, - }, - }, - mistral: { - id: "mistral", - env: ["MISTRAL_API_KEY"], - npm: "@ai-sdk/mistral", - name: "Mistral", - doc: "https://docs.mistral.ai/getting-started/models/", - models: { - "mistral-small-latest": { - id: "mistral-small-latest", - name: "Mistral Small (latest)", - family: "mistral-small", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2026-03-16", - last_updated: "2026-03-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 256000, output: 256000 }, - }, - "mistral-nemo": { - id: "mistral-nemo", - name: "Mistral Nemo", - family: "mistral-nemo", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 128000, output: 128000 }, - }, - "mistral-large-2512": { - id: "mistral-large-2512", - name: "Mistral Large 3", - family: "mistral-large", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2024-11-01", - last_updated: "2025-12-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 262144, output: 262144 }, - }, - "labs-devstral-small-2512": { - id: "labs-devstral-small-2512", - name: "Devstral Small 2", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-12", - release_date: "2025-12-09", - last_updated: "2025-12-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 256000 }, - }, - "devstral-2512": { - id: "devstral-2512", - name: "Devstral 2", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-12", - release_date: "2025-12-09", - last_updated: "2025-12-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2 }, - limit: { context: 262144, output: 262144 }, - }, - "magistral-medium-latest": { - id: "magistral-medium-latest", - name: "Magistral Medium (latest)", - family: "magistral-medium", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-03-17", - last_updated: "2025-03-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 5 }, - limit: { context: 128000, output: 16384 }, - }, - "open-mixtral-8x7b": { - id: "open-mixtral-8x7b", - name: "Mixtral 8x7B", - family: "mixtral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-01", - release_date: "2023-12-11", - last_updated: "2023-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 0.7 }, - limit: { context: 32000, output: 32000 }, - }, - "pixtral-large-latest": { - id: "pixtral-large-latest", - name: "Pixtral Large (latest)", - family: "pixtral", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2024-11-01", - last_updated: "2024-11-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 6 }, - limit: { context: 128000, output: 128000 }, - }, - "mistral-large-2411": { - id: "mistral-large-2411", - name: "Mistral Large 2.1", - family: "mistral-large", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2024-11-01", - last_updated: "2024-11-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 6 }, - limit: { context: 131072, output: 16384 }, - }, - "codestral-latest": { - id: "codestral-latest", - name: "Codestral (latest)", - family: "codestral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-05-29", - last_updated: "2025-01-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 256000, output: 4096 }, - }, - "mistral-large-latest": { - id: "mistral-large-latest", - name: "Mistral Large (latest)", - family: "mistral-large", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2024-11-01", - last_updated: "2025-12-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 262144, output: 262144 }, - }, - "mistral-small-2506": { - id: "mistral-small-2506", - name: "Mistral Small 3.2", - family: "mistral-small", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-03", - release_date: "2025-06-20", - last_updated: "2025-06-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 128000, output: 16384 }, - }, - "pixtral-12b": { - id: "pixtral-12b", - name: "Pixtral 12B", - family: "pixtral", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2024-09-01", - last_updated: "2024-09-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 128000, output: 128000 }, - }, - "ministral-8b-latest": { - id: "ministral-8b-latest", - name: "Ministral 8B (latest)", - family: "ministral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-10-01", - last_updated: "2024-10-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 128000, output: 128000 }, - }, - "mistral-embed": { - id: "mistral-embed", - name: "Mistral Embed", - family: "mistral-embed", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2023-12-11", - last_updated: "2023-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0 }, - limit: { context: 8000, output: 3072 }, - }, - "magistral-small": { - id: "magistral-small", - name: "Magistral Small", - family: "magistral-small", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-03-17", - last_updated: "2025-03-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 128000, output: 128000 }, - }, - "mistral-small-2603": { - id: "mistral-small-2603", - name: "Mistral Small 4", - family: "mistral-small", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2026-03-16", - last_updated: "2026-03-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 256000, output: 256000 }, - }, - "ministral-3b-latest": { - id: "ministral-3b-latest", - name: "Ministral 3B (latest)", - family: "ministral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-10-01", - last_updated: "2024-10-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.04 }, - limit: { context: 128000, output: 128000 }, - }, - "open-mixtral-8x22b": { - id: "open-mixtral-8x22b", - name: "Mixtral 8x22B", - family: "mixtral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-04-17", - last_updated: "2024-04-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 6 }, - limit: { context: 64000, output: 64000 }, - }, - "mistral-medium-2604": { - id: "mistral-medium-2604", - name: "Mistral Medium 3.5", - family: "mistral-medium", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-29", - last_updated: "2026-04-29", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 1.5, output: 7.5 }, - limit: { context: 262144, output: 262144 }, - }, - "devstral-small-2505": { - id: "devstral-small-2505", - name: "Devstral Small 2505", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-05-07", - last_updated: "2025-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 128000, output: 128000 }, - }, - "devstral-medium-2507": { - id: "devstral-medium-2507", - name: "Devstral Medium", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-07-10", - last_updated: "2025-07-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2 }, - limit: { context: 128000, output: 128000 }, - }, - "open-mistral-7b": { - id: "open-mistral-7b", - name: "Mistral 7B", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2023-09-27", - last_updated: "2023-09-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 0.25 }, - limit: { context: 8000, output: 8000 }, - }, - "devstral-medium-latest": { - id: "devstral-medium-latest", - name: "Devstral 2 (latest)", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-12", - release_date: "2025-12-02", - last_updated: "2025-12-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2 }, - limit: { context: 262144, output: 262144 }, - }, - "mistral-medium-2505": { - id: "mistral-medium-2505", - name: "Mistral Medium 3", - family: "mistral-medium", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-05-07", - last_updated: "2025-05-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 131072, output: 131072 }, - }, - "devstral-small-2507": { - id: "devstral-small-2507", - name: "Devstral Small", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-07-10", - last_updated: "2025-07-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 128000, output: 128000 }, - }, - "mistral-medium-2508": { - id: "mistral-medium-2508", - name: "Mistral Medium 3.1", - family: "mistral-medium", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-08-12", - last_updated: "2025-08-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 262144, output: 262144 }, - }, - "mistral-medium-latest": { - id: "mistral-medium-latest", - name: "Mistral Medium (latest)", - family: "mistral-medium", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-29", - last_updated: "2026-04-29", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 1.5, output: 7.5 }, - limit: { context: 262144, output: 262144 }, - }, - }, - }, - ovhcloud: { - id: "ovhcloud", - env: ["OVHCLOUD_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://oai.endpoints.kepler.ai.cloud.ovh.net/v1", - name: "OVHcloud AI Endpoints", - doc: "https://www.ovhcloud.com/en/public-cloud/ai-endpoints/catalog//", - models: { - "meta-llama-3_3-70b-instruct": { - id: "meta-llama-3_3-70b-instruct", - name: "Meta-Llama-3_3-70B-Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-01", - last_updated: "2025-04-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.74, output: 0.74 }, - limit: { context: 131072, output: 131072 }, - }, - "mistral-7b-instruct-v0.3": { - id: "mistral-7b-instruct-v0.3", - name: "Mistral-7B-Instruct-v0.3", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-01", - last_updated: "2025-04-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.11, output: 0.11 }, - limit: { context: 65536, output: 65536 }, - }, - "qwen3-32b": { - id: "qwen3-32b", - name: "Qwen3-32B", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-16", - last_updated: "2025-07-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.25 }, - limit: { context: 32768, output: 32768 }, - }, - "qwen2.5-vl-72b-instruct": { - id: "qwen2.5-vl-72b-instruct", - name: "Qwen2.5-VL-72B-Instruct", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-03-31", - last_updated: "2025-03-31", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 1.01, output: 1.01 }, - limit: { context: 32768, output: 32768 }, - }, - "qwen3-coder-30b-a3b-instruct": { - id: "qwen3-coder-30b-a3b-instruct", - name: "Qwen3-Coder-30B-A3B-Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-28", - last_updated: "2025-10-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.26 }, - limit: { context: 262144, output: 262144 }, - }, - "gpt-oss-20b": { - id: "gpt-oss-20b", - name: "gpt-oss-20b", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-08-28", - last_updated: "2025-08-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.18 }, - limit: { context: 131072, output: 131072 }, - }, - "mistral-small-3.2-24b-instruct-2506": { - id: "mistral-small-3.2-24b-instruct-2506", - name: "Mistral-Small-3.2-24B-Instruct-2506", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-16", - last_updated: "2025-07-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.31 }, - limit: { context: 131072, output: 131072 }, - }, - "qwen3.5-9b": { - id: "qwen3.5-9b", - name: "Qwen3.5-9B", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-15", - last_updated: "2026-02-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.15 }, - limit: { context: 262144, output: 262144 }, - }, - "gpt-oss-120b": { - id: "gpt-oss-120b", - name: "gpt-oss-120b", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - release_date: "2025-08-28", - last_updated: "2025-08-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.47 }, - limit: { context: 131072, output: 131072 }, - }, - "mistral-nemo-instruct-2407": { - id: "mistral-nemo-instruct-2407", - name: "Mistral-Nemo-Instruct-2407", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-11-20", - last_updated: "2024-11-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.14 }, - limit: { context: 65536, output: 65536 }, - }, - "llama-3.1-8b-instruct": { - id: "llama-3.1-8b-instruct", - name: "Llama-3.1-8B-Instruct", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-06-11", - last_updated: "2025-06-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.11, output: 0.11 }, - limit: { context: 131072, output: 131072 }, - }, - }, - }, - friendli: { - id: "friendli", - env: ["FRIENDLI_TOKEN"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.friendli.ai/serverless/v1", - name: "Friendli", - doc: "https://friendli.ai/docs/guides/serverless_endpoints/introduction", - models: { - "Qwen/Qwen3-235B-A22B-Instruct-2507": { - id: "Qwen/Qwen3-235B-A22B-Instruct-2507", - name: "Qwen3 235B A22B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-29", - last_updated: "2026-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.8 }, - limit: { context: 262144, output: 262144 }, - }, - "zai-org/GLM-5.1": { - id: "zai-org/GLM-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-07", - last_updated: "2026-04-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.4, output: 4.4, cache_read: 0.26 }, - limit: { context: 202752, output: 202752 }, - }, - "zai-org/GLM-5": { - id: "zai-org/GLM-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2, cache_read: 0.5 }, - limit: { context: 202752, output: 202752 }, - }, - "meta-llama/Llama-3.3-70B-Instruct": { - id: "meta-llama/Llama-3.3-70B-Instruct", - name: "Llama 3.3 70B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-08-01", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 0.6 }, - limit: { context: 131072, output: 131072 }, - }, - "meta-llama/Llama-3.1-8B-Instruct": { - id: "meta-llama/Llama-3.1-8B-Instruct", - name: "Llama 3.1 8B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-08-01", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 131072, output: 8000 }, - }, - "MiniMaxAI/MiniMax-M2.5": { - id: "MiniMaxAI/MiniMax-M2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06 }, - limit: { context: 196608, output: 196608 }, - }, - }, - }, - cortecs: { - id: "cortecs", - env: ["CORTECS_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.cortecs.ai/v1", - name: "Cortecs", - doc: "https://api.cortecs.ai/v1/models", - models: { - "minimax-m2.7": { - id: "minimax-m2.7", - name: "MiniMax-m2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.47, output: 1.4 }, - limit: { context: 202752, output: 196072 }, - }, - "claude-haiku-4-5": { - id: "claude-haiku-4-5", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.09, output: 5.43 }, - limit: { context: 200000, output: 200000 }, - }, - "qwen3-235b-a22b-instruct-2507": { - id: "qwen3-235b-a22b-instruct-2507", - name: "Qwen3 235B A22B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.062, output: 0.408 }, - limit: { context: 131000, output: 131000 }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi K2.5", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.76 }, - limit: { context: 256000, output: 256000 }, - }, - "deepseek-v3-0324": { - id: "deepseek-v3-0324", - name: "DeepSeek V3 0324", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-03-24", - last_updated: "2025-03-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.551, output: 1.654 }, - limit: { context: 128000, output: 128000 }, - }, - "glm-4.7": { - id: "glm-4.7", - name: "GLM 4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 2.23 }, - limit: { context: 198000, output: 198000 }, - }, - "claude-opus4-7": { - id: "claude-opus4-7", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5.6, output: 27.99, cache_read: 0.56, cache_write: 6.99 }, - limit: { context: 1000000, output: 128000 }, - }, - "glm-5": { - id: "glm-5", - name: "GLM 5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.08, output: 3.44 }, - limit: { context: 202752, output: 202752 }, - }, - "nova-pro-v1": { - id: "nova-pro-v1", - name: "Nova Pro 1.0", - family: "nova-pro", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-12-03", - last_updated: "2024-12-03", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.016, output: 4.061 }, - limit: { context: 300000, output: 5000 }, - }, - "devstral-2512": { - id: "devstral-2512", - name: "Devstral 2 2512", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-12", - release_date: "2025-12-09", - last_updated: "2025-12-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262000, output: 262000 }, - }, - "qwen3-32b": { - id: "qwen3-32b", - name: "Qwen3 32B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-04-29", - last_updated: "2025-04-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.099, output: 0.33 }, - limit: { context: 16384, output: 16384 }, - }, - "codestral-2508": { - id: "codestral-2508", - name: "Codestral 2508", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-03", - release_date: "2025-07-30", - last_updated: "2025-07-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.9, cache_read: 0.03 }, - limit: { context: 256000, output: 256000 }, - }, - "claude-4-5-sonnet": { - id: "claude-4-5-sonnet", - name: "Claude 4.5 Sonnet", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3.259, output: 16.296 }, - limit: { context: 200000, output: 200000 }, - }, - "kimi-k2-instruct": { - id: "kimi-k2-instruct", - name: "Kimi K2 Instruct", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-07-11", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.551, output: 2.646 }, - limit: { context: 131000, output: 131000 }, - }, - "nemotron-3-super-120b-a12b": { - id: "nemotron-3-super-120b-a12b", - name: "Nemotron 3 Super 120B A12B", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-12", - release_date: "2026-03-11", - last_updated: "2026-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.266, output: 0.799 }, - limit: { context: 262144, output: 262144 }, - }, - "minimax-m2": { - id: "minimax-m2", - name: "MiniMax-M2", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-11", - release_date: "2025-10-27", - last_updated: "2025-10-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.39, output: 1.57 }, - limit: { context: 400000, output: 400000 }, - }, - "gemini-2.5-pro": { - id: "gemini-2.5-pro", - name: "Gemini 2.5 Pro", - family: "gemini-pro", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.654, output: 11.024 }, - limit: { context: 1048576, output: 65535 }, - }, - "claude-opus4-6": { - id: "claude-opus4-6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5.98, output: 29.89 }, - limit: { context: 1000000, output: 1000000 }, - }, - "devstral-small-2512": { - id: "devstral-small-2512", - name: "Devstral Small 2 2512", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-12", - release_date: "2025-12-09", - last_updated: "2025-12-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262000, output: 262000 }, - }, - "minimax-m2.1": { - id: "minimax-m2.1", - name: "MiniMax-M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.34, output: 1.34 }, - limit: { context: 196000, output: 196000 }, - }, - "glm-5.1": { - id: "glm-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-14", - last_updated: "2026-04-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.31, output: 4.1, cache_read: 0.24 }, - limit: { context: 204800, output: 131072 }, - }, - "glm-4.5": { - id: "glm-4.5", - name: "GLM 4.5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-29", - last_updated: "2025-07-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.67, output: 2.46 }, - limit: { context: 131072, output: 131072 }, - }, - "claude-opus4-5": { - id: "claude-opus4-5", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-11-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5.98, output: 29.89 }, - limit: { context: 200000, output: 200000 }, - }, - "claude-sonnet-4": { - id: "claude-sonnet-4", - name: "Claude Sonnet 4", - family: "claude-sonnet", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-03", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3.307, output: 16.536 }, - limit: { context: 200000, output: 64000 }, - }, - "qwen3-next-80b-a3b-thinking": { - id: "qwen3-next-80b-a3b-thinking", - name: "Qwen3 Next 80B A3B Thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-11", - last_updated: "2025-09-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.164, output: 1.311 }, - limit: { context: 128000, output: 128000 }, - }, - "glm-4.5-air": { - id: "glm-4.5-air", - name: "GLM 4.5 Air", - family: "glm-air", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-08-01", - last_updated: "2025-08-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 1.34 }, - limit: { context: 131072, output: 131072 }, - }, - "kimi-k2.6": { - id: "kimi-k2.6", - name: "Kimi K2.6", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-17", - last_updated: "2026-04-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.81, output: 3.54, cache_read: 0.2 }, - limit: { context: 256000, output: 256000 }, - }, - "qwen3-coder-next": { - id: "qwen3-coder-next", - name: "Qwen3 Coder Next 80B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-02-04", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.158, output: 0.84 }, - limit: { context: 256000, output: 65536 }, - }, - "claude-4-6-sonnet": { - id: "claude-4-6-sonnet", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3.59, output: 17.92 }, - limit: { context: 1000000, output: 1000000 }, - }, - "qwen3-coder-480b-a35b-instruct": { - id: "qwen3-coder-480b-a35b-instruct", - name: "Qwen3 Coder 480B A35B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-07-25", - last_updated: "2025-07-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.441, output: 1.984 }, - limit: { context: 262000, output: 262000 }, - }, - "mixtral-8x7B-instruct-v0.1": { - id: "mixtral-8x7B-instruct-v0.1", - name: "Mixtral 8x7B Instruct v0.1", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2023-09", - release_date: "2023-12-11", - last_updated: "2023-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.438, output: 0.68 }, - limit: { context: 32000, output: 32000 }, - }, - "hermes-4-70b": { - id: "hermes-4-70b", - name: "Hermes 4 70B", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2025-08-26", - last_updated: "2025-08-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.116, output: 0.358 }, - limit: { context: 128000, output: 128000 }, - }, - "minimax-m2.5": { - id: "minimax-m2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.32, output: 1.18 }, - limit: { context: 196608, output: 196608 }, - }, - "deepseek-v3.2": { - id: "deepseek-v3.2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.266, output: 0.444 }, - limit: { context: 163840, output: 163840 }, - }, - "intellect-3": { - id: "intellect-3", - name: "INTELLECT 3", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-11", - release_date: "2025-11-26", - last_updated: "2025-11-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.219, output: 1.202 }, - limit: { context: 128000, output: 128000 }, - }, - "glm-4.7-flash": { - id: "glm-4.7-flash", - name: "GLM-4.7-Flash", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-08-08", - last_updated: "2025-08-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.53 }, - limit: { context: 203000, output: 203000 }, - }, - "gpt-oss-120b": { - id: "gpt-oss-120b", - name: "GPT Oss 120b", - family: "gpt-oss", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-01", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 128000 }, - }, - "qwen-2.5-72b-instruct": { - id: "qwen-2.5-72b-instruct", - name: "Qwen2.5 72B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-09-19", - last_updated: "2024-09-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.062, output: 0.231 }, - limit: { context: 33000, output: 33000 }, - }, - "deepseek-r1-0528": { - id: "deepseek-r1-0528", - name: "DeepSeek R1 0528", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.585, output: 2.307 }, - limit: { context: 164000, output: 164000 }, - }, - "gpt-4.1": { - id: "gpt-4.1", - name: "GPT 4.1", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.354, output: 9.417 }, - limit: { context: 1047576, output: 32768 }, - }, - "kimi-k2-thinking": { - id: "kimi-k2-thinking", - name: "Kimi K2 Thinking", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-12", - release_date: "2025-12-08", - last_updated: "2025-12-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.656, output: 2.731 }, - limit: { context: 262000, output: 262000 }, - }, - "llama-3.1-405b-instruct": { - id: "llama-3.1-405b-instruct", - name: "Llama 3.1 405B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 128000 }, - }, - "qwen3.5-122b-a10b": { - id: "qwen3.5-122b-a10b", - name: "Qwen3.5 122B A10B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2026-01", - release_date: "2026-02-24", - last_updated: "2026-02-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.444, output: 3.106 }, - limit: { context: 262144, output: 262144 }, - }, - "llama-3.3-70b-instruct": { - id: "llama-3.3-70b-instruct", - name: "Llama 3.3 70B Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.089, output: 0.275 }, - limit: { context: 131000, output: 131000 }, - }, - "mistral-large-2512": { - id: "mistral-large-2512", - name: "Mistral Large 3 2512", - family: "mistral-large", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-12", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.5, cache_read: 0.05 }, - limit: { context: 256000, output: 256000 }, - }, - "qwen3.5-397b-a17b": { - id: "qwen3.5-397b-a17b", - name: "Qwen3.5 397B A17B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2026-01", - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3.6 }, - limit: { context: 250000, output: 250000 }, - }, - "deepseek-v4-flash": { - id: "deepseek-v4-flash", - name: "DeepSeek V4 Flash", - family: "deepseek-flash", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.133, output: 0.266, cache_read: 0.028 }, - limit: { context: 1048576, output: 384000 }, - }, - "deepseek-v4-pro": { - id: "deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.553, output: 3.106, cache_read: 0.145 }, - limit: { context: 1048576, output: 384000 }, - }, - "qwen3-coder-30b-a3b-instruct": { - id: "qwen3-coder-30b-a3b-instruct", - name: "Qwen3 Coder 30B A3B Instruct", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-31", - last_updated: "2025-07-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.053, output: 0.222 }, - limit: { context: 262000, output: 262000 }, - }, - }, - }, - siliconflow: { - id: "siliconflow", - env: ["SILICONFLOW_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.siliconflow.com/v1", - name: "SiliconFlow", - doc: "https://cloud.siliconflow.com/models", - models: { - "nex-agi/DeepSeek-V3.1-Nex-N1": { - id: "nex-agi/DeepSeek-V3.1-Nex-N1", - name: "nex-agi/DeepSeek-V3.1-Nex-N1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-01-01", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 2 }, - limit: { context: 131000, output: 131000 }, - }, - "Qwen/Qwen2.5-VL-72B-Instruct": { - id: "Qwen/Qwen2.5-VL-72B-Instruct", - name: "Qwen/Qwen2.5-VL-72B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-01-28", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.59, output: 0.59 }, - limit: { context: 131000, output: 4000 }, - }, - "Qwen/Qwen3-VL-32B-Thinking": { - id: "Qwen/Qwen3-VL-32B-Thinking", - name: "Qwen/Qwen3-VL-32B-Thinking", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-21", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.5 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-30B-A3B-Thinking-2507": { - id: "Qwen/Qwen3-30B-A3B-Thinking-2507", - name: "Qwen/Qwen3-30B-A3B-Thinking-2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-31", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09, output: 0.3 }, - limit: { context: 262000, output: 131000 }, - }, - "Qwen/Qwen3-VL-235B-A22B-Thinking": { - id: "Qwen/Qwen3-VL-235B-A22B-Thinking", - name: "Qwen/Qwen3-VL-235B-A22B-Thinking", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-04", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.45, output: 3.5 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen2.5-7B-Instruct": { - id: "Qwen/Qwen2.5-7B-Instruct", - name: "Qwen/Qwen2.5-7B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.05 }, - limit: { context: 33000, output: 4000 }, - }, - "Qwen/Qwen2.5-Coder-32B-Instruct": { - id: "Qwen/Qwen2.5-Coder-32B-Instruct", - name: "Qwen/Qwen2.5-Coder-32B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-11-11", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 0.18 }, - limit: { context: 33000, output: 4000 }, - }, - "Qwen/Qwen3-VL-30B-A3B-Instruct": { - id: "Qwen/Qwen3-VL-30B-A3B-Instruct", - name: "Qwen/Qwen3-VL-30B-A3B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-05", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.29, output: 1 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/QwQ-32B": { - id: "Qwen/QwQ-32B", - name: "Qwen/QwQ-32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-03-06", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.58 }, - limit: { context: 131000, output: 131000 }, - }, - "Qwen/Qwen3-235B-A22B": { - id: "Qwen/Qwen3-235B-A22B", - name: "Qwen/Qwen3-235B-A22B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-30", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.35, output: 1.42 }, - limit: { context: 131000, output: 131000 }, - }, - "Qwen/Qwen3-Omni-30B-A3B-Captioner": { - id: "Qwen/Qwen3-Omni-30B-A3B-Captioner", - name: "Qwen/Qwen3-Omni-30B-A3B-Captioner", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-04", - last_updated: "2025-11-25", - modalities: { input: ["audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 66000, output: 66000 }, - }, - "Qwen/Qwen3-VL-8B-Thinking": { - id: "Qwen/Qwen3-VL-8B-Thinking", - name: "Qwen/Qwen3-VL-8B-Thinking", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-15", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 2 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen2.5-VL-7B-Instruct": { - id: "Qwen/Qwen2.5-VL-7B-Instruct", - name: "Qwen/Qwen2.5-VL-7B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-01-28", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.05 }, - limit: { context: 33000, output: 4000 }, - }, - "Qwen/Qwen3-Next-80B-A3B-Instruct": { - id: "Qwen/Qwen3-Next-80B-A3B-Instruct", - name: "Qwen/Qwen3-Next-80B-A3B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 1.4 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-8B": { - id: "Qwen/Qwen3-8B", - name: "Qwen/Qwen3-8B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-30", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.06, output: 0.06 }, - limit: { context: 131000, output: 131000 }, - }, - "Qwen/Qwen3-30B-A3B-Instruct-2507": { - id: "Qwen/Qwen3-30B-A3B-Instruct-2507", - name: "Qwen/Qwen3-30B-A3B-Instruct-2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-30", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09, output: 0.3 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-235B-A22B-Instruct-2507": { - id: "Qwen/Qwen3-235B-A22B-Instruct-2507", - name: "Qwen/Qwen3-235B-A22B-Instruct-2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-23", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09, output: 0.6 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-32B": { - id: "Qwen/Qwen3-32B", - name: "Qwen/Qwen3-32B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-30", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.57 }, - limit: { context: 131000, output: 131000 }, - }, - "Qwen/Qwen3-Coder-30B-A3B-Instruct": { - id: "Qwen/Qwen3-Coder-30B-A3B-Instruct", - name: "Qwen/Qwen3-Coder-30B-A3B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-01", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.28 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-Omni-30B-A3B-Instruct": { - id: "Qwen/Qwen3-Omni-30B-A3B-Instruct", - name: "Qwen/Qwen3-Omni-30B-A3B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-04", - last_updated: "2025-11-25", - modalities: { input: ["text", "image", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 66000, output: 66000 }, - }, - "Qwen/Qwen3-14B": { - id: "Qwen/Qwen3-14B", - name: "Qwen/Qwen3-14B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-30", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.28 }, - limit: { context: 131000, output: 131000 }, - }, - "Qwen/Qwen2.5-72B-Instruct-128K": { - id: "Qwen/Qwen2.5-72B-Instruct-128K", - name: "Qwen/Qwen2.5-72B-Instruct-128K", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.59, output: 0.59 }, - limit: { context: 131000, output: 4000 }, - }, - "Qwen/Qwen2.5-32B-Instruct": { - id: "Qwen/Qwen2.5-32B-Instruct", - name: "Qwen/Qwen2.5-32B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-09-19", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 0.18 }, - limit: { context: 33000, output: 4000 }, - }, - "Qwen/Qwen3-235B-A22B-Thinking-2507": { - id: "Qwen/Qwen3-235B-A22B-Thinking-2507", - name: "Qwen/Qwen3-235B-A22B-Thinking-2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-28", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.13, output: 0.6 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-Omni-30B-A3B-Thinking": { - id: "Qwen/Qwen3-Omni-30B-A3B-Thinking", - name: "Qwen/Qwen3-Omni-30B-A3B-Thinking", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-04", - last_updated: "2025-11-25", - modalities: { input: ["text", "image", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4 }, - limit: { context: 66000, output: 66000 }, - }, - "Qwen/Qwen2.5-VL-32B-Instruct": { - id: "Qwen/Qwen2.5-VL-32B-Instruct", - name: "Qwen/Qwen2.5-VL-32B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-03-24", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 0.27 }, - limit: { context: 131000, output: 131000 }, - }, - "Qwen/Qwen3-Next-80B-A3B-Thinking": { - id: "Qwen/Qwen3-Next-80B-A3B-Thinking", - name: "Qwen/Qwen3-Next-80B-A3B-Thinking", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-25", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.57 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-VL-235B-A22B-Instruct": { - id: "Qwen/Qwen3-VL-235B-A22B-Instruct", - name: "Qwen/Qwen3-VL-235B-A22B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-04", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.5 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen2.5-14B-Instruct": { - id: "Qwen/Qwen2.5-14B-Instruct", - name: "Qwen/Qwen2.5-14B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 33000, output: 4000 }, - }, - "Qwen/Qwen3-VL-30B-A3B-Thinking": { - id: "Qwen/Qwen3-VL-30B-A3B-Thinking", - name: "Qwen/Qwen3-VL-30B-A3B-Thinking", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-11", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.29, output: 1 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-VL-32B-Instruct": { - id: "Qwen/Qwen3-VL-32B-Instruct", - name: "Qwen/Qwen3-VL-32B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-21", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-VL-8B-Instruct": { - id: "Qwen/Qwen3-VL-8B-Instruct", - name: "Qwen/Qwen3-VL-8B-Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-15", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 0.68 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen3-Coder-480B-A35B-Instruct": { - id: "Qwen/Qwen3-Coder-480B-A35B-Instruct", - name: "Qwen/Qwen3-Coder-480B-A35B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-31", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1 }, - limit: { context: 262000, output: 262000 }, - }, - "Qwen/Qwen2.5-72B-Instruct": { - id: "Qwen/Qwen2.5-72B-Instruct", - name: "Qwen/Qwen2.5-72B-Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.59, output: 0.59 }, - limit: { context: 33000, output: 4000 }, - }, - "stepfun-ai/Step-3.5-Flash": { - id: "stepfun-ai/Step-3.5-Flash", - name: "stepfun-ai/Step-3.5-Flash", - family: "step", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 262000, output: 262000 }, - }, - "zai-org/GLM-4.5": { - id: "zai-org/GLM-4.5", - name: "zai-org/GLM-4.5", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-28", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 131000, output: 131000 }, - }, - "zai-org/GLM-5V-Turbo": { - id: "zai-org/GLM-5V-Turbo", - name: "zai-org/GLM-5V-Turbo", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 4, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "zai-org/GLM-4.7": { - id: "zai-org/GLM-4.7", - name: "zai-org/GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 205000, output: 205000 }, - }, - "zai-org/GLM-5.1": { - id: "zai-org/GLM-5.1", - name: "zai-org/GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-08", - last_updated: "2026-04-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.4, output: 4.4, cache_write: 0 }, - limit: { context: 205000, output: 205000 }, - }, - "zai-org/GLM-4.5-Air": { - id: "zai-org/GLM-4.5-Air", - name: "zai-org/GLM-4.5-Air", - family: "glm-air", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-28", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.86 }, - limit: { context: 131000, output: 131000 }, - }, - "zai-org/GLM-5": { - id: "zai-org/GLM-5", - name: "zai-org/GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2 }, - limit: { context: 205000, output: 205000 }, - }, - "zai-org/GLM-4.6V": { - id: "zai-org/GLM-4.6V", - name: "zai-org/GLM-4.6V", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-12-07", - last_updated: "2025-12-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 131000, output: 131000 }, - }, - "zai-org/GLM-4.6": { - id: "zai-org/GLM-4.6", - name: "zai-org/GLM-4.6", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-04", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.9 }, - limit: { context: 205000, output: 205000 }, - }, - "zai-org/GLM-4.5V": { - id: "zai-org/GLM-4.5V", - name: "zai-org/GLM-4.5V", - family: "glm", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-13", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.86 }, - limit: { context: 66000, output: 66000 }, - }, - "meta-llama/Meta-Llama-3.1-8B-Instruct": { - id: "meta-llama/Meta-Llama-3.1-8B-Instruct", - name: "meta-llama/Meta-Llama-3.1-8B-Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-23", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.06, output: 0.06 }, - limit: { context: 33000, output: 4000 }, - }, - "inclusionAI/Ring-flash-2.0": { - id: "inclusionAI/Ring-flash-2.0", - name: "inclusionAI/Ring-flash-2.0", - family: "ring", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-29", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.57 }, - limit: { context: 131000, output: 131000 }, - }, - "inclusionAI/Ling-mini-2.0": { - id: "inclusionAI/Ling-mini-2.0", - name: "inclusionAI/Ling-mini-2.0", - family: "ling", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-10", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.28 }, - limit: { context: 131000, output: 131000 }, - }, - "inclusionAI/Ling-flash-2.0": { - id: "inclusionAI/Ling-flash-2.0", - name: "inclusionAI/Ling-flash-2.0", - family: "ling", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.57 }, - limit: { context: 131000, output: 131000 }, - }, - "tencent/Hunyuan-A13B-Instruct": { - id: "tencent/Hunyuan-A13B-Instruct", - name: "tencent/Hunyuan-A13B-Instruct", - family: "hunyuan", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-06-30", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.57 }, - limit: { context: 131000, output: 131000 }, - }, - "tencent/Hunyuan-MT-7B": { - id: "tencent/Hunyuan-MT-7B", - name: "tencent/Hunyuan-MT-7B", - family: "hunyuan", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 33000, output: 33000 }, - }, - "deepseek-ai/DeepSeek-V3.1": { - id: "deepseek-ai/DeepSeek-V3.1", - name: "deepseek-ai/DeepSeek-V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-25", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 1 }, - limit: { context: 164000, output: 164000 }, - }, - "deepseek-ai/deepseek-vl2": { - id: "deepseek-ai/deepseek-vl2", - name: "deepseek-ai/deepseek-vl2", - family: "deepseek", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-13", - last_updated: "2025-11-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 4000, output: 4000 }, - }, - "deepseek-ai/DeepSeek-V3": { - id: "deepseek-ai/DeepSeek-V3", - name: "deepseek-ai/DeepSeek-V3", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-12-26", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1 }, - limit: { context: 164000, output: 164000 }, - }, - "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B": { - id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B", - name: "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-01-20", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 0.18 }, - limit: { context: 131000, output: 131000 }, - }, - "deepseek-ai/DeepSeek-R1": { - id: "deepseek-ai/DeepSeek-R1", - name: "deepseek-ai/DeepSeek-R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-05-28", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 2.18 }, - limit: { context: 164000, output: 164000 }, - }, - "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B": { - id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B", - name: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-01-20", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 131000, output: 131000 }, - }, - "deepseek-ai/DeepSeek-V3.2-Exp": { - id: "deepseek-ai/DeepSeek-V3.2-Exp", - name: "deepseek-ai/DeepSeek-V3.2-Exp", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-10", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 0.41 }, - limit: { context: 164000, output: 164000 }, - }, - "deepseek-ai/DeepSeek-V3.2": { - id: "deepseek-ai/DeepSeek-V3.2", - name: "deepseek-ai/DeepSeek-V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-03", - last_updated: "2025-12-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 0.42 }, - limit: { context: 164000, output: 164000 }, - }, - "deepseek-ai/DeepSeek-V3.1-Terminus": { - id: "deepseek-ai/DeepSeek-V3.1-Terminus", - name: "deepseek-ai/DeepSeek-V3.1-Terminus", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-29", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 1 }, - limit: { context: 164000, output: 164000 }, - }, - "openai/gpt-oss-20b": { - id: "openai/gpt-oss-20b", - name: "openai/gpt-oss-20b", - family: "gpt-oss", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-13", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.04, output: 0.18 }, - limit: { context: 131000, output: 8000 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "openai/gpt-oss-120b", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-13", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.45 }, - limit: { context: 131000, output: 8000 }, - }, - "baidu/ERNIE-4.5-300B-A47B": { - id: "baidu/ERNIE-4.5-300B-A47B", - name: "baidu/ERNIE-4.5-300B-A47B", - family: "ernie", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-02", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.28, output: 1.1 }, - limit: { context: 131000, output: 131000 }, - }, - "THUDM/GLM-Z1-9B-0414": { - id: "THUDM/GLM-Z1-9B-0414", - name: "THUDM/GLM-Z1-9B-0414", - family: "glm-z", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.086, output: 0.086 }, - limit: { context: 131000, output: 131000 }, - }, - "THUDM/GLM-4-9B-0414": { - id: "THUDM/GLM-4-9B-0414", - name: "THUDM/GLM-4-9B-0414", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.086, output: 0.086 }, - limit: { context: 33000, output: 33000 }, - }, - "THUDM/GLM-4-32B-0414": { - id: "THUDM/GLM-4-32B-0414", - name: "THUDM/GLM-4-32B-0414", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 0.27 }, - limit: { context: 33000, output: 33000 }, - }, - "THUDM/GLM-Z1-32B-0414": { - id: "THUDM/GLM-Z1-32B-0414", - name: "THUDM/GLM-Z1-32B-0414", - family: "glm-z", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-18", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.57 }, - limit: { context: 131000, output: 131000 }, - }, - "moonshotai/Kimi-K2-Thinking": { - id: "moonshotai/Kimi-K2-Thinking", - name: "moonshotai/Kimi-K2-Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-11-07", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.55, output: 2.5 }, - limit: { context: 262000, output: 262000 }, - }, - "moonshotai/Kimi-K2.6": { - id: "moonshotai/Kimi-K2.6", - name: "moonshotai/Kimi-K2.6", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262000, output: 262000 }, - }, - "moonshotai/Kimi-K2-Instruct": { - id: "moonshotai/Kimi-K2-Instruct", - name: "moonshotai/Kimi-K2-Instruct", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-13", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.58, output: 2.29 }, - limit: { context: 131000, output: 131000 }, - }, - "moonshotai/Kimi-K2-Instruct-0905": { - id: "moonshotai/Kimi-K2-Instruct-0905", - name: "moonshotai/Kimi-K2-Instruct-0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-08", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 262000, output: 262000 }, - }, - "moonshotai/Kimi-K2.5": { - id: "moonshotai/Kimi-K2.5", - name: "moonshotai/Kimi-K2.5", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 2.25 }, - limit: { context: 262000, output: 262000 }, - }, - "MiniMaxAI/MiniMax-M2.5": { - id: "MiniMaxAI/MiniMax-M2.5", - name: "MiniMaxAI/MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-02-15", - last_updated: "2026-02-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 197000, output: 131000 }, - }, - "MiniMaxAI/MiniMax-M2.1": { - id: "MiniMaxAI/MiniMax-M2.1", - name: "MiniMaxAI/MiniMax-M2.1", - family: "minimax", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 197000, output: 131000 }, - }, - "ByteDance-Seed/Seed-OSS-36B-Instruct": { - id: "ByteDance-Seed/Seed-OSS-36B-Instruct", - name: "ByteDance-Seed/Seed-OSS-36B-Instruct", - family: "seed", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-04", - last_updated: "2025-11-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.21, output: 0.57 }, - limit: { context: 262000, output: 262000 }, - }, - }, - }, - vercel: { - id: "vercel", - env: ["AI_GATEWAY_API_KEY"], - npm: "@ai-sdk/gateway", - name: "Vercel AI Gateway", - doc: "https://github.com/vercel/ai/tree/5eb85cc45a259553501f535b8ac79a77d0e79223/packages/gateway", - models: { - "alibaba/qwen3-coder-plus": { - id: "alibaba/qwen3-coder-plus", - name: "Qwen3 Coder Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 5 }, - limit: { context: 1000000, output: 1000000 }, - }, - "alibaba/qwen3.6-27b": { - id: "alibaba/qwen3.6-27b", - name: "Qwen 3.6 27B", - family: "qwen3.6", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-22", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 3.5999999999999996 }, - limit: { context: 256000, output: 256000 }, - }, - "alibaba/qwen3-embedding-8b": { - id: "alibaba/qwen3-embedding-8b", - name: "Qwen3 Embedding 8B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-06-05", - last_updated: "2025-06-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0 }, - limit: { context: 32768, output: 32768 }, - }, - "alibaba/qwen-3-30b": { - id: "alibaba/qwen-3-30b", - name: "Qwen3-30B-A3B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.08, output: 0.29 }, - limit: { context: 40960, output: 16384 }, - }, - "alibaba/qwen-3-235b": { - id: "alibaba/qwen-3-235b", - name: "Qwen3 235B A22B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.13, output: 0.6 }, - limit: { context: 40960, output: 16384 }, - }, - "alibaba/qwen3.5-flash": { - id: "alibaba/qwen3.5-flash", - name: "Qwen 3.5 Flash", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-24", - last_updated: "2026-02-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.001, cache_write: 0.125 }, - limit: { context: 1000000, output: 64000 }, - }, - "alibaba/qwen3.6-plus": { - id: "alibaba/qwen3.6-plus", - name: "Qwen 3.6 Plus", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-03", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3, cache_read: 0.09999999999999999, cache_write: 0.625 }, - limit: { context: 1000000, output: 64000 }, - }, - "alibaba/qwen3-max": { - id: "alibaba/qwen3-max", - name: "Qwen3 Max", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 6 }, - limit: { context: 262144, output: 32768 }, - }, - "alibaba/qwen3-embedding-0.6b": { - id: "alibaba/qwen3-embedding-0.6b", - name: "Qwen3 Embedding 0.6B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.01, output: 0 }, - limit: { context: 32768, output: 32768 }, - }, - "alibaba/qwen-3-32b": { - id: "alibaba/qwen-3-32b", - name: "Qwen 3.32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 40960, output: 16384 }, - }, - "alibaba/qwen-3.6-max-preview": { - id: "alibaba/qwen-3.6-max-preview", - name: "Qwen 3.6 Max Preview", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-20", - last_updated: "2026-04-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: true, - cost: { input: 1.3, output: 7.8, cache_read: 0.26, cache_write: 1.625 }, - limit: { context: 240000, output: 64000 }, - }, - "alibaba/qwen3-next-80b-a3b-thinking": { - id: "alibaba/qwen3-next-80b-a3b-thinking", - name: "Qwen3 Next 80B A3B Thinking", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-09-12", - last_updated: "2025-09-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 1.5 }, - limit: { context: 131072, output: 65536 }, - }, - "alibaba/qwen3-vl-thinking": { - id: "alibaba/qwen3-vl-thinking", - name: "Qwen3 VL Thinking", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-09-24", - last_updated: "2025-09-24", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 8.4 }, - limit: { context: 131072, output: 129024 }, - }, - "alibaba/qwen3-235b-a22b-thinking": { - id: "alibaba/qwen3-235b-a22b-thinking", - name: "Qwen3 235B A22B Thinking 2507", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.9 }, - limit: { context: 262114, output: 262114 }, - }, - "alibaba/qwen3-next-80b-a3b-instruct": { - id: "alibaba/qwen3-next-80b-a3b-instruct", - name: "Qwen3 Next 80B A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-12", - last_updated: "2025-09-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 1.1 }, - limit: { context: 262144, output: 32768 }, - }, - "alibaba/qwen3-coder-next": { - id: "alibaba/qwen3-coder-next", - name: "Qwen3 Coder Next", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-07-22", - last_updated: "2026-02-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.2 }, - limit: { context: 256000, output: 256000 }, - }, - "alibaba/qwen3-embedding-4b": { - id: "alibaba/qwen3-embedding-4b", - name: "Qwen3 Embedding 4B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-06-05", - last_updated: "2025-06-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.02, output: 0 }, - limit: { context: 32768, output: 32768 }, - }, - "alibaba/qwen3-max-thinking": { - id: "alibaba/qwen3-max-thinking", - name: "Qwen 3 Max Thinking", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01", - last_updated: "2025-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.2, output: 6, cache_read: 0.24 }, - limit: { context: 256000, output: 65536 }, - }, - "alibaba/qwen3-vl-235b-a22b-instruct": { - id: "alibaba/qwen3-vl-235b-a22b-instruct", - name: "Qwen3 VL 235B A22B Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-09-24", - last_updated: "2026-05-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.39999999999999997, output: 1.5999999999999999 }, - limit: { context: 131072, output: 129024 }, - }, - "alibaba/qwen3-coder": { - id: "alibaba/qwen3-coder", - name: "Qwen3 Coder 480B A35B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.38, output: 1.53 }, - limit: { context: 262144, output: 66536 }, - }, - "alibaba/qwen3-max-preview": { - id: "alibaba/qwen3-max-preview", - name: "Qwen3 Max Preview", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 6, cache_read: 0.24 }, - limit: { context: 262144, output: 32768 }, - }, - "alibaba/qwen3.5-plus": { - id: "alibaba/qwen3.5-plus", - name: "Qwen 3.5 Plus", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-16", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2.4, cache_read: 0.04, cache_write: 0.5 }, - limit: { context: 1000000, output: 64000 }, - }, - "alibaba/qwen-3-14b": { - id: "alibaba/qwen-3-14b", - name: "Qwen3-14B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.06, output: 0.24 }, - limit: { context: 40960, output: 16384 }, - }, - "alibaba/qwen3-vl-instruct": { - id: "alibaba/qwen3-vl-instruct", - name: "Qwen3 VL Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-24", - last_updated: "2025-09-24", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 2.8 }, - limit: { context: 131072, output: 129024 }, - }, - "alibaba/qwen3-coder-30b-a3b": { - id: "alibaba/qwen3-coder-30b-a3b", - name: "Qwen 3 Coder 30B A3B Instruct", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.27 }, - limit: { context: 160000, output: 32768 }, - }, - "perplexity/sonar-pro": { - id: "perplexity/sonar-pro", - name: "Sonar Pro", - family: "sonar-pro", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 8000 }, - }, - "perplexity/sonar": { - id: "perplexity/sonar", - name: "Sonar", - family: "sonar", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-02", - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 1 }, - limit: { context: 127000, output: 8000 }, - }, - "perplexity/sonar-reasoning": { - id: "perplexity/sonar-reasoning", - name: "Sonar Reasoning", - family: "sonar-reasoning", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-09", - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5 }, - limit: { context: 127000, output: 8000 }, - }, - "perplexity/sonar-reasoning-pro": { - id: "perplexity/sonar-reasoning-pro", - name: "Sonar Reasoning Pro", - family: "sonar-reasoning", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-09", - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8 }, - limit: { context: 127000, output: 8000 }, - }, - "deepseek/deepseek-v3.2-thinking": { - id: "deepseek/deepseek-v3.2-thinking", - name: "DeepSeek V3.2 Thinking", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.28, output: 0.42, cache_read: 0.03 }, - limit: { context: 128000, output: 64000 }, - }, - "deepseek/deepseek-v3.2-exp": { - id: "deepseek/deepseek-v3.2-exp", - name: "DeepSeek V3.2 Exp", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 0.4 }, - limit: { context: 163840, output: 163840 }, - }, - "deepseek/deepseek-v3.1": { - id: "deepseek/deepseek-v3.1", - name: "DeepSeek-V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1 }, - limit: { context: 163840, output: 128000 }, - }, - "deepseek/deepseek-v4-flash": { - id: "deepseek/deepseek-v4-flash", - name: "DeepSeek V4 Flash", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-23", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.28, cache_read: 0.028 }, - limit: { context: 1000000, output: 384000 }, - }, - "deepseek/deepseek-v4-pro": { - id: "deepseek/deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-23", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.74, output: 3.48, cache_read: 0.145 }, - limit: { context: 1000000, output: 384000 }, - }, - "deepseek/deepseek-v3.2": { - id: "deepseek/deepseek-v3.2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-07", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.27, output: 0.4, cache_read: 0.22 }, - limit: { context: 163842, output: 8000 }, - }, - "deepseek/deepseek-v3": { - id: "deepseek/deepseek-v3", - name: "DeepSeek V3 0324", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-12-26", - last_updated: "2024-12-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.77, output: 0.77 }, - limit: { context: 163840, output: 16384 }, - }, - "deepseek/deepseek-v3.1-terminus": { - id: "deepseek/deepseek-v3.1-terminus", - name: "DeepSeek V3.1 Terminus", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-09-22", - last_updated: "2025-09-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 1 }, - limit: { context: 131072, output: 65536 }, - }, - "deepseek/deepseek-r1": { - id: "deepseek/deepseek-r1", - name: "DeepSeek-R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-01-20", - last_updated: "2025-05-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.35, output: 5.4 }, - limit: { context: 128000, output: 32768 }, - }, - "arcee-ai/trinity-mini": { - id: "arcee-ai/trinity-mini", - name: "Trinity Mini", - family: "trinity", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-12", - last_updated: "2025-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.15 }, - limit: { context: 131072, output: 131072 }, - }, - "arcee-ai/trinity-large-thinking": { - id: "arcee-ai/trinity-large-thinking", - name: "Trinity Large Thinking", - family: "trinity", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 0.8999999999999999 }, - limit: { context: 262100, output: 80000 }, - }, - "arcee-ai/trinity-large-preview": { - id: "arcee-ai/trinity-large-preview", - name: "Trinity Large Preview", - family: "trinity", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-01", - last_updated: "2025-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1 }, - limit: { context: 131000, output: 131000 }, - }, - "recraft/recraft-v3": { - id: "recraft/recraft-v3", - name: "Recraft V3", - family: "recraft", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-10", - last_updated: "2024-10", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 512, output: 0 }, - }, - "recraft/recraft-v2": { - id: "recraft/recraft-v2", - name: "Recraft V2", - family: "recraft", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-03", - last_updated: "2024-03", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 512, output: 0 }, - }, - "voyage/voyage-3-large": { - id: "voyage/voyage-3-large", - name: "voyage-3-large", - family: "voyage", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "voyage/voyage-4-large": { - id: "voyage/voyage-4-large", - name: "voyage-4-large", - family: "voyage", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-03-06", - last_updated: "2026-03-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 32000, output: 0 }, - }, - "voyage/voyage-3.5-lite": { - id: "voyage/voyage-3.5-lite", - name: "voyage-3.5-lite", - family: "voyage", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.02, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "voyage/voyage-code-3": { - id: "voyage/voyage-code-3", - name: "voyage-code-3", - family: "voyage", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.18, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "voyage/voyage-finance-2": { - id: "voyage/voyage-finance-2", - name: "voyage-finance-2", - family: "voyage", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-03", - last_updated: "2024-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.12, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "voyage/voyage-4-lite": { - id: "voyage/voyage-4-lite", - name: "voyage-4-lite", - family: "voyage", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-03-06", - last_updated: "2026-03-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 32000, output: 0 }, - }, - "voyage/voyage-4": { - id: "voyage/voyage-4", - name: "voyage-4", - family: "voyage", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-03-06", - last_updated: "2026-03-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 32000, output: 0 }, - }, - "voyage/voyage-code-2": { - id: "voyage/voyage-code-2", - name: "voyage-code-2", - family: "voyage", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-01", - last_updated: "2024-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.12, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "voyage/voyage-law-2": { - id: "voyage/voyage-law-2", - name: "voyage-law-2", - family: "voyage", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-03", - last_updated: "2024-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.12, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "voyage/voyage-3.5": { - id: "voyage/voyage-3.5", - name: "voyage-3.5", - family: "voyage", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.06, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "morph/morph-v3-large": { - id: "morph/morph-v3-large", - name: "Morph v3 Large", - family: "morph", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-08-15", - last_updated: "2024-08-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.9, output: 1.9 }, - limit: { context: 32000, output: 32000 }, - }, - "morph/morph-v3-fast": { - id: "morph/morph-v3-fast", - name: "Morph v3 Fast", - family: "morph", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-08-15", - last_updated: "2024-08-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 1.2 }, - limit: { context: 16000, output: 16000 }, - }, - "zai/glm-5v-turbo": { - id: "zai/glm-5v-turbo", - name: "GLM 5V Turbo", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-03", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 4, cache_read: 0.24 }, - limit: { context: 200000, output: 128000 }, - }, - "zai/glm-4.7": { - id: "zai/glm-4.7", - name: "GLM 4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.43, output: 1.75, cache_read: 0.08 }, - limit: { context: 202752, output: 120000 }, - }, - "zai/glm-5": { - id: "zai/glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2, cache_read: 0.2 }, - limit: { context: 202800, output: 131072 }, - }, - "zai/glm-4.7-flashx": { - id: "zai/glm-4.7-flashx", - name: "GLM 4.7 FlashX", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-01", - last_updated: "2025-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.4, cache_read: 0.01 }, - limit: { context: 200000, output: 128000 }, - }, - "zai/glm-5.1": { - id: "zai/glm-5.1", - name: "GLM 5.1", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-07", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.4, output: 4.4, cache_read: 0.26 }, - limit: { context: 202752, output: 202752 }, - }, - "zai/glm-4.6v-flash": { - id: "zai/glm-4.6v-flash", - name: "GLM-4.6V-Flash", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 24000 }, - }, - "zai/glm-4.5": { - id: "zai/glm-4.5", - name: "GLM 4.5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 131072, output: 131072 }, - }, - "zai/glm-4.5-air": { - id: "zai/glm-4.5-air", - name: "GLM 4.5 Air", - family: "glm-air", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1.1 }, - limit: { context: 128000, output: 96000 }, - }, - "zai/glm-5-turbo": { - id: "zai/glm-5-turbo", - name: "GLM 5 Turbo", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-15", - last_updated: "2026-03-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 4, cache_read: 0.24 }, - limit: { context: 202800, output: 131100 }, - }, - "zai/glm-4.5v": { - id: "zai/glm-4.5v", - name: "GLM 4.5V", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08", - release_date: "2025-08-11", - last_updated: "2025-08-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.8 }, - limit: { context: 66000, output: 66000 }, - }, - "zai/glm-4.6": { - id: "zai/glm-4.6", - name: "GLM 4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 1.8 }, - limit: { context: 200000, output: 96000 }, - }, - "zai/glm-4.6v": { - id: "zai/glm-4.6v", - name: "GLM-4.6V", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.9, cache_read: 0.05 }, - limit: { context: 128000, output: 24000 }, - }, - "zai/glm-4.7-flash": { - id: "zai/glm-4.7-flash", - name: "GLM 4.7 Flash", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-13", - last_updated: "2026-03-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.39999999999999997 }, - limit: { context: 200000, output: 131000 }, - }, - "cohere/command-a": { - id: "cohere/command-a", - name: "Command A", - family: "command", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 256000, output: 8000 }, - }, - "cohere/embed-v4.0": { - id: "cohere/embed-v4.0", - name: "Embed v4.0", - family: "cohere-embed", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.12, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "prime-intellect/intellect-3": { - id: "prime-intellect/intellect-3", - name: "INTELLECT 3", - family: "intellect", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-11-26", - last_updated: "2025-11-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.1 }, - limit: { context: 131072, output: 131072 }, - }, - "xai/grok-4.3": { - id: "xai/grok-4.3", - name: "Grok 4.3", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-30", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 2.5, cache_read: 0.19999999999999998 }, - limit: { context: 1000000, output: 1000000 }, - }, - "xai/grok-4.20-non-reasoning": { - id: "xai/grok-4.20-non-reasoning", - name: "Grok 4.20 Non-Reasoning", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-03-09", - last_updated: "2026-03-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.19999999999999998 }, - limit: { context: 2000000, output: 2000000 }, - }, - "xai/grok-4.20-non-reasoning-beta": { - id: "xai/grok-4.20-non-reasoning-beta", - name: "Grok 4.20 Beta Non-Reasoning", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-03-11", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.19999999999999998 }, - limit: { context: 2000000, output: 2000000 }, - }, - "xai/grok-4.20-reasoning": { - id: "xai/grok-4.20-reasoning", - name: "Grok 4.20 Reasoning", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-09", - last_updated: "2026-03-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.19999999999999998 }, - limit: { context: 2000000, output: 2000000 }, - }, - "xai/grok-imagine-image": { - id: "xai/grok-imagine-image", - name: "Grok Imagine Image", - family: "grok", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-01-28", - last_updated: "2026-02-19", - modalities: { input: ["text"], output: ["text", "image"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "xai/grok-4.20-multi-agent-beta": { - id: "xai/grok-4.20-multi-agent-beta", - name: "Grok 4.20 Multi Agent Beta", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-11", - last_updated: "2026-03-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.19999999999999998 }, - limit: { context: 2000000, output: 2000000 }, - }, - "xai/grok-imagine-image-pro": { - id: "xai/grok-imagine-image-pro", - name: "Grok Imagine Image Pro", - family: "grok", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-01-28", - last_updated: "2026-02-19", - modalities: { input: ["text"], output: ["text", "image"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "xai/grok-4-fast-reasoning": { - id: "xai/grok-4-fast-reasoning", - name: "Grok 4 Fast Reasoning", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 256000 }, - }, - "xai/grok-4.1-fast-non-reasoning": { - id: "xai/grok-4.1-fast-non-reasoning", - name: "Grok 4.1 Fast Non-Reasoning", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "xai/grok-4.20-reasoning-beta": { - id: "xai/grok-4.20-reasoning-beta", - name: "Grok 4.20 Beta Reasoning", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-11", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.19999999999999998 }, - limit: { context: 2000000, output: 2000000 }, - }, - "xai/grok-4.20-multi-agent": { - id: "xai/grok-4.20-multi-agent", - name: "Grok 4.20 Multi-Agent", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-09", - last_updated: "2026-03-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.19999999999999998 }, - limit: { context: 2000000, output: 2000000 }, - }, - "xai/grok-4.1-fast-reasoning": { - id: "xai/grok-4.1-fast-reasoning", - name: "Grok 4.1 Fast Reasoning", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "xai/grok-4-fast-non-reasoning": { - id: "xai/grok-4-fast-non-reasoning", - name: "Grok 4 Fast (Non-Reasoning)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "xai/grok-3": { - id: "xai/grok-3", - name: "Grok 3", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75 }, - limit: { context: 131072, output: 8192 }, - }, - "xai/grok-3-mini": { - id: "xai/grok-3-mini", - name: "Grok 3 Mini", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.5, reasoning: 0.5, cache_read: 0.075 }, - limit: { context: 131072, output: 8192 }, - }, - "xai/grok-2-vision": { - id: "xai/grok-2-vision", - name: "Grok 2 Vision", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2024-08-20", - last_updated: "2024-08-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 10, cache_read: 2 }, - limit: { context: 8192, output: 4096 }, - }, - "xai/grok-4": { - id: "xai/grok-4", - name: "Grok 4", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, reasoning: 15, cache_read: 0.75 }, - limit: { context: 256000, output: 64000 }, - }, - "xai/grok-code-fast-1": { - id: "xai/grok-code-fast-1", - name: "Grok Code Fast 1", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2025-08-28", - last_updated: "2025-08-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.5, cache_read: 0.02 }, - limit: { context: 256000, output: 10000 }, - }, - "xai/grok-3-fast": { - id: "xai/grok-3-fast", - name: "Grok 3 Fast", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 1.25 }, - limit: { context: 131072, output: 8192 }, - }, - "xai/grok-3-mini-fast": { - id: "xai/grok-3-mini-fast", - name: "Grok 3 Mini Fast", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 4, reasoning: 4, cache_read: 0.15 }, - limit: { context: 131072, output: 8192 }, - }, - "nvidia/nemotron-3-super-120b-a12b": { - id: "nvidia/nemotron-3-super-120b-a12b", - name: "NVIDIA Nemotron 3 Super 120B A12B", - family: "nemotron", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.65 }, - limit: { context: 256000, output: 32000 }, - }, - "nvidia/nemotron-3-nano-30b-a3b": { - id: "nvidia/nemotron-3-nano-30b-a3b", - name: "Nemotron 3 Nano 30B A3B", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12", - last_updated: "2024-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.06, output: 0.24 }, - limit: { context: 262144, output: 262144 }, - }, - "nvidia/nemotron-nano-12b-v2-vl": { - id: "nvidia/nemotron-nano-12b-v2-vl", - name: "Nvidia Nemotron Nano 12B V2 VL", - family: "nemotron", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12", - last_updated: "2024-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 131072, output: 131072 }, - }, - "nvidia/nemotron-nano-9b-v2": { - id: "nvidia/nemotron-nano-9b-v2", - name: "Nvidia Nemotron Nano 9B V2", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-08-18", - last_updated: "2025-08-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.04, output: 0.16 }, - limit: { context: 131072, output: 131072 }, - }, - "inception/mercury-edit-2": { - id: "inception/mercury-edit-2", - name: "Mercury Edit 2", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2026-03-30", - last_updated: "2026-03-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.75, cache_read: 0.025 }, - limit: { context: 128000, output: 8192 }, - }, - "inception/mercury-2": { - id: "inception/mercury-2", - name: "Mercury 2", - family: "mercury", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-24", - last_updated: "2026-03-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 0.75, cache_read: 0.024999999999999998 }, - limit: { context: 128000, output: 128000 }, - }, - "inception/mercury-coder-small": { - id: "inception/mercury-coder-small", - name: "Mercury Coder Small Beta", - family: "mercury", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-02-26", - last_updated: "2026-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1 }, - limit: { context: 32000, output: 16384 }, - }, - "openai/gpt-5.1-codex-max": { - id: "openai/gpt-5.1-codex-max", - name: "GPT 5.1 Codex Max", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/gpt-5.2-chat": { - id: "openai/gpt-5.2-chat", - name: "GPT-5.2 Chat", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.18 }, - limit: { context: 128000, input: 111616, output: 16384 }, - }, - "openai/gpt-4o-mini-search-preview": { - id: "openai/gpt-4o-mini-search-preview", - name: "GPT 4o Mini Search Preview", - family: "gpt-mini", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - knowledge: "2023-09", - release_date: "2025-01", - last_updated: "2025-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, input: 111616, output: 16384 }, - }, - "openai/codex-mini": { - id: "openai/codex-mini", - name: "Codex Mini", - family: "gpt-codex-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-05-16", - last_updated: "2025-05-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5, output: 6, cache_read: 0.38 }, - limit: { context: 200000, input: 100000, output: 100000 }, - }, - "openai/gpt-5-chat": { - id: "openai/gpt-5-chat", - name: "GPT-5 Chat", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image", "pdf"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 128000, input: 111616, output: 16384 }, - }, - "openai/gpt-5.3-chat": { - id: "openai/gpt-5.3-chat", - name: "GPT-5.3 Chat", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-03", - last_updated: "2026-03-06", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 128000, input: 111616, output: 16384 }, - }, - "openai/gpt-5.2-pro": { - id: "openai/gpt-5.2-pro", - name: "GPT 5.2 ", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 21, output: 168 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/text-embedding-3-large": { - id: "openai/text-embedding-3-large", - name: "text-embedding-3-large", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-01-25", - last_updated: "2024-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.13, output: 0 }, - limit: { context: 8192, input: 6656, output: 1536 }, - }, - "openai/gpt-5.5": { - id: "openai/gpt-5.5", - name: "GPT 5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5 }, - limit: { context: 1000000, input: 872000, output: 128000 }, - }, - "openai/gpt-5.3-codex": { - id: "openai/gpt-5.3-codex", - name: "GPT 5.3 Codex", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-24", - last_updated: "2026-02-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/text-embedding-ada-002": { - id: "openai/text-embedding-ada-002", - name: "text-embedding-ada-002", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2022-12-15", - last_updated: "2022-12-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0 }, - limit: { context: 8192, input: 6656, output: 1536 }, - }, - "openai/gpt-5.2": { - id: "openai/gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.18 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/o3-pro": { - id: "openai/o3-pro", - name: "o3 Pro", - family: "o-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-10", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 20, output: 80 }, - limit: { context: 200000, input: 100000, output: 100000 }, - }, - "openai/gpt-5.4-mini": { - id: "openai/gpt-5.4-mini", - name: "GPT 5.4 Mini", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5, cache_read: 0.075 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/gpt-5.4-nano": { - id: "openai/gpt-5.4-nano", - name: "GPT 5.4 Nano", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.19999999999999998, output: 1.25, cache_read: 0.02 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/gpt-5.2-codex": { - id: "openai/gpt-5.2-codex", - name: "GPT-5.2-Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-12", - last_updated: "2025-12", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/gpt-5.1-codex-mini": { - id: "openai/gpt-5.1-codex-mini", - name: "GPT-5.1 Codex mini", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-05-16", - last_updated: "2025-05-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.03 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/gpt-5.1-thinking": { - id: "openai/gpt-5.1-thinking", - name: "GPT 5.1 Thinking", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-10", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image", "pdf"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/gpt-5.4-pro": { - id: "openai/gpt-5.4-pro", - name: "GPT 5.4 Pro", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-05", - last_updated: "2026-03-06", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "openai/gpt-3.5-turbo": { - id: "openai/gpt-3.5-turbo", - name: "GPT-3.5 Turbo", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2021-09", - release_date: "2023-03-01", - last_updated: "2023-03-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 16385, input: 12289, output: 4096 }, - }, - "openai/o3-deep-research": { - id: "openai/o3-deep-research", - name: "o3-deep-research", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-10", - release_date: "2024-06-26", - last_updated: "2024-06-26", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 40, cache_read: 2.5 }, - limit: { context: 200000, input: 100000, output: 100000 }, - }, - "openai/text-embedding-3-small": { - id: "openai/text-embedding-3-small", - name: "text-embedding-3-small", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-01-25", - last_updated: "2024-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.02, output: 0 }, - limit: { context: 8192, input: 6656, output: 1536 }, - }, - "openai/gpt-5.4": { - id: "openai/gpt-5.4", - name: "GPT 5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-05", - last_updated: "2026-03-06", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 15, cache_read: 0.25 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "openai/gpt-oss-20b": { - id: "openai/gpt-oss-20b", - name: "GPT OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.3 }, - limit: { context: 131072, input: 98304, output: 32768 }, - }, - "openai/gpt-5-pro": { - id: "openai/gpt-5-pro", - name: "GPT-5 pro", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image", "pdf"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 15, output: 120 }, - limit: { context: 400000, input: 128000, output: 272000 }, - }, - "openai/gpt-oss-safeguard-20b": { - id: "openai/gpt-oss-safeguard-20b", - name: "gpt-oss-safeguard-20b", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.08, output: 0.3, cache_read: 0.04 }, - limit: { context: 131072, input: 65536, output: 65536 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.5 }, - limit: { context: 131072, output: 131072 }, - }, - "openai/gpt-5.5-pro": { - id: "openai/gpt-5.5-pro", - name: "GPT 5.5 Pro", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180 }, - limit: { context: 1000000, input: 872000, output: 128000 }, - }, - "openai/gpt-3.5-turbo-instruct": { - id: "openai/gpt-3.5-turbo-instruct", - name: "GPT-3.5 Turbo Instruct", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2021-09", - release_date: "2023-03-01", - last_updated: "2023-03-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5, output: 2 }, - limit: { context: 8192, input: 4096, output: 4096 }, - }, - "openai/gpt-5.1-instant": { - id: "openai/gpt-5.1-instant", - name: "GPT-5.1 Instant", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image", "pdf"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 128000, input: 111616, output: 16384 }, - }, - "openai/gpt-5.1-codex": { - id: "openai/gpt-5.1-codex", - name: "GPT-5.1-Codex", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/gpt-4.1-mini": { - id: "openai/gpt-4.1-mini", - name: "GPT-4.1 mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.6, cache_read: 0.1 }, - limit: { context: 1047576, output: 32768 }, - }, - "openai/gpt-4.1": { - id: "openai/gpt-4.1", - name: "GPT-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 1047576, output: 32768 }, - }, - "openai/gpt-5": { - id: "openai/gpt-5", - name: "GPT-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/gpt-4o": { - id: "openai/gpt-4o", - name: "GPT-4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-05-13", - last_updated: "2024-08-06", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10, cache_read: 1.25 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/o3": { - id: "openai/o3", - name: "o3", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-4.1-nano": { - id: "openai/gpt-4.1-nano", - name: "GPT-4.1 nano", - family: "gpt-nano", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.03 }, - limit: { context: 1047576, output: 32768 }, - }, - "openai/gpt-5-codex": { - id: "openai/gpt-5-codex", - name: "GPT-5-Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/o3-mini": { - id: "openai/o3-mini", - name: "o3-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2024-12-20", - last_updated: "2025-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.55 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/o1": { - id: "openai/o1", - name: "o1", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2023-09", - release_date: "2024-12-05", - last_updated: "2024-12-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 60, cache_read: 7.5 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/o4-mini": { - id: "openai/o4-mini", - name: "o4-mini", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.28 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-4o-mini": { - id: "openai/gpt-4o-mini", - name: "GPT-4o mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.08 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-4-turbo": { - id: "openai/gpt-4-turbo", - name: "GPT-4 Turbo", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - knowledge: "2023-12", - release_date: "2023-11-06", - last_updated: "2024-04-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 30 }, - limit: { context: 128000, output: 4096 }, - }, - "openai/gpt-5-nano": { - id: "openai/gpt-5-nano", - name: "GPT-5 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4, cache_read: 0.005 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "openai/gpt-5-mini": { - id: "openai/gpt-5-mini", - name: "GPT-5 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "amazon/titan-embed-text-v2": { - id: "amazon/titan-embed-text-v2", - name: "Titan Text Embeddings V2", - family: "titan-embed", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-04", - last_updated: "2024-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.02, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "amazon/nova-2-lite": { - id: "amazon/nova-2-lite", - name: "Nova 2 Lite", - family: "nova", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-01", - last_updated: "2024-12-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5 }, - limit: { context: 1000000, output: 1000000 }, - }, - "amazon/nova-pro": { - id: "amazon/nova-pro", - name: "Nova Pro", - family: "nova-pro", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-03", - last_updated: "2024-12-03", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 3.2, cache_read: 0.2 }, - limit: { context: 300000, output: 8192 }, - }, - "amazon/nova-lite": { - id: "amazon/nova-lite", - name: "Nova Lite", - family: "nova-lite", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-03", - last_updated: "2024-12-03", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.06, output: 0.24, cache_read: 0.015 }, - limit: { context: 300000, output: 8192 }, - }, - "amazon/nova-micro": { - id: "amazon/nova-micro", - name: "Nova Micro", - family: "nova-micro", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-03", - last_updated: "2024-12-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.035, output: 0.14, cache_read: 0.00875 }, - limit: { context: 128000, output: 8192 }, - }, - "mistral/mistral-nemo": { - id: "mistral/mistral-nemo", - name: "Mistral Nemo", - family: "mistral-nemo", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.04, output: 0.17 }, - limit: { context: 60288, output: 16000 }, - }, - "mistral/ministral-14b": { - id: "mistral/ministral-14b", - name: "Ministral 14B", - family: "ministral", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 256000, output: 256000 }, - }, - "mistral/codestral-embed": { - id: "mistral/codestral-embed", - name: "Codestral Embed", - family: "codestral-embed", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "mistral/mistral-medium": { - id: "mistral/mistral-medium", - name: "Mistral Medium 3.1", - family: "mistral-medium", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-05-07", - last_updated: "2025-05-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 128000, output: 64000 }, - }, - "mistral/mistral-embed": { - id: "mistral/mistral-embed", - name: "Mistral Embed", - family: "mistral-embed", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2023-12-11", - last_updated: "2023-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "mistral/devstral-2": { - id: "mistral/devstral-2", - name: "Devstral 2", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-12-09", - last_updated: "2025-12-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 256000 }, - }, - "mistral/mistral-large-3": { - id: "mistral/mistral-large-3", - name: "Mistral Large 3", - family: "mistral-large", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-12-02", - last_updated: "2025-12-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 256000, output: 256000 }, - }, - "mistral/devstral-small-2": { - id: "mistral/devstral-small-2", - name: "Devstral Small 2", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-05-07", - last_updated: "2025-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 256000 }, - }, - "mistral/devstral-small": { - id: "mistral/devstral-small", - name: "Devstral Small 1.1", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-05-07", - last_updated: "2025-05-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 128000, output: 64000 }, - }, - "mistral/ministral-8b": { - id: "mistral/ministral-8b", - name: "Ministral 8B (latest)", - family: "ministral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-10-01", - last_updated: "2024-10-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 128000, output: 128000 }, - }, - "mistral/magistral-medium": { - id: "mistral/magistral-medium", - name: "Magistral Medium (latest)", - family: "magistral-medium", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-03-17", - last_updated: "2025-03-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 5 }, - limit: { context: 128000, output: 16384 }, - }, - "mistral/mistral-small": { - id: "mistral/mistral-small", - name: "Mistral Small (latest)", - family: "mistral-small", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2026-03-16", - last_updated: "2026-03-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 256000, output: 256000 }, - }, - "mistral/magistral-small": { - id: "mistral/magistral-small", - name: "Magistral Small", - family: "magistral-small", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-06", - release_date: "2025-03-17", - last_updated: "2025-03-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 128000, output: 128000 }, - }, - "mistral/pixtral-12b": { - id: "mistral/pixtral-12b", - name: "Pixtral 12B", - family: "pixtral", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2024-09-01", - last_updated: "2024-09-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 128000, output: 128000 }, - }, - "mistral/mixtral-8x22b-instruct": { - id: "mistral/mixtral-8x22b-instruct", - name: "Mixtral 8x22B", - family: "mixtral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-04-17", - last_updated: "2024-04-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 6 }, - limit: { context: 64000, output: 64000 }, - }, - "mistral/pixtral-large": { - id: "mistral/pixtral-large", - name: "Pixtral Large (latest)", - family: "pixtral", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2024-11-01", - last_updated: "2024-11-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 6 }, - limit: { context: 128000, output: 128000 }, - }, - "mistral/ministral-3b": { - id: "mistral/ministral-3b", - name: "Ministral 3B (latest)", - family: "ministral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-10-01", - last_updated: "2024-10-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.04 }, - limit: { context: 128000, output: 128000 }, - }, - "mistral/codestral": { - id: "mistral/codestral", - name: "Codestral (latest)", - family: "codestral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-05-29", - last_updated: "2025-01-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 256000, output: 4096 }, - }, - "meta/llama-3.2-1b": { - id: "meta/llama-3.2-1b", - name: "Llama 3.2 1B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-18", - last_updated: "2024-09-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 128000, output: 8192 }, - }, - "meta/llama-3.1-8b": { - id: "meta/llama-3.1-8b", - name: "Llama 3.1 8B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.03, output: 0.05 }, - limit: { context: 131072, output: 16384 }, - }, - "meta/llama-3.2-90b": { - id: "meta/llama-3.2-90b", - name: "Llama 3.2 90B Vision Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-25", - last_updated: "2024-09-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.72, output: 0.72 }, - limit: { context: 128000, output: 8192 }, - }, - "meta/llama-3.2-3b": { - id: "meta/llama-3.2-3b", - name: "Llama 3.2 3B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-18", - last_updated: "2024-09-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 128000, output: 8192 }, - }, - "meta/llama-3.2-11b": { - id: "meta/llama-3.2-11b", - name: "Llama 3.2 11B Vision Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-25", - last_updated: "2024-09-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.16, output: 0.16 }, - limit: { context: 128000, output: 8192 }, - }, - "meta/llama-3.1-70b": { - id: "meta/llama-3.1-70b", - name: "Llama 3.1 70B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 0.4 }, - limit: { context: 131072, output: 16384 }, - }, - "meta/llama-3.3-70b": { - id: "meta/llama-3.3-70b", - name: "Llama-3.3-70B-Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "meta/llama-4-maverick": { - id: "meta/llama-4-maverick", - name: "Llama-4-Maverick-17B-128E-Instruct-FP8", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "meta/llama-4-scout": { - id: "meta/llama-4-scout", - name: "Llama-4-Scout-17B-16E-Instruct-FP8", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "vercel/v0-1.5-md": { - id: "vercel/v0-1.5-md", - name: "v0-1.5-md", - family: "v0", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-06-09", - last_updated: "2025-06-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 128000, output: 32000 }, - }, - "vercel/v0-1.0-md": { - id: "vercel/v0-1.0-md", - name: "v0-1.0-md", - family: "v0", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 128000, output: 32000 }, - }, - "minimax/minimax-m2.7": { - id: "minimax/minimax-m2.7", - name: "Minimax M2.7", - family: "minimax", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06, cache_write: 0.375 }, - limit: { context: 204800, output: 131000 }, - }, - "minimax/minimax-m2.7-highspeed": { - id: "minimax/minimax-m2.7-highspeed", - name: "MiniMax M2.7 High Speed", - family: "minimax", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.4, cache_read: 0.06, cache_write: 0.375 }, - limit: { context: 204800, output: 131100 }, - }, - "minimax/minimax-m2": { - id: "minimax/minimax-m2", - name: "MiniMax M2", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-10-27", - last_updated: "2025-10-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 1.15, cache_read: 0.03, cache_write: 0.38 }, - limit: { context: 262114, output: 262114 }, - }, - "minimax/minimax-m2.1": { - id: "minimax/minimax-m2.1", - name: "MiniMax M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-10-27", - last_updated: "2025-10-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2, cache_read: 0.03, cache_write: 0.38 }, - limit: { context: 204800, output: 131072 }, - }, - "minimax/minimax-m2.1-lightning": { - id: "minimax/minimax-m2.1-lightning", - name: "MiniMax M2.1 Lightning", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-10-27", - last_updated: "2025-10-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.4, cache_read: 0.03, cache_write: 0.38 }, - limit: { context: 204800, output: 131072 }, - }, - "minimax/minimax-m2.5": { - id: "minimax/minimax-m2.5", - name: "MiniMax M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2, cache_read: 0.03, cache_write: 0.375 }, - limit: { context: 204800, output: 131000 }, - }, - "minimax/minimax-m2.5-highspeed": { - id: "minimax/minimax-m2.5-highspeed", - name: "MiniMax M2.5 High Speed", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-03-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 2.4, cache_read: 0.03, cache_write: 0.375 }, - limit: { context: 0, output: 0 }, - }, - "kwaipilot/kat-coder-pro-v1": { - id: "kwaipilot/kat-coder-pro-v1", - name: "KAT-Coder-Pro V1", - family: "kat-coder", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-10-24", - last_updated: "2025-10-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 256000, output: 32000 }, - }, - "kwaipilot/kat-coder-pro-v2": { - id: "kwaipilot/kat-coder-pro-v2", - name: "Kat Coder Pro V2", - family: "kat-coder", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-03-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.2, cache_read: 0.06 }, - limit: { context: 256000, output: 256000 }, - }, - "google/gemini-2.5-flash-lite-preview-09-2025": { - id: "google/gemini-2.5-flash-lite-preview-09-2025", - name: "Gemini 2.5 Flash Lite Preview 09-25", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.01 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-3.1-flash-lite-preview": { - id: "google/gemini-3.1-flash-lite-preview", - name: "Gemini 3.1 Flash Lite Preview", - family: "gemini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-03", - last_updated: "2026-03-06", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5, cache_read: 0.025, cache_write: 1 }, - limit: { context: 1000000, output: 65000 }, - }, - "google/gemini-3-pro-image": { - id: "google/gemini-3-pro-image", - name: "Nano Banana Pro (Gemini 3 Pro Image)", - family: "gemini-pro", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-03", - release_date: "2025-09", - last_updated: "2025-09", - modalities: { input: ["text"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 2, output: 120 }, - limit: { context: 65536, output: 32768 }, - }, - "google/gemini-3.1-pro-preview": { - id: "google/gemini-3.1-pro-preview", - name: "Gemini 3.1 Pro Preview", - family: "gemini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-19", - last_updated: "2026-02-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2 }, - limit: { context: 1000000, output: 64000 }, - }, - "google/gemini-3-pro-preview": { - id: "google/gemini-3-pro-preview", - name: "Gemini 3 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1000000, output: 64000 }, - }, - "google/imagen-4.0-ultra-generate-001": { - id: "google/imagen-4.0-ultra-generate-001", - name: "Imagen 4 Ultra", - family: "imagen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-05-24", - last_updated: "2025-05-24", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 480, output: 0 }, - }, - "google/gemini-embedding-001": { - id: "google/gemini-embedding-001", - name: "Gemini Embedding 001", - family: "gemini-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "google/gemma-4-31b-it": { - id: "google/gemma-4-31b-it", - name: "Gemma 4 31B IT", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-03", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.39999999999999997 }, - limit: { context: 262144, output: 131072 }, - }, - "google/gemini-2.5-flash-image": { - id: "google/gemini-2.5-flash-image", - name: "Nano Banana (Gemini 2.5 Flash Image)", - family: "gemini-flash", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-03-20", - modalities: { input: ["text"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5 }, - limit: { context: 32768, output: 32768 }, - }, - "google/text-embedding-005": { - id: "google/text-embedding-005", - name: "Text Embedding 005", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-08", - last_updated: "2024-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.03, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "google/text-multilingual-embedding-002": { - id: "google/text-multilingual-embedding-002", - name: "Text Multilingual Embedding 002", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-03", - last_updated: "2024-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.03, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "google/gemini-3.1-flash-image-preview": { - id: "google/gemini-3.1-flash-image-preview", - name: "Gemini 3.1 Flash Image Preview (Nano Banana 2)", - family: "gemini", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2026-02-26", - last_updated: "2026-03-06", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 0.5, output: 3 }, - limit: { context: 131072, output: 32768 }, - }, - "google/gemini-3.1-flash-lite": { - id: "google/gemini-3.1-flash-lite", - name: "Gemini 3.1 Flash Lite", - family: "gemini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-05-07", - last_updated: "2026-05-08", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5, cache_read: 0.03 }, - limit: { context: 1000000, output: 65000 }, - }, - "google/gemini-3-flash": { - id: "google/gemini-3-flash", - name: "Gemini 3 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 3, cache_read: 0.05 }, - limit: { context: 1000000, output: 64000 }, - }, - "google/imagen-4.0-generate-001": { - id: "google/imagen-4.0-generate-001", - name: "Imagen 4", - family: "imagen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 480, output: 0 }, - }, - "google/gemini-2.5-flash-preview-09-2025": { - id: "google/gemini-2.5-flash-preview-09-2025", - name: "Gemini 2.5 Flash Preview 09-25", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.03, cache_write: 0.383 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-embedding-2": { - id: "google/gemini-embedding-2", - name: "Gemini Embedding 2", - family: "gemini-embedding", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-03-10", - last_updated: "2026-03-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 0, output: 0 }, - }, - "google/gemma-4-26b-a4b-it": { - id: "google/gemma-4-26b-a4b-it", - name: "Gemma 4 26B A4B IT", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-03", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.13, output: 0.39999999999999997 }, - limit: { context: 262144, output: 131072 }, - }, - "google/imagen-4.0-fast-generate-001": { - id: "google/imagen-4.0-fast-generate-001", - name: "Imagen 4 Fast", - family: "imagen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-06", - last_updated: "2025-06", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 480, output: 0 }, - }, - "google/gemini-2.5-flash-lite": { - id: "google/gemini-2.5-flash-lite", - name: "Gemini 2.5 Flash Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.01 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-2.5-flash-image-preview": { - id: "google/gemini-2.5-flash-image-preview", - name: "Nano Banana Preview (Gemini 2.5 Flash Image Preview)", - family: "gemini-flash", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-03-20", - modalities: { input: ["text"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5 }, - limit: { context: 32768, output: 32768 }, - }, - "google/gemini-2.0-flash-lite": { - id: "google/gemini-2.0-flash-lite", - name: "Gemini 2.0 Flash Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 1048576, output: 8192 }, - }, - "google/gemini-2.5-flash": { - id: "google/gemini-2.5-flash", - name: "Gemini 2.5 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.03, input_audio: 1 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-2.5-pro": { - id: "google/gemini-2.5-pro", - name: "Gemini 2.5 Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 1.25, - output: 10, - cache_read: 0.125, - context_over_200k: { input: 2.5, output: 15, cache_read: 0.25 }, - }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-2.0-flash": { - id: "google/gemini-2.0-flash", - name: "Gemini 2.0 Flash", - family: "gemini-flash", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 8192 }, - }, - "moonshotai/kimi-k2-turbo": { - id: "moonshotai/kimi-k2-turbo", - name: "Kimi K2 Turbo", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.4, output: 10 }, - limit: { context: 256000, output: 16384 }, - }, - "moonshotai/kimi-k2.5": { - id: "moonshotai/kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-26", - last_updated: "2026-01-26", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.2 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/kimi-k2-thinking-turbo": { - id: "moonshotai/kimi-k2-thinking-turbo", - name: "Kimi K2 Thinking Turbo", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.15, output: 8, cache_read: 0.15 }, - limit: { context: 262114, output: 262114 }, - }, - "moonshotai/kimi-k2-0905": { - id: "moonshotai/kimi-k2-0905", - name: "Kimi K2 0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 2.5 }, - limit: { context: 131072, output: 16384 }, - }, - "moonshotai/kimi-k2.6": { - id: "moonshotai/kimi-k2.6", - name: "Kimi K2.6", - family: "kimi-k2.6", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-20", - last_updated: "2026-04-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262000, output: 262000 }, - }, - "moonshotai/kimi-k2-thinking": { - id: "moonshotai/kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.47, output: 2, cache_read: 0.14 }, - limit: { context: 216144, output: 216144 }, - }, - "moonshotai/kimi-k2": { - id: "moonshotai/kimi-k2", - name: "Kimi K2 Instruct", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-07-14", - last_updated: "2025-07-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3 }, - limit: { context: 131072, output: 16384 }, - status: "deprecated", - }, - "interfaze/interfaze-beta": { - id: "interfaze/interfaze-beta", - name: "Interfaze Beta", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2025-10-07", - last_updated: "2026-04-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5, output: 3.5 }, - limit: { context: 1000000, output: 32000 }, - }, - "anthropic/claude-3.5-sonnet-20240620": { - id: "anthropic/claude-3.5-sonnet-20240620", - name: "Claude 3.5 Sonnet (2024-06-20)", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-06-20", - last_updated: "2024-06-20", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 8192 }, - }, - "anthropic/claude-opus-4.6": { - id: "anthropic/claude-opus-4.6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02", - last_updated: "2026-02", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "anthropic/claude-opus-4.7": { - id: "anthropic/claude-opus-4.7", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "anthropic/claude-opus-4.5": { - id: "anthropic/claude-opus-4.5", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-11-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 18.75 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-haiku-4.5": { - id: "anthropic/claude-haiku-4.5", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-sonnet-4.6": { - id: "anthropic/claude-sonnet-4.6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.6, cache_write: 7.5 }, - }, - limit: { context: 1000000, output: 128000 }, - }, - "anthropic/claude-3-opus": { - id: "anthropic/claude-3-opus", - name: "Claude Opus 3", - family: "claude-opus", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-08-31", - release_date: "2024-02-29", - last_updated: "2024-02-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 4096 }, - }, - "anthropic/claude-3.5-haiku": { - id: "anthropic/claude-3.5-haiku", - name: "Claude Haiku 3.5", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07-31", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4, cache_read: 0.08, cache_write: 1 }, - limit: { context: 200000, output: 8192 }, - }, - "anthropic/claude-opus-4": { - id: "anthropic/claude-opus-4", - name: "Claude Opus 4", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "anthropic/claude-3-haiku": { - id: "anthropic/claude-3-haiku", - name: "Claude Haiku 3", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-08-31", - release_date: "2024-03-13", - last_updated: "2024-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.25, cache_read: 0.03, cache_write: 0.3 }, - limit: { context: 200000, output: 4096 }, - }, - "anthropic/claude-sonnet-4.5": { - id: "anthropic/claude-sonnet-4.5", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-sonnet-4": { - id: "anthropic/claude-sonnet-4", - name: "Claude Sonnet 4", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-3.5-sonnet": { - id: "anthropic/claude-3.5-sonnet", - name: "Claude Sonnet 3.5 v2", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04-30", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 8192 }, - }, - "anthropic/claude-3.7-sonnet": { - id: "anthropic/claude-3.7-sonnet", - name: "Claude Sonnet 3.7", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10-31", - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "anthropic/claude-opus-4.1": { - id: "anthropic/claude-opus-4.1", - name: "Claude Opus 4", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "xiaomi/mimo-v2.5-pro": { - id: "xiaomi/mimo-v2.5-pro", - name: "MiMo V2.5 Pro", - family: "mimo-v2.5-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-22", - last_updated: "2026-05-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 3, cache_read: 0.19999999999999998 }, - limit: { context: 1050000, output: 131000 }, - }, - "xiaomi/mimo-v2.5": { - id: "xiaomi/mimo-v2.5", - name: "MiMo M2.5", - family: "mimo-v2.5", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-22", - last_updated: "2026-05-01", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.39999999999999997, output: 2, cache_read: 0.08 }, - limit: { context: 1050000, output: 131100 }, - }, - "xiaomi/mimo-v2-pro": { - id: "xiaomi/mimo-v2-pro", - name: "MiMo V2 Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 3, cache_read: 0.19999999999999998 }, - limit: { context: 1000000, output: 128000 }, - }, - "xiaomi/mimo-v2-flash": { - id: "xiaomi/mimo-v2-flash", - name: "MiMo V2 Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.29 }, - limit: { context: 262144, output: 32000 }, - }, - "bytedance/seed-1.6": { - id: "bytedance/seed-1.6", - name: "Seed 1.6", - family: "seed", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09", - last_updated: "2025-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.05 }, - limit: { context: 256000, output: 32000 }, - }, - "bytedance/seed-1.8": { - id: "bytedance/seed-1.8", - name: "Seed 1.8", - family: "seed", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-10", - last_updated: "2025-10", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.05 }, - limit: { context: 256000, output: 64000 }, - }, - "meituan/longcat-flash-chat": { - id: "meituan/longcat-flash-chat", - name: "LongCat Flash Chat", - family: "longcat", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-08-30", - last_updated: "2025-08-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 128000, output: 8192 }, - }, - "meituan/longcat-flash-thinking": { - id: "meituan/longcat-flash-thinking", - name: "LongCat Flash Thinking", - family: "longcat", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 1.5 }, - limit: { context: 128000, output: 8192 }, - }, - "meituan/longcat-flash-thinking-2601": { - id: "meituan/longcat-flash-thinking-2601", - name: "LongCat Flash Thinking 2601", - family: "longcat", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - release_date: "2026-03-13", - last_updated: "2026-03-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - limit: { context: 32768, output: 32768 }, - }, - "bfl/flux-pro-1.0-fill": { - id: "bfl/flux-pro-1.0-fill", - name: "FLUX.1 Fill [pro]", - family: "flux", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-10", - last_updated: "2024-10", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 512, output: 0 }, - }, - "bfl/flux-pro-1.1": { - id: "bfl/flux-pro-1.1", - name: "FLUX1.1 [pro]", - family: "flux", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-10", - last_updated: "2024-10", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 512, output: 0 }, - }, - "bfl/flux-kontext-pro": { - id: "bfl/flux-kontext-pro", - name: "FLUX.1 Kontext Pro", - family: "flux", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-06", - last_updated: "2025-06", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 512, output: 0 }, - }, - "bfl/flux-kontext-max": { - id: "bfl/flux-kontext-max", - name: "FLUX.1 Kontext Max", - family: "flux", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-06", - last_updated: "2025-06", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 512, output: 0 }, - }, - "bfl/flux-pro-1.1-ultra": { - id: "bfl/flux-pro-1.1-ultra", - name: "FLUX1.1 [pro] Ultra", - family: "flux", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2024-11", - last_updated: "2024-11", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - limit: { context: 512, output: 0 }, - }, - }, - }, - minimax: { - id: "minimax", - env: ["MINIMAX_API_KEY"], - npm: "@ai-sdk/anthropic", - api: "https://api.minimax.io/anthropic/v1", - name: "MiniMax (minimax.io)", - doc: "https://platform.minimax.io/docs/guides/quickstart", - models: { - "MiniMax-M2": { - id: "MiniMax-M2", - name: "MiniMax-M2", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-10-27", - last_updated: "2025-10-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 196608, output: 128000 }, - }, - "MiniMax-M2.5": { - id: "MiniMax-M2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.03, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.7": { - id: "MiniMax-M2.7", - name: "MiniMax-M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.7-highspeed": { - id: "MiniMax-M2.7-highspeed", - name: "MiniMax-M2.7-highspeed", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.4, cache_read: 0.06, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.1": { - id: "MiniMax-M2.1", - name: "MiniMax-M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.5-highspeed": { - id: "MiniMax-M2.5-highspeed", - name: "MiniMax-M2.5-highspeed", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-13", - last_updated: "2026-02-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.4, cache_read: 0.06, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - }, - }, - llmgateway: { - id: "llmgateway", - env: ["LLMGATEWAY_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.llmgateway.io/v1", - name: "LLM Gateway", - doc: "https://llmgateway.io/docs", - models: { - "gpt-4o-mini-search-preview": { - id: "gpt-4o-mini-search-preview", - name: "GPT-4o Mini Search Preview", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2024-10-01", - last_updated: "2024-10-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 16384 }, - }, - "grok-4-1-fast-reasoning": { - id: "grok-4-1-fast-reasoning", - name: "Grok 4.1 Fast Reasoning", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "qwen3-235b-a22b-instruct-2507": { - id: "qwen3-235b-a22b-instruct-2507", - name: "Qwen3 235B A22B Instruct (2507)", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-08", - last_updated: "2025-07-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.8, output: 2.4 }, - limit: { context: 131072, output: 8192 }, - }, - "llama-4-scout": { - id: "llama-4-scout", - name: "Llama 4 Scout", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.18, output: 0.59 }, - limit: { context: 32768, output: 16384 }, - status: "beta", - }, - "hermes-2-pro-llama-3-8b": { - id: "hermes-2-pro-llama-3-8b", - name: "Hermes 2 Pro Llama 3 8B", - family: "hermes", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2024-05-27", - last_updated: "2024-05-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.14 }, - limit: { context: 8192, output: 8192 }, - }, - "qwen-coder-plus": { - id: "qwen-coder-plus", - name: "Qwen Coder Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-09-18", - last_updated: "2024-09-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1 }, - limit: { context: 131072, output: 8192 }, - }, - auto: { - id: "auto", - name: "Auto Route", - family: "auto", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-01-01", - last_updated: "2024-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "glm-4.6v-flashx": { - id: "glm-4.6v-flashx", - name: "GLM-4.6V FlashX", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-08", - last_updated: "2025-12-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.04, output: 0.4, cache_read: 0 }, - limit: { context: 128000, output: 16000 }, - }, - "gemma-2-27b-it-together": { - id: "gemma-2-27b-it-together", - name: "Gemma 2 27B IT", - family: "gemma", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2024-06-27", - last_updated: "2024-06-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.08 }, - limit: { context: 8192, output: 16384 }, - }, - "codestral-2508": { - id: "codestral-2508", - name: "Codestral", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-07-30", - last_updated: "2025-07-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 256000, output: 16384 }, - }, - "gemma-3-1b-it": { - id: "gemma-3-1b-it", - name: "Gemma 3 1B IT", - family: "gemma", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-03-12", - last_updated: "2025-03-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.3 }, - limit: { context: 1000000, output: 16384 }, - }, - "glm-4-32b-0414-128k": { - id: "glm-4-32b-0414-128k", - name: "GLM-4 32B (0414-128k)", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 128000, output: 16384 }, - }, - "seed-1-6-flash-250715": { - id: "seed-1-6-flash-250715", - name: "Seed 1.6 Flash (250715)", - family: "seed", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-26", - last_updated: "2025-07-26", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.3, cache_read: 0.01 }, - limit: { context: 256000, output: 8192 }, - }, - "seed-1-6-250615": { - id: "seed-1-6-250615", - name: "Seed 1.6 (250615)", - family: "seed", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-06-25", - last_updated: "2025-06-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 2, cache_read: 0.05 }, - limit: { context: 256000, output: 8192 }, - }, - "qwen3-vl-235b-a22b-thinking": { - id: "qwen3-vl-235b-a22b-thinking", - name: "Qwen3 VL 235B A22B Thinking", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.8, output: 2.4 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3-vl-30b-a3b-thinking": { - id: "qwen3-vl-30b-a3b-thinking", - name: "Qwen3 VL 30B A3B Thinking", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-02", - last_updated: "2025-10-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen2-5-vl-32b-instruct": { - id: "qwen2-5-vl-32b-instruct", - name: "Qwen2.5 VL 32B Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-03-15", - last_updated: "2025-03-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.3 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen3-vl-8b-instruct": { - id: "qwen3-vl-8b-instruct", - name: "Qwen3 VL 8B Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-08-19", - last_updated: "2025-08-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 131072, output: 8192 }, - }, - "claude-3-7-sonnet": { - id: "claude-3-7-sonnet", - name: "Claude 3.7 Sonnet", - family: "claude", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-02-24", - last_updated: "2025-02-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3 }, - limit: { context: 200000, output: 8192 }, - }, - "gemini-pro-latest": { - id: "gemini-pro-latest", - name: "Gemini Pro Latest", - family: "gemini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-27", - last_updated: "2026-02-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2 }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-3-5-haiku": { - id: "claude-3-5-haiku", - name: "Claude 3.5 Haiku", - family: "claude", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4, cache_read: 0.08 }, - limit: { context: 200000, output: 8192 }, - status: "deprecated", - }, - "qwen-max-latest": { - id: "qwen-max-latest", - name: "Qwen Max Latest", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-01-25", - last_updated: "2025-01-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.6, output: 6.4 }, - limit: { context: 32768, output: 8192 }, - }, - "glm-4.6v-flash": { - id: "glm-4.6v-flash", - name: "GLM-4.6V Flash", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-08", - last_updated: "2025-12-08", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16000 }, - status: "beta", - }, - "qwen3-30b-a3b-instruct-2507": { - id: "qwen3-30b-a3b-instruct-2507", - name: "Qwen3 30B A3B Instruct (2507)", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-08", - last_updated: "2025-07-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 131072, output: 8192 }, - }, - "minimax-text-01": { - id: "minimax-text-01", - name: "MiniMax Text 01", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-01-15", - last_updated: "2025-01-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1.1 }, - limit: { context: 1000000, output: 131072 }, - }, - "qwen3-32b-fp8": { - id: "qwen3-32b-fp8", - name: "Qwen3 32B FP8", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-28", - last_updated: "2025-04-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 131072, output: 8192 }, - }, - "llama-4-scout-17b-instruct": { - id: "llama-4-scout-17b-instruct", - name: "Llama 4 Scout 17B Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.17, output: 0.66 }, - limit: { context: 8192, output: 2048 }, - }, - "qwen3-4b-fp8": { - id: "qwen3-4b-fp8", - name: "Qwen3 4B FP8", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-28", - last_updated: "2025-04-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.05 }, - limit: { context: 131072, output: 8192 }, - }, - "ministral-8b-2512": { - id: "ministral-8b-2512", - name: "Ministral 8B", - family: "mistral", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-12-02", - last_updated: "2025-12-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 262144, output: 8192 }, - }, - "gemma-3-27b": { - id: "gemma-3-27b", - name: "Gemma 3 27B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-03-12", - last_updated: "2025-03-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 0.27 }, - limit: { context: 128000, output: 16384 }, - }, - "qwen3-vl-flash": { - id: "qwen3-vl-flash", - name: "Qwen3 VL Flash", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-09", - last_updated: "2025-10-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4, cache_read: 0.01 }, - limit: { context: 1000000, output: 32000 }, - }, - "llama-3.1-70b-instruct": { - id: "llama-3.1-70b-instruct", - name: "Llama 3.1 70B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.72, output: 0.72 }, - limit: { context: 128000, output: 2048 }, - status: "beta", - }, - "seed-1-8-251228": { - id: "seed-1-8-251228", - name: "Seed 1.8 (251228)", - family: "seed", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-18", - last_updated: "2025-12-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 2, cache_read: 0.05 }, - limit: { context: 256000, output: 8192 }, - }, - "qwen3-235b-a22b-thinking-2507": { - id: "qwen3-235b-a22b-thinking-2507", - name: "Qwen3 235B A22B Thinking (2507)", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-08", - last_updated: "2025-07-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.8, output: 2.4 }, - limit: { context: 131072, output: 8192 }, - }, - "seed-1-6-250915": { - id: "seed-1-6-250915", - name: "Seed 1.6 (250915)", - family: "seed", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 2, cache_read: 0.05 }, - limit: { context: 256000, output: 8192 }, - }, - "glm-4.5-x": { - id: "glm-4.5-x", - name: "GLM-4.5 X", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2.2, output: 8.9, cache_read: 0.45 }, - limit: { context: 128000, output: 16384 }, - status: "beta", - }, - "qwen3-30b-a3b-thinking-2507": { - id: "qwen3-30b-a3b-thinking-2507", - name: "Qwen3 30B A3B Thinking (2507)", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-08", - last_updated: "2025-07-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 131072, output: 8192 }, - }, - "grok-4-fast-reasoning": { - id: "grok-4-fast-reasoning", - name: "Grok 4 Fast Reasoning", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "deepseek-v3.1": { - id: "deepseek-v3.1", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.56, output: 1.68, cache_read: 0.11 }, - limit: { context: 128000, output: 32768 }, - }, - "ministral-3b-2512": { - id: "ministral-3b-2512", - name: "Ministral 3B", - family: "mistral", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-12-02", - last_updated: "2025-12-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 131072, output: 8192 }, - }, - "qwen-plus-latest": { - id: "qwen-plus-latest", - name: "Qwen Plus Latest", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-01-25", - last_updated: "2025-01-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 131072, output: 8192 }, - }, - "llama-3.1-nemotron-ultra-253b": { - id: "llama-3.1-nemotron-ultra-253b", - name: "Llama 3.1 Nemotron Ultra 253B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-04-07", - last_updated: "2025-04-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.8 }, - limit: { context: 128000, output: 8192 }, - }, - "llama-4-maverick-17b-instruct": { - id: "llama-4-maverick-17b-instruct", - name: "Llama 4 Maverick 17B Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.24, output: 0.97 }, - limit: { context: 8192, output: 2048 }, - }, - "grok-4-0709": { - id: "grok-4-0709", - name: "Grok 4 (0709)", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 256000, output: 256000 }, - }, - "qwen3-30b-a3b-fp8": { - id: "qwen3-30b-a3b-fp8", - name: "Qwen3 30B A3B FP8", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-28", - last_updated: "2025-04-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 131072, output: 8192 }, - }, - "minimax-m2.1-lightning": { - id: "minimax-m2.1-lightning", - name: "MiniMax M2.1 Lightning", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.12, output: 0.48 }, - limit: { context: 196608, output: 131072 }, - }, - "qwen3-max-2026-01-23": { - id: "qwen3-max-2026-01-23", - name: "Qwen3 Max (2026-01-23)", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-01-23", - last_updated: "2026-01-23", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.6 }, - limit: { context: 256000, output: 32800 }, - }, - "llama-3.2-3b-instruct": { - id: "llama-3.2-3b-instruct", - name: "Llama 3.2 3B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2024-09-18", - last_updated: "2024-09-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.05 }, - limit: { context: 32768, output: 32000 }, - }, - "qwen3-coder-next": { - id: "qwen3-coder-next", - name: "Qwen3 Coder Next", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4 }, - limit: { context: 262144, output: 65536 }, - }, - "gpt-4o-search-preview": { - id: "gpt-4o-search-preview", - name: "GPT-4o Search Preview", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2024-10-01", - last_updated: "2024-10-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10 }, - limit: { context: 128000, output: 16384 }, - }, - custom: { - id: "custom", - name: "Custom Model", - family: "auto", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-01-01", - last_updated: "2024-01-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "qwen3-vl-30b-a3b-instruct": { - id: "qwen3-vl-30b-a3b-instruct", - name: "Qwen3 VL 30B A3B Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-10-02", - last_updated: "2025-10-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 131072, output: 8192 }, - }, - "deepseek-v3.2": { - id: "deepseek-v3.2", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.28, output: 0.42, cache_read: 0.03 }, - limit: { context: 163840, output: 16384 }, - }, - "qwen3-235b-a22b-fp8": { - id: "qwen3-235b-a22b-fp8", - name: "Qwen3 235B A22B FP8", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-04-28", - last_updated: "2025-04-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 2.5 }, - limit: { context: 131072, output: 8192 }, - }, - "gpt-oss-20b": { - id: "gpt-oss-20b", - name: "GPT OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.5 }, - limit: { context: 131072, output: 32766 }, - }, - "kimi-k2": { - id: "kimi-k2", - name: "Kimi K2", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-11", - last_updated: "2025-07-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3, cache_read: 0.5 }, - limit: { context: 131072, output: 16384 }, - }, - "llama-3-8b-instruct": { - id: "llama-3-8b-instruct", - name: "Llama 3 8B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-04-03", - last_updated: "2025-04-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.04 }, - limit: { context: 8192, output: 8192 }, - }, - "qwen3-vl-235b-a22b-instruct": { - id: "qwen3-vl-235b-a22b-instruct", - name: "Qwen3 VL 235B A22B Instruct", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.8, output: 2.4 }, - limit: { context: 131072, output: 8192 }, - }, - "gpt-oss-120b": { - id: "gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.75 }, - limit: { context: 131072, output: 32766 }, - }, - "qwen25-coder-7b": { - id: "qwen25-coder-7b", - name: "Qwen2.5 Coder 7B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2024-09-19", - last_updated: "2024-09-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.05 }, - limit: { context: 131072, output: 8192 }, - }, - "llama-3.1-8b-instruct": { - id: "llama-3.1-8b-instruct", - name: "Llama 3.1 8B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 0.22 }, - limit: { context: 128000, output: 2048 }, - status: "beta", - }, - "llama-3-70b-instruct": { - id: "llama-3-70b-instruct", - name: "Llama 3 70B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2024-04-18", - last_updated: "2024-04-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.51, output: 0.74 }, - limit: { context: 8192, output: 8000 }, - }, - "deepseek-r1-0528": { - id: "deepseek-r1-0528", - name: "DeepSeek R1 (0528)", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.8, output: 2.4 }, - limit: { context: 64000, output: 16384 }, - status: "beta", - }, - "glm-4.5-airx": { - id: "glm-4.5-airx", - name: "GLM-4.5 AirX", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.5, cache_read: 0.22 }, - limit: { context: 128000, output: 16384 }, - }, - "ministral-14b-2512": { - id: "ministral-14b-2512", - name: "Ministral 14B", - family: "mistral", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2025-12-02", - last_updated: "2025-12-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 262144, output: 8192 }, - }, - "llama-3.2-11b-instruct": { - id: "llama-3.2-11b-instruct", - name: "Llama 3.2 11B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - release_date: "2024-09-25", - last_updated: "2024-09-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.33 }, - limit: { context: 128000, output: 8192 }, - }, - "claude-3-opus": { - id: "claude-3-opus", - name: "Claude 3 Opus", - family: "claude", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2024-03-04", - last_updated: "2024-03-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5 }, - limit: { context: 200000, output: 4096 }, - }, - "minimax-m2.7": { - id: "minimax-m2.7", - name: "MiniMax-M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - "grok-4-20-beta-0309-non-reasoning": { - id: "grok-4-20-beta-0309-non-reasoning", - name: "Grok 4.20 (Non-Reasoning)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-03-09", - last_updated: "2026-03-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.2, context_over_200k: { input: 4, output: 12, cache_read: 0.4 } }, - limit: { context: 2000000, output: 30000 }, - }, - "qwen3-coder-plus": { - id: "qwen3-coder-plus", - name: "Qwen3 Coder Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 5 }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-haiku-4-5": { - id: "claude-haiku-4-5", - name: "Claude Haiku 4.5 (latest)", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-opus-4-5-20251101": { - id: "claude-opus-4-5-20251101", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-01", - last_updated: "2025-11-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - }, - "gemini-2.5-flash-lite-preview-09-2025": { - id: "gemini-2.5-flash-lite-preview-09-2025", - name: "Gemini 2.5 Flash Lite Preview 09-25", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 65536 }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi K2.5", - family: "kimi-k2.5", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: false, - knowledge: "2025-01", - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.1 }, - limit: { context: 262144, output: 262144 }, - }, - "llama-3.3-70b-instruct": { - id: "llama-3.3-70b-instruct", - name: "Llama-3.3-70B-Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "mistral-large-2512": { - id: "mistral-large-2512", - name: "Mistral Large 3", - family: "mistral-large", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2024-11-01", - last_updated: "2025-12-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 262144, output: 262144 }, - }, - "glm-4.7": { - id: "glm-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.11, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "minimax-m2.7-highspeed": { - id: "minimax-m2.7-highspeed", - name: "MiniMax-M2.7-highspeed", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.4, cache_read: 0.06, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - "mimo-v2.5-pro": { - id: "mimo-v2.5-pro", - name: "MiMo-V2.5-Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3, cache_read: 0.2, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1048576, output: 131072 }, - }, - "gemma-3n-e4b-it": { - id: "gemma-3n-e4b-it", - name: "Gemma 3n 4B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 2000 }, - }, - "claude-3-5-sonnet-20241022": { - id: "claude-3-5-sonnet-20241022", - name: "Claude Sonnet 3.5 v2", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04-30", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 8192 }, - }, - "gpt-5.2-pro": { - id: "gpt-5.2-pro", - name: "GPT-5.2 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 21, output: 168 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "qwq-plus": { - id: "qwq-plus", - name: "QwQ Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-03-05", - last_updated: "2025-03-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 2.4 }, - limit: { context: 131072, output: 8192 }, - }, - "gemini-3.1-flash-lite-preview": { - id: "gemini-3.1-flash-lite-preview", - name: "Gemini 3.1 Flash Lite Preview", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-03-03", - last_updated: "2026-03-03", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5, cache_read: 0.025, cache_write: 1 }, - limit: { context: 1048576, output: 65536 }, - }, - "qwen-vl-plus": { - id: "qwen-vl-plus", - name: "Qwen-VL Plus", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-01-25", - last_updated: "2025-08-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.21, output: 0.63 }, - limit: { context: 131072, output: 8192 }, - }, - "glm-5": { - id: "glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2, cache_read: 0.2, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "devstral-2512": { - id: "devstral-2512", - name: "Devstral 2", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-12", - release_date: "2025-12-09", - last_updated: "2025-12-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 2 }, - limit: { context: 262144, output: 262144 }, - }, - "qwen3-32b": { - id: "qwen3-32b", - name: "Qwen3 32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.7, output: 2.8, reasoning: 8.4 }, - limit: { context: 131072, output: 16384 }, - }, - "claude-sonnet-4-6": { - id: "claude-sonnet-4-6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - }, - "glm-4.7-flashx": { - id: "glm-4.7-flashx", - name: "GLM-4.7-FlashX", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.4, cache_read: 0.01, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "gemini-3.1-pro-preview": { - id: "gemini-3.1-pro-preview", - name: "Gemini 3.1 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1048576, output: 65536 }, - }, - "qwen35-397b-a17b": { - id: "qwen35-397b-a17b", - name: "Qwen3.5 397B-A17B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-02-15", - last_updated: "2026-02-15", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3.6 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen-max": { - id: "qwen-max", - name: "Qwen Max", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-04-03", - last_updated: "2025-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.6, output: 6.4 }, - limit: { context: 32768, output: 8192 }, - }, - "gpt-5.3-chat-latest": { - id: "gpt-5.3-chat-latest", - name: "GPT-5.3 Chat (latest)", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-03-03", - last_updated: "2026-03-03", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 128000, output: 16384 }, - }, - "gemini-2.0-flash": { - id: "gemini-2.0-flash", - name: "Gemini 2.0 Flash", - family: "gemini-flash", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 8192 }, - }, - "gemini-3-flash-preview": { - id: "gemini-3-flash-preview", - name: "Gemini 3 Flash Preview", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 0.5, - output: 3, - cache_read: 0.05, - context_over_200k: { input: 0.5, output: 3, cache_read: 0.05 }, - }, - limit: { context: 1048576, output: 65536 }, - }, - "qwen-plus": { - id: "qwen-plus", - name: "Qwen Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-01-25", - last_updated: "2025-09-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.2, reasoning: 4 }, - limit: { context: 1000000, output: 32768 }, - }, - "gpt-5.5": { - id: "gpt-5.5", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-23", - last_updated: "2026-04-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5, context_over_200k: { input: 10, output: 45, cache_read: 1 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - experimental: { - modes: { - fast: { - cost: { input: 12.5, output: 75, cache_read: 1.25 }, - provider: { body: { service_tier: "priority" } }, - }, - }, - }, - }, - "qwen3.6-35b-a3b": { - id: "qwen3.6-35b-a3b", - name: "Qwen3.6 35B-A3B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-17", - last_updated: "2026-04-17", - modalities: { input: ["text", "image", "video", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.248, output: 1.485 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen-omni-turbo": { - id: "qwen-omni-turbo", - name: "Qwen-Omni Turbo", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-01-19", - last_updated: "2025-03-26", - modalities: { input: ["text", "image", "audio", "video"], output: ["text", "audio"] }, - open_weights: false, - cost: { input: 0.07, output: 0.27, input_audio: 4.44, output_audio: 8.89 }, - limit: { context: 32768, output: 2048 }, - }, - "claude-opus-4-7": { - id: "claude-opus-4-7", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "gpt-5-mini": { - id: "gpt-5-mini", - name: "GPT-5 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-5-nano": { - id: "gpt-5-nano", - name: "GPT-5 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4, cache_read: 0.005 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "mimo-v2-omni": { - id: "mimo-v2-omni", - name: "MiMo-V2-Omni", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2, cache_read: 0.08 }, - limit: { context: 262144, output: 131072 }, - }, - "gpt-5.3-codex": { - id: "gpt-5.3-codex", - name: "GPT-5.3 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "minimax-m2": { - id: "minimax-m2", - name: "MiniMax-M2", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-10-27", - last_updated: "2025-10-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 196608, output: 128000 }, - }, - "claude-sonnet-4-5-20250929": { - id: "claude-sonnet-4-5-20250929", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "qwen-flash": { - id: "qwen-flash", - name: "Qwen Flash", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4 }, - limit: { context: 1000000, output: 32768 }, - }, - "gpt-4-turbo": { - id: "gpt-4-turbo", - name: "GPT-4 Turbo", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - knowledge: "2023-12", - release_date: "2023-11-06", - last_updated: "2024-04-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 30 }, - limit: { context: 128000, output: 4096 }, - }, - "gemini-2.5-pro": { - id: "gemini-2.5-pro", - name: "Gemini 2.5 Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 1.25, - output: 10, - cache_read: 0.125, - context_over_200k: { input: 2.5, output: 15, cache_read: 0.25 }, - }, - limit: { context: 1048576, output: 65536 }, - }, - "mimo-v2.5": { - id: "mimo-v2.5", - name: "MiMo-V2.5", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: true, - cost: { - input: 0.4, - output: 2, - cache_read: 0.08, - context_over_200k: { input: 0.8, output: 4, cache_read: 0.16 }, - }, - limit: { context: 1048576, output: 131072 }, - }, - "grok-4-1-fast-non-reasoning": { - id: "grok-4-1-fast-non-reasoning", - name: "Grok 4.1 Fast (Non-Reasoning)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "sonar-pro": { - id: "sonar-pro", - name: "Sonar Pro", - family: "sonar-pro", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-09-01", - release_date: "2024-01-01", - last_updated: "2025-09-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15 }, - limit: { context: 200000, output: 8192 }, - }, - "pixtral-large-latest": { - id: "pixtral-large-latest", - name: "Pixtral Large (latest)", - family: "pixtral", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2024-11-01", - last_updated: "2024-11-04", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 6 }, - limit: { context: 128000, output: 128000 }, - }, - "gpt-5.2": { - id: "gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "grok-4-20-beta-0309-reasoning": { - id: "grok-4-20-beta-0309-reasoning", - name: "Grok 4.20 (Reasoning)", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-09", - last_updated: "2026-03-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6, cache_read: 0.2, context_over_200k: { input: 4, output: 12, cache_read: 0.4 } }, - limit: { context: 2000000, output: 30000 }, - }, - "gpt-4o-mini": { - id: "gpt-4o-mini", - name: "GPT-4o mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.08 }, - limit: { context: 128000, output: 16384 }, - }, - "qwen3.6-plus": { - id: "qwen3.6-plus", - name: "Qwen3.6 Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.276, output: 1.651, cache_read: 0.028, cache_write: 0.344 }, - limit: { context: 1000000, output: 65536 }, - }, - "gpt-5.4-mini": { - id: "gpt-5.4-mini", - name: "GPT-5.4 mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5, cache_read: 0.075 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "qwen3-max": { - id: "qwen3-max", - name: "Qwen3 Max", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.2, output: 6 }, - limit: { context: 262144, output: 65536 }, - }, - "minimax-m2.1": { - id: "minimax-m2.1", - name: "MiniMax-M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204800, output: 131072 }, - }, - "glm-5.1": { - id: "glm-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-03-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 6, output: 24, cache_read: 1.3, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "o4-mini": { - id: "o4-mini", - name: "o4-mini", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.28 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-5.4-nano": { - id: "gpt-5.4-nano", - name: "GPT-5.4 nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.25, cache_read: 0.02 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "glm-4.5": { - id: "glm-4.5", - name: "GLM-4.5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.11, cache_write: 0 }, - limit: { context: 131072, output: 98304 }, - }, - "mistral-large-latest": { - id: "mistral-large-latest", - name: "Mistral Large (latest)", - family: "mistral-large", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2024-11-01", - last_updated: "2025-12-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 262144, output: 262144 }, - }, - "mistral-small-2506": { - id: "mistral-small-2506", - name: "Mistral Small 3.2", - family: "mistral-small", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-03", - release_date: "2025-06-20", - last_updated: "2025-06-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 128000, output: 16384 }, - }, - "gemma-3-12b-it": { - id: "gemma-3-12b-it", - name: "Gemma 3 12B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 32768, output: 8192 }, - }, - "gpt-5.2-codex": { - id: "gpt-5.2-codex", - name: "GPT-5.2 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gemini-2.5-flash": { - id: "gemini-2.5-flash", - name: "Gemini 2.5 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.03, input_audio: 1 }, - limit: { context: 1048576, output: 65536 }, - }, - "gpt-5.2-chat-latest": { - id: "gpt-5.2-chat-latest", - name: "GPT-5.2 Chat", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 128000, output: 16384 }, - }, - "gemma-3n-e2b-it": { - id: "gemma-3n-e2b-it", - name: "Gemma 3n 2B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 2000 }, - }, - "gpt-5.1-codex-mini": { - id: "gpt-5.1-codex-mini", - name: "GPT-5.1 Codex mini", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "grok-4-fast": { - id: "grok-4-fast", - name: "Grok 4 Fast", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "gemini-3.1-flash-lite": { - id: "gemini-3.1-flash-lite", - name: "Gemini 3.1 Flash Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-05-07", - last_updated: "2026-05-07", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5, cache_read: 0.025, cache_write: 1 }, - limit: { context: 1048576, output: 65536 }, - }, - "qwen3-next-80b-a3b-thinking": { - id: "qwen3-next-80b-a3b-thinking", - name: "Qwen3-Next 80B-A3B (Thinking)", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09", - last_updated: "2025-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 6 }, - limit: { context: 131072, output: 32768 }, - }, - "grok-code-fast-1": { - id: "grok-code-fast-1", - name: "Grok Code Fast 1", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2025-08-28", - last_updated: "2025-08-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.5, cache_read: 0.02 }, - limit: { context: 256000, output: 10000 }, - }, - "gpt-5.1": { - id: "gpt-5.1", - name: "GPT-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gemma-3-4b-it": { - id: "gemma-3-4b-it", - name: "Gemma 3 4B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 32768, output: 8192 }, - }, - "kimi-k2-thinking-turbo": { - id: "kimi-k2-thinking-turbo", - name: "Kimi K2 Thinking Turbo", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.15, output: 8, cache_read: 0.15 }, - limit: { context: 262144, output: 262144 }, - }, - o1: { - id: "o1", - name: "o1", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2023-09", - release_date: "2024-12-05", - last_updated: "2024-12-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 60, cache_read: 7.5 }, - limit: { context: 200000, output: 100000 }, - }, - "glm-4.5-air": { - id: "glm-4.5-air", - name: "GLM-4.5-Air", - family: "glm-air", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1.1, cache_read: 0.03, cache_write: 0 }, - limit: { context: 131072, output: 98304 }, - }, - "gpt-5.4-pro": { - id: "gpt-5.4-pro", - name: "GPT-5.4 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "gpt-3.5-turbo": { - id: "gpt-3.5-turbo", - name: "GPT-3.5-turbo", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - knowledge: "2021-09-01", - release_date: "2023-03-01", - last_updated: "2023-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.5, cache_read: 1.25 }, - limit: { context: 16385, output: 4096 }, - }, - "o3-mini": { - id: "o3-mini", - name: "o3-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2024-12-20", - last_updated: "2025-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.55 }, - limit: { context: 200000, output: 100000 }, - }, - "qwen-vl-max": { - id: "qwen-vl-max", - name: "Qwen-VL Max", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-04-08", - last_updated: "2025-08-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 3.2 }, - limit: { context: 131072, output: 8192 }, - }, - sonar: { - id: "sonar", - name: "Sonar", - family: "sonar", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-09-01", - release_date: "2024-01-01", - last_updated: "2025-09-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 1 }, - limit: { context: 128000, output: 4096 }, - }, - "qwen3-coder-flash": { - id: "qwen3-coder-flash", - name: "Qwen3 Coder Flash", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 1.5 }, - limit: { context: 1000000, output: 65536 }, - }, - "grok-4-3": { - id: "grok-4-3", - name: "Grok 4.3", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-05-01", - last_updated: "2026-05-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { - input: 1.25, - output: 2.5, - cache_read: 0.2, - context_over_200k: { input: 2.5, output: 5, cache_read: 0.4 }, - }, - limit: { context: 1000000, output: 30000 }, - }, - "glm-4.5v": { - id: "glm-4.5v", - name: "GLM-4.5V", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-08-11", - last_updated: "2025-08-11", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.8 }, - limit: { context: 64000, output: 16384 }, - }, - "deepseek-v4-flash": { - id: "deepseek-v4-flash", - name: "DeepSeek V4 Flash", - family: "deepseek-flash", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.28, cache_read: 0.028 }, - limit: { context: 1000000, output: 384000 }, - }, - "grok-4": { - id: "grok-4", - name: "Grok 4", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, reasoning: 15, cache_read: 0.75 }, - limit: { context: 256000, output: 64000 }, - }, - "qwen3-next-80b-a3b-instruct": { - id: "qwen3-next-80b-a3b-instruct", - name: "Qwen3-Next 80B-A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09", - last_updated: "2025-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 2 }, - limit: { context: 131072, output: 32768 }, - }, - "gpt-4": { - id: "gpt-4", - name: "GPT-4", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - knowledge: "2023-11", - release_date: "2023-11-06", - last_updated: "2024-04-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 60 }, - limit: { context: 8192, output: 8192 }, - }, - "glm-4.6": { - id: "glm-4.6", - name: "GLM-4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.11, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "kimi-k2.6": { - id: "kimi-k2.6", - name: "Kimi K2.6", - family: "kimi-k2.6", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262144, output: 262144 }, - }, - "glm-4.6v": { - id: "glm-4.6v", - name: "GLM-4.6V", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-08", - last_updated: "2025-12-08", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 128000, output: 32768 }, - }, - "claude-opus-4-1-20250805": { - id: "claude-opus-4-1-20250805", - name: "Claude Opus 4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "gpt-5.4": { - id: "gpt-5.4", - name: "GPT-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 15, cache_read: 0.25 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "claude-haiku-4-5-20251001": { - id: "claude-haiku-4-5-20251001", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "glm-4.5-flash": { - id: "glm-4.5-flash", - name: "GLM-4.5-Flash", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 131072, output: 98304 }, - }, - "qwen3-vl-plus": { - id: "qwen3-vl-plus", - name: "Qwen3-VL Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-23", - last_updated: "2025-09-23", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.6, reasoning: 4.8 }, - limit: { context: 262144, output: 32768 }, - }, - "grok-4-1-fast": { - id: "grok-4-1-fast", - name: "Grok 4.1 Fast", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "claude-sonnet-4-20250514": { - id: "claude-sonnet-4-20250514", - name: "Claude Sonnet 4", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "qwen3-coder-480b-a35b-instruct": { - id: "qwen3-coder-480b-a35b-instruct", - name: "Qwen3-Coder 480B-A35B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.5, output: 7.5 }, - limit: { context: 262144, output: 65536 }, - }, - "claude-opus-4-6": { - id: "claude-opus-4-6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "deepseek-v4-pro": { - id: "deepseek-v4-pro", - name: "DeepSeek V4 Pro", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-05", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.74, output: 3.48, cache_read: 0.145 }, - limit: { context: 1000000, output: 384000 }, - }, - "gpt-4.1-nano": { - id: "gpt-4.1-nano", - name: "GPT-4.1 nano", - family: "gpt-nano", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.03 }, - limit: { context: 1047576, output: 32768 }, - }, - "claude-3-7-sonnet-20250219": { - id: "claude-3-7-sonnet-20250219", - name: "Claude Sonnet 3.7", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10-31", - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "qwen3-coder-30b-a3b-instruct": { - id: "qwen3-coder-30b-a3b-instruct", - name: "Qwen3-Coder 30B-A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.45, output: 2.25 }, - limit: { context: 262144, output: 65536 }, - }, - "minimax-m2.5": { - id: "minimax-m2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.03, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - "mimo-v2-pro": { - id: "mimo-v2-pro", - name: "MiMo-V2-Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 3, cache_read: 0.2, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1048576, output: 131072 }, - }, - o3: { - id: "o3", - name: "o3", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-5-pro": { - id: "gpt-5-pro", - name: "GPT-5 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-10-06", - last_updated: "2025-10-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 120 }, - limit: { context: 400000, input: 272000, output: 272000 }, - }, - "gpt-4o": { - id: "gpt-4o", - name: "GPT-4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-05-13", - last_updated: "2024-08-06", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10, cache_read: 1.25 }, - limit: { context: 128000, output: 16384 }, - }, - "minimax-m2.5-highspeed": { - id: "minimax-m2.5-highspeed", - name: "MiniMax-M2.5-highspeed", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-13", - last_updated: "2026-02-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.4, cache_read: 0.06, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - "qwen-turbo": { - id: "qwen-turbo", - name: "Qwen Turbo", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-11-01", - last_updated: "2025-04-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.2, reasoning: 0.5 }, - limit: { context: 1000000, output: 16384 }, - }, - "claude-sonnet-4-5": { - id: "claude-sonnet-4-5", - name: "Claude Sonnet 4.5 (latest)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "gemini-2.5-flash-lite": { - id: "gemini-2.5-flash-lite", - name: "Gemini 2.5 Flash Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 65536 }, - }, - "gpt-5": { - id: "gpt-5", - name: "GPT-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "glm-4.7-flash": { - id: "glm-4.7-flash", - name: "GLM-4.7-Flash", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "mimo-v2-flash": { - id: "mimo-v2-flash", - name: "MiMo-V2-Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12-01", - release_date: "2025-12-16", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3, cache_read: 0.01 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen3.6-max-preview": { - id: "qwen3.6-max-preview", - name: "Qwen3.6 Max Preview", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-04-20", - last_updated: "2026-04-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.3, output: 7.8, cache_read: 0.13, cache_write: 1.625 }, - limit: { context: 262144, output: 65536 }, - }, - "gpt-5-chat-latest": { - id: "gpt-5-chat-latest", - name: "GPT-5 Chat (latest)", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: false, - structured_output: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "claude-opus-4-20250514": { - id: "claude-opus-4-20250514", - name: "Claude Opus 4", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "qwen2-5-vl-72b-instruct": { - id: "qwen2-5-vl-72b-instruct", - name: "Qwen2.5-VL 72B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 2.8, output: 8.4 }, - limit: { context: 131072, output: 8192 }, - }, - "gpt-5.5-pro": { - id: "gpt-5.5-pro", - name: "GPT-5.5 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-23", - last_updated: "2026-04-23", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180, context_over_200k: { input: 60, output: 270 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "gpt-4.1": { - id: "gpt-4.1", - name: "GPT-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 1047576, output: 32768 }, - }, - "devstral-small-2507": { - id: "devstral-small-2507", - name: "Devstral Small", - family: "devstral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-07-10", - last_updated: "2025-07-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 128000, output: 128000 }, - }, - "kimi-k2-thinking": { - id: "kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5, cache_read: 0.15 }, - limit: { context: 262144, output: 262144 }, - }, - "gemini-2.0-flash-lite": { - id: "gemini-2.0-flash-lite", - name: "Gemini 2.0 Flash Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 1048576, output: 8192 }, - }, - "gpt-4.1-mini": { - id: "gpt-4.1-mini", - name: "GPT-4.1 mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.6, cache_read: 0.1 }, - limit: { context: 1047576, output: 32768 }, - }, - "gpt-5.1-codex": { - id: "gpt-5.1-codex", - name: "GPT-5.1 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "grok-3": { - id: "grok-3", - name: "Grok 3", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75 }, - limit: { context: 131072, output: 8192 }, - }, - "grok-4-fast-non-reasoning": { - id: "grok-4-fast-non-reasoning", - name: "Grok 4 Fast (Non-Reasoning)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - "sonar-reasoning-pro": { - id: "sonar-reasoning-pro", - name: "Sonar Reasoning Pro", - family: "sonar-reasoning", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-09-01", - release_date: "2024-01-01", - last_updated: "2025-09-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8 }, - limit: { context: 128000, output: 4096 }, - }, - }, - }, - "google-vertex": { - id: "google-vertex", - env: ["GOOGLE_VERTEX_PROJECT", "GOOGLE_VERTEX_LOCATION", "GOOGLE_APPLICATION_CREDENTIALS"], - npm: "@ai-sdk/google-vertex", - name: "Vertex", - doc: "https://cloud.google.com/vertex-ai/generative-ai/docs/models", - models: { - "gemini-2.0-flash": { - id: "gemini-2.0-flash", - name: "Gemini 2.0 Flash", - family: "gemini-flash", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.025 }, - limit: { context: 1048576, output: 8192 }, - }, - "gemini-3-pro-preview": { - id: "gemini-3-pro-preview", - name: "Gemini 3 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-flash-latest": { - id: "gemini-flash-latest", - name: "Gemini Flash Latest", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.075, cache_write: 0.383 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-2.5-flash-lite-preview-06-17": { - id: "gemini-2.5-flash-lite-preview-06-17", - name: "Gemini 2.5 Flash Lite Preview 06-17", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 65536, output: 65536 }, - }, - "gemini-2.5-flash": { - id: "gemini-2.5-flash", - name: "Gemini 2.5 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.075, cache_write: 0.383 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-2.5-flash-preview-09-2025": { - id: "gemini-2.5-flash-preview-09-2025", - name: "Gemini 2.5 Flash Preview 09-25", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.075, cache_write: 0.383 }, - limit: { context: 1048576, output: 65536 }, - }, - "zai-org/glm-5-maas": { - id: "zai-org/glm-5-maas", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2, cache_read: 0.1 }, - limit: { context: 202752, output: 131072 }, - provider: { - npm: "@ai-sdk/openai-compatible", - api: "https://${GOOGLE_VERTEX_ENDPOINT}/v1/projects/${GOOGLE_VERTEX_PROJECT}/locations/${GOOGLE_VERTEX_LOCATION}/endpoints/openapi", - }, - }, - "zai-org/glm-4.7-maas": { - id: "zai-org/glm-4.7-maas", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-06", - last_updated: "2026-01-06", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2 }, - limit: { context: 200000, output: 128000 }, - provider: { - npm: "@ai-sdk/openai-compatible", - api: "https://${GOOGLE_VERTEX_ENDPOINT}/v1/projects/${GOOGLE_VERTEX_PROJECT}/locations/${GOOGLE_VERTEX_LOCATION}/endpoints/openapi", - }, - }, - "deepseek-ai/deepseek-v3.2-maas": { - id: "deepseek-ai/deepseek-v3.2-maas", - name: "DeepSeek V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-12-17", - last_updated: "2026-04-04", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: true, - cost: { input: 0.56, output: 1.68, cache_read: 0.056 }, - limit: { context: 163840, output: 65536 }, - provider: { - npm: "@ai-sdk/openai-compatible", - api: "https://${GOOGLE_VERTEX_ENDPOINT}/v1/projects/${GOOGLE_VERTEX_PROJECT}/locations/${GOOGLE_VERTEX_LOCATION}/endpoints/openapi", - }, - }, - "deepseek-ai/deepseek-v3.1-maas": { - id: "deepseek-ai/deepseek-v3.1-maas", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-28", - last_updated: "2025-08-28", - modalities: { input: ["text", "pdf"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.7 }, - limit: { context: 163840, output: 32768 }, - provider: { - npm: "@ai-sdk/openai-compatible", - api: "https://${GOOGLE_VERTEX_ENDPOINT}/v1/projects/${GOOGLE_VERTEX_PROJECT}/locations/${GOOGLE_VERTEX_LOCATION}/endpoints/openapi", - }, - }, - "openai/gpt-oss-120b-maas": { - id: "openai/gpt-oss-120b-maas", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.36 }, - limit: { context: 131072, output: 32768 }, - }, - "openai/gpt-oss-20b-maas": { - id: "openai/gpt-oss-20b-maas", - name: "GPT OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.25 }, - limit: { context: 131072, output: 32768 }, - }, - "meta/llama-3.3-70b-instruct-maas": { - id: "meta/llama-3.3-70b-instruct-maas", - name: "Llama 3.3 70B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-12", - release_date: "2025-04-29", - last_updated: "2025-04-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.72, output: 0.72 }, - limit: { context: 128000, output: 8192 }, - provider: { - npm: "@ai-sdk/openai-compatible", - api: "https://${GOOGLE_VERTEX_ENDPOINT}/v1/projects/${GOOGLE_VERTEX_PROJECT}/locations/${GOOGLE_VERTEX_LOCATION}/endpoints/openapi", - }, - }, - "meta/llama-4-maverick-17b-128e-instruct-maas": { - id: "meta/llama-4-maverick-17b-128e-instruct-maas", - name: "Llama 4 Maverick 17B 128E Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-29", - last_updated: "2025-04-29", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.35, output: 1.15 }, - limit: { context: 524288, output: 8192 }, - provider: { - npm: "@ai-sdk/openai-compatible", - api: "https://${GOOGLE_VERTEX_ENDPOINT}/v1/projects/${GOOGLE_VERTEX_PROJECT}/locations/${GOOGLE_VERTEX_LOCATION}/endpoints/openapi", - }, - }, - "qwen/qwen3-235b-a22b-instruct-2507-maas": { - id: "qwen/qwen3-235b-a22b-instruct-2507-maas", - name: "Qwen3 235B A22B Instruct", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-13", - last_updated: "2025-08-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.22, output: 0.88 }, - limit: { context: 262144, output: 16384 }, - provider: { - npm: "@ai-sdk/openai-compatible", - api: "https://${GOOGLE_VERTEX_ENDPOINT}/v1/projects/${GOOGLE_VERTEX_PROJECT}/locations/${GOOGLE_VERTEX_LOCATION}/endpoints/openapi", - }, - }, - "moonshotai/kimi-k2-thinking-maas": { - id: "moonshotai/kimi-k2-thinking-maas", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5 }, - limit: { context: 262144, output: 262144 }, - provider: { - npm: "@ai-sdk/openai-compatible", - api: "https://${GOOGLE_VERTEX_ENDPOINT}/v1/projects/${GOOGLE_VERTEX_PROJECT}/locations/${GOOGLE_VERTEX_LOCATION}/endpoints/openapi", - }, - }, - "gemini-flash-lite-latest": { - id: "gemini-flash-lite-latest", - name: "Gemini Flash-Lite Latest", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-2.5-pro-preview-05-06": { - id: "gemini-2.5-pro-preview-05-06", - name: "Gemini 2.5 Pro Preview 05-06", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-05-06", - last_updated: "2025-05-06", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.31 }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-haiku-4-5@20251001": { - id: "claude-haiku-4-5@20251001", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - provider: { npm: "@ai-sdk/google-vertex/anthropic" }, - }, - "gemini-3.1-pro-preview-customtools": { - id: "gemini-3.1-pro-preview-customtools", - name: "Gemini 3.1 Pro Preview Custom Tools", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-sonnet-4-6@default": { - id: "claude-sonnet-4-6@default", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 3, - output: 15, - cache_read: 0.3, - cache_write: 3.75, - context_over_200k: { input: 6, output: 22.5, cache_read: 0.6, cache_write: 7.5 }, - }, - limit: { context: 200000, output: 64000 }, - provider: { npm: "@ai-sdk/google-vertex/anthropic" }, - }, - "gemini-2.5-flash-lite-preview-09-2025": { - id: "gemini-2.5-flash-lite-preview-09-2025", - name: "Gemini 2.5 Flash Lite Preview 09-25", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-3-5-haiku@20241022": { - id: "claude-3-5-haiku@20241022", - name: "Claude Haiku 3.5", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07-31", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4, cache_read: 0.08, cache_write: 1 }, - limit: { context: 200000, output: 8192 }, - provider: { npm: "@ai-sdk/google-vertex/anthropic" }, - }, - "gemini-3.1-flash-lite-preview": { - id: "gemini-3.1-flash-lite-preview", - name: "Gemini 3.1 Flash Lite Preview", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-03-03", - last_updated: "2026-03-03", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5, cache_read: 0.025, cache_write: 1 }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-3-5-sonnet@20241022": { - id: "claude-3-5-sonnet@20241022", - name: "Claude Sonnet 3.5 v2", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04-30", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 8192 }, - provider: { npm: "@ai-sdk/google-vertex/anthropic" }, - }, - "gemini-3.1-pro-preview": { - id: "gemini-3.1-pro-preview", - name: "Gemini 3.1 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-opus-4-1@20250805": { - id: "claude-opus-4-1@20250805", - name: "Claude Opus 4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - provider: { npm: "@ai-sdk/google-vertex/anthropic" }, - }, - "gemini-3-flash-preview": { - id: "gemini-3-flash-preview", - name: "Gemini 3 Flash Preview", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 0.5, - output: 3, - cache_read: 0.05, - context_over_200k: { input: 0.5, output: 3, cache_read: 0.05 }, - }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-2.5-flash-preview-05-20": { - id: "gemini-2.5-flash-preview-05-20", - name: "Gemini 2.5 Flash Preview 05-20", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.0375 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-embedding-001": { - id: "gemini-embedding-001", - name: "Gemini Embedding 001", - family: "gemini", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2025-05", - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0 }, - limit: { context: 2048, output: 3072 }, - }, - "gemini-2.5-pro": { - id: "gemini-2.5-pro", - name: "Gemini 2.5 Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 1.25, - output: 10, - cache_read: 0.125, - context_over_200k: { input: 2.5, output: 15, cache_read: 0.25 }, - }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-2.5-pro-preview-06-05": { - id: "gemini-2.5-pro-preview-06-05", - name: "Gemini 2.5 Pro Preview 06-05", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-05", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.31 }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-sonnet-4@20250514": { - id: "claude-sonnet-4@20250514", - name: "Claude Sonnet 4", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - provider: { npm: "@ai-sdk/google-vertex/anthropic" }, - }, - "gemini-3.1-flash-lite": { - id: "gemini-3.1-flash-lite", - name: "Gemini 3.1 Flash Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-05-07", - last_updated: "2026-05-07", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5, cache_read: 0.025, cache_write: 1 }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-3-7-sonnet@20250219": { - id: "claude-3-7-sonnet@20250219", - name: "Claude Sonnet 3.7", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10-31", - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - provider: { npm: "@ai-sdk/google-vertex/anthropic" }, - }, - "claude-opus-4@20250514": { - id: "claude-opus-4@20250514", - name: "Claude Opus 4", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - provider: { npm: "@ai-sdk/google-vertex/anthropic" }, - }, - "claude-opus-4-5@20251101": { - id: "claude-opus-4-5@20251101", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-01", - last_updated: "2025-11-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - provider: { npm: "@ai-sdk/google-vertex/anthropic" }, - }, - "gemini-2.5-flash-preview-04-17": { - id: "gemini-2.5-flash-preview-04-17", - name: "Gemini 2.5 Flash Preview 04-17", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-04-17", - last_updated: "2025-04-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.0375 }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-sonnet-4-5@20250929": { - id: "claude-sonnet-4-5@20250929", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - provider: { npm: "@ai-sdk/google-vertex/anthropic" }, - }, - "gemini-2.5-flash-lite": { - id: "gemini-2.5-flash-lite", - name: "Gemini 2.5 Flash Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-opus-4-6@default": { - id: "claude-opus-4-6@default", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 5, - output: 25, - cache_read: 0.5, - cache_write: 6.25, - context_over_200k: { input: 10, output: 37.5, cache_read: 1, cache_write: 12.5 }, - }, - limit: { context: 1000000, output: 128000 }, - provider: { npm: "@ai-sdk/google-vertex/anthropic" }, - }, - "gemini-2.0-flash-lite": { - id: "gemini-2.0-flash-lite", - name: "Gemini 2.0 Flash Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 1048576, output: 8192 }, - }, - "claude-opus-4-7@default": { - id: "claude-opus-4-7@default", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 5, - output: 25, - cache_read: 0.5, - cache_write: 6.25, - context_over_200k: { input: 10, output: 37.5, cache_read: 1, cache_write: 12.5 }, - }, - limit: { context: 1000000, output: 128000 }, - provider: { npm: "@ai-sdk/google-vertex/anthropic" }, - }, - }, - }, - "cloudflare-workers-ai": { - id: "cloudflare-workers-ai", - env: ["CLOUDFLARE_ACCOUNT_ID", "CLOUDFLARE_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/ai/v1", - name: "Cloudflare Workers AI", - doc: "https://developers.cloudflare.com/workers-ai/models/", - models: { - "@cf/zai-org/glm-4.7-flash": { - id: "@cf/zai-org/glm-4.7-flash", - name: "GLM-4.7-Flash", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.06, output: 0.4 }, - limit: { context: 131072, output: 131072 }, - }, - "@cf/nvidia/nemotron-3-120b-a12b": { - id: "@cf/nvidia/nemotron-3-120b-a12b", - name: "Nemotron 3 Super 120B", - family: "nemotron", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-03-11", - last_updated: "2026-03-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 256000, output: 256000 }, - }, - "@cf/openai/gpt-oss-20b": { - id: "@cf/openai/gpt-oss-20b", - name: "GPT OSS 20B", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.3 }, - limit: { context: 128000, output: 16384 }, - }, - "@cf/openai/gpt-oss-120b": { - id: "@cf/openai/gpt-oss-120b", - name: "GPT OSS 120B", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.35, output: 0.75 }, - limit: { context: 128000, output: 16384 }, - }, - "@cf/meta/llama-4-scout-17b-16e-instruct": { - id: "@cf/meta/llama-4-scout-17b-16e-instruct", - name: "Llama 4 Scout 17B 16E Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.27, output: 0.85 }, - limit: { context: 128000, output: 16384 }, - }, - "@cf/google/gemma-4-26b-a4b-it": { - id: "@cf/google/gemma-4-26b-a4b-it", - name: "Gemma 4 26B A4B IT", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-15", - last_updated: "2025-12-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 256000, output: 16384 }, - }, - "@cf/moonshotai/kimi-k2.5": { - id: "@cf/moonshotai/kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.1 }, - limit: { context: 256000, output: 256000 }, - }, - "@cf/moonshotai/kimi-k2.6": { - id: "@cf/moonshotai/kimi-k2.6", - name: "Kimi K2.6", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-20", - last_updated: "2026-04-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 256000, output: 256000 }, - }, - }, - }, - groq: { - id: "groq", - env: ["GROQ_API_KEY"], - npm: "@ai-sdk/groq", - name: "Groq", - doc: "https://console.groq.com/docs/models", - models: { - "gemma2-9b-it": { - id: "gemma2-9b-it", - name: "Gemma 2 9B", - family: "gemma", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-06-27", - last_updated: "2024-06-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 8192, output: 8192 }, - status: "deprecated", - }, - "mistral-saba-24b": { - id: "mistral-saba-24b", - name: "Mistral Saba 24B", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-02-06", - last_updated: "2025-02-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.79, output: 0.79 }, - limit: { context: 32768, output: 32768 }, - status: "deprecated", - }, - "deepseek-r1-distill-llama-70b": { - id: "deepseek-r1-distill-llama-70b", - name: "DeepSeek R1 Distill Llama 70B", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.75, output: 0.99 }, - limit: { context: 131072, output: 8192 }, - status: "deprecated", - }, - "llama-guard-3-8b": { - id: "llama-guard-3-8b", - name: "Llama Guard 3 8B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 8192, output: 8192 }, - status: "deprecated", - }, - "llama-3.3-70b-versatile": { - id: "llama-3.3-70b-versatile", - name: "Llama 3.3 70B Versatile", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.59, output: 0.79 }, - limit: { context: 131072, output: 32768 }, - }, - "allam-2-7b": { - id: "allam-2-7b", - name: "ALLaM-2-7b", - family: "allam", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-09", - release_date: "2024-09", - last_updated: "2024-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 4096, output: 4096 }, - }, - "whisper-large-v3": { - id: "whisper-large-v3", - name: "Whisper Large V3", - family: "whisper", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-09", - release_date: "2023-09-01", - last_updated: "2025-09-05", - modalities: { input: ["audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 448, output: 448 }, - }, - "llama-3.1-8b-instant": { - id: "llama-3.1-8b-instant", - name: "Llama 3.1 8B Instant", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.08 }, - limit: { context: 131072, output: 131072 }, - }, - "llama3-70b-8192": { - id: "llama3-70b-8192", - name: "Llama 3 70B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-03", - release_date: "2024-04-18", - last_updated: "2024-04-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.59, output: 0.79 }, - limit: { context: 8192, output: 8192 }, - status: "deprecated", - }, - "qwen-qwq-32b": { - id: "qwen-qwq-32b", - name: "Qwen QwQ 32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2024-11-27", - last_updated: "2024-11-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.29, output: 0.39 }, - limit: { context: 131072, output: 16384 }, - status: "deprecated", - }, - "whisper-large-v3-turbo": { - id: "whisper-large-v3-turbo", - name: "Whisper Large v3 Turbo", - family: "whisper", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2024-10-01", - last_updated: "2024-10-01", - modalities: { input: ["audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 448, output: 448 }, - }, - "llama3-8b-8192": { - id: "llama3-8b-8192", - name: "Llama 3 8B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-03", - release_date: "2024-04-18", - last_updated: "2024-04-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.08 }, - limit: { context: 8192, output: 8192 }, - status: "deprecated", - }, - "canopylabs/orpheus-arabic-saudi": { - id: "canopylabs/orpheus-arabic-saudi", - name: "Orpheus Arabic Saudi", - family: "canopylabs", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-12-16", - release_date: "2025-12-16", - last_updated: "2025-12-16", - modalities: { input: ["text"], output: ["audio"] }, - open_weights: false, - cost: { input: 40, output: 0 }, - limit: { context: 4000, output: 50000 }, - }, - "canopylabs/orpheus-v1-english": { - id: "canopylabs/orpheus-v1-english", - name: "Orpheus V1 English", - family: "canopylabs", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2025-12-19", - release_date: "2025-12-19", - last_updated: "2025-12-19", - modalities: { input: ["text"], output: ["audio"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 4000, output: 50000 }, - }, - "meta-llama/llama-4-scout-17b-16e-instruct": { - id: "meta-llama/llama-4-scout-17b-16e-instruct", - name: "Llama 4 Scout 17B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.11, output: 0.34 }, - limit: { context: 131072, output: 8192 }, - }, - "meta-llama/llama-prompt-guard-2-22m": { - id: "meta-llama/llama-prompt-guard-2-22m", - name: "Llama Prompt Guard 2 22M", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2024-10-01", - last_updated: "2024-10-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.03 }, - limit: { context: 512, output: 512 }, - }, - "meta-llama/llama-guard-4-12b": { - id: "meta-llama/llama-guard-4-12b", - name: "Llama Guard 4 12B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.2 }, - limit: { context: 131072, output: 1024 }, - status: "deprecated", - }, - "meta-llama/llama-4-maverick-17b-128e-instruct": { - id: "meta-llama/llama-4-maverick-17b-128e-instruct", - name: "Llama 4 Maverick 17B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 131072, output: 8192 }, - status: "deprecated", - }, - "meta-llama/llama-prompt-guard-2-86m": { - id: "meta-llama/llama-prompt-guard-2-86m", - name: "Llama Prompt Guard 2 86M", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2024-10-01", - last_updated: "2024-10-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.04 }, - limit: { context: 512, output: 512 }, - }, - "openai/gpt-oss-20b": { - id: "openai/gpt-oss-20b", - name: "GPT OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 131072, output: 65536 }, - }, - "openai/gpt-oss-safeguard-20b": { - id: "openai/gpt-oss-safeguard-20b", - name: "Safety GPT OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-03-05", - last_updated: "2025-03-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.075, output: 0.3, cache_read: 0.037 }, - limit: { context: 131072, output: 65536 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 131072, output: 65536 }, - }, - "qwen/qwen3-32b": { - id: "qwen/qwen3-32b", - name: "Qwen3 32B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-11-08", - release_date: "2024-12-23", - last_updated: "2024-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.29, output: 0.59 }, - limit: { context: 131072, output: 40960 }, - }, - "groq/compound": { - id: "groq/compound", - name: "Compound", - family: "groq", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-09-04", - release_date: "2025-09-04", - last_updated: "2025-09-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 8192 }, - }, - "groq/compound-mini": { - id: "groq/compound-mini", - name: "Compound Mini", - family: "groq", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-09-04", - release_date: "2025-09-04", - last_updated: "2025-09-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 8192 }, - }, - "moonshotai/kimi-k2-instruct": { - id: "moonshotai/kimi-k2-instruct", - name: "Kimi K2 Instruct", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-07-14", - last_updated: "2025-07-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3 }, - limit: { context: 131072, output: 16384 }, - status: "deprecated", - }, - "moonshotai/kimi-k2-instruct-0905": { - id: "moonshotai/kimi-k2-instruct-0905", - name: "Kimi K2 Instruct 0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3 }, - limit: { context: 262144, output: 16384 }, - }, - }, - }, - azure: { - id: "azure", - env: ["AZURE_RESOURCE_NAME", "AZURE_API_KEY"], - npm: "@ai-sdk/azure", - name: "Azure", - doc: "https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models", - models: { - "mistral-nemo": { - id: "mistral-nemo", - name: "Mistral Nemo", - family: "mistral-nemo", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 128000, output: 128000 }, - }, - "gpt-5.2-chat": { - id: "gpt-5.2-chat", - name: "GPT-5.2 Chat", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 128000, output: 16384 }, - }, - "codex-mini": { - id: "codex-mini", - name: "Codex Mini", - family: "gpt-codex-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-04", - release_date: "2025-05-16", - last_updated: "2025-05-16", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5, output: 6, cache_read: 0.375 }, - limit: { context: 200000, output: 100000 }, - }, - "phi-4-multimodal": { - id: "phi-4-multimodal", - name: "Phi-4-multimodal", - family: "phi", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0.08, output: 0.32, input_audio: 4 }, - limit: { context: 128000, output: 4096 }, - }, - "phi-3.5-mini-instruct": { - id: "phi-3.5-mini-instruct", - name: "Phi-3.5-mini-instruct", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-08-20", - last_updated: "2024-08-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.52 }, - limit: { context: 128000, output: 4096 }, - }, - "llama-4-scout-17b-16e-instruct": { - id: "llama-4-scout-17b-16e-instruct", - name: "Llama 4 Scout 17B 16E Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.78 }, - limit: { context: 128000, output: 8192 }, - }, - "grok-4-1-fast-reasoning": { - id: "grok-4-1-fast-reasoning", - name: "Grok 4.1 Fast (Reasoning)", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-06-27", - last_updated: "2025-06-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 128000, input: 128000, output: 8192 }, - status: "beta", - }, - "phi-3-medium-4k-instruct": { - id: "phi-3-medium-4k-instruct", - name: "Phi-3-medium-instruct (4k)", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.17, output: 0.68 }, - limit: { context: 4096, output: 1024 }, - }, - "ministral-3b": { - id: "ministral-3b", - name: "Ministral 3B", - family: "ministral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.04, output: 0.04 }, - limit: { context: 128000, output: 8192 }, - }, - "claude-haiku-4-5": { - id: "claude-haiku-4-5", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-02-31", - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - provider: { - npm: "@ai-sdk/anthropic", - api: "https://${AZURE_RESOURCE_NAME}.services.ai.azure.com/anthropic/v1", - }, - }, - "meta-llama-3.1-8b-instruct": { - id: "meta-llama-3.1-8b-instruct", - name: "Meta-Llama-3.1-8B-Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.61 }, - limit: { context: 128000, output: 32768 }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-06", - last_updated: "2026-02-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3 }, - limit: { context: 262144, output: 262144 }, - provider: { - npm: "@ai-sdk/openai-compatible", - api: "https://${AZURE_RESOURCE_NAME}.services.ai.azure.com/models", - shape: "completions", - }, - }, - "llama-3.3-70b-instruct": { - id: "llama-3.3-70b-instruct", - name: "Llama-3.3-70B-Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.71, output: 0.71 }, - limit: { context: 128000, output: 32768 }, - }, - "deepseek-v3-0324": { - id: "deepseek-v3-0324", - name: "DeepSeek-V3-0324", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-03-24", - last_updated: "2025-03-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.14, output: 4.56 }, - limit: { context: 131072, output: 131072 }, - }, - "gpt-5-chat": { - id: "gpt-5-chat", - name: "GPT-5 Chat", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: false, - temperature: false, - knowledge: "2024-10-24", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 128000, output: 16384 }, - }, - "phi-3.5-moe-instruct": { - id: "phi-3.5-moe-instruct", - name: "Phi-3.5-MoE-instruct", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-08-20", - last_updated: "2024-08-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.16, output: 0.64 }, - limit: { context: 128000, output: 4096 }, - }, - "gpt-5.3-chat": { - id: "gpt-5.3-chat", - name: "GPT-5.3 Chat", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-03", - last_updated: "2026-03-03", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 128000, output: 16384 }, - }, - "o1-mini": { - id: "o1-mini", - name: "o1-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2023-09", - release_date: "2024-09-12", - last_updated: "2024-09-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.55 }, - limit: { context: 128000, output: 65536 }, - }, - "text-embedding-3-large": { - id: "text-embedding-3-large", - name: "text-embedding-3-large", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2024-01-25", - last_updated: "2024-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.13, output: 0 }, - limit: { context: 8191, output: 3072 }, - }, - "phi-3-mini-128k-instruct": { - id: "phi-3-mini-128k-instruct", - name: "Phi-3-mini-instruct (128k)", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.52 }, - limit: { context: 128000, output: 4096 }, - }, - "phi-4-reasoning": { - id: "phi-4-reasoning", - name: "Phi-4-reasoning", - family: "phi", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.125, output: 0.5 }, - limit: { context: 32000, output: 4096 }, - }, - "gpt-5-mini": { - id: "gpt-5-mini", - name: "GPT-5 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.03 }, - limit: { context: 272000, output: 128000 }, - }, - "gpt-5-nano": { - id: "gpt-5-nano", - name: "GPT-5 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4, cache_read: 0.01 }, - limit: { context: 272000, output: 128000 }, - }, - "meta-llama-3-70b-instruct": { - id: "meta-llama-3-70b-instruct", - name: "Meta-Llama-3-70B-Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-12", - release_date: "2024-04-18", - last_updated: "2024-04-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.68, output: 3.54 }, - limit: { context: 8192, output: 2048 }, - }, - "phi-3-small-8k-instruct": { - id: "phi-3-small-8k-instruct", - name: "Phi-3-small-instruct (8k)", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 8192, output: 2048 }, - }, - "gpt-5.3-codex": { - id: "gpt-5.3-codex", - name: "GPT-5.3 Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-24", - last_updated: "2026-02-24", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "text-embedding-ada-002": { - id: "text-embedding-ada-002", - name: "text-embedding-ada-002", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2022-12-15", - last_updated: "2022-12-15", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0 }, - limit: { context: 8192, output: 1536 }, - }, - "llama-3.2-90b-vision-instruct": { - id: "llama-3.2-90b-vision-instruct", - name: "Llama-3.2-90B-Vision-Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-25", - last_updated: "2024-09-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 2.04, output: 2.04 }, - limit: { context: 128000, output: 8192 }, - }, - "deepseek-r1": { - id: "deepseek-r1", - name: "DeepSeek-R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2024-07", - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.35, output: 5.4 }, - limit: { context: 163840, output: 163840 }, - }, - "grok-4-1-fast-non-reasoning": { - id: "grok-4-1-fast-non-reasoning", - name: "Grok 4.1 Fast (Non-Reasoning)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-06-27", - last_updated: "2025-06-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 128000, input: 128000, output: 8192 }, - status: "beta", - }, - "deepseek-v3.2-speciale": { - id: "deepseek-v3.2-speciale", - name: "DeepSeek-V3.2-Speciale", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2024-07", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.58, output: 1.68 }, - limit: { context: 128000, output: 128000 }, - }, - "gpt-5.2": { - id: "gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "mistral-large-2411": { - id: "mistral-large-2411", - name: "Mistral Large 24.11", - family: "mistral-large", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2024-11-01", - last_updated: "2024-11-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6 }, - limit: { context: 128000, output: 32768 }, - }, - "claude-opus-4-1": { - id: "claude-opus-4-1", - name: "Claude Opus 4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - provider: { - npm: "@ai-sdk/anthropic", - api: "https://${AZURE_RESOURCE_NAME}.services.ai.azure.com/anthropic/v1", - }, - }, - "cohere-command-a": { - id: "cohere-command-a", - name: "Command A", - family: "command-a", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-06-01", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.5, output: 10 }, - limit: { context: 256000, output: 8000 }, - }, - "llama-3.2-11b-vision-instruct": { - id: "llama-3.2-11b-vision-instruct", - name: "Llama-3.2-11B-Vision-Instruct", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-25", - last_updated: "2024-09-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.37, output: 0.37 }, - limit: { context: 128000, output: 8192 }, - }, - "meta-llama-3.1-405b-instruct": { - id: "meta-llama-3.1-405b-instruct", - name: "Meta-Llama-3.1-405B-Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 5.33, output: 16 }, - limit: { context: 128000, output: 32768 }, - }, - "gpt-5.1-chat": { - id: "gpt-5.1-chat", - name: "GPT-5.1 Chat", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text", "image", "audio"], output: ["text", "image", "audio"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 128000, output: 16384 }, - }, - "gpt-4-turbo-vision": { - id: "gpt-4-turbo-vision", - name: "GPT-4 Turbo Vision", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-11", - release_date: "2023-11-06", - last_updated: "2024-04-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 30 }, - limit: { context: 128000, output: 4096 }, - }, - "gpt-5.2-codex": { - id: "gpt-5.2-codex", - name: "GPT-5.2 Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-01-14", - last_updated: "2026-01-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.75, output: 14, cache_read: 0.175 }, - limit: { context: 400000, output: 128000 }, - }, - "cohere-embed-v-4-0": { - id: "cohere-embed-v-4-0", - name: "Embed v4", - family: "cohere-embed", - attachment: true, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2025-04-15", - last_updated: "2025-04-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.12, output: 0 }, - limit: { context: 128000, output: 1536 }, - }, - "gpt-5.1-codex-mini": { - id: "gpt-5.1-codex-mini", - name: "GPT-5.1 Codex Mini", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, output: 128000 }, - }, - "gpt-3.5-turbo-0125": { - id: "gpt-3.5-turbo-0125", - name: "GPT-3.5 Turbo 0125", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2021-08", - release_date: "2024-01-25", - last_updated: "2024-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 1.5 }, - limit: { context: 16384, output: 16384 }, - }, - "o1-preview": { - id: "o1-preview", - name: "o1-preview", - family: "o", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2023-09", - release_date: "2024-09-12", - last_updated: "2024-09-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 16.5, output: 66, cache_read: 8.25 }, - limit: { context: 128000, output: 32768 }, - }, - "cohere-embed-v3-multilingual": { - id: "cohere-embed-v3-multilingual", - name: "Embed v3 Multilingual", - family: "cohere-embed", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2023-11-07", - last_updated: "2023-11-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0 }, - limit: { context: 512, output: 1024 }, - }, - "grok-4-20-non-reasoning": { - id: "grok-4-20-non-reasoning", - name: "Grok 4.20 (Non-Reasoning)", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2026-04-08", - last_updated: "2026-04-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6 }, - limit: { context: 262000, output: 8192 }, - status: "beta", - }, - "gpt-5.1": { - id: "gpt-5.1", - name: "GPT-5.1", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text", "image", "audio"], output: ["text", "image", "audio"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 272000, output: 128000 }, - }, - "grok-4-fast-reasoning": { - id: "grok-4-fast-reasoning", - name: "Grok 4 Fast (Reasoning)", - family: "grok", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - o1: { - id: "o1", - name: "o1", - family: "o", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2023-09", - release_date: "2024-12-05", - last_updated: "2024-12-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 60, cache_read: 7.5 }, - limit: { context: 200000, output: 100000 }, - }, - "mistral-small-2503": { - id: "mistral-small-2503", - name: "Mistral Small 3.1", - family: "mistral-small", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2025-03-01", - last_updated: "2025-03-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.3 }, - limit: { context: 128000, output: 32768 }, - }, - "model-router": { - id: "model-router", - name: "Model Router", - family: "model-router", - attachment: true, - reasoning: false, - tool_call: true, - release_date: "2025-05-19", - last_updated: "2025-11-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "gpt-3.5-turbo-1106": { - id: "gpt-3.5-turbo-1106", - name: "GPT-3.5 Turbo 1106", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2021-08", - release_date: "2023-11-06", - last_updated: "2023-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 2 }, - limit: { context: 16384, output: 16384 }, - }, - "text-embedding-3-small": { - id: "text-embedding-3-small", - name: "text-embedding-3-small", - family: "text-embedding", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2024-01-25", - last_updated: "2024-01-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.02, output: 0 }, - limit: { context: 8191, output: 1536 }, - }, - "deepseek-v3.1": { - id: "deepseek-v3.1", - name: "DeepSeek-V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.56, output: 1.68 }, - limit: { context: 131072, output: 131072 }, - }, - "claude-opus-4-5": { - id: "claude-opus-4-5", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-08-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - provider: { - npm: "@ai-sdk/anthropic", - api: "https://${AZURE_RESOURCE_NAME}.services.ai.azure.com/anthropic/v1", - }, - }, - "phi-3-mini-4k-instruct": { - id: "phi-3-mini-4k-instruct", - name: "Phi-3-mini-instruct (4k)", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.13, output: 0.52 }, - limit: { context: 4096, output: 1024 }, - }, - "meta-llama-3.1-70b-instruct": { - id: "meta-llama-3.1-70b-instruct", - name: "Meta-Llama-3.1-70B-Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.68, output: 3.54 }, - limit: { context: 128000, output: 32768 }, - }, - "phi-4-mini-reasoning": { - id: "phi-4-mini-reasoning", - name: "Phi-4-mini-reasoning", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 128000, output: 4096 }, - }, - "gpt-4": { - id: "gpt-4", - name: "GPT-4", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-11", - release_date: "2023-03-14", - last_updated: "2023-03-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 60, output: 120 }, - limit: { context: 8192, output: 8192 }, - }, - "meta-llama-3-8b-instruct": { - id: "meta-llama-3-8b-instruct", - name: "Meta-Llama-3-8B-Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-12", - release_date: "2024-04-18", - last_updated: "2024-04-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.61 }, - limit: { context: 8192, output: 2048 }, - }, - "kimi-k2.6": { - id: "kimi-k2.6", - name: "Kimi K2.6", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4 }, - limit: { context: 262144, output: 262144 }, - provider: { - npm: "@ai-sdk/openai-compatible", - api: "https://${AZURE_RESOURCE_NAME}.services.ai.azure.com/models", - shape: "completions", - }, - }, - "gpt-5-codex": { - id: "gpt-5-codex", - name: "GPT-5-Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 400000, output: 128000 }, - }, - "phi-4-mini": { - id: "phi-4-mini", - name: "Phi-4-mini", - family: "phi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 128000, output: 4096 }, - }, - "grok-4-20-reasoning": { - id: "grok-4-20-reasoning", - name: "Grok 4.20 (Reasoning)", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-09", - release_date: "2026-04-08", - last_updated: "2026-04-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 6 }, - limit: { context: 262000, output: 8192 }, - status: "beta", - }, - "gpt-3.5-turbo-0301": { - id: "gpt-3.5-turbo-0301", - name: "GPT-3.5 Turbo 0301", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2021-08", - release_date: "2023-03-01", - last_updated: "2023-03-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5, output: 2 }, - limit: { context: 4096, output: 4096 }, - }, - "claude-opus-4-6": { - id: "claude-opus-4-6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 5, - output: 25, - cache_read: 0.5, - cache_write: 6.25, - context_over_200k: { input: 10, output: 37.5, cache_read: 1, cache_write: 12.5 }, - }, - limit: { context: 200000, output: 128000 }, - provider: { - npm: "@ai-sdk/anthropic", - api: "https://${AZURE_RESOURCE_NAME}.services.ai.azure.com/anthropic/v1", - }, - }, - "phi-3-small-128k-instruct": { - id: "phi-3-small-128k-instruct", - name: "Phi-3-small-instruct (128k)", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 4096 }, - }, - "deepseek-v3.2": { - id: "deepseek-v3.2", - name: "DeepSeek-V3.2", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.58, output: 1.68 }, - limit: { context: 128000, output: 128000 }, - }, - "phi-3-medium-128k-instruct": { - id: "phi-3-medium-128k-instruct", - name: "Phi-3-medium-instruct (128k)", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.17, output: 0.68 }, - limit: { context: 128000, output: 4096 }, - }, - "gpt-3.5-turbo-0613": { - id: "gpt-3.5-turbo-0613", - name: "GPT-3.5 Turbo 0613", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2021-08", - release_date: "2023-06-13", - last_updated: "2023-06-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 4 }, - limit: { context: 16384, output: 16384 }, - }, - "claude-sonnet-4-5": { - id: "claude-sonnet-4-5", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - provider: { - npm: "@ai-sdk/anthropic", - api: "https://${AZURE_RESOURCE_NAME}.services.ai.azure.com/anthropic/v1", - }, - }, - "phi-4": { - id: "phi-4", - name: "Phi-4", - family: "phi", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.125, output: 0.5 }, - limit: { context: 128000, output: 4096 }, - }, - "gpt-5": { - id: "gpt-5", - name: "GPT-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.13 }, - limit: { context: 272000, output: 128000 }, - }, - "gpt-4-32k": { - id: "gpt-4-32k", - name: "GPT-4 32K", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-11", - release_date: "2023-03-14", - last_updated: "2023-03-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 60, output: 120 }, - limit: { context: 32768, output: 32768 }, - }, - "cohere-embed-v3-english": { - id: "cohere-embed-v3-english", - name: "Embed v3 English", - family: "cohere-embed", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2023-11-07", - last_updated: "2023-11-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0 }, - limit: { context: 512, output: 1024 }, - }, - "phi-4-reasoning-plus": { - id: "phi-4-reasoning-plus", - name: "Phi-4-reasoning-plus", - family: "phi", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.125, output: 0.5 }, - limit: { context: 32000, output: 4096 }, - }, - "mistral-medium-2505": { - id: "mistral-medium-2505", - name: "Mistral Medium 3", - family: "mistral-medium", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-05", - release_date: "2025-05-07", - last_updated: "2025-05-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2 }, - limit: { context: 128000, output: 128000 }, - }, - "gpt-3.5-turbo-instruct": { - id: "gpt-3.5-turbo-instruct", - name: "GPT-3.5 Turbo Instruct", - family: "gpt", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2021-08", - release_date: "2023-09-21", - last_updated: "2023-09-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.5, output: 2 }, - limit: { context: 4096, output: 4096 }, - }, - "deepseek-r1-0528": { - id: "deepseek-r1-0528", - name: "DeepSeek-R1-0528", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.35, output: 5.4 }, - limit: { context: 163840, output: 163840 }, - }, - "kimi-k2-thinking": { - id: "kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2025-12-02", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5, cache_read: 0.15 }, - limit: { context: 262144, output: 262144 }, - }, - "gpt-5.1-codex": { - id: "gpt-5.1-codex", - name: "GPT-5.1 Codex", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-14", - last_updated: "2025-11-14", - modalities: { input: ["text", "image", "audio"], output: ["text", "image", "audio"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "codestral-2501": { - id: "codestral-2501", - name: "Codestral 25.01", - family: "codestral", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 256000, output: 256000 }, - }, - "llama-4-maverick-17b-128e-instruct-fp8": { - id: "llama-4-maverick-17b-128e-instruct-fp8", - name: "Llama 4 Maverick 17B 128E Instruct FP8", - family: "llama", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-04-05", - last_updated: "2025-04-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.25, output: 1 }, - limit: { context: 128000, output: 8192 }, - }, - "mai-ds-r1": { - id: "mai-ds-r1", - name: "MAI-DS-R1", - family: "mai", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2024-06", - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.35, output: 5.4 }, - limit: { context: 128000, output: 8192 }, - }, - "gpt-5.1-codex-max": { - id: "gpt-5.1-codex-max", - name: "GPT-5.1 Codex Max", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-11-13", - last_updated: "2025-11-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "claude-sonnet-4-6": { - id: "claude-sonnet-4-6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - provider: { - npm: "@ai-sdk/anthropic", - api: "https://${AZURE_RESOURCE_NAME}.services.ai.azure.com/anthropic/v1", - }, - }, - "gpt-5.5": { - id: "gpt-5.5", - name: "GPT-5.5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-12-01", - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 30, cache_read: 0.5, context_over_200k: { input: 10, output: 45, cache_read: 1 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "gpt-4-turbo": { - id: "gpt-4-turbo", - name: "GPT-4 Turbo", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2023-11-06", - last_updated: "2024-04-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 10, output: 30 }, - limit: { context: 128000, output: 4096 }, - }, - "gpt-4o-mini": { - id: "gpt-4o-mini", - name: "GPT-4o mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.08 }, - limit: { context: 128000, output: 16384 }, - }, - "gpt-5.4-mini": { - id: "gpt-5.4-mini", - name: "GPT-5.4 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 4.5, cache_read: 0.075 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "cohere-command-r-08-2024": { - id: "cohere-command-r-08-2024", - name: "Command R", - family: "command-r", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06-01", - release_date: "2024-08-30", - last_updated: "2024-08-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 128000, output: 4000 }, - }, - "o4-mini": { - id: "o4-mini", - name: "o4-mini", - family: "o-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.28 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-5.4-nano": { - id: "gpt-5.4-nano", - name: "GPT-5.4 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.25, cache_read: 0.02 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "grok-code-fast-1": { - id: "grok-code-fast-1", - name: "Grok Code Fast 1", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2025-08-28", - last_updated: "2025-08-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 1.5, cache_read: 0.02 }, - limit: { context: 256000, output: 10000 }, - }, - "gpt-5.4-pro": { - id: "gpt-5.4-pro", - name: "GPT-5.4 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 30, output: 180, context_over_200k: { input: 60, output: 270 } }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "o3-mini": { - id: "o3-mini", - name: "o3-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05", - release_date: "2024-12-20", - last_updated: "2025-01-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1.1, output: 4.4, cache_read: 0.55 }, - limit: { context: 200000, output: 100000 }, - }, - "grok-4": { - id: "grok-4", - name: "Grok 4", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, reasoning: 15, cache_read: 0.75 }, - limit: { context: 256000, output: 64000 }, - }, - "gpt-5.4": { - id: "gpt-5.4", - name: "GPT-5.4", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 2.5, - output: 15, - cache_read: 0.25, - context_over_200k: { input: 5, output: 22.5, cache_read: 0.5 }, - }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "gpt-4.1-nano": { - id: "gpt-4.1-nano", - name: "GPT-4.1 nano", - family: "gpt-nano", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.03 }, - limit: { context: 1047576, output: 32768 }, - }, - "grok-3-mini": { - id: "grok-3-mini", - name: "Grok 3 Mini", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 0.5, reasoning: 0.5, cache_read: 0.075 }, - limit: { context: 131072, output: 8192 }, - }, - o3: { - id: "o3", - name: "o3", - family: "o", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2024-05", - release_date: "2025-04-16", - last_updated: "2025-04-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 200000, output: 100000 }, - }, - "gpt-5-pro": { - id: "gpt-5-pro", - name: "GPT-5 Pro", - family: "gpt-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2025-10-06", - last_updated: "2025-10-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 120 }, - limit: { context: 400000, output: 272000 }, - }, - "gpt-4o": { - id: "gpt-4o", - name: "GPT-4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-09", - release_date: "2024-05-13", - last_updated: "2024-08-06", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2.5, output: 10, cache_read: 1.25 }, - limit: { context: 128000, output: 16384 }, - }, - "cohere-command-r-plus-08-2024": { - id: "cohere-command-r-plus-08-2024", - name: "Command R+", - family: "command-r", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-06-01", - release_date: "2024-08-30", - last_updated: "2024-08-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.5, output: 10 }, - limit: { context: 128000, output: 4000 }, - }, - "gpt-4.1": { - id: "gpt-4.1", - name: "GPT-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 1047576, output: 32768 }, - }, - "gpt-4.1-mini": { - id: "gpt-4.1-mini", - name: "GPT-4.1 mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 1.6, cache_read: 0.1 }, - limit: { context: 1047576, output: 32768 }, - }, - "grok-3": { - id: "grok-3", - name: "Grok 3", - family: "grok", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-11", - release_date: "2025-02-17", - last_updated: "2025-02-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75 }, - limit: { context: 131072, output: 8192 }, - }, - "grok-4-fast-non-reasoning": { - id: "grok-4-fast-non-reasoning", - name: "Grok 4 Fast (Non-Reasoning)", - family: "grok", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-09-19", - last_updated: "2025-09-19", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.2, output: 0.5, cache_read: 0.05 }, - limit: { context: 2000000, output: 30000 }, - }, - }, - }, - fastrouter: { - id: "fastrouter", - env: ["FASTROUTER_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://go.fastrouter.ai/api/v1", - name: "FastRouter", - doc: "https://fastrouter.ai/models", - models: { - "x-ai/grok-4": { - id: "x-ai/grok-4", - name: "Grok 4", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.75, cache_write: 15 }, - limit: { context: 256000, output: 64000 }, - }, - "deepseek-ai/deepseek-r1-distill-llama-70b": { - id: "deepseek-ai/deepseek-r1-distill-llama-70b", - name: "DeepSeek R1 Distill Llama 70B", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-01-23", - last_updated: "2025-01-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.14 }, - limit: { context: 131072, output: 131072 }, - }, - "openai/gpt-5-mini": { - id: "openai/gpt-5-mini", - name: "GPT-5 Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10-01", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2, cache_read: 0.025 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-5-nano": { - id: "openai/gpt-5-nano", - name: "GPT-5 Nano", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10-01", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.4, cache_read: 0.005 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-oss-20b": { - id: "openai/gpt-oss-20b", - name: "GPT OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.2 }, - limit: { context: 131072, output: 65536 }, - }, - "openai/gpt-5": { - id: "openai/gpt-5", - name: "GPT-5", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10-01", - release_date: "2025-08-07", - last_updated: "2025-08-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.125 }, - limit: { context: 400000, output: 128000 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 131072, output: 32768 }, - }, - "z-ai/glm-5": { - id: "z-ai/glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 3.15 }, - limit: { context: 204800, output: 131072 }, - }, - "qwen/qwen3-coder": { - id: "qwen/qwen3-coder", - name: "Qwen3 Coder", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 262144, output: 66536 }, - }, - "google/gemini-2.5-pro": { - id: "google/gemini-2.5-pro", - name: "Gemini 2.5 Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.31 }, - limit: { context: 1048576, output: 65536 }, - }, - "google/gemini-2.5-flash": { - id: "google/gemini-2.5-flash", - name: "Gemini 2.5 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.0375 }, - limit: { context: 1048576, output: 65536 }, - }, - "moonshotai/kimi-k2": { - id: "moonshotai/kimi-k2", - name: "Kimi K2", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-07-11", - last_updated: "2025-07-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.2 }, - limit: { context: 131072, output: 32768 }, - }, - "openai/gpt-4.1": { - id: "openai/gpt-4.1", - name: "GPT-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 8, cache_read: 0.5 }, - limit: { context: 1047576, output: 32768 }, - }, - "anthropic/claude-opus-4.1": { - id: "anthropic/claude-opus-4.1", - name: "Claude Opus 4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "anthropic/claude-sonnet-4": { - id: "anthropic/claude-sonnet-4", - name: "Claude Sonnet 4", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - }, - }, - stackit: { - id: "stackit", - env: ["STACKIT_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.openai-compat.model-serving.eu01.onstackit.cloud/v1", - name: "STACKIT", - doc: "https://docs.stackit.cloud/products/data-and-ai/ai-model-serving/basics/available-shared-models", - models: { - "Qwen/Qwen3-VL-Embedding-8B": { - id: "Qwen/Qwen3-VL-Embedding-8B", - name: "Qwen3-VL Embedding 8B", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: false, - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.09 }, - limit: { context: 32000, output: 4096 }, - }, - "Qwen/Qwen3-VL-235B-A22B-Instruct-FP8": { - id: "Qwen/Qwen3-VL-235B-A22B-Instruct-FP8", - name: "Qwen3-VL 235B", - family: "qwen", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2024-11-01", - last_updated: "2024-11-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 1.64, output: 1.91 }, - limit: { context: 218000, output: 8192 }, - }, - "neuralmagic/Meta-Llama-3.1-8B-Instruct-FP8": { - id: "neuralmagic/Meta-Llama-3.1-8B-Instruct-FP8", - name: "Llama 3.1 8B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.16, output: 0.27 }, - limit: { context: 128000, output: 8192 }, - }, - "neuralmagic/Mistral-Nemo-Instruct-2407-FP8": { - id: "neuralmagic/Mistral-Nemo-Instruct-2407-FP8", - name: "Mistral Nemo", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2024-07-01", - last_updated: "2024-07-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.49, output: 0.71 }, - limit: { context: 128000, output: 8192 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT-OSS 120B", - family: "gpt", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.49, output: 0.71 }, - limit: { context: 131000, output: 8192 }, - }, - "cortecs/Llama-3.3-70B-Instruct-FP8-Dynamic": { - id: "cortecs/Llama-3.3-70B-Instruct-FP8-Dynamic", - name: "Llama 3.3 70B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2024-12-05", - last_updated: "2024-12-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.49, output: 0.71 }, - limit: { context: 128000, output: 8192 }, - }, - "google/gemma-3-27b-it": { - id: "google/gemma-3-27b-it", - name: "Gemma 3 27B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - release_date: "2025-05-17", - last_updated: "2025-05-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.49, output: 0.71 }, - limit: { context: 37000, output: 8192 }, - }, - "intfloat/e5-mistral-7b-instruct": { - id: "intfloat/e5-mistral-7b-instruct", - name: "E5 Mistral 7B", - family: "mistral", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: false, - release_date: "2023-12-11", - last_updated: "2023-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.02, output: 0.02 }, - limit: { context: 4096, output: 4096 }, - }, - }, - }, - "tencent-coding-plan": { - id: "tencent-coding-plan", - env: ["TENCENT_CODING_PLAN_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.lkeap.cloud.tencent.com/coding/v3", - name: "Tencent Coding Plan (China)", - doc: "https://cloud.tencent.com/document/product/1772/128947", - models: { - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi-K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 262144, output: 32768 }, - }, - "glm-5": { - id: "glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 202752, output: 16384 }, - }, - "hunyuan-turbos": { - id: "hunyuan-turbos", - name: "Hunyuan-TurboS", - family: "hunyuan", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-03-08", - last_updated: "2026-03-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 131072, output: 16384 }, - }, - "hunyuan-t1": { - id: "hunyuan-t1", - name: "Hunyuan-T1", - family: "hunyuan", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-03-08", - last_updated: "2026-03-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 131072, output: 16384 }, - }, - "hunyuan-2.0-instruct": { - id: "hunyuan-2.0-instruct", - name: "Tencent HY 2.0 Instruct", - family: "hunyuan", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-03-08", - last_updated: "2026-03-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 131072, output: 16384 }, - }, - "minimax-m2.5": { - id: "minimax-m2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 204800, output: 32768 }, - }, - "tc-code-latest": { - id: "tc-code-latest", - name: "Auto", - family: "auto", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-03-08", - last_updated: "2026-03-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 131072, output: 16384 }, - }, - "hunyuan-2.0-thinking": { - id: "hunyuan-2.0-thinking", - name: "Tencent HY 2.0 Think", - family: "hunyuan", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-03-08", - last_updated: "2026-03-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 131072, output: 16384 }, - }, - }, - }, - "privatemode-ai": { - id: "privatemode-ai", - env: ["PRIVATEMODE_API_KEY", "PRIVATEMODE_ENDPOINT"], - npm: "@ai-sdk/openai-compatible", - api: "http://localhost:8080/v1", - name: "Privatemode AI", - doc: "https://docs.privatemode.ai/api/overview", - models: { - "gemma-3-27b": { - id: "gemma-3-27b", - name: "Gemma 3 27B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-08", - release_date: "2025-03-12", - last_updated: "2025-03-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "whisper-large-v3": { - id: "whisper-large-v3", - name: "Whisper large-v3", - family: "whisper", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - knowledge: "2023-09", - release_date: "2023-09-01", - last_updated: "2023-09-01", - modalities: { input: ["audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 0, output: 4096 }, - }, - "qwen3-embedding-4b": { - id: "qwen3-embedding-4b", - name: "Qwen3-Embedding 4B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - structured_output: false, - temperature: true, - knowledge: "2025-06", - release_date: "2025-06-06", - last_updated: "2025-06-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 32000, output: 2560 }, - }, - "gpt-oss-120b": { - id: "gpt-oss-120b", - name: "gpt-oss-120b", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08", - release_date: "2025-08-04", - last_updated: "2025-08-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 128000 }, - }, - "qwen3-coder-30b-a3b": { - id: "qwen3-coder-30b-a3b", - name: "Qwen3-Coder 30B-A3B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04", - last_updated: "2025-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 32768 }, - }, - }, - }, - google: { - id: "google", - env: ["GOOGLE_GENERATIVE_AI_API_KEY", "GEMINI_API_KEY"], - npm: "@ai-sdk/google", - name: "Google", - doc: "https://ai.google.dev/gemini-api/docs/models", - models: { - "gemini-flash-lite-latest": { - id: "gemini-flash-lite-latest", - name: "Gemini Flash-Lite Latest", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-2.5-pro-preview-05-06": { - id: "gemini-2.5-pro-preview-05-06", - name: "Gemini 2.5 Pro Preview 05-06", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-05-06", - last_updated: "2025-05-06", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.31 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-live-2.5-flash-preview-native-audio": { - id: "gemini-live-2.5-flash-preview-native-audio", - name: "Gemini Live 2.5 Flash Preview Native Audio", - family: "gemini-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-09-18", - modalities: { input: ["text", "audio", "video"], output: ["text", "audio"] }, - open_weights: false, - cost: { input: 0.5, output: 2, input_audio: 3, output_audio: 12 }, - limit: { context: 131072, output: 65536 }, - }, - "gemini-3.1-pro-preview-customtools": { - id: "gemini-3.1-pro-preview-customtools", - name: "Gemini 3.1 Pro Preview Custom Tools", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-2.5-flash-lite-preview-09-2025": { - id: "gemini-2.5-flash-lite-preview-09-2025", - name: "Gemini 2.5 Flash Lite Preview 09-25", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-1.5-flash": { - id: "gemini-1.5-flash", - name: "Gemini 1.5 Flash", - family: "gemini-flash", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-05-14", - last_updated: "2024-05-14", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.075, output: 0.3, cache_read: 0.01875 }, - limit: { context: 1000000, output: 8192 }, - }, - "gemini-1.5-pro": { - id: "gemini-1.5-pro", - name: "Gemini 1.5 Pro", - family: "gemini-pro", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-02-15", - last_updated: "2024-02-15", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 5, cache_read: 0.3125 }, - limit: { context: 1000000, output: 8192 }, - }, - "gemma-3n-e4b-it": { - id: "gemma-3n-e4b-it", - name: "Gemma 3n 4B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 2000 }, - }, - "gemini-3.1-flash-lite-preview": { - id: "gemini-3.1-flash-lite-preview", - name: "Gemini 3.1 Flash Lite Preview", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-03-03", - last_updated: "2026-03-03", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5, cache_read: 0.025, cache_write: 1 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-3.1-pro-preview": { - id: "gemini-3.1-pro-preview", - name: "Gemini 3.1 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-19", - last_updated: "2026-02-19", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-2.0-flash": { - id: "gemini-2.0-flash", - name: "Gemini 2.0 Flash", - family: "gemini-flash", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 8192 }, - }, - "gemini-3-flash-preview": { - id: "gemini-3-flash-preview", - name: "Gemini 3 Flash Preview", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 0.5, - output: 3, - cache_read: 0.05, - context_over_200k: { input: 0.5, output: 3, cache_read: 0.05 }, - }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-2.5-flash-preview-tts": { - id: "gemini-2.5-flash-preview-tts", - name: "Gemini 2.5 Flash Preview TTS", - family: "gemini-flash", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2025-01", - release_date: "2025-05-01", - last_updated: "2025-05-01", - modalities: { input: ["text"], output: ["audio"] }, - open_weights: false, - cost: { input: 0.5, output: 10 }, - limit: { context: 8000, output: 16000 }, - }, - "gemini-3-pro-preview": { - id: "gemini-3-pro-preview", - name: "Gemini 3 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-11-18", - last_updated: "2025-11-18", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 2, output: 12, cache_read: 0.2, context_over_200k: { input: 4, output: 18, cache_read: 0.4 } }, - limit: { context: 1000000, output: 64000 }, - }, - "gemini-2.5-flash-preview-05-20": { - id: "gemini-2.5-flash-preview-05-20", - name: "Gemini 2.5 Flash Preview 05-20", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.0375 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-embedding-001": { - id: "gemini-embedding-001", - name: "Gemini Embedding 001", - family: "gemini", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2025-05", - release_date: "2025-05-20", - last_updated: "2025-05-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0 }, - limit: { context: 2048, output: 3072 }, - }, - "gemini-2.5-pro": { - id: "gemini-2.5-pro", - name: "Gemini 2.5 Pro", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { - input: 1.25, - output: 10, - cache_read: 0.125, - context_over_200k: { input: 2.5, output: 15, cache_read: 0.25 }, - }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-flash-latest": { - id: "gemini-flash-latest", - name: "Gemini Flash Latest", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.075, input_audio: 1 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemma-4-31b-it": { - id: "gemma-4-31b-it", - name: "Gemma 4 31B", - family: "gemma", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 256000, output: 8192 }, - }, - "gemini-2.5-pro-preview-06-05": { - id: "gemini-2.5-pro-preview-06-05", - name: "Gemini 2.5 Pro Preview 06-05", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-05", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1.25, output: 10, cache_read: 0.31 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-2.5-flash-image": { - id: "gemini-2.5-flash-image", - name: "Gemini 2.5 Flash Image", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-06", - release_date: "2025-08-26", - last_updated: "2025-08-26", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 0.3, output: 30, cache_read: 0.075 }, - limit: { context: 32768, output: 32768 }, - }, - "gemini-2.5-flash-lite-preview-06-17": { - id: "gemini-2.5-flash-lite-preview-06-17", - name: "Gemini 2.5 Flash Lite Preview 06-17", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025, input_audio: 0.3 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemma-3-12b-it": { - id: "gemma-3-12b-it", - name: "Gemma 3 12B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 32768, output: 8192 }, - }, - "gemini-2.5-flash": { - id: "gemini-2.5-flash", - name: "Gemini 2.5 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-03-20", - last_updated: "2025-06-05", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.03, input_audio: 1 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemma-3n-e2b-it": { - id: "gemma-3n-e2b-it", - name: "Gemma 3n 2B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-07-09", - last_updated: "2025-07-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 2000 }, - }, - "gemini-3.1-flash-image-preview": { - id: "gemini-3.1-flash-image-preview", - name: "Gemini 3.1 Flash Image (Preview)", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-01", - release_date: "2026-02-26", - last_updated: "2026-02-26", - modalities: { input: ["text", "image", "pdf"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 0.25, output: 60 }, - limit: { context: 131072, output: 32768 }, - }, - "gemini-3.1-flash-lite": { - id: "gemini-3.1-flash-lite", - name: "Gemini 3.1 Flash Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-05-07", - last_updated: "2026-05-07", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.5, cache_read: 0.025, cache_write: 1 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemma-3-4b-it": { - id: "gemma-3-4b-it", - name: "Gemma 3 4B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-13", - last_updated: "2025-03-13", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 32768, output: 8192 }, - }, - "gemini-2.5-flash-preview-04-17": { - id: "gemini-2.5-flash-preview-04-17", - name: "Gemini 2.5 Flash Preview 04-17", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-04-17", - last_updated: "2025-04-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.15, output: 0.6, cache_read: 0.0375 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-2.5-pro-preview-tts": { - id: "gemini-2.5-pro-preview-tts", - name: "Gemini 2.5 Pro Preview TTS", - family: "gemini-flash", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - knowledge: "2025-01", - release_date: "2025-05-01", - last_updated: "2025-05-01", - modalities: { input: ["text"], output: ["audio"] }, - open_weights: false, - cost: { input: 1, output: 20 }, - limit: { context: 8000, output: 16000 }, - }, - "gemini-2.5-flash-preview-09-2025": { - id: "gemini-2.5-flash-preview-09-2025", - name: "Gemini 2.5 Flash Preview 09-25", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-25", - last_updated: "2025-09-25", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.3, output: 2.5, cache_read: 0.075, input_audio: 1 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemma-3-27b-it": { - id: "gemma-3-27b-it", - name: "Gemma 3 27B", - family: "gemma", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-03-12", - last_updated: "2025-03-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 8192 }, - }, - "gemma-4-26b-a4b-it": { - id: "gemma-4-26b-a4b-it", - name: "Gemma 4 26B", - family: "gemma", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - limit: { context: 256000, output: 8192 }, - }, - "gemini-2.5-flash-lite": { - id: "gemini-2.5-flash-lite", - name: "Gemini 2.5 Flash Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-06-17", - last_updated: "2025-06-17", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.1, output: 0.4, cache_read: 0.025 }, - limit: { context: 1048576, output: 65536 }, - }, - "gemini-2.5-flash-image-preview": { - id: "gemini-2.5-flash-image-preview", - name: "Gemini 2.5 Flash Image (Preview)", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2025-06", - release_date: "2025-08-26", - last_updated: "2025-08-26", - modalities: { input: ["text", "image"], output: ["text", "image"] }, - open_weights: false, - cost: { input: 0.3, output: 30, cache_read: 0.075 }, - limit: { context: 32768, output: 32768 }, - }, - "gemini-1.5-flash-8b": { - id: "gemini-1.5-flash-8b", - name: "Gemini 1.5 Flash-8B", - family: "gemini-flash", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2024-10-03", - last_updated: "2024-10-03", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.0375, output: 0.15, cache_read: 0.01 }, - limit: { context: 1000000, output: 8192 }, - }, - "gemini-live-2.5-flash": { - id: "gemini-live-2.5-flash", - name: "Gemini Live 2.5 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-09-01", - last_updated: "2025-09-01", - modalities: { input: ["text", "image", "audio", "video"], output: ["text", "audio"] }, - open_weights: false, - cost: { input: 0.5, output: 2, input_audio: 3, output_audio: 12 }, - limit: { context: 128000, output: 8000 }, - }, - "gemini-2.0-flash-lite": { - id: "gemini-2.0-flash-lite", - name: "Gemini 2.0 Flash Lite", - family: "gemini-flash-lite", - attachment: true, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2024-06", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.075, output: 0.3 }, - limit: { context: 1048576, output: 8192 }, - }, - }, - }, - drun: { - id: "drun", - env: ["DRUN_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://chat.d.run/v1", - name: "D.Run (China)", - doc: "https://www.d.run", - models: { - "public/deepseek-r1": { - id: "public/deepseek-r1", - name: "DeepSeek R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.55, output: 2.2 }, - limit: { context: 131072, output: 32000 }, - }, - "public/minimax-m25": { - id: "public/minimax-m25", - name: "MiniMax M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_details" }, - temperature: true, - release_date: "2025-03-01", - last_updated: "2025-03-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.29, output: 1.16 }, - limit: { context: 204800, output: 131072 }, - }, - "public/deepseek-v3": { - id: "public/deepseek-v3", - name: "DeepSeek V3", - family: "deepseek", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2024-12-26", - last_updated: "2024-12-26", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.28, output: 1.1 }, - limit: { context: 131072, output: 8192 }, - }, - }, - }, - moonshotai: { - id: "moonshotai", - env: ["MOONSHOT_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.moonshot.ai/v1", - name: "Moonshot AI", - doc: "https://platform.moonshot.ai/docs/api/chat", - models: { - "kimi-k2-0905-preview": { - id: "kimi-k2-0905-preview", - name: "Kimi K2 0905", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5, cache_read: 0.15 }, - limit: { context: 262144, output: 262144 }, - }, - "kimi-k2.5": { - id: "kimi-k2.5", - name: "Kimi K2.5", - family: "kimi-k2.5", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: false, - knowledge: "2025-01", - release_date: "2026-01", - last_updated: "2026-01", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3, cache_read: 0.1 }, - limit: { context: 262144, output: 262144 }, - }, - "kimi-k2-thinking-turbo": { - id: "kimi-k2-thinking-turbo", - name: "Kimi K2 Thinking Turbo", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.15, output: 8, cache_read: 0.15 }, - limit: { context: 262144, output: 262144 }, - }, - "kimi-k2.6": { - id: "kimi-k2.6", - name: "Kimi K2.6", - family: "kimi-k2.6", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4, cache_read: 0.16 }, - limit: { context: 262144, output: 262144 }, - }, - "kimi-k2-turbo-preview": { - id: "kimi-k2-turbo-preview", - name: "Kimi K2 Turbo", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-09-05", - last_updated: "2025-09-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.4, output: 10, cache_read: 0.6 }, - limit: { context: 262144, output: 262144 }, - }, - "kimi-k2-0711-preview": { - id: "kimi-k2-0711-preview", - name: "Kimi K2 0711", - family: "kimi", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-07-14", - last_updated: "2025-07-14", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5, cache_read: 0.15 }, - limit: { context: 131072, output: 16384 }, - }, - "kimi-k2-thinking": { - id: "kimi-k2-thinking", - name: "Kimi K2 Thinking", - family: "kimi-thinking", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-08", - release_date: "2025-11-06", - last_updated: "2025-11-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.5, cache_read: 0.15 }, - limit: { context: 262144, output: 262144 }, - }, - }, - }, - berget: { - id: "berget", - env: ["BERGET_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.berget.ai/v1", - name: "Berget.AI", - doc: "https://api.berget.ai", - models: { - "zai-org/GLM-4.7": { - id: "zai-org/GLM-4.7", - name: "GLM 4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-12", - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.77, output: 2.75 }, - limit: { context: 128000, output: 8192 }, - }, - "mistralai/Mistral-Small-3.2-24B-Instruct-2506": { - id: "mistralai/Mistral-Small-3.2-24B-Instruct-2506", - name: "Mistral Small 3.2 24B Instruct 2506", - family: "mistral-small", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-09", - release_date: "2025-10-01", - last_updated: "2025-10-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.33, output: 0.33 }, - limit: { context: 32000, output: 8192 }, - }, - "mistralai/Mistral-Medium-3.5-128B": { - id: "mistralai/Mistral-Medium-3.5-128B", - name: "Mistral Medium 3.5 128B", - family: "mistral-medium", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2026-04", - release_date: "2026-04-29", - last_updated: "2026-04-29", - modalities: { input: ["image", "text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.65, output: 5.5 }, - limit: { context: 262144, output: 131072 }, - }, - "meta-llama/Llama-3.3-70B-Instruct": { - id: "meta-llama/Llama-3.3-70B-Instruct", - name: "Llama 3.3 70B Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2023-12", - release_date: "2025-04-27", - last_updated: "2025-04-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.99, output: 0.99 }, - limit: { context: 128000, output: 8192 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT-OSS-120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.44, output: 0.99 }, - limit: { context: 128000, output: 8192 }, - }, - "google/gemma-4-31B-it": { - id: "google/gemma-4-31B-it", - name: "Gemma 4 31B Instruct", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-12", - release_date: "2026-04-02", - last_updated: "2026-04-02", - modalities: { input: ["audio", "image", "text", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.275, output: 0.55 }, - limit: { context: 128000, output: 8192 }, - }, - }, - }, - "github-models": { - id: "github-models", - env: ["GITHUB_TOKEN"], - npm: "@ai-sdk/openai-compatible", - api: "https://models.github.ai/inference", - name: "GitHub Models", - doc: "https://docs.github.com/en/github-models", - models: { - "deepseek/deepseek-v3-0324": { - id: "deepseek/deepseek-v3-0324", - name: "DeepSeek-V3-0324", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-03-24", - last_updated: "2025-03-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "deepseek/deepseek-r1": { - id: "deepseek/deepseek-r1", - name: "DeepSeek-R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 65536, output: 8192 }, - }, - "deepseek/deepseek-r1-0528": { - id: "deepseek/deepseek-r1-0528", - name: "DeepSeek-R1-0528", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-05-28", - last_updated: "2025-05-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 65536, output: 8192 }, - }, - "ai21-labs/ai21-jamba-1.5-mini": { - id: "ai21-labs/ai21-jamba-1.5-mini", - name: "AI21 Jamba 1.5 Mini", - family: "jamba", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2024-08-29", - last_updated: "2024-08-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 4096 }, - }, - "ai21-labs/ai21-jamba-1.5-large": { - id: "ai21-labs/ai21-jamba-1.5-large", - name: "AI21 Jamba 1.5 Large", - family: "jamba", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2024-08-29", - last_updated: "2024-08-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 256000, output: 4096 }, - }, - "microsoft/phi-3.5-mini-instruct": { - id: "microsoft/phi-3.5-mini-instruct", - name: "Phi-3.5-mini instruct (128k)", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-08-20", - last_updated: "2024-08-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/phi-3-medium-4k-instruct": { - id: "microsoft/phi-3-medium-4k-instruct", - name: "Phi-3-medium instruct (4k)", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 4096, output: 1024 }, - }, - "microsoft/phi-3.5-moe-instruct": { - id: "microsoft/phi-3.5-moe-instruct", - name: "Phi-3.5-MoE instruct (128k)", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-08-20", - last_updated: "2024-08-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/phi-3-mini-128k-instruct": { - id: "microsoft/phi-3-mini-128k-instruct", - name: "Phi-3-mini instruct (128k)", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/phi-4-mini-instruct": { - id: "microsoft/phi-4-mini-instruct", - name: "Phi-4-mini-instruct", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/phi-4-reasoning": { - id: "microsoft/phi-4-reasoning", - name: "Phi-4-Reasoning", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/phi-3-small-8k-instruct": { - id: "microsoft/phi-3-small-8k-instruct", - name: "Phi-3-small instruct (8k)", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 2048 }, - }, - "microsoft/phi-3.5-vision-instruct": { - id: "microsoft/phi-3.5-vision-instruct", - name: "Phi-3.5-vision instruct (128k)", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-08-20", - last_updated: "2024-08-20", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/phi-3-mini-4k-instruct": { - id: "microsoft/phi-3-mini-4k-instruct", - name: "Phi-3-mini instruct (4k)", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 4096, output: 1024 }, - }, - "microsoft/phi-4-mini-reasoning": { - id: "microsoft/phi-4-mini-reasoning", - name: "Phi-4-mini-reasoning", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/phi-3-small-128k-instruct": { - id: "microsoft/phi-3-small-128k-instruct", - name: "Phi-3-small instruct (128k)", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/phi-3-medium-128k-instruct": { - id: "microsoft/phi-3-medium-128k-instruct", - name: "Phi-3-medium instruct (128k)", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-04-23", - last_updated: "2024-04-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/phi-4": { - id: "microsoft/phi-4", - name: "Phi-4", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 16000, output: 4096 }, - }, - "microsoft/phi-4-multimodal-instruct": { - id: "microsoft/phi-4-multimodal-instruct", - name: "Phi-4-multimodal-instruct", - family: "phi", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-12-11", - last_updated: "2024-12-11", - modalities: { input: ["text", "image", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "microsoft/mai-ds-r1": { - id: "microsoft/mai-ds-r1", - name: "MAI-DS-R1", - family: "mai", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-06", - release_date: "2025-01-20", - last_updated: "2025-01-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 65536, output: 8192 }, - }, - "cohere/cohere-command-r-08-2024": { - id: "cohere/cohere-command-r-08-2024", - name: "Cohere Command R 08-2024", - family: "command-r", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2024-08-01", - last_updated: "2024-08-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "cohere/cohere-command-a": { - id: "cohere/cohere-command-a", - name: "Cohere Command A", - family: "command-a", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2024-11-01", - last_updated: "2024-11-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "cohere/cohere-command-r-plus": { - id: "cohere/cohere-command-r-plus", - name: "Cohere Command R+", - family: "command-r", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2024-04-04", - last_updated: "2024-08-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "cohere/cohere-command-r": { - id: "cohere/cohere-command-r", - name: "Cohere Command R", - family: "command-r", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2024-03-11", - last_updated: "2024-08-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "cohere/cohere-command-r-plus-08-2024": { - id: "cohere/cohere-command-r-plus-08-2024", - name: "Cohere Command R+ 08-2024", - family: "command-r", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2024-08-01", - last_updated: "2024-08-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 4096 }, - }, - "xai/grok-3-mini": { - id: "xai/grok-3-mini", - name: "Grok 3 Mini", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-09", - last_updated: "2024-12-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "xai/grok-3": { - id: "xai/grok-3", - name: "Grok 3", - family: "grok", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2024-12-09", - last_updated: "2024-12-09", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "openai/o1-mini": { - id: "openai/o1-mini", - name: "OpenAI o1-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: false, - temperature: false, - knowledge: "2023-10", - release_date: "2024-09-12", - last_updated: "2024-12-17", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 65536 }, - }, - "openai/gpt-4o-mini": { - id: "openai/gpt-4o-mini", - name: "GPT-4o mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text", "image", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/o4-mini": { - id: "openai/o4-mini", - name: "OpenAI o4-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: false, - temperature: false, - knowledge: "2024-04", - release_date: "2025-01-31", - last_updated: "2025-01-31", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/o1-preview": { - id: "openai/o1-preview", - name: "OpenAI o1-preview", - family: "o", - attachment: false, - reasoning: true, - tool_call: false, - temperature: false, - knowledge: "2023-10", - release_date: "2024-09-12", - last_updated: "2024-09-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 32768 }, - }, - "openai/o1": { - id: "openai/o1", - name: "OpenAI o1", - family: "o", - attachment: false, - reasoning: true, - tool_call: false, - temperature: false, - knowledge: "2023-10", - release_date: "2024-09-12", - last_updated: "2024-12-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/o3-mini": { - id: "openai/o3-mini", - name: "OpenAI o3-mini", - family: "o-mini", - attachment: false, - reasoning: true, - tool_call: false, - temperature: false, - knowledge: "2024-04", - release_date: "2025-01-31", - last_updated: "2025-01-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-4.1-nano": { - id: "openai/gpt-4.1-nano", - name: "GPT-4.1-nano", - family: "gpt-nano", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/o3": { - id: "openai/o3", - name: "OpenAI o3", - family: "o", - attachment: false, - reasoning: true, - tool_call: false, - temperature: false, - knowledge: "2024-04", - release_date: "2025-01-31", - last_updated: "2025-01-31", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 200000, output: 100000 }, - }, - "openai/gpt-4o": { - id: "openai/gpt-4o", - name: "GPT-4o", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-10", - release_date: "2024-05-13", - last_updated: "2024-05-13", - modalities: { input: ["text", "image", "audio"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-4.1": { - id: "openai/gpt-4.1", - name: "GPT-4.1", - family: "gpt", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "openai/gpt-4.1-mini": { - id: "openai/gpt-4.1-mini", - name: "GPT-4.1-mini", - family: "gpt-mini", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04", - release_date: "2025-04-14", - last_updated: "2025-04-14", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 16384 }, - }, - "meta/llama-4-scout-17b-16e-instruct": { - id: "meta/llama-4-scout-17b-16e-instruct", - name: "Llama 4 Scout 17B 16E Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-31", - last_updated: "2025-01-31", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "meta/meta-llama-3.1-8b-instruct": { - id: "meta/meta-llama-3.1-8b-instruct", - name: "Meta-Llama-3.1-8B-Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 32768 }, - }, - "meta/llama-3.3-70b-instruct": { - id: "meta/llama-3.3-70b-instruct", - name: "Llama-3.3-70B-Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 32768 }, - }, - "meta/meta-llama-3-70b-instruct": { - id: "meta/meta-llama-3-70b-instruct", - name: "Meta-Llama-3-70B-Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-04-18", - last_updated: "2024-04-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 2048 }, - }, - "meta/llama-3.2-90b-vision-instruct": { - id: "meta/llama-3.2-90b-vision-instruct", - name: "Llama-3.2-90B-Vision-Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-25", - last_updated: "2024-09-25", - modalities: { input: ["text", "image", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "meta/llama-3.2-11b-vision-instruct": { - id: "meta/llama-3.2-11b-vision-instruct", - name: "Llama-3.2-11B-Vision-Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-09-25", - last_updated: "2024-09-25", - modalities: { input: ["text", "image", "audio"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "meta/meta-llama-3.1-405b-instruct": { - id: "meta/meta-llama-3.1-405b-instruct", - name: "Meta-Llama-3.1-405B-Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 32768 }, - }, - "meta/meta-llama-3.1-70b-instruct": { - id: "meta/meta-llama-3.1-70b-instruct", - name: "Meta-Llama-3.1-70B-Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-07-23", - last_updated: "2024-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 32768 }, - }, - "meta/meta-llama-3-8b-instruct": { - id: "meta/meta-llama-3-8b-instruct", - name: "Meta-Llama-3-8B-Instruct", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-04-18", - last_updated: "2024-04-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 2048 }, - }, - "meta/llama-4-maverick-17b-128e-instruct-fp8": { - id: "meta/llama-4-maverick-17b-128e-instruct-fp8", - name: "Llama 4 Maverick 17B 128E Instruct FP8", - family: "llama", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-12", - release_date: "2025-01-31", - last_updated: "2025-01-31", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "core42/jais-30b-chat": { - id: "core42/jais-30b-chat", - name: "JAIS 30b Chat", - family: "jais", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2023-03", - release_date: "2023-08-30", - last_updated: "2023-08-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 2048 }, - }, - "mistral-ai/mistral-nemo": { - id: "mistral-ai/mistral-nemo", - name: "Mistral Nemo", - family: "mistral-nemo", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2024-07-18", - last_updated: "2024-07-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "mistral-ai/ministral-3b": { - id: "mistral-ai/ministral-3b", - name: "Ministral 3B", - family: "ministral", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 8192 }, - }, - "mistral-ai/mistral-large-2411": { - id: "mistral-ai/mistral-large-2411", - name: "Mistral Large 24.11", - family: "mistral-large", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2024-11-01", - last_updated: "2024-11-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 32768 }, - }, - "mistral-ai/mistral-small-2503": { - id: "mistral-ai/mistral-small-2503", - name: "Mistral Small 3.1", - family: "mistral-small", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2025-03-01", - last_updated: "2025-03-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 32768 }, - }, - "mistral-ai/mistral-medium-2505": { - id: "mistral-ai/mistral-medium-2505", - name: "Mistral Medium 3 (25.05)", - family: "mistral-medium", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-09", - release_date: "2025-05-01", - last_updated: "2025-05-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 128000, output: 32768 }, - }, - "mistral-ai/codestral-2501": { - id: "mistral-ai/codestral-2501", - name: "Codestral 25.01", - family: "codestral", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-03", - release_date: "2025-01-01", - last_updated: "2025-01-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 32000, output: 8192 }, - }, - }, - }, - neuralwatt: { - id: "neuralwatt", - env: ["NEURALWATT_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.neuralwatt.com/v1", - name: "Neuralwatt", - doc: "https://portal.neuralwatt.com/docs", - models: { - "glm-5-fast": { - id: "glm-5-fast", - name: "GLM 5 Fast", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-04-07", - last_updated: "2026-04-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.1, output: 3.6 }, - limit: { context: 200000, output: 200000 }, - }, - "kimi-k2.6-fast": { - id: "kimi-k2.6-fast", - name: "Kimi K2.6 Fast", - family: "kimi", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.69, output: 3.22 }, - limit: { context: 262144, output: 262144 }, - }, - "qwen3.5-397b-fast": { - id: "qwen3.5-397b-fast", - name: "Qwen3.5 397B Fast", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-02-01", - last_updated: "2026-02-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.69, output: 4.14 }, - limit: { context: 262144, output: 262144 }, - }, - "glm-5.1-fast": { - id: "glm-5.1-fast", - name: "GLM 5.1 Fast", - family: "glm", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-04-07", - last_updated: "2026-04-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.1, output: 3.6 }, - limit: { context: 200000, output: 200000 }, - }, - "qwen3.6-35b-fast": { - id: "qwen3.6-35b-fast", - name: "Qwen3.6 35B Fast", - family: "qwen3.6", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.1 }, - limit: { context: 131072, output: 131072 }, - }, - "kimi-k2.5-fast": { - id: "kimi-k2.5-fast", - name: "Kimi K2.5 Fast", - family: "kimi", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.52, output: 2.59 }, - limit: { context: 262144, output: 262144 }, - }, - "Qwen/Qwen3.5-397B-A17B-FP8": { - id: "Qwen/Qwen3.5-397B-A17B-FP8", - name: "Qwen3.5 397B A17B FP8", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-01", - last_updated: "2026-02-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.69, output: 4.14 }, - limit: { context: 262144, output: 262144 }, - }, - "Qwen/Qwen3.6-35B-A3B": { - id: "Qwen/Qwen3.6-35B-A3B", - name: "Qwen3.6 35B A3B", - family: "qwen3.6", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.05, output: 0.1 }, - limit: { context: 131072, output: 131072 }, - }, - "zai-org/GLM-5.1-FP8": { - id: "zai-org/GLM-5.1-FP8", - name: "GLM 5.1 FP8", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-07", - last_updated: "2026-04-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.1, output: 3.6 }, - limit: { context: 200000, output: 200000 }, - }, - "mistralai/Devstral-Small-2-24B-Instruct-2512": { - id: "mistralai/Devstral-Small-2-24B-Instruct-2512", - name: "Devstral Small 2 24B Instruct 2512", - family: "devstral", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-12-09", - last_updated: "2025-12-09", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.12, output: 0.35 }, - limit: { context: 262144, output: 262144 }, - }, - "openai/gpt-oss-20b": { - id: "openai/gpt-oss-20b", - name: "GPT OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.03, output: 0.16 }, - limit: { context: 16384, output: 16384 }, - }, - "moonshotai/Kimi-K2.6": { - id: "moonshotai/Kimi-K2.6", - name: "Kimi K2.6", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.69, output: 3.22 }, - limit: { context: 262144, output: 262144 }, - }, - "moonshotai/Kimi-K2.5": { - id: "moonshotai/Kimi-K2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.52, output: 2.59 }, - limit: { context: 262144, output: 262144 }, - }, - "MiniMaxAI/MiniMax-M2.5": { - id: "MiniMaxAI/MiniMax-M2.5", - name: "MiniMax M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.35, output: 1.38 }, - limit: { context: 196608, output: 196608 }, - }, - }, - }, - togetherai: { - id: "togetherai", - env: ["TOGETHER_API_KEY"], - npm: "@ai-sdk/togetherai", - name: "Together AI", - doc: "https://docs.together.ai/docs/serverless-models", - models: { - "essentialai/Rnj-1-Instruct": { - id: "essentialai/Rnj-1-Instruct", - name: "Rnj-1 Instruct", - family: "rnj", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-12-05", - last_updated: "2025-12-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.15 }, - limit: { context: 32768, output: 32768 }, - }, - "Qwen/Qwen3.5-397B-A17B": { - id: "Qwen/Qwen3.5-397B-A17B", - name: "Qwen3.5 397B A17B", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-16", - last_updated: "2026-02-16", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 3.6 }, - limit: { context: 262144, output: 130000 }, - }, - "Qwen/Qwen3.6-Plus": { - id: "Qwen/Qwen3.6-Plus", - name: "Qwen3.6 Plus", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-30", - last_updated: "2026-04-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 3 }, - limit: { context: 1000000, output: 500000 }, - }, - "Qwen/Qwen3-Coder-Next-FP8": { - id: "Qwen/Qwen3-Coder-Next-FP8", - name: "Qwen3 Coder Next FP8", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2026-02-03", - release_date: "2026-02-03", - last_updated: "2026-02-03", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 1.2 }, - limit: { context: 262144, output: 262144 }, - }, - "Qwen/Qwen3-235B-A22B-Instruct-2507-tput": { - id: "Qwen/Qwen3-235B-A22B-Instruct-2507-tput", - name: "Qwen3 235B A22B Instruct 2507 FP8", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-07-25", - last_updated: "2025-07-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.6 }, - limit: { context: 262144, output: 262144 }, - }, - "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8": { - id: "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8", - name: "Qwen3 Coder 480B A35B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-23", - last_updated: "2025-07-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2, output: 2 }, - limit: { context: 262144, output: 262144 }, - }, - "zai-org/GLM-5.1": { - id: "zai-org/GLM-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-11", - release_date: "2026-04-07", - last_updated: "2026-04-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.4, output: 4.4 }, - limit: { context: 202752, output: 131072 }, - }, - "meta-llama/Llama-3.3-70B-Instruct-Turbo": { - id: "meta-llama/Llama-3.3-70B-Instruct-Turbo", - name: "Llama 3.3 70B", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-12", - release_date: "2024-12-06", - last_updated: "2024-12-06", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.88, output: 0.88 }, - limit: { context: 131072, output: 131072 }, - }, - "deepseek-ai/DeepSeek-V3": { - id: "deepseek-ai/DeepSeek-V3", - name: "DeepSeek V3", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-07", - release_date: "2025-01-20", - last_updated: "2025-05-29", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1.25, output: 1.25 }, - limit: { context: 131072, output: 131072 }, - }, - "deepseek-ai/DeepSeek-R1": { - id: "deepseek-ai/DeepSeek-R1", - name: "DeepSeek R1", - family: "deepseek-thinking", - attachment: false, - reasoning: true, - tool_call: false, - temperature: true, - knowledge: "2024-07", - release_date: "2024-12-26", - last_updated: "2025-03-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 3, output: 7 }, - limit: { context: 163839, output: 163839 }, - }, - "deepseek-ai/DeepSeek-V3-1": { - id: "deepseek-ai/DeepSeek-V3-1", - name: "DeepSeek V3.1", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08", - release_date: "2025-08-21", - last_updated: "2025-08-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.7 }, - limit: { context: 131072, output: 131072 }, - }, - "deepseek-ai/DeepSeek-V4-Pro": { - id: "deepseek-ai/DeepSeek-V4-Pro", - name: "DeepSeek V4 Pro", - family: "deepseek", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-24", - last_updated: "2026-04-24", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 2.1, output: 4.4, cache_read: 0.2 }, - limit: { context: 512000, output: 384000 }, - }, - "openai/gpt-oss-120b": { - id: "openai/gpt-oss-120b", - name: "GPT OSS 120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 131072, output: 131072 }, - }, - "google/gemma-4-31B-it": { - id: "google/gemma-4-31B-it", - name: "Gemma 4 31B Instruct", - family: "gemma", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-07", - last_updated: "2026-04-07", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.5 }, - limit: { context: 262144, output: 131072 }, - }, - "moonshotai/Kimi-K2.6": { - id: "moonshotai/Kimi-K2.6", - name: "Kimi K2.6", - family: "kimi-k2.6", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 1.2, output: 4.5, cache_read: 0.2 }, - limit: { context: 262144, output: 131000 }, - }, - "moonshotai/Kimi-K2.5": { - id: "moonshotai/Kimi-K2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: true, - temperature: true, - knowledge: "2026-01", - release_date: "2026-01-27", - last_updated: "2026-01-27", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.5, output: 2.8 }, - limit: { context: 262144, output: 262144 }, - }, - "MiniMaxAI/MiniMax-M2.5": { - id: "MiniMaxAI/MiniMax-M2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMaxAI/MiniMax-M2.7": { - id: "MiniMaxAI/MiniMax-M2.7", - name: "MiniMax-M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06 }, - limit: { context: 202752, output: 131072 }, - }, - }, - }, - "qihang-ai": { - id: "qihang-ai", - env: ["QIHANG_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.qhaigc.net/v1", - name: "QiHang", - doc: "https://www.qhaigc.net/docs", - models: { - "claude-opus-4-5-20251101": { - id: "claude-opus-4-5-20251101", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03", - release_date: "2025-11-01", - last_updated: "2025-11-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.71, output: 3.57 }, - limit: { context: 200000, output: 32000 }, - }, - "gemini-3-flash-preview": { - id: "gemini-3-flash-preview", - name: "Gemini 3 Flash Preview", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.07, output: 0.43, context_over_200k: { input: 0.07, output: 0.43 } }, - limit: { context: 1048576, output: 65536 }, - }, - "gpt-5-mini": { - id: "gpt-5-mini", - name: "GPT-5-Mini", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-09-30", - release_date: "2025-09-15", - last_updated: "2025-09-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.04, output: 0.29 }, - limit: { context: 200000, output: 64000 }, - }, - "gemini-3-pro-preview": { - id: "gemini-3-pro-preview", - name: "Gemini 3 Pro Preview", - family: "gemini-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-11", - release_date: "2025-11-19", - last_updated: "2025-11-19", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.57, output: 3.43 }, - limit: { context: 1000000, output: 65000 }, - }, - "claude-sonnet-4-5-20250929": { - id: "claude-sonnet-4-5-20250929", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.43, output: 2.14 }, - limit: { context: 200000, output: 64000 }, - }, - "gpt-5.2": { - id: "gpt-5.2", - name: "GPT-5.2", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 2 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gpt-5.2-codex": { - id: "gpt-5.2-codex", - name: "GPT-5.2 Codex", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2025-12-11", - last_updated: "2025-12-11", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 1.14 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "gemini-2.5-flash": { - id: "gemini-2.5-flash", - name: "Gemini 2.5 Flash", - family: "gemini-flash", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2025-12-17", - last_updated: "2025-12-17", - modalities: { input: ["text", "image", "video", "audio", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.09, output: 0.71, context_over_200k: { input: 0.09, output: 0.71 } }, - limit: { context: 1048576, output: 65536 }, - }, - "claude-haiku-4-5-20251001": { - id: "claude-haiku-4-5-20251001", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-10-01", - last_updated: "2025-10-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.14, output: 0.71 }, - limit: { context: 200000, output: 64000 }, - }, - }, - }, - "tencent-tokenhub": { - id: "tencent-tokenhub", - env: ["TENCENT_TOKENHUB_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://tokenhub.tencentmaas.com/v1", - name: "Tencent TokenHub", - doc: "https://cloud.tencent.com/document/product/1823/130050", - models: { - "hy3-preview": { - id: "hy3-preview", - name: "Hy3 preview", - family: "Hy", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-04-20", - last_updated: "2026-04-20", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 256000, output: 64000 }, - }, - }, - }, - anthropic: { - id: "anthropic", - env: ["ANTHROPIC_API_KEY"], - npm: "@ai-sdk/anthropic", - name: "Anthropic", - doc: "https://docs.anthropic.com/en/docs/about-claude/models", - models: { - "claude-3-sonnet-20240229": { - id: "claude-3-sonnet-20240229", - name: "Claude Sonnet 3", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-08-31", - release_date: "2024-03-04", - last_updated: "2024-03-04", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 0.3 }, - limit: { context: 200000, output: 4096 }, - }, - "claude-haiku-4-5": { - id: "claude-haiku-4-5", - name: "Claude Haiku 4.5 (latest)", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-opus-4-5-20251101": { - id: "claude-opus-4-5-20251101", - name: "Claude Opus 4.5", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-01", - last_updated: "2025-11-01", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-3-opus-20240229": { - id: "claude-3-opus-20240229", - name: "Claude Opus 3", - family: "claude-opus", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-08-31", - release_date: "2024-02-29", - last_updated: "2024-02-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 4096 }, - }, - "claude-3-5-haiku-20241022": { - id: "claude-3-5-haiku-20241022", - name: "Claude Haiku 3.5", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07-31", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4, cache_read: 0.08, cache_write: 1 }, - limit: { context: 200000, output: 8192 }, - }, - "claude-3-5-sonnet-20241022": { - id: "claude-3-5-sonnet-20241022", - name: "Claude Sonnet 3.5 v2", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04-30", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 8192 }, - }, - "claude-sonnet-4-6": { - id: "claude-sonnet-4-6", - name: "Claude Sonnet 4.6", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 1000000, output: 64000 }, - }, - "claude-opus-4-0": { - id: "claude-opus-4-0", - name: "Claude Opus 4 (latest)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "claude-opus-4-7": { - id: "claude-opus-4-7", - name: "Claude Opus 4.7", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - }, - "claude-3-haiku-20240307": { - id: "claude-3-haiku-20240307", - name: "Claude Haiku 3", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2023-08-31", - release_date: "2024-03-13", - last_updated: "2024-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.25, output: 1.25, cache_read: 0.03, cache_write: 0.3 }, - limit: { context: 200000, output: 4096 }, - }, - "claude-sonnet-4-5-20250929": { - id: "claude-sonnet-4-5-20250929", - name: "Claude Sonnet 4.5", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-3-5-haiku-latest": { - id: "claude-3-5-haiku-latest", - name: "Claude Haiku 3.5 (latest)", - family: "claude-haiku", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-07-31", - release_date: "2024-10-22", - last_updated: "2024-10-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 4, cache_read: 0.08, cache_write: 1 }, - limit: { context: 200000, output: 8192 }, - }, - "claude-opus-4-1": { - id: "claude-opus-4-1", - name: "Claude Opus 4.1 (latest)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "claude-sonnet-4-0": { - id: "claude-sonnet-4-0", - name: "Claude Sonnet 4 (latest)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-3-5-sonnet-20240620": { - id: "claude-3-5-sonnet-20240620", - name: "Claude Sonnet 3.5", - family: "claude-sonnet", - attachment: true, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2024-04-30", - release_date: "2024-06-20", - last_updated: "2024-06-20", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 8192 }, - }, - "claude-opus-4-5": { - id: "claude-opus-4-5", - name: "Claude Opus 4.5 (latest)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-11-24", - last_updated: "2025-11-24", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-opus-4-1-20250805": { - id: "claude-opus-4-1-20250805", - name: "Claude Opus 4.1", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - "claude-haiku-4-5-20251001": { - id: "claude-haiku-4-5-20251001", - name: "Claude Haiku 4.5", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2025-10-15", - last_updated: "2025-10-15", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-sonnet-4-20250514": { - id: "claude-sonnet-4-20250514", - name: "Claude Sonnet 4", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-opus-4-6": { - id: "claude-opus-4-6", - name: "Claude Opus 4.6", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-03-13", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 }, - limit: { context: 1000000, output: 128000 }, - experimental: { - modes: { - fast: { - cost: { input: 30, output: 150, cache_read: 3, cache_write: 37.5 }, - provider: { body: { speed: "fast" }, headers: { "anthropic-beta": "fast-mode-2026-02-01" } }, - }, - }, - }, - }, - "claude-3-7-sonnet-20250219": { - id: "claude-3-7-sonnet-20250219", - name: "Claude Sonnet 3.7", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10-31", - release_date: "2025-02-19", - last_updated: "2025-02-19", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-sonnet-4-5": { - id: "claude-sonnet-4-5", - name: "Claude Sonnet 4.5 (latest)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2025-09-29", - last_updated: "2025-09-29", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 }, - limit: { context: 200000, output: 64000 }, - }, - "claude-opus-4-20250514": { - id: "claude-opus-4-20250514", - name: "Claude Opus 4", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2025-05-22", - last_updated: "2025-05-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 }, - limit: { context: 200000, output: 32000 }, - }, - }, - }, - modelscope: { - id: "modelscope", - env: ["MODELSCOPE_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api-inference.modelscope.cn/v1", - name: "ModelScope", - doc: "https://modelscope.cn/docs/model-service/API-Inference/intro", - models: { - "Qwen/Qwen3-30B-A3B-Thinking-2507": { - id: "Qwen/Qwen3-30B-A3B-Thinking-2507", - name: "Qwen3 30B A3B Thinking 2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-30", - last_updated: "2025-07-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 32768 }, - }, - "Qwen/Qwen3-30B-A3B-Instruct-2507": { - id: "Qwen/Qwen3-30B-A3B-Instruct-2507", - name: "Qwen3 30B A3B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-30", - last_updated: "2025-07-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 16384 }, - }, - "Qwen/Qwen3-235B-A22B-Instruct-2507": { - id: "Qwen/Qwen3-235B-A22B-Instruct-2507", - name: "Qwen3 235B A22B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-04-28", - last_updated: "2025-07-21", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 131072 }, - }, - "Qwen/Qwen3-Coder-30B-A3B-Instruct": { - id: "Qwen/Qwen3-Coder-30B-A3B-Instruct", - name: "Qwen3 Coder 30B A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-31", - last_updated: "2025-07-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 65536 }, - }, - "Qwen/Qwen3-235B-A22B-Thinking-2507": { - id: "Qwen/Qwen3-235B-A22B-Thinking-2507", - name: "Qwen3-235B-A22B-Thinking-2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-25", - last_updated: "2025-07-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 262144, output: 131072 }, - }, - "ZhipuAI/GLM-4.5": { - id: "ZhipuAI/GLM-4.5", - name: "GLM-4.5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 131072, output: 98304 }, - }, - "ZhipuAI/GLM-4.6": { - id: "ZhipuAI/GLM-4.6", - name: "GLM-4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 202752, output: 98304 }, - }, - }, - }, - "hpc-ai": { - id: "hpc-ai", - env: ["HPC_AI_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.hpc-ai.com/inference/v1", - name: "HPC-AI", - doc: "https://www.hpc-ai.com/doc/docs/quickstart/", - models: { - "zai-org/glm-5.1": { - id: "zai-org/glm-5.1", - name: "GLM 5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-04-08", - last_updated: "2026-04-08", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.66, output: 2, cache_read: 0.12 }, - limit: { context: 202000, output: 202000 }, - }, - "minimax/minimax-m2.5": { - id: "minimax/minimax-m2.5", - name: "MiniMax M2.5", - family: "minimax-m2.5", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: false, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-03-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.14, output: 0.56, cache_read: 0.014 }, - limit: { context: 1000000, output: 131072 }, - }, - "moonshotai/kimi-k2.5": { - id: "moonshotai/kimi-k2.5", - name: "Kimi K2.5", - family: "kimi", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: false, - knowledge: "2025-01-01", - release_date: "2026-01-01", - last_updated: "2026-03-25", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.21, output: 1, cache_read: 0.03 }, - limit: { context: 262144, output: 262144 }, - }, - }, - }, - gitlab: { - id: "gitlab", - env: ["GITLAB_TOKEN"], - npm: "gitlab-ai-provider", - name: "GitLab Duo", - doc: "https://docs.gitlab.com/user/duo_agent_platform/", - models: { - "duo-chat-gpt-5-4-nano": { - id: "duo-chat-gpt-5-4-nano", - name: "Agentic Chat (GPT-5.4 Nano)", - family: "gpt-nano", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "duo-chat-gpt-5-mini": { - id: "duo-chat-gpt-5-mini", - name: "Agentic Chat (GPT-5 Mini)", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-05-30", - release_date: "2026-01-22", - last_updated: "2026-01-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "duo-chat-sonnet-4-6": { - id: "duo-chat-sonnet-4-6", - name: "Agentic Chat (Claude Sonnet 4.6)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-08-31", - release_date: "2026-02-17", - last_updated: "2026-02-17", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 1000000, output: 64000 }, - }, - "duo-chat-gpt-5-2": { - id: "duo-chat-gpt-5-2", - name: "Agentic Chat (GPT-5.2)", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-01-23", - last_updated: "2026-01-23", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "duo-chat-gpt-5-codex": { - id: "duo-chat-gpt-5-codex", - name: "Agentic Chat (GPT-5 Codex)", - family: "gpt-codex", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2026-01-22", - last_updated: "2026-01-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "duo-chat-gpt-5-1": { - id: "duo-chat-gpt-5-1", - name: "Agentic Chat (GPT-5.1)", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2024-09-30", - release_date: "2026-01-22", - last_updated: "2026-01-22", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "duo-chat-gpt-5-2-codex": { - id: "duo-chat-gpt-5-2-codex", - name: "Agentic Chat (GPT-5.2 Codex)", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-01-22", - last_updated: "2026-01-22", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "duo-chat-sonnet-4-5": { - id: "duo-chat-sonnet-4-5", - name: "Agentic Chat (Claude Sonnet 4.5)", - family: "claude-sonnet", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-07-31", - release_date: "2026-01-08", - last_updated: "2026-01-08", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 200000, output: 64000 }, - }, - "duo-chat-gpt-5-4": { - id: "duo-chat-gpt-5-4", - name: "Agentic Chat (GPT-5.4)", - family: "gpt", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-05", - last_updated: "2026-03-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 1050000, input: 922000, output: 128000 }, - }, - "duo-chat-haiku-4-5": { - id: "duo-chat-haiku-4-5", - name: "Agentic Chat (Claude Haiku 4.5)", - family: "claude-haiku", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-02-28", - release_date: "2026-01-08", - last_updated: "2026-01-08", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 200000, output: 64000 }, - }, - "duo-chat-gpt-5-3-codex": { - id: "duo-chat-gpt-5-3-codex", - name: "Agentic Chat (GPT-5.3 Codex)", - family: "gpt-codex", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "duo-chat-gpt-5-4-mini": { - id: "duo-chat-gpt-5-4-mini", - name: "Agentic Chat (GPT-5.4 Mini)", - family: "gpt-mini", - attachment: true, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: false, - knowledge: "2025-08-31", - release_date: "2026-03-17", - last_updated: "2026-03-17", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0 }, - limit: { context: 400000, input: 272000, output: 128000 }, - }, - "duo-chat-opus-4-7": { - id: "duo-chat-opus-4-7", - name: "Agentic Chat (Claude Opus 4.7)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: false, - knowledge: "2026-01-31", - release_date: "2026-04-16", - last_updated: "2026-04-16", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 1000000, output: 64000 }, - }, - "duo-chat-opus-4-5": { - id: "duo-chat-opus-4-5", - name: "Agentic Chat (Claude Opus 4.5)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-03-31", - release_date: "2026-01-08", - last_updated: "2026-01-08", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 200000, output: 64000 }, - }, - "duo-chat-opus-4-6": { - id: "duo-chat-opus-4-6", - name: "Agentic Chat (Claude Opus 4.6)", - family: "claude-opus", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-05-31", - release_date: "2026-02-05", - last_updated: "2026-02-05", - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 1000000, output: 64000 }, - }, - }, - }, - xiaomi: { - id: "xiaomi", - env: ["XIAOMI_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.xiaomimimo.com/v1", - name: "Xiaomi", - doc: "https://platform.xiaomimimo.com/#/docs", - models: { - "mimo-v2.5-pro": { - id: "mimo-v2.5-pro", - name: "MiMo-V2.5-Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3, cache_read: 0.2, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1048576, output: 131072 }, - }, - "mimo-v2-omni": { - id: "mimo-v2-omni", - name: "MiMo-V2-Omni", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0.4, output: 2, cache_read: 0.08 }, - limit: { context: 262144, output: 131072 }, - }, - "mimo-v2.5": { - id: "mimo-v2.5", - name: "MiMo-V2.5", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: true, - cost: { - input: 0.4, - output: 2, - cache_read: 0.08, - context_over_200k: { input: 0.8, output: 4, cache_read: 0.16 }, - }, - limit: { context: 1048576, output: 131072 }, - }, - "mimo-v2-pro": { - id: "mimo-v2-pro", - name: "MiMo-V2-Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 3, cache_read: 0.2, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1048576, output: 131072 }, - }, - "mimo-v2-flash": { - id: "mimo-v2-flash", - name: "MiMo-V2-Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12-01", - release_date: "2025-12-16", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.3, cache_read: 0.01 }, - limit: { context: 262144, output: 65536 }, - }, - }, - }, - clarifai: { - id: "clarifai", - env: ["CLARIFAI_PAT"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.clarifai.com/v2/ext/openai/v1", - name: "Clarifai", - doc: "https://docs.clarifai.com/compute/inference/", - models: { - "arcee_ai/AFM/models/trinity-mini": { - id: "arcee_ai/AFM/models/trinity-mini", - name: "Trinity Mini", - family: "trinity-mini", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2024-10", - release_date: "2025-12", - last_updated: "2026-02-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.045, output: 0.15 }, - limit: { context: 131072, output: 131072 }, - }, - "mistralai/completion/models/Ministral-3-14B-Reasoning-2512": { - id: "mistralai/completion/models/Ministral-3-14B-Reasoning-2512", - name: "Ministral 3 14B Reasoning 2512", - family: "ministral", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-12", - release_date: "2025-12-01", - last_updated: "2025-12-12", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 2.5, output: 1.7 }, - limit: { context: 262144, output: 262144 }, - }, - "mistralai/completion/models/Ministral-3-3B-Reasoning-2512": { - id: "mistralai/completion/models/Ministral-3-3B-Reasoning-2512", - name: "Ministral 3 3B Reasoning 2512", - family: "ministral", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12", - last_updated: "2026-02-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 1.039, output: 0.54825 }, - limit: { context: 262144, output: 262144 }, - }, - "deepseek-ai/deepseek-ocr/models/DeepSeek-OCR": { - id: "deepseek-ai/deepseek-ocr/models/DeepSeek-OCR", - name: "DeepSeek OCR", - family: "deepseek", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-10-20", - last_updated: "2026-02-25", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 0.7 }, - limit: { context: 8192, output: 8192 }, - }, - "openai/chat-completion/models/gpt-oss-20b": { - id: "openai/chat-completion/models/gpt-oss-20b", - name: "GPT OSS 20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-12-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.045, output: 0.18 }, - limit: { context: 131072, output: 16384 }, - }, - "openai/chat-completion/models/gpt-oss-120b-high-throughput": { - id: "openai/chat-completion/models/gpt-oss-120b-high-throughput", - name: "GPT OSS 120B High Throughput", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2026-02-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.09, output: 0.36 }, - limit: { context: 131072, output: 16384 }, - }, - "minimaxai/chat-completion/models/MiniMax-M2_5-high-throughput": { - id: "minimaxai/chat-completion/models/MiniMax-M2_5-high-throughput", - name: "MiniMax-M2.5 High Throughput", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204800, output: 131072 }, - }, - "qwen/qwenCoder/models/Qwen3-Coder-30B-A3B-Instruct": { - id: "qwen/qwenCoder/models/Qwen3-Coder-30B-A3B-Instruct", - name: "Qwen3 Coder 30B A3B Instruct", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-31", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.11458, output: 0.74812 }, - limit: { context: 262144, output: 65536 }, - }, - "qwen/qwenLM/models/Qwen3-30B-A3B-Thinking-2507": { - id: "qwen/qwenLM/models/Qwen3-30B-A3B-Thinking-2507", - name: "Qwen3 30B A3B Thinking 2507", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-31", - last_updated: "2026-02-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.36, output: 1.3 }, - limit: { context: 262144, output: 131072 }, - }, - "qwen/qwenLM/models/Qwen3-30B-A3B-Instruct-2507": { - id: "qwen/qwenLM/models/Qwen3-30B-A3B-Instruct-2507", - name: "Qwen3 30B A3B Instruct 2507", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: true, - structured_output: true, - temperature: true, - release_date: "2025-07-30", - last_updated: "2026-02-25", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.5 }, - limit: { context: 262144, output: 262144 }, - }, - "clarifai/main/models/mm-poly-8b": { - id: "clarifai/main/models/mm-poly-8b", - name: "MM Poly 8B", - family: "mm-poly", - attachment: true, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2025-06", - last_updated: "2026-02-25", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: false, - cost: { input: 0.658, output: 1.11 }, - limit: { context: 32768, output: 4096 }, - }, - "moonshotai/chat-completion/models/Kimi-K2_6": { - id: "moonshotai/chat-completion/models/Kimi-K2_6", - name: "Kimi K2.6", - family: "kimi-k2.6", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - knowledge: "2025-01", - release_date: "2026-04-21", - last_updated: "2026-04-21", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.95, output: 4 }, - limit: { context: 262144, output: 262144 }, - }, - }, - }, - "minimax-cn": { - id: "minimax-cn", - env: ["MINIMAX_API_KEY"], - npm: "@ai-sdk/anthropic", - api: "https://api.minimaxi.com/anthropic/v1", - name: "MiniMax (minimaxi.com)", - doc: "https://platform.minimaxi.com/docs/guides/quickstart", - models: { - "MiniMax-M2": { - id: "MiniMax-M2", - name: "MiniMax-M2", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-10-27", - last_updated: "2025-10-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 196608, output: 128000 }, - }, - "MiniMax-M2.5": { - id: "MiniMax-M2.5", - name: "MiniMax-M2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-12", - last_updated: "2026-02-12", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.03, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.7": { - id: "MiniMax-M2.7", - name: "MiniMax-M2.7", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2, cache_read: 0.06, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.7-highspeed": { - id: "MiniMax-M2.7-highspeed", - name: "MiniMax-M2.7-highspeed", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.4, cache_read: 0.06, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.1": { - id: "MiniMax-M2.1", - name: "MiniMax-M2.1", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-23", - last_updated: "2025-12-23", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 204800, output: 131072 }, - }, - "MiniMax-M2.5-highspeed": { - id: "MiniMax-M2.5-highspeed", - name: "MiniMax-M2.5-highspeed", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-13", - last_updated: "2026-02-13", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.4, cache_read: 0.06, cache_write: 0.375 }, - limit: { context: 204800, output: 131072 }, - }, - }, - }, - "regolo-ai": { - id: "regolo-ai", - env: ["REGOLO_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.regolo.ai/v1", - name: "Regolo AI", - doc: "https://docs.regolo.ai/", - models: { - "mistral-small3.2": { - id: "mistral-small3.2", - name: "Mistral Small 3.2", - family: "mistral-small", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-01-31", - last_updated: "2025-01-31", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.5, output: 2.2 }, - limit: { context: 120000, output: 120000 }, - }, - "qwen3-embedding-8b": { - id: "qwen3-embedding-8b", - name: "Qwen3-Embedding-8B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2026-02-01", - last_updated: "2026-02-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.1, output: 0.1 }, - limit: { context: 32768, output: 8192 }, - }, - "llama-3.3-70b-instruct": { - id: "llama-3.3-70b-instruct", - name: "Llama 3.3 70B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-04-28", - last_updated: "2025-04-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.6, output: 2.7 }, - limit: { context: 128000, output: 16384 }, - }, - "qwen3-reranker-4b": { - id: "qwen3-reranker-4b", - name: "Qwen3-Reranker-4B", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: false, - release_date: "2026-02-01", - last_updated: "2026-02-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.12, output: 0.12 }, - limit: { context: 32768, output: 8192 }, - }, - "mistral-small-4-119b": { - id: "mistral-small-4-119b", - name: "Mistral Small 4 119B", - family: "mistral-small", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-15", - last_updated: "2026-03-15", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: false, - cost: { input: 0.75, output: 3 }, - limit: { context: 256000, output: 16384 }, - }, - "qwen3.5-122b": { - id: "qwen3.5-122b", - name: "Qwen3.5-122B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-01", - last_updated: "2026-02-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.9, output: 3.6 }, - limit: { context: 262144, output: 16384 }, - }, - "qwen-image": { - id: "qwen-image", - name: "Qwen-Image", - family: "qwen", - attachment: false, - reasoning: false, - tool_call: false, - temperature: true, - release_date: "2026-03-01", - last_updated: "2026-03-01", - modalities: { input: ["text"], output: ["image"] }, - open_weights: false, - cost: { input: 0.5, output: 2 }, - limit: { context: 8192, output: 4096 }, - }, - "qwen3-coder-next": { - id: "qwen3-coder-next", - name: "Qwen3-Coder-Next", - family: "qwen", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-01", - last_updated: "2026-03-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 1.2 }, - limit: { context: 262144, output: 16384 }, - }, - "minimax-m2.5": { - id: "minimax-m2.5", - name: "MiniMax 2.5", - family: "minimax", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-10", - last_updated: "2026-03-10", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.8, output: 3.5 }, - limit: { context: 190000, output: 64000 }, - }, - "gpt-oss-20b": { - id: "gpt-oss-20b", - name: "GPT-OSS-20B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-03-01", - last_updated: "2026-03-01", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.4, output: 1.8 }, - limit: { context: 128000, output: 16384 }, - }, - "qwen3.5-9b": { - id: "qwen3.5-9b", - name: "Qwen3.5-9B", - family: "qwen", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2026-02-01", - last_updated: "2026-02-01", - modalities: { input: ["text", "image"], output: ["text"] }, - open_weights: true, - cost: { input: 0.15, output: 0.6 }, - limit: { context: 262144, output: 8192 }, - }, - "gpt-oss-120b": { - id: "gpt-oss-120b", - name: "GPT-OSS-120B", - family: "gpt-oss", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-08-05", - last_updated: "2025-08-05", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 1, output: 4.2 }, - limit: { context: 128000, output: 16384 }, - }, - "llama-3.1-8b-instruct": { - id: "llama-3.1-8b-instruct", - name: "Llama 3.1 8B Instruct", - family: "llama", - attachment: false, - reasoning: false, - tool_call: true, - temperature: true, - release_date: "2025-04-07", - last_updated: "2025-04-07", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0.05, output: 0.25 }, - limit: { context: 120000, output: 120000 }, - }, - }, - }, - "xiaomi-token-plan-ams": { - id: "xiaomi-token-plan-ams", - env: ["XIAOMI_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://token-plan-ams.xiaomimimo.com/v1", - name: "Xiaomi Token Plan (Europe)", - doc: "https://platform.xiaomimimo.com/#/docs", - models: { - "mimo-v2-tts": { - id: "mimo-v2-tts", - name: "MiMo-V2-TTS", - family: "mimo", - attachment: false, - reasoning: false, - tool_call: false, - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["audio"] }, - open_weights: true, - cost: { input: 0, output: 0 }, - limit: { context: 8192, output: 16384 }, - }, - "mimo-v2-flash": { - id: "mimo-v2-flash", - name: "MiMo-V2-Flash", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12-01", - release_date: "2025-12-16", - last_updated: "2026-02-04", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 262144, output: 65536 }, - }, - "mimo-v2-pro": { - id: "mimo-v2-pro", - name: "MiMo-V2-Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0, context_over_200k: { input: 2, output: 6, cache_read: 0.4 } }, - limit: { context: 1048576, output: 131072 }, - }, - "mimo-v2.5": { - id: "mimo-v2.5", - name: "MiMo-V2.5", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text", "image", "audio", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, context_over_200k: { input: 0, output: 0, cache_read: 0 } }, - limit: { context: 1048576, output: 131072 }, - }, - "mimo-v2-omni": { - id: "mimo-v2-omni", - name: "MiMo-V2-Omni", - family: "mimo", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-03-18", - last_updated: "2026-03-18", - modalities: { input: ["text", "image", "audio", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, cache_read: 0 }, - limit: { context: 262144, output: 131072 }, - }, - "mimo-v2.5-pro": { - id: "mimo-v2.5-pro", - name: "MiMo-V2.5-Pro", - family: "mimo", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2024-12", - release_date: "2026-04-22", - last_updated: "2026-04-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, context_over_200k: { input: 0, output: 0, cache_read: 0 } }, - limit: { context: 1048576, output: 131072 }, - }, - }, - }, - zhipuai: { - id: "zhipuai", - env: ["ZHIPU_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://open.bigmodel.cn/api/paas/v4", - name: "Zhipu AI", - doc: "https://docs.z.ai/guides/overview/pricing", - models: { - "glm-5v-turbo": { - id: "glm-5v-turbo", - name: "GLM-5V-Turbo", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-04-01", - last_updated: "2026-04-01", - modalities: { input: ["text", "image", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 5, output: 22, cache_read: 1.2, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "glm-5": { - id: "glm-5", - name: "GLM-5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - release_date: "2026-02-11", - last_updated: "2026-02-11", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 1, output: 3.2, cache_read: 0.2, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "glm-5.1": { - id: "glm-5.1", - name: "GLM-5.1", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - structured_output: true, - temperature: true, - release_date: "2026-03-27", - last_updated: "2026-03-27", - modalities: { input: ["text"], output: ["text"] }, - open_weights: false, - cost: { input: 6, output: 24, cache_read: 1.3, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "glm-4.7-flash": { - id: "glm-4.7-flash", - name: "GLM-4.7-Flash", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "glm-4.5-flash": { - id: "glm-4.5-flash", - name: "GLM-4.5-Flash", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0, output: 0, cache_read: 0, cache_write: 0 }, - limit: { context: 131072, output: 98304 }, - }, - "glm-4.6v": { - id: "glm-4.6v", - name: "GLM-4.6V", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-08", - last_updated: "2025-12-08", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.3, output: 0.9 }, - limit: { context: 128000, output: 32768 }, - }, - "glm-4.6": { - id: "glm-4.6", - name: "GLM-4.6", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-09-30", - last_updated: "2025-09-30", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.11, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - "glm-4.5v": { - id: "glm-4.5v", - name: "GLM-4.5V", - family: "glm", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-08-11", - last_updated: "2025-08-11", - modalities: { input: ["text", "image", "video"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 1.8 }, - limit: { context: 64000, output: 16384 }, - }, - "glm-4.5-air": { - id: "glm-4.5-air", - name: "GLM-4.5-Air", - family: "glm-air", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.2, output: 1.1, cache_read: 0.03, cache_write: 0 }, - limit: { context: 131072, output: 98304 }, - }, - "glm-4.5": { - id: "glm-4.5", - name: "GLM-4.5", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2025-07-28", - last_updated: "2025-07-28", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.11, cache_write: 0 }, - limit: { context: 131072, output: 98304 }, - }, - "glm-4.7-flashx": { - id: "glm-4.7-flashx", - name: "GLM-4.7-FlashX", - family: "glm-flash", - attachment: false, - reasoning: true, - tool_call: true, - temperature: true, - knowledge: "2025-04", - release_date: "2026-01-19", - last_updated: "2026-01-19", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.07, output: 0.4, cache_read: 0.01, cache_write: 0 }, - limit: { context: 200000, output: 131072 }, - }, - "glm-4.7": { - id: "glm-4.7", - name: "GLM-4.7", - family: "glm", - attachment: false, - reasoning: true, - tool_call: true, - interleaved: { field: "reasoning_content" }, - temperature: true, - knowledge: "2025-04", - release_date: "2025-12-22", - last_updated: "2025-12-22", - modalities: { input: ["text"], output: ["text"] }, - open_weights: true, - cost: { input: 0.6, output: 2.2, cache_read: 0.11, cache_write: 0 }, - limit: { context: 204800, output: 131072 }, - }, - }, - }, - nova: { - id: "nova", - env: ["NOVA_API_KEY"], - npm: "@ai-sdk/openai-compatible", - api: "https://api.nova.amazon.com/v1", - name: "Nova", - doc: "https://nova.amazon.com/dev/documentation", - models: { - "nova-2-lite-v1": { - id: "nova-2-lite-v1", - name: "Nova 2 Lite", - family: "nova-lite", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-01", - last_updated: "2025-12-01", - modalities: { input: ["text", "image", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, reasoning: 0 }, - limit: { context: 1000000, output: 64000 }, - }, - "nova-2-pro-v1": { - id: "nova-2-pro-v1", - name: "Nova 2 Pro", - family: "nova-pro", - attachment: true, - reasoning: true, - tool_call: true, - temperature: true, - release_date: "2025-12-03", - last_updated: "2026-01-03", - modalities: { input: ["text", "image", "video", "pdf"], output: ["text"] }, - open_weights: false, - cost: { input: 0, output: 0, reasoning: 0 }, - limit: { context: 1000000, output: 64000 }, - }, - }, - }, -} diff --git a/packages/core/src/models.ts b/packages/core/src/models.ts deleted file mode 100644 index 1c24176844..0000000000 --- a/packages/core/src/models.ts +++ /dev/null @@ -1,235 +0,0 @@ -import path from "path" -import { Context, Duration, Effect, Layer, Option, Schedule, Schema } from "effect" -import { FetchHttpClient, HttpClient, HttpClientRequest } from "effect/unstable/http" -import { Global } from "./global" -import { Flag } from "./flag/flag" -import { Flock } from "./util/flock" -import { Hash } from "./util/hash" -import { AppFileSystem } from "./filesystem" -import { InstallationChannel, InstallationVersion } from "./installation/version" -import * as ModelsRefresh from "./kilocode/models-refresh" // kilocode_change - -export const CatalogModelStatus = Schema.Literals(["alpha", "beta", "deprecated"]) -export type CatalogModelStatus = typeof CatalogModelStatus.Type - -const USER_AGENT = `opencode/${InstallationChannel}/${InstallationVersion}/${Flag.KILO_CLIENT}` - -const CostTier = Schema.Struct({ - input: Schema.Finite, - output: Schema.Finite, - cache_read: Schema.optional(Schema.Finite), - cache_write: Schema.optional(Schema.Finite), - tier: Schema.Struct({ - type: Schema.Literal("context"), - size: Schema.Finite, - }), -}) - -const Cost = Schema.Struct({ - input: Schema.Finite, - output: Schema.Finite, - cache_read: Schema.optional(Schema.Finite), - cache_write: Schema.optional(Schema.Finite), - tiers: Schema.optional(Schema.Array(CostTier)), - context_over_200k: Schema.optional( - Schema.Struct({ - input: Schema.Finite, - output: Schema.Finite, - cache_read: Schema.optional(Schema.Finite), - cache_write: Schema.optional(Schema.Finite), - }), - ), -}) - -export const Model = Schema.Struct({ - id: Schema.String, - name: Schema.String, - family: Schema.optional(Schema.String), - release_date: Schema.String, - attachment: Schema.Boolean, - reasoning: Schema.Boolean, - temperature: Schema.Boolean, - tool_call: Schema.Boolean, - interleaved: Schema.optional( - Schema.Union([ - Schema.Literal(true), - Schema.Struct({ - field: Schema.Literals(["reasoning_content", "reasoning_details"]), - }), - ]), - ), - cost: Schema.optional(Cost), - limit: Schema.Struct({ - context: Schema.Finite, - input: Schema.optional(Schema.Finite), - output: Schema.Finite, - }), - modalities: Schema.optional( - Schema.Struct({ - input: Schema.Array(Schema.Literals(["text", "audio", "image", "video", "pdf"])), - output: Schema.Array(Schema.Literals(["text", "audio", "image", "video", "pdf"])), - }), - ), - // kilocode_change start - preserve Kilo catalog metadata - recommendedIndex: Schema.optional(Schema.Finite), - prompt: Schema.optional(Schema.String), - isFree: Schema.optional(Schema.Boolean), - mayTrainOnYourPrompts: Schema.optional(Schema.Boolean), - ai_sdk_provider: Schema.optional(Schema.String), - // kilocode_change end - experimental: Schema.optional( - Schema.Struct({ - modes: Schema.optional( - Schema.Record( - Schema.String, - Schema.Struct({ - cost: Schema.optional(Cost), - provider: Schema.optional( - Schema.Struct({ - body: Schema.optional(Schema.Record(Schema.String, Schema.MutableJson)), - headers: Schema.optional(Schema.Record(Schema.String, Schema.String)), - }), - ), - }), - ), - ), - }), - ), - status: Schema.optional(CatalogModelStatus), - provider: Schema.optional( - Schema.Struct({ npm: Schema.optional(Schema.String), api: Schema.optional(Schema.String) }), - ), -}) -export type Model = Schema.Schema.Type - -export const Provider = Schema.Struct({ - api: Schema.optional(Schema.String), - name: Schema.String, - env: Schema.Array(Schema.String), - id: Schema.String, - npm: Schema.optional(Schema.String), - models: Schema.Record(Schema.String, Model), -}) - -export type Provider = Schema.Schema.Type - -export interface Interface { - readonly get: () => Effect.Effect> - readonly refresh: (force?: boolean) => Effect.Effect -} - -export class Service extends Context.Service()("@opencode/ModelsDev") {} - -type Requirements = AppFileSystem.Service | HttpClient.HttpClient - -export const layer: Layer.Layer = Layer.effect( - Service, - Effect.gen(function* () { - const fs = yield* AppFileSystem.Service - const http = HttpClient.filterStatusOk( - (yield* HttpClient.HttpClient).pipe( - HttpClient.retryTransient({ - retryOn: "errors-and-responses", - times: 2, - schedule: Schedule.exponential(200).pipe(Schedule.jittered), - }), - ), - ) - - const source = Flag.KILO_MODELS_URL || "https://models.dev" - const filepath = path.join( - Global.Path.cache, - source === "https://models.dev" ? "models.json" : `models-${Hash.fast(source)}.json`, - ) - const ttl = Duration.minutes(5) - const lockKey = `models-dev:${filepath}` - - const fresh = Effect.fnUntraced(function* () { - const stat = yield* fs.stat(filepath).pipe(Effect.catch(() => Effect.succeed(undefined))) - if (!stat) return false - const mtime = Option.getOrElse(stat.mtime, () => new Date(0)).getTime() - return Date.now() - mtime < Duration.toMillis(ttl) - }) - - const fetchApi = Effect.fn("ModelsDev.fetchApi")(function* () { - return yield* HttpClientRequest.get(`${source}/api.json`).pipe( - HttpClientRequest.setHeader("User-Agent", USER_AGENT), - http.execute, - Effect.flatMap((res) => res.text), - Effect.timeout("10 seconds"), - ) - }) - - const loadFromDisk = fs.readJson(Flag.KILO_MODELS_PATH ?? filepath).pipe( - Effect.catch(() => Effect.succeed(undefined)), - Effect.map((v) => v as Record | undefined), - ) - - // Bundled at build time; absent in dev — `tryPromise` covers both. - const loadSnapshot = Effect.tryPromise({ - // @ts-ignore — generated at build time, may not exist in dev - try: () => import("./models-snapshot.js").then((m) => m.snapshot as Record | undefined), - catch: () => undefined, - }).pipe(Effect.catch(() => Effect.succeed(undefined))) - - const fetchAndWrite = Effect.fn("ModelsDev.fetchAndWrite")(function* () { - const text = yield* fetchApi() - yield* fs.writeWithDirs(filepath, text) - return text - }) - - const populate = Effect.gen(function* () { - const fromDisk = yield* loadFromDisk - if (fromDisk) return fromDisk - const snapshot = yield* loadSnapshot - if (snapshot) return snapshot - if (Flag.KILO_DISABLE_MODELS_FETCH) return {} - // Flock is cross-process: concurrent opencode CLIs can race on this cache file. - const text = yield* Effect.scoped( - Effect.gen(function* () { - yield* Flock.effect(lockKey) - return yield* fetchAndWrite() - }), - ) - return JSON.parse(text) as Record - }).pipe(Effect.withSpan("ModelsDev.populate"), Effect.orDie) - - const [cachedGet, invalidate] = yield* Effect.cachedInvalidateWithTTL(populate, Duration.infinity) - - const get = (): Effect.Effect> => cachedGet - - const refresh = Effect.fn("ModelsDev.refresh")(function* (force = false) { - if (!force && (yield* fresh())) return - yield* Effect.scoped( - Effect.gen(function* () { - yield* Flock.effect(lockKey) - // Re-check under the lock: another process may have refreshed between - // our outer check and lock acquisition. - if (!force && (yield* fresh())) return - yield* fetchAndWrite() - yield* invalidate - yield* ModelsRefresh.notify() // kilocode_change - }), - ).pipe( - Effect.tapCause((cause) => - Effect.logError("Failed to fetch models.dev").pipe(Effect.annotateLogs("cause", cause)), - ), - Effect.ignore, - ) - }) - - if (!Flag.KILO_DISABLE_MODELS_FETCH && !process.argv.includes("--get-yargs-completions")) { - // Schedule.spaced runs the effect once, then waits between completions. - yield* Effect.forkScoped(refresh().pipe(Effect.repeat(Schedule.spaced("60 minutes")), Effect.ignore)) - } - - return Service.of({ get, refresh }) - }), -) - -export const defaultLayer: Layer.Layer = layer.pipe( - Layer.provide(FetchHttpClient.layer), - Layer.provide(AppFileSystem.defaultLayer), -) - -export * as ModelsDev from "./models" diff --git a/packages/core/src/npm.ts b/packages/core/src/npm.ts index 8dac8faf01..f3398e8391 100644 --- a/packages/core/src/npm.ts +++ b/packages/core/src/npm.ts @@ -4,9 +4,11 @@ import path from "path" import npa from "npm-package-arg" import { Effect, Schema, Context, Layer, Option, FileSystem } from "effect" import { NodeFileSystem } from "@effect/platform-node" -import { AppFileSystem } from "./filesystem" +import { FSUtil } from "./fs-util" import { Global } from "./global" import { EffectFlock } from "./util/effect-flock" +import { LayerNode } from "./effect/layer-node" +import { filesystem } from "./effect/layer-node-platform" import { makeRuntime } from "./effect/runtime" import { NpmConfig } from "./npm-config" @@ -70,7 +72,7 @@ interface ArboristTree { export const layer = Layer.effect( Service, Effect.gen(function* () { - const afs = yield* AppFileSystem.Service + const afs = yield* FSUtil.Service const global = yield* Global.Service const fs = yield* FileSystem.FileSystem const flock = yield* EffectFlock.Service @@ -246,10 +248,11 @@ export const layer = Layer.effect( export const defaultLayer = layer.pipe( Layer.provide(EffectFlock.layer), - Layer.provide(AppFileSystem.layer), + Layer.provide(FSUtil.layer), Layer.provide(Global.layer), Layer.provide(NodeFileSystem.layer), ) +export const node = LayerNode.make(layer, [FSUtil.node, Global.node, filesystem, EffectFlock.node]) const { runPromise } = makeRuntime(Service, defaultLayer) diff --git a/packages/core/src/observability.ts b/packages/core/src/observability.ts new file mode 100644 index 0000000000..faffb27333 --- /dev/null +++ b/packages/core/src/observability.ts @@ -0,0 +1,21 @@ +export * as Observability from "./observability" + +import { NodeFileSystem } from "@effect/platform-node" +import { Effect, Layer, Logger, References } from "effect" +import { FetchHttpClient } from "effect/unstable/http" +import { OtlpSerialization } from "effect/unstable/observability" +import { Logging } from "./observability/logging" +import { Otlp } from "./observability/otlp" + +export const layer = Layer.unwrap( + Effect.gen(function* () { + const logs = Logger.layer([...Logging.loggers(), ...Otlp.loggers()], { mergeWithExisting: false }).pipe( + Layer.provide(NodeFileSystem.layer), + Layer.provide(OtlpSerialization.layerJson), + Layer.provide(FetchHttpClient.layer), + Layer.orDie, + Layer.merge(Layer.succeed(References.MinimumLogLevel, Logging.minimumLogLevel())), + ) + return Layer.merge(logs, yield* Effect.promise(Otlp.tracingLayer)) + }), +) diff --git a/packages/core/src/observability/logging.ts b/packages/core/src/observability/logging.ts new file mode 100644 index 0000000000..e8576fcd9f --- /dev/null +++ b/packages/core/src/observability/logging.ts @@ -0,0 +1,71 @@ +import { Formatter, Logger, type LogLevel } from "effect" +import path from "path" +import { Global } from "../global" +import { runID } from "./shared" + +function formatter(id: string = runID) { + return Logger.map(Logger.formatStructured, (output) => { + const messages = Array.isArray(output.message) ? output.message : [output.message] + return [ + ["timestamp", output.timestamp], + ["level", output.level], + ["run", id], + ...messages.flatMap((value) => (plain(value) ? flatten(value) : [["message", value] as const])), + ...(output.cause === undefined ? [] : [["cause", output.cause] as const]), + ...flatten(output.spans), + ...flatten(output.annotations), + ] + .map(([key, value]) => `${key}=${format(value)}`) + .join(" ") + }) +} + +function flatten( + input: Record, + prefix = "", + seen = new WeakSet(), +): Array { + if (seen.has(input)) return [[prefix, "[Circular]"]] + seen.add(input) + const entries = Object.entries(input) + if (entries.length === 0 && prefix) return [[prefix, input]] + return entries.flatMap(([key, value]) => { + const path = prefix ? `${prefix}.${key}` : key + return plain(value) ? flatten(value, path, seen) : [[path, value] as const] + }) +} + +function plain(input: unknown): input is Record { + if (input === null || typeof input !== "object" || Array.isArray(input)) return false + const prototype = Object.getPrototypeOf(input) + return prototype === Object.prototype || prototype === null +} + +function format(input: unknown) { + const value = typeof input === "string" ? input : Formatter.format(input) + return /^[^\s="\\]+$/.test(value) ? value : JSON.stringify(value) +} + +export function fileLogger(file = path.join(Global.Path.log, "opencode.log"), id: string = runID) { + // Do not set batchWindow to 0; it causes high idle CPU usage. + return Logger.toFile(formatter(id), file, { flag: "a" }) +} + +const stderrLogger = Logger.make((options) => process.stderr.write(formatter().log(options) + "\n")) + +export function minimumLogLevel() { + const value = process.env.KILO_LOG_LEVEL?.toUpperCase() + const levels = { + DEBUG: "Debug", + INFO: "Info", + WARN: "Warn", + ERROR: "Error", + } as const satisfies Record + return value && value in levels ? levels[value as keyof typeof levels] : levels.INFO +} + +export function loggers() { + return process.env.KILO_PRINT_LOGS === "1" ? [fileLogger(), stderrLogger] : [fileLogger()] +} + +export * as Logging from "./logging" diff --git a/packages/core/src/observability/otlp.ts b/packages/core/src/observability/otlp.ts new file mode 100644 index 0000000000..f2f49015fa --- /dev/null +++ b/packages/core/src/observability/otlp.ts @@ -0,0 +1,79 @@ +import { Layer } from "effect" +import { OtlpLogger } from "effect/unstable/observability" +import { Flag } from "../flag/flag" +import { InstallationChannel, InstallationVersion } from "../installation/version" +import { runID } from "./shared" + +const endpoint = Flag.OTEL_EXPORTER_OTLP_ENDPOINT + +const headers = Flag.OTEL_EXPORTER_OTLP_HEADERS + ? Flag.OTEL_EXPORTER_OTLP_HEADERS.split(",").reduce( + (acc, entry) => { + const [key, ...value] = entry.split("=") + acc[key] = value.join("=") + return acc + }, + {} as Record, + ) + : undefined + +function resourceAttributes() { + const value = process.env.OTEL_RESOURCE_ATTRIBUTES + if (!value) return {} + try { + return Object.fromEntries( + value.split(",").map((entry) => { + const index = entry.indexOf("=") + if (index < 1) throw new Error("Invalid OTEL_RESOURCE_ATTRIBUTES entry") + return [decodeURIComponent(entry.slice(0, index)), decodeURIComponent(entry.slice(index + 1))] + }), + ) + } catch { + return {} + } +} + +export function resource(): { serviceName: string; serviceVersion: string; attributes: Record } { + return { + serviceName: "opencode", + serviceVersion: InstallationVersion, + attributes: { + ...resourceAttributes(), + "deployment.environment.name": InstallationChannel, + "opencode.client": Flag.KILO_CLIENT, + "opencode.run": runID, + "service.instance.id": runID, + }, + } +} + +export function loggers() { + if (!endpoint) return [] + return [OtlpLogger.make({ url: `${endpoint}/v1/logs`, resource: resource(), headers })] +} + +export async function tracingLayer() { + if (!endpoint) return Layer.empty + const NodeSdk = await import("@effect/opentelemetry/NodeSdk") + const OTLP = await import("@opentelemetry/exporter-trace-otlp-http") + const SdkBase = await import("@opentelemetry/sdk-trace-base") + const { AsyncLocalStorageContextManager } = await import("@opentelemetry/context-async-hooks") + const { context } = await import("@opentelemetry/api") + + // The Effect Node SDK does not register a global context manager, but the AI SDK uses it to parent spans. + const manager = new AsyncLocalStorageContextManager() + manager.enable() + context.setGlobalContextManager(manager) + + return NodeSdk.layer(() => ({ + resource: resource(), + spanProcessor: new SdkBase.BatchSpanProcessor( + new OTLP.OTLPTraceExporter({ + url: `${endpoint}/v1/traces`, + headers, + }), + ), + })) +} + +export * as Otlp from "./otlp" diff --git a/packages/core/src/observability/shared.ts b/packages/core/src/observability/shared.ts new file mode 100644 index 0000000000..76393aacce --- /dev/null +++ b/packages/core/src/observability/shared.ts @@ -0,0 +1 @@ +export const runID = crypto.randomUUID().slice(0, 8) diff --git a/packages/core/src/patch.ts b/packages/core/src/patch.ts new file mode 100644 index 0000000000..a4370d44aa --- /dev/null +++ b/packages/core/src/patch.ts @@ -0,0 +1,197 @@ +export * as Patch from "./patch" + +export type Hunk = + | { readonly type: "add"; readonly path: string; readonly contents: string } + | { readonly type: "delete"; readonly path: string } + | { + readonly type: "update" + readonly path: string + readonly movePath?: string + readonly chunks: ReadonlyArray + } + +export interface UpdateFileChunk { + readonly oldLines: ReadonlyArray + readonly newLines: ReadonlyArray + readonly changeContext?: string + readonly endOfFile?: boolean +} + +export interface FileUpdate { + readonly content: string + readonly bom: boolean +} + +export function parse(patchText: string): ReadonlyArray { + const lines = stripHeredoc(patchText.trim()).split("\n") + const begin = lines.findIndex((line) => line.trim() === "*** Begin Patch") + const end = lines.findIndex((line) => line.trim() === "*** End Patch") + if (begin === -1 || end === -1 || begin >= end) throw new Error("Invalid patch format: missing Begin/End markers") + + const hunks: Hunk[] = [] + let index = begin + 1 + while (index < end) { + const line = lines[index]! + if (line.startsWith("*** Add File:")) { + const path = line.slice("*** Add File:".length).trim() + if (!path) throw new Error("Invalid add file path") + const parsed = parseAdd(lines, index + 1) + hunks.push({ type: "add", path, contents: parsed.content }) + index = parsed.next + continue + } + if (line.startsWith("*** Delete File:")) { + const path = line.slice("*** Delete File:".length).trim() + if (!path) throw new Error("Invalid delete file path") + hunks.push({ type: "delete", path }) + index++ + continue + } + if (line.startsWith("*** Update File:")) { + const path = line.slice("*** Update File:".length).trim() + if (!path) throw new Error("Invalid update file path") + let next = index + 1 + let movePath: string | undefined + if (lines[next]?.startsWith("*** Move to:")) { + movePath = lines[next]!.slice("*** Move to:".length).trim() + if (!movePath) throw new Error("Invalid move file path") + next++ + } + const parsed = parseUpdate(lines, next) + if (parsed.chunks.length === 0) throw new Error(`Invalid update hunk for ${path}: expected at least one @@ chunk`) + hunks.push({ type: "update", path, movePath, chunks: parsed.chunks }) + index = parsed.next + continue + } + throw new Error(`Invalid patch line: ${line}`) + } + return hunks +} + +export function derive(path: string, chunks: ReadonlyArray, original: string): FileUpdate { + const source = splitBom(original) + const lines = source.text.split("\n") + if (lines.at(-1) === "") lines.pop() + const replacements = computeReplacements(lines, path, chunks) + const updated = [...lines] + for (const [start, remove, insert] of replacements.toReversed()) updated.splice(start, remove, ...insert) + if (updated.at(-1) !== "") updated.push("") + const next = splitBom(updated.join("\n")) + return { content: next.text, bom: source.bom || next.bom } +} + +export function joinBom(text: string, bom: boolean) { + const stripped = splitBom(text).text + return bom ? `\uFEFF${stripped}` : stripped +} + +function parseAdd(lines: ReadonlyArray, start: number) { + const content: string[] = [] + let index = start + while (index < lines.length && !lines[index]!.startsWith("***")) { + if (!lines[index]!.startsWith("+")) throw new Error(`Invalid add file line: ${lines[index]}`) + content.push(lines[index]!.slice(1)) + index++ + } + return { content: content.join("\n"), next: index } +} + +function parseUpdate(lines: ReadonlyArray, start: number) { + const chunks: UpdateFileChunk[] = [] + let index = start + while (index < lines.length && !lines[index]!.startsWith("***")) { + if (!lines[index]!.startsWith("@@")) { + throw new Error(`Invalid update file line: ${lines[index]}`) + } + const changeContext = lines[index]!.slice(2).trim() || undefined + const oldLines: string[] = [] + const newLines: string[] = [] + let endOfFile = false + index++ + while (index < lines.length && !lines[index]!.startsWith("@@")) { + const line = lines[index]! + if (line === "*** End of File") { + endOfFile = true + index++ + break + } + if (line.startsWith("***")) break + if (line.startsWith(" ")) { + oldLines.push(line.slice(1)) + newLines.push(line.slice(1)) + } else if (line.startsWith("-")) oldLines.push(line.slice(1)) + else if (line.startsWith("+")) newLines.push(line.slice(1)) + else throw new Error(`Invalid update chunk line: ${line}`) + index++ + } + chunks.push({ oldLines, newLines, changeContext, endOfFile: endOfFile || undefined }) + } + return { chunks, next: index } +} + +function computeReplacements(lines: ReadonlyArray, path: string, chunks: ReadonlyArray) { + const replacements: Array]> = [] + let lineIndex = 0 + for (const chunk of chunks) { + if (chunk.changeContext) { + const context = seek(lines, [chunk.changeContext], lineIndex) + if (context === -1) throw new Error(`Failed to find context '${chunk.changeContext}' in ${path}`) + lineIndex = context + 1 + } + if (chunk.oldLines.length === 0) { + replacements.push([lines.length, 0, chunk.newLines]) + continue + } + let oldLines = chunk.oldLines + let newLines = chunk.newLines + let found = seek(lines, oldLines, lineIndex, chunk.endOfFile) + if (found === -1 && oldLines.at(-1) === "") { + oldLines = oldLines.slice(0, -1) + if (newLines.at(-1) === "") newLines = newLines.slice(0, -1) + found = seek(lines, oldLines, lineIndex, chunk.endOfFile) + } + if (found === -1) throw new Error(`Failed to find expected lines in ${path}:\n${chunk.oldLines.join("\n")}`) + replacements.push([found, oldLines.length, newLines]) + lineIndex = found + oldLines.length + } + return replacements.toSorted((left, right) => left[0] - right[0]) +} + +function seek(lines: ReadonlyArray, pattern: ReadonlyArray, start: number, eof = false) { + if (pattern.length === 0) return -1 + for (const compare of [exact, rstrip, trim, normalized]) { + if (eof) { + const offset = lines.length - pattern.length + if (offset >= start && matches(lines, pattern, offset, compare)) return offset + } + for (let offset = start; offset <= lines.length - pattern.length; offset++) { + if (matches(lines, pattern, offset, compare)) return offset + } + } + return -1 +} + +function matches( + lines: ReadonlyArray, + pattern: ReadonlyArray, + offset: number, + compare: (left: string, right: string) => boolean, +) { + return pattern.every((line, index) => compare(lines[offset + index]!, line)) +} + +const exact = (left: string, right: string) => left === right +const rstrip = (left: string, right: string) => left.trimEnd() === right.trimEnd() +const trim = (left: string, right: string) => left.trim() === right.trim() +const normalized = (left: string, right: string) => normalize(left.trim()) === normalize(right.trim()) +const normalize = (value: string) => + value + .replace(/[‘’‚‛]/g, "'") + .replace(/[“”„‟]/g, '"') + .replace(/[‐‑‒–—―]/g, "-") + .replace(/…/g, "...") + .replace(/ /g, " ") +const splitBom = (text: string) => + text.startsWith("\uFEFF") ? { bom: true, text: text.slice(1) } : { bom: false, text } +const stripHeredoc = (input: string) => + input.match(/^(?:cat\s+)?<<['"]?(\w+)['"]?\s*\n([\s\S]*?)\n\1\s*$/)?.[2] ?? input diff --git a/packages/core/src/permission.ts b/packages/core/src/permission.ts new file mode 100644 index 0000000000..bbfc6014e8 --- /dev/null +++ b/packages/core/src/permission.ts @@ -0,0 +1,329 @@ +export * as PermissionV2 from "./permission" + +import { Context, Deferred, Effect as EffectRuntime, Layer, Schema } from "effect" +import { EventV2 } from "./event" +import { Location } from "./location" +import { AgentV2 } from "./agent" +import { SessionV2 } from "./session" +import { SessionStore } from "./session/store" +import { withStatics } from "./schema" +import { Identifier } from "./util/identifier" +import { Wildcard } from "./util/wildcard" +import { PermissionSchema } from "./permission/schema" +import { PermissionSaved } from "./permission/saved" + +export { Effect, Rule, Ruleset } from "./permission/schema" +type Effect = PermissionSchema.Effect +type Rule = PermissionSchema.Rule +type Ruleset = PermissionSchema.Ruleset +const missingAgentPermissions: Ruleset = [{ action: "*", resource: "*", effect: "deny" }] + +export const ID = Schema.String.check(Schema.isStartsWith("per")).pipe( + Schema.brand("PermissionV2.ID"), + withStatics((schema) => ({ create: (id?: string) => schema.make(id ?? "per_" + Identifier.ascending()) })), +) +export type ID = typeof ID.Type + +export const Source = Schema.Union([ + Schema.Struct({ + type: Schema.Literal("tool"), + messageID: Schema.String, + callID: Schema.String, + }), +]).annotate({ identifier: "PermissionV2.Source" }) +export type Source = typeof Source.Type + +const RequestFields = { + sessionID: SessionV2.ID, + action: Schema.String, + resources: Schema.Array(Schema.String), + save: Schema.Array(Schema.String).pipe(Schema.optional), + metadata: Schema.Record(Schema.String, Schema.Unknown).pipe(Schema.optional), + source: Source.pipe(Schema.optional), +} + +export const Request = Schema.Struct({ + id: ID, + ...RequestFields, +}).annotate({ identifier: "PermissionV2.Request" }) +export type Request = typeof Request.Type + +export const Reply = Schema.Literals(["once", "always", "reject"]).annotate({ identifier: "PermissionV2.Reply" }) +export type Reply = typeof Reply.Type + +export const AssertInput = Schema.Struct({ + id: ID.pipe(Schema.optional), + ...RequestFields, + agent: AgentV2.ID.pipe(Schema.optional), +}).annotate({ identifier: "PermissionV2.AssertInput" }) +export type AssertInput = typeof AssertInput.Type + +export const ReplyInput = Schema.Struct({ + requestID: ID, + reply: Reply, + message: Schema.String.pipe(Schema.optional), +}).annotate({ identifier: "PermissionV2.ReplyInput" }) +export type ReplyInput = typeof ReplyInput.Type + +export const AskResult = Schema.Struct({ + id: ID, + effect: PermissionSchema.Effect, +}).annotate({ identifier: "PermissionV2.AskResult" }) +export type AskResult = typeof AskResult.Type + +export const Event = { + Asked: EventV2.define({ type: "permission.v2.asked", schema: Request.fields }), + Replied: EventV2.define({ + type: "permission.v2.replied", + schema: { + sessionID: SessionV2.ID, + requestID: ID, + reply: Reply, + }, + }), +} + +export class RejectedError extends Schema.TaggedErrorClass()("PermissionV2.RejectedError", {}) {} + +export class CorrectedError extends Schema.TaggedErrorClass()("PermissionV2.CorrectedError", { + feedback: Schema.String, +}) {} + +export class DeniedError extends Schema.TaggedErrorClass()("PermissionV2.DeniedError", { + rules: PermissionSchema.Ruleset, +}) {} + +export class NotFoundError extends Schema.TaggedErrorClass()("PermissionV2.NotFoundError", { + requestID: ID, +}) {} + +export type Error = DeniedError | RejectedError | CorrectedError + +export function evaluate(action: string, resource: string, ...rulesets: Ruleset[]): Rule { + return ( + rulesets + .flat() + .findLast((rule) => Wildcard.match(action, rule.action) && Wildcard.match(resource, rule.resource)) ?? { + action, + resource: "*", + effect: "ask", + } + ) +} + +export function merge(...rulesets: Ruleset[]): Ruleset { + return rulesets.flat() +} + +export interface Interface { + readonly ask: (input: AssertInput) => EffectRuntime.Effect + readonly assert: (input: AssertInput) => EffectRuntime.Effect + readonly reply: (input: ReplyInput) => EffectRuntime.Effect + readonly get: (id: ID) => EffectRuntime.Effect + readonly forSession: (sessionID: SessionV2.ID) => EffectRuntime.Effect> + readonly list: () => EffectRuntime.Effect> +} + +export class Service extends Context.Service()("@opencode/v2/Permission") {} + +interface Pending { + readonly request: Request + readonly agent?: AgentV2.ID + readonly deferred: Deferred.Deferred +} + +export const layer = Layer.effect( + Service, + EffectRuntime.gen(function* () { + const events = yield* EventV2.Service + const location = yield* Location.Service + const agents = yield* AgentV2.Service + const sessions = yield* SessionStore.Service + const saved = yield* PermissionSaved.Service + const pending = new Map() + + yield* EffectRuntime.addFinalizer(() => + EffectRuntime.forEach(pending.values(), (item) => Deferred.fail(item.deferred, new RejectedError()), { + discard: true, + }).pipe( + EffectRuntime.ensuring( + EffectRuntime.sync(() => { + pending.clear() + }), + ), + ), + ) + + const savedRules = EffectRuntime.fnUntraced(function* () { + return (yield* saved.list({ projectID: location.project.id })).map( + (item): Rule => ({ action: item.action, resource: item.resource, effect: "allow" }), + ) + }) + + const configured = EffectRuntime.fn("PermissionV2.configured")(function* ( + sessionID: SessionV2.ID, + agentID?: AgentV2.ID, + ) { + const session = yield* sessions.get(sessionID) + if (!session) return yield* new SessionV2.NotFoundError({ sessionID }) + const agent = yield* agents.resolve(agentID ?? session.agent) + return agent?.permissions ?? missingAgentPermissions + }) + + function denied(input: AssertInput, rules: Ruleset) { + return input.resources.some((resource) => evaluate(input.action, resource, rules).effect === "deny") + } + + function relevant(input: AssertInput, rules: Ruleset) { + return rules.filter((rule) => Wildcard.match(input.action, rule.action)) + } + + const evaluateInput = EffectRuntime.fnUntraced(function* (input: AssertInput) { + const rules = yield* configured(input.sessionID, input.agent) + if (denied(input, rules)) return { effect: "deny" as const, rules } + const all = [...rules, ...(yield* savedRules())] + const effects = input.resources.map((resource) => evaluate(input.action, resource, all).effect) + const effect: Effect = effects.includes("deny") ? "deny" : effects.includes("ask") ? "ask" : "allow" + return { effect, rules: all } + }) + + function request(input: AssertInput): Request { + return { + id: input.id ?? ID.create(), + sessionID: input.sessionID, + action: input.action, + resources: input.resources, + save: input.save, + metadata: input.metadata, + source: input.source, + } + } + + const create = (request: Request, agent?: AgentV2.ID) => + EffectRuntime.uninterruptible( + EffectRuntime.gen(function* () { + const deferred = yield* Deferred.make() + const item = { request, agent, deferred } + if (pending.has(request.id)) return yield* EffectRuntime.die(`Duplicate pending permission ID: ${request.id}`) + pending.set(request.id, item) + yield* events + .publish(Event.Asked, request) + .pipe(EffectRuntime.onError(() => EffectRuntime.sync(() => pending.delete(request.id)))) + return item + }), + ) + + const ask = EffectRuntime.fn("PermissionV2.ask")(function* (input: AssertInput) { + const result = yield* evaluateInput(input) + const value = request(input) + if (result.effect === "ask") yield* create(value, input.agent) + return { id: value.id, effect: result.effect } + }) + + const assert = EffectRuntime.fn("PermissionV2.assert")((input: AssertInput) => + EffectRuntime.uninterruptibleMask((restore) => + EffectRuntime.gen(function* () { + const result = yield* evaluateInput(input) + if (result.effect === "deny") { + return yield* new DeniedError({ + rules: relevant(input, result.rules), + }) + } + if (result.effect === "allow") return + const item = yield* create(request(input), input.agent) + return yield* restore(Deferred.await(item.deferred)).pipe( + EffectRuntime.ensuring( + EffectRuntime.sync(() => { + pending.delete(item.request.id) + }), + ), + ) + }), + ), + ) + + const reply = EffectRuntime.fn("PermissionV2.reply")((input: ReplyInput) => + EffectRuntime.uninterruptible( + EffectRuntime.gen(function* () { + const existing = pending.get(input.requestID) + if (!existing) return yield* new NotFoundError({ requestID: input.requestID }) + yield* events.publish(Event.Replied, { + sessionID: existing.request.sessionID, + requestID: existing.request.id, + reply: input.reply, + }) + + if (input.reply === "reject") { + yield* Deferred.fail( + existing.deferred, + input.message ? new CorrectedError({ feedback: input.message }) : new RejectedError(), + ) + pending.delete(input.requestID) + for (const [id, item] of pending) { + if (item.request.sessionID !== existing.request.sessionID) continue + yield* events.publish(Event.Replied, { + sessionID: item.request.sessionID, + requestID: item.request.id, + reply: "reject", + }) + yield* Deferred.fail(item.deferred, new RejectedError()) + pending.delete(id) + } + return + } + + if (input.reply === "always" && existing.request.save?.length) { + yield* saved.add({ + projectID: location.project.id, + action: existing.request.action, + resources: existing.request.save, + }) + } + yield* Deferred.succeed(existing.deferred, undefined) + pending.delete(input.requestID) + if (input.reply !== "always" || !existing.request.save?.length) return + + const rememberedRules = yield* savedRules() + for (const [id, item] of pending) { + const input = { ...item.request } + const rules = yield* configured(item.request.sessionID, item.agent).pipe( + EffectRuntime.catchTag("Session.NotFoundError", () => EffectRuntime.succeed(undefined)), + ) + if (!rules) continue + if (denied(input, rules)) continue + const effective = [...rules, ...rememberedRules] + if ( + !item.request.resources.every( + (resource) => evaluate(item.request.action, resource, effective).effect === "allow", + ) + ) + continue + yield* events.publish(Event.Replied, { + sessionID: item.request.sessionID, + requestID: item.request.id, + reply: "always", + }) + yield* Deferred.succeed(item.deferred, undefined) + pending.delete(id) + } + }), + ), + ) + + const list = EffectRuntime.fn("PermissionV2.list")(function* () { + return Array.from(pending.values(), (item) => item.request) + }) + + const get = EffectRuntime.fn("PermissionV2.get")(function* (id: ID) { + return pending.get(id)?.request + }) + + const forSession = EffectRuntime.fn("PermissionV2.forSession")(function* (sessionID: SessionV2.ID) { + return Array.from(pending.values(), (item) => item.request).filter((request) => request.sessionID === sessionID) + }) + + return Service.of({ ask, assert, reply, get, forSession, list }) + }), +) + +export const locationLayer = layer.pipe(Layer.provideMerge(AgentV2.locationLayer)) diff --git a/packages/core/src/permission/saved.ts b/packages/core/src/permission/saved.ts new file mode 100644 index 0000000000..4c57ef2aa0 --- /dev/null +++ b/packages/core/src/permission/saved.ts @@ -0,0 +1,87 @@ +export * as PermissionSaved from "./saved" + +import { eq } from "drizzle-orm" +import { Context, Effect, Layer, Schema } from "effect" +import { Database } from "../database/database" +import { ProjectV2 } from "../project" +import { withStatics } from "../schema" +import { Identifier } from "../util/identifier" +import { PermissionTable } from "./sql" + +export const ID = Schema.String.pipe( + Schema.brand("PermissionSaved.ID"), + withStatics((schema) => ({ create: () => schema.make("psv_" + Identifier.ascending()) })), +) +export type ID = typeof ID.Type + +export const Info = Schema.Struct({ + id: ID, + projectID: ProjectV2.ID, + action: Schema.String, + resource: Schema.String, +}).annotate({ identifier: "PermissionSaved.Info" }) +export type Info = typeof Info.Type + +export const ListInput = Schema.Struct({ + projectID: ProjectV2.ID.pipe(Schema.optional), +}).annotate({ identifier: "PermissionSaved.ListInput" }) +export type ListInput = typeof ListInput.Type + +export const AddInput = Schema.Struct({ + projectID: ProjectV2.ID, + action: Schema.String, + resources: Schema.Array(Schema.String), +}).annotate({ identifier: "PermissionSaved.AddInput" }) +export type AddInput = typeof AddInput.Type + +export interface Interface { + readonly list: (input?: ListInput) => Effect.Effect> + readonly add: (input: AddInput) => Effect.Effect + readonly remove: (id: ID) => Effect.Effect +} + +export class Service extends Context.Service()("@opencode/v2/PermissionSaved") {} + +export const layer = Layer.effect( + Service, + Effect.gen(function* () { + const { db } = yield* Database.Service + + const list = Effect.fn("PermissionSaved.list")(function* (input?: ListInput) { + const rows = yield* db + .select() + .from(PermissionTable) + .where(input?.projectID ? eq(PermissionTable.project_id, input.projectID) : undefined) + .all() + .pipe(Effect.orDie) + return rows.map( + (row): Info => ({ id: row.id, projectID: row.project_id, action: row.action, resource: row.resource }), + ) + }) + + const add = Effect.fn("PermissionSaved.add")(function* (input: AddInput) { + if (!input.resources.length) return + yield* db + .insert(PermissionTable) + .values( + input.resources.map((resource) => ({ + id: ID.create(), + project_id: input.projectID, + action: input.action, + resource, + })), + ) + .onConflictDoNothing() + .run() + .pipe(Effect.orDie) + }) + + const remove = Effect.fn("PermissionSaved.remove")(function* (id: ID) { + yield* db.delete(PermissionTable).where(eq(PermissionTable.id, id)).run().pipe(Effect.orDie) + }) + + return Service.of({ list, add, remove }) + }), +) + +export const defaultLayer = layer.pipe(Layer.provide(Database.defaultLayer)) diff --git a/packages/core/src/permission/schema.ts b/packages/core/src/permission/schema.ts new file mode 100644 index 0000000000..2d806dbd8c --- /dev/null +++ b/packages/core/src/permission/schema.ts @@ -0,0 +1,16 @@ +export * as PermissionSchema from "./schema" + +import { Schema } from "effect" + +export const Effect = Schema.Literals(["allow", "deny", "ask"]).annotate({ identifier: "PermissionV2.Effect" }) +export type Effect = typeof Effect.Type + +export const Rule = Schema.Struct({ + action: Schema.String, + resource: Schema.String, + effect: Effect, +}).annotate({ identifier: "PermissionV2.Rule" }) +export type Rule = typeof Rule.Type + +export const Ruleset = Schema.Array(Rule).annotate({ identifier: "PermissionV2.Ruleset" }) +export type Ruleset = typeof Ruleset.Type diff --git a/packages/core/src/permission/sql.ts b/packages/core/src/permission/sql.ts new file mode 100644 index 0000000000..c395555d79 --- /dev/null +++ b/packages/core/src/permission/sql.ts @@ -0,0 +1,20 @@ +import { sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core" +import { Timestamps } from "../database/schema.sql" +import { ProjectV2 } from "../project" +import { ProjectTable } from "../project/sql" +import type { PermissionSaved } from "./saved" + +export const PermissionTable = sqliteTable( + "permission", + { + id: text().$type().primaryKey(), + project_id: text() + .$type() + .notNull() + .references(() => ProjectTable.id, { onDelete: "cascade" }), + action: text().notNull(), + resource: text().notNull(), + ...Timestamps, + }, + (table) => [uniqueIndex("permission_project_action_resource_idx").on(table.project_id, table.action, table.resource)], +) diff --git a/packages/core/src/plugin.ts b/packages/core/src/plugin.ts index dfcae94685..aaef65d322 100644 --- a/packages/core/src/plugin.ts +++ b/packages/core/src/plugin.ts @@ -2,27 +2,28 @@ export * as PluginV2 from "./plugin" import { createDraft, finishDraft, type Draft } from "immer" import type { LanguageModelV3 } from "@ai-sdk/provider" -import { type ProviderV2 } from "./provider" -import { Context, Effect, Layer, Schema } from "effect" +import { Context, Effect, Exit, Layer, Schema, Scope } from "effect" import type { ModelV2 } from "./model" +import type { Catalog } from "./catalog" +import { EventV2 } from "./event" +import { KeyedMutex } from "./effect/keyed-mutex" export const ID = Schema.String.pipe(Schema.brand("Plugin.ID")) export type ID = typeof ID.Type +export const Event = { + Added: EventV2.define({ + type: "plugin.added", + schema: { + id: ID, + }, + }), +} + type HookSpec = { - "provider.update": { - input: {} - output: { - provider: ProviderV2.Info - cancel: boolean - } - } - "model.update": { - input: {} - output: { - model: ModelV2.Info - cancel: boolean - } + "catalog.transform": { + input: Catalog.Editor + output: {} } "aisdk.language": { input: { @@ -61,15 +62,24 @@ export type HookFunctions = { export type HookInput = HookSpec[Name]["input"] export type HookOutput = HookSpec[Name]["output"] -export type Effect = Effect.Effect +export type Effect = Effect.Effect export function define(input: { id: ID; effect: Effect.Effect }) { return input } export interface Interface { - readonly add: (input: { id: ID; effect: Effect }) => Effect.Effect + readonly add: (input: { + id: ID + effect: Effect.Effect + }) => Effect.Effect readonly remove: (id: ID) => Effect.Effect + readonly triggerFor: ( + id: ID, + name: Name, + input: HookInput, + output: HookOutput, + ) => Effect.Effect & HookOutput> readonly trigger: ( name: Name, input: HookInput, @@ -85,21 +95,44 @@ export const layer = Layer.effect( let hooks: { id: ID hooks: HookFunctions + scope: Scope.Closeable }[] = [] + const events = yield* EventV2.Service + const scope = yield* Scope.Scope + const locks = KeyedMutex.makeUnsafe() const svc = Service.of({ add: Effect.fn("Plugin.add")(function* (input) { - const result = yield* input.effect - if (!result) return - hooks = [ - ...hooks.filter((item) => item.id !== input.id), - { - id: input.id, - hooks: result, - }, - ] + yield* locks.withLock(input.id)( + Effect.gen(function* () { + const existing = hooks.find((item) => item.id === input.id) + if (existing) yield* Scope.close(existing.scope, Exit.void).pipe(Effect.ignore) + const childScope = yield* Scope.fork(scope) + const result = yield* input.effect.pipe( + Scope.provide(childScope), + Effect.withSpan("Plugin.load", { + attributes: { + "plugin.id": input.id, + }, + }), + Effect.onExit((exit) => (Exit.isFailure(exit) ? Scope.close(childScope, exit) : Effect.void)), + ) + hooks = [ + ...hooks.filter((item) => item.id !== input.id), + { + id: input.id, + hooks: result ?? {}, + scope: childScope, + }, + ] + yield* events.publish(Event.Added, { id: input.id }) + }), + ) }), trigger: Effect.fn("Plugin.trigger")(function* (name, input, output) { + return yield* svc.triggerFor(ID.make("*"), name, input, output) + }), + triggerFor: Effect.fn("Plugin.triggerFor")(function* (id, name, input, output) { const draftEntries = new Map>() const event = { ...input, @@ -114,6 +147,7 @@ export const layer = Layer.effect( } for (const item of hooks) { + if (id !== ID.make("*") && item.id !== id) continue const match = item.hooks[name] if (!match) continue yield* match(event as any).pipe( @@ -133,14 +167,20 @@ export const layer = Layer.effect( return event as any }), remove: Effect.fn("Plugin.remove")(function* (id) { - hooks = hooks.filter((item) => item.id !== id) + yield* locks.withLock(id)( + Effect.gen(function* () { + const existing = hooks.find((item) => item.id === id) + hooks = hooks.filter((item) => item.id !== id) + if (existing) yield* Scope.close(existing.scope, Exit.void).pipe(Effect.ignore) + }), + ) }), }) return svc }), ) -export const defaultLayer = layer +export const locationLayer = layer // opencode // sdcok diff --git a/packages/core/src/plugin/agent.ts b/packages/core/src/plugin/agent.ts new file mode 100644 index 0000000000..e8a8d8bc9d --- /dev/null +++ b/packages/core/src/plugin/agent.ts @@ -0,0 +1,207 @@ +export * as AgentPlugin from "./agent" + +import path from "path" +import { Effect } from "effect" +import { AgentV2 } from "../agent" +import { Global } from "../global" +import { Location } from "../location" +import { PermissionV2 } from "../permission" +import { PluginV2 } from "../plugin" + +const TRUNCATION_GLOB = path.join(Global.Path.data, "tool-output", "*") +const BUILD_SYSTEM = + "You are an AI coding agent. Help the user accomplish software engineering tasks by inspecting the workspace, making targeted changes, and using tools according to the configured permissions." + +const PROMPT_EXPLORE = `You are a file search specialist. You excel at thoroughly navigating and exploring codebases. + +Your strengths: +- Rapidly finding files using glob patterns +- Searching code and text with powerful regex patterns +- Reading and analyzing file contents + +Guidelines: +- Use Glob for broad file pattern matching +- Use Grep for searching file contents with regex +- Use Read when you know the specific file path you need to read +- Adapt your search approach based on the thoroughness level specified by the caller +- Return file paths as absolute paths in your final response +- For clear communication, avoid using emojis +- Do not create any files, or run bash commands that modify the user's system state in any way + +Complete the user's search request efficiently and report your findings clearly.` + +const PROMPT_COMPACTION = `You are an anchored context summarization assistant for coding sessions. + +Summarize only the conversation history you are given. The newest turns may be kept verbatim outside your summary, so focus on the older context that still matters for continuing the work. + +If the prompt includes a block, treat it as the current anchored summary. Update it with the new history by preserving still-true details, removing stale details, and merging in new facts. + +Always follow the exact output structure requested by the user prompt. Keep every section, preserve exact file paths and identifiers when known, and prefer terse bullets over paragraphs. + +Do not answer the conversation itself. Do not mention that you are summarizing, compacting, or merging context. Respond in the same language as the conversation.` + +const PROMPT_TITLE = `You are a title generator. You output ONLY a thread title. Nothing else. + + +Generate a brief title that would help the user find this conversation later. + +Follow all rules in +Use the so you know what a good title looks like. +Your output must be: +- A single line +- <=50 characters +- No explanations + + + +- you MUST use the same language as the user message you are summarizing +- Title must be grammatically correct and read naturally - no word salad +- Never include tool names in the title (e.g. "read tool", "bash tool", "edit tool") +- Focus on the main topic or question the user needs to retrieve +- Vary your phrasing - avoid repetitive patterns like always starting with "Analyzing" +- When a file is mentioned, focus on WHAT the user wants to do WITH the file, not just that they shared it +- Keep exact: technical terms, numbers, filenames, HTTP codes +- Remove: the, this, my, a, an +- Never assume tech stack +- Never use tools +- NEVER respond to questions, just generate a title for the conversation +- The title should NEVER include "summarizing" or "generating" when generating a title +- DO NOT SAY YOU CANNOT GENERATE A TITLE OR COMPLAIN ABOUT THE INPUT +- Always output something meaningful, even if the input is minimal. +- If the user message is short or conversational (e.g. "hello", "lol", "what's up", "hey"): + -> create a title that reflects the user's tone or intent (such as Greeting, Quick check-in, Light chat, Intro message, etc.) + + + +"debug 500 errors in production" -> Debugging production 500 errors +"refactor user service" -> Refactoring user service +"why is app.js failing" -> app.js failure investigation +"implement rate limiting" -> Rate limiting implementation +"how do I connect postgres to my API" -> Postgres API connection +"best practices for React hooks" -> React hooks best practices +"@src/credential.ts can you add refresh token support" -> Credential refresh token support +"@utils/parser.ts this is broken" -> Parser bug fix +"look at @config.json" -> Config review +"@App.tsx add dark mode toggle" -> Dark mode toggle in App +` + +const PROMPT_SUMMARY = `Summarize what was done in this conversation. Write like a pull request description. + +Rules: +- 2-3 sentences max +- Describe the changes made, not the process +- Do not mention running tests, builds, or other validation steps +- Do not explain what the user asked for +- Write in first person (I added..., I fixed...) +- Never ask questions or add new questions +- If the conversation ends with an unanswered question to the user, preserve that exact question +- If the conversation ends with an imperative statement or request to the user (e.g. "Now please run the command and paste the console output"), always include that exact request in the summary` + +export const Plugin = PluginV2.define({ + id: PluginV2.ID.make("agent"), + effect: Effect.gen(function* () { + const agent = yield* AgentV2.Service + const location = yield* Location.Service + const worktree = location.directory + const whitelistedDirs = [TRUNCATION_GLOB, path.join(Global.Path.tmp, "*")] + const readonlyExternalDirectory: PermissionV2.Ruleset = [ + { action: "external_directory", resource: "*", effect: "ask" }, + ...whitelistedDirs.map( + (resource): PermissionV2.Rule => ({ action: "external_directory", resource, effect: "allow" }), + ), + ] + const defaults: PermissionV2.Ruleset = [ + { action: "*", resource: "*", effect: "allow" }, + ...readonlyExternalDirectory, + { action: "question", resource: "*", effect: "deny" }, + { action: "plan_enter", resource: "*", effect: "deny" }, + { action: "plan_exit", resource: "*", effect: "deny" }, + { action: "read", resource: "*", effect: "allow" }, + { action: "read", resource: "*.env", effect: "ask" }, + { action: "read", resource: "*.env.*", effect: "ask" }, + { action: "read", resource: "*.env.example", effect: "allow" }, + ] + + yield* agent.update((editor) => { + editor.update(AgentV2.defaultID, (item) => { + item.description = "The default agent. Executes tools based on configured permissions." + item.system ??= BUILD_SYSTEM + item.mode = "primary" + item.permissions.push( + ...PermissionV2.merge(defaults, [ + { action: "question", resource: "*", effect: "allow" }, + { action: "plan_enter", resource: "*", effect: "allow" }, + ]), + ) + }) + + editor.update(AgentV2.ID.make("plan"), (item) => { + item.description = "Plan mode. Disallows all edit tools." + item.mode = "primary" + item.permissions.push( + ...PermissionV2.merge(defaults, [ + { action: "question", resource: "*", effect: "allow" }, + { action: "plan_exit", resource: "*", effect: "allow" }, + { action: "external_directory", resource: path.join(Global.Path.data, "plans", "*"), effect: "allow" }, + { action: "edit", resource: "*", effect: "deny" }, + { action: "edit", resource: path.join(".opencode", "plans", "*.md"), effect: "allow" }, + { + action: "edit", + resource: path.relative(worktree, path.join(Global.Path.data, "plans", "*.md")), + effect: "allow", + }, + ]), + ) + }) + + editor.update(AgentV2.ID.make("general"), (item) => { + item.description = + "General-purpose agent for researching complex questions and executing multi-step tasks. Use this agent to execute multiple units of work in parallel." + item.mode = "subagent" + item.permissions.push(...PermissionV2.merge(defaults, [{ action: "todowrite", resource: "*", effect: "deny" }])) + }) + + editor.update(AgentV2.ID.make("explore"), (item) => { + item.description = + 'Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. "src/components/**/*.tsx"), search code for keywords (eg. "API endpoints"), or answer questions about the codebase (eg. "how do API endpoints work?"). When calling this agent, specify the desired thoroughness level: "quick" for basic searches, "medium" for moderate exploration, or "very thorough" for comprehensive analysis across multiple locations and naming conventions.' + item.system = PROMPT_EXPLORE + item.mode = "subagent" + item.permissions.push( + ...PermissionV2.merge( + defaults, + [ + { action: "*", resource: "*", effect: "deny" }, + { action: "grep", resource: "*", effect: "allow" }, + { action: "glob", resource: "*", effect: "allow" }, + { action: "webfetch", resource: "*", effect: "allow" }, + { action: "websearch", resource: "*", effect: "allow" }, + { action: "read", resource: "*", effect: "allow" }, + ], + readonlyExternalDirectory, + ), + ) + }) + + editor.update(AgentV2.ID.make("compaction"), (item) => { + item.mode = "primary" + item.hidden = true + item.system = PROMPT_COMPACTION + item.permissions.push(...PermissionV2.merge(defaults, [{ action: "*", resource: "*", effect: "deny" }])) + }) + + editor.update(AgentV2.ID.make("title"), (item) => { + item.mode = "primary" + item.hidden = true + item.system = PROMPT_TITLE + item.permissions.push(...PermissionV2.merge(defaults, [{ action: "*", resource: "*", effect: "deny" }])) + }) + + editor.update(AgentV2.ID.make("summary"), (item) => { + item.mode = "primary" + item.hidden = true + item.system = PROMPT_SUMMARY + item.permissions.push(...PermissionV2.merge(defaults, [{ action: "*", resource: "*", effect: "deny" }])) + }) + }) + }), +}) diff --git a/packages/core/src/plugin/auth.ts b/packages/core/src/plugin/auth.ts deleted file mode 100644 index 503d82852c..0000000000 --- a/packages/core/src/plugin/auth.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Effect } from "effect" -import { AuthV2 } from "../auth" -import { PluginV2 } from "../plugin" - -export const AuthPlugin = PluginV2.define({ - id: PluginV2.ID.make("auth"), - effect: Effect.gen(function* () { - const auth = yield* AuthV2.Service - return { - "provider.update": Effect.fn(function* (evt) { - const account = yield* auth.active(AuthV2.ServiceID.make(evt.provider.id)).pipe(Effect.orDie) - if (!account) return - evt.provider.enabled = { - via: "auth", - service: account.serviceID, - } - if (account.credential.type === "api") { - evt.provider.options.aisdk.provider.apiKey = account.credential.key - Object.assign(evt.provider.options.aisdk.provider, account.credential.metadata ?? {}) - } - if (account.credential.type === "oauth") { - evt.provider.options.aisdk.provider.apiKey = account.credential.access - if (evt.provider.id === "kilo" && account.credential.accountId) { - evt.provider.options.aisdk.provider.kilocodeOrganizationId = account.credential.accountId // kilocode_change - } - } - }), - } - }), -}) diff --git a/packages/core/src/plugin/boot.ts b/packages/core/src/plugin/boot.ts index 74560ac85b..694b0bc564 100644 --- a/packages/core/src/plugin/boot.ts +++ b/packages/core/src/plugin/boot.ts @@ -1,18 +1,50 @@ export * as PluginBoot from "./boot" import { Context, Deferred, Effect, Layer } from "effect" -import { AuthV2 } from "../auth" +import { Credential } from "../credential" +import { Integration } from "../integration" +import { AgentV2 } from "../agent" import { Catalog } from "../catalog" +import { CommandV2 } from "../command" +import { Config } from "../config" +import { ConfigAgentPlugin } from "../config/plugin/agent" +import { ConfigCommandPlugin } from "../config/plugin/command" +import { ConfigSkillPlugin } from "../config/plugin/skill" +import { ConfigReferencePlugin } from "../config/plugin/reference" +import { EventV2 } from "../event" +import { FSUtil } from "../fs-util" +import { Global } from "../global" +import { Location } from "../location" +import { ModelsDev } from "../models-dev" import { Npm } from "../npm" import { PluginV2 } from "../plugin" -import { AuthPlugin } from "./auth" -import { EnvPlugin } from "./env" +import { AgentPlugin } from "./agent" +import { CommandPlugin } from "./command" +import { ConfigProviderPlugin } from "../config/plugin/provider" import { ModelsDevPlugin } from "./models-dev" import { ProviderPlugins } from "./provider" +import { SkillV2 } from "../skill" +import { Reference } from "../reference" type Plugin = { id: PluginV2.ID - effect: Effect.Effect + effect: PluginV2.Effect< + | Catalog.Service + | CommandV2.Service + | Credential.Service + | Integration.Service + | AgentV2.Service + | Npm.Service + | EventV2.Service + | FSUtil.Service + | Global.Service + | Location.Service + | PluginV2.Service + | Config.Service + | ModelsDev.Service + | SkillV2.Service + | Reference.Service + > } export interface Interface { @@ -21,51 +53,82 @@ export interface Interface { export class Service extends Context.Service()("@opencode/v2/PluginBoot") {} -export const layer: Layer.Layer = - Layer.effect( - Service, - Effect.gen(function* () { - const catalog = yield* Catalog.Service - const plugin = yield* PluginV2.Service - const auth = yield* AuthV2.Service - const npm = yield* Npm.Service - const done = yield* Deferred.make() +export const layer = Layer.effect( + Service, + Effect.gen(function* () { + const catalog = yield* Catalog.Service + const commands = yield* CommandV2.Service + const plugin = yield* PluginV2.Service + const credentials = yield* Credential.Service + const integrations = yield* Integration.Service + const agents = yield* AgentV2.Service + const config = yield* Config.Service + const location = yield* Location.Service + const modelsDev = yield* ModelsDev.Service + const npm = yield* Npm.Service + const events = yield* EventV2.Service + const fs = yield* FSUtil.Service + const global = yield* Global.Service + const skill = yield* SkillV2.Service + const references = yield* Reference.Service + const done = yield* Deferred.make() - const add = Effect.fn("PluginBoot.add")(function* (input: Plugin) { - yield* plugin.add({ - id: input.id, - effect: input.effect.pipe( - Effect.provideService(Catalog.Service, catalog), - Effect.provideService(AuthV2.Service, auth), - Effect.provideService(Npm.Service, npm), - ), - }) + const add = Effect.fn("PluginBoot.add")(function* (input: Plugin) { + yield* plugin.add({ + id: input.id, + effect: input.effect.pipe( + Effect.provideService(Catalog.Service, catalog), + Effect.provideService(CommandV2.Service, commands), + Effect.provideService(Credential.Service, credentials), + Effect.provideService(Integration.Service, integrations), + Effect.provideService(AgentV2.Service, agents), + Effect.provideService(Config.Service, config), + Effect.provideService(Location.Service, location), + Effect.provideService(ModelsDev.Service, modelsDev), + Effect.provideService(Npm.Service, npm), + Effect.provideService(EventV2.Service, events), + Effect.provideService(FSUtil.Service, fs), + Effect.provideService(Global.Service, global), + Effect.provideService(SkillV2.Service, skill), + Effect.provideService(Reference.Service, references), + Effect.provideService(PluginV2.Service, plugin), + ), }) + }) - const boot = Effect.gen(function* () { - yield* add(EnvPlugin) - yield* add(AuthPlugin) - for (const item of ProviderPlugins) { - yield* add(item) - } - yield* add(ModelsDevPlugin) - }).pipe(Effect.withSpan("PluginBoot.boot")) + const boot = Effect.gen(function* () { + yield* add(AgentPlugin.Plugin) + yield* add(CommandPlugin.Plugin) + // kilocode_change - Kilo's CLI registry supplies `kilo-config`; do not register the redundant opencode skill. + for (const item of ProviderPlugins) { + yield* add(item) + } + yield* add(ModelsDevPlugin) + yield* add(ConfigProviderPlugin.Plugin) + yield* add(ConfigAgentPlugin.Plugin) + yield* add(ConfigCommandPlugin.Plugin) + yield* add(ConfigSkillPlugin.Plugin) + yield* add(ConfigReferencePlugin.Plugin) + }).pipe(Effect.withSpan("PluginBoot.boot")) - yield* boot.pipe( - Effect.exit, - Effect.flatMap((exit) => Deferred.done(done, exit)), - Effect.forkScoped, - ) + yield* boot.pipe( + Effect.exit, + Effect.flatMap((exit) => Deferred.done(done, exit)), + Effect.forkScoped, + ) - return Service.of({ - wait: () => Deferred.await(done), - }) - }), - ) + return Service.of({ + wait: () => Deferred.await(done), + }) + }), +) -export const defaultLayer = layer.pipe( - Layer.provide(Catalog.defaultLayer), - Layer.provide(PluginV2.defaultLayer), - Layer.provide(Layer.orDie(AuthV2.defaultLayer)), - Layer.provide(Npm.defaultLayer), +export const locationLayer = layer.pipe( + Layer.provideMerge(Integration.locationLayer), + Layer.provideMerge(Catalog.locationLayer), + Layer.provideMerge(CommandV2.locationLayer), + Layer.provideMerge(Config.locationLayer), + Layer.provideMerge(AgentV2.locationLayer), + Layer.provideMerge(SkillV2.locationLayer), + Layer.provideMerge(Reference.locationLayer), ) diff --git a/packages/core/src/plugin/command.ts b/packages/core/src/plugin/command.ts new file mode 100644 index 0000000000..66386a2128 --- /dev/null +++ b/packages/core/src/plugin/command.ts @@ -0,0 +1,29 @@ +export * as CommandPlugin from "./command" + +import { Effect } from "effect" +import { CommandV2 } from "../command" +import { Location } from "../location" +import { PluginV2 } from "../plugin" +import PROMPT_INITIALIZE from "./command/initialize.txt" +import PROMPT_REVIEW from "./command/review.txt" + +export const Plugin = PluginV2.define({ + id: PluginV2.ID.make("command"), + effect: Effect.gen(function* () { + const command = yield* CommandV2.Service + const location = yield* Location.Service + const transform = yield* command.transform() + + yield* transform((editor) => { + editor.update("init", (command) => { + command.template = PROMPT_INITIALIZE.replace("${path}", location.project.directory) + command.description = "guided AGENTS.md setup" + }) + editor.update("review", (command) => { + command.template = PROMPT_REVIEW.replace("${path}", location.project.directory) + command.description = "review changes [commit|branch|pr], defaults to uncommitted" + command.subtask = true + }) + }) + }), +}) diff --git a/packages/core/src/plugin/command/initialize.txt b/packages/core/src/plugin/command/initialize.txt new file mode 100644 index 0000000000..a403dac904 --- /dev/null +++ b/packages/core/src/plugin/command/initialize.txt @@ -0,0 +1,66 @@ +Create or update `AGENTS.md` for this repository. + +The goal is a compact instruction file that helps future Kilo sessions avoid mistakes and ramp up quickly. Every line should answer: "Would an agent likely miss this without help?" If not, leave it out. + +User-provided focus or constraints (honor these): +$ARGUMENTS + +## How to investigate + +Read the highest-value sources first: +- `README*`, root manifests, workspace config, lockfiles +- build, test, lint, formatter, typecheck, and codegen config +- CI workflows and pre-commit / task runner config +- existing instruction files (`AGENTS.md`, `CLAUDE.md`, `.cursor/rules/`, `.cursorrules`, `.github/copilot-instructions.md`) +- repo-local Kilo config such as `kilo.json` + +If architecture is still unclear after reading config and docs, inspect a small number of representative code files to find the real entrypoints, package boundaries, and execution flow. Prefer reading the files that explain how the system is wired together over random leaf files. + +Prefer executable sources of truth over prose. If docs conflict with config or scripts, trust the executable source and only keep what you can verify. + +## What to extract + +Look for the highest-signal facts for an agent working in this repo: +- exact developer commands, especially non-obvious ones +- how to run a single test, a single package, or a focused verification step +- required command order when it matters, such as `lint -> typecheck -> test` +- monorepo or multi-package boundaries, ownership of major directories, and the real app/library entrypoints +- framework or toolchain quirks: generated code, migrations, codegen, build artifacts, special env loading, dev servers, infra deploy flow +- repo-specific style or workflow conventions that differ from defaults +- testing quirks: fixtures, integration test prerequisites, snapshot workflows, required services, flaky or expensive suites +- important constraints from existing instruction files worth preserving + +Good `AGENTS.md` content is usually hard-earned context that took reading multiple files to infer. + +## Questions + +Only ask the user questions if the repo cannot answer something important. Use the `question` tool for one short batch at most. + +Good questions: +- undocumented team conventions +- branch / PR / release expectations +- missing setup or test prerequisites that are known but not written down + +Do not ask about anything the repo already makes clear. + +## Writing rules + +Include only high-signal, repo-specific guidance such as: +- exact commands and shortcuts the agent would otherwise guess wrong +- architecture notes that are not obvious from filenames +- conventions that differ from language or framework defaults +- setup requirements, environment quirks, and operational gotchas +- references to existing instruction sources that matter + +Exclude: +- generic software advice +- long tutorials or exhaustive file trees +- obvious language conventions +- speculative claims or anything you could not verify +- content better stored in another file referenced via `kilo.json` `instructions` + +When in doubt, omit. + +Prefer short sections and bullets. If the repo is simple, keep the file simple. If the repo is large, summarize the few structural facts that actually change how an agent should work. + +If `AGENTS.md` already exists at `${path}`, improve it in place rather than rewriting blindly. Preserve verified useful guidance, delete fluff or stale claims, and reconcile it with the current codebase. diff --git a/packages/core/src/plugin/command/review.txt b/packages/core/src/plugin/command/review.txt new file mode 100644 index 0000000000..071807ec87 --- /dev/null +++ b/packages/core/src/plugin/command/review.txt @@ -0,0 +1,100 @@ +You are a code reviewer. Your job is to review code changes and provide actionable feedback. + +--- + +Input: $ARGUMENTS + +--- + +## Determining What to Review + +Based on the input provided, determine which type of review to perform: + +1. **No arguments (default)**: Review all uncommitted changes + - Run: `git diff` for unstaged changes + - Run: `git diff --cached` for staged changes + - Run: `git status --short` to identify untracked (net new) files + +2. **Commit hash** (40-char SHA or short hash): Review that specific commit + - Run: `git show $ARGUMENTS` + +3. **Branch name**: Compare current branch to the specified branch + - Run: `git diff $ARGUMENTS...HEAD` + +4. **PR URL or number** (contains "github.com" or "pull" or looks like a PR number): Review the pull request + - Run: `gh pr view $ARGUMENTS` to get PR context + - Run: `gh pr diff $ARGUMENTS` to get the diff + +Use best judgement when processing input. + +--- + +## Gathering Context + +**Diffs alone are not enough.** After getting the diff, read the entire file(s) being modified to understand the full context. Code that looks wrong in isolation may be correct given surrounding logic—and vice versa. + +- Use the diff to identify which files changed +- Use `git status --short` to identify untracked files, then read their full contents +- Read the full file to understand existing patterns, control flow, and error handling +- Check for existing style guide or conventions files (CONVENTIONS.md, AGENTS.md, .editorconfig, etc.) + +--- + +## What to Look For + +**Bugs** - Your primary focus. +- Logic errors, off-by-one mistakes, incorrect conditionals +- If-else guards: missing guards, incorrect branching, unreachable code paths +- Edge cases: null/empty/undefined inputs, error conditions, race conditions +- Security issues: injection, auth bypass, data exposure +- Broken error handling that swallows failures, throws unexpectedly or returns error types that are not caught. + +**Structure** - Does the code fit the codebase? +- Does it follow existing patterns and conventions? +- Are there established abstractions it should use but doesn't? +- Excessive nesting that could be flattened with early returns or extraction + +**Performance** - Only flag if obviously problematic. +- O(n²) on unbounded data, N+1 queries, blocking I/O on hot paths + +**Behavior Changes** - If a behavioral change is introduced, raise it (especially if it's possibly unintentional). + +--- + +## Before You Flag Something + +**Be certain.** If you're going to call something a bug, you need to be confident it actually is one. + +- Only review the changes - do not review pre-existing code that wasn't modified +- Don't flag something as a bug if you're unsure - investigate first +- Don't invent hypothetical problems - if an edge case matters, explain the realistic scenario where it breaks +- If you need more context to be sure, use the tools below to get it + +**Don't be a zealot about style.** When checking code against conventions: + +- Verify the code is *actually* in violation. Don't complain about else statements if early returns are already being used correctly. +- Some "violations" are acceptable when they're the simplest option. A `let` statement is fine if the alternative is convoluted. +- Excessive nesting is a legitimate concern regardless of other style choices. + +--- + +## Tools + +Use these to inform your review: + +- **Explore agent** - Find how existing code handles similar problems. Check patterns, conventions, and prior art before claiming something doesn't fit. +- **Exa Code Context** - Verify correct usage of libraries/APIs before flagging something as wrong. +- **Web Search** - Research best practices if you're unsure about a pattern. + +If you're uncertain about something and can't verify it with these tools, say "I'm not sure about X" rather than flagging it as a definite issue. + +--- + +## Output + +1. If there is a bug, be direct and clear about why it is a bug. +2. Clearly communicate severity of issues. Do not overstate severity. +3. Critiques should clearly and explicitly communicate the scenarios, environments, or inputs that are necessary for the bug to arise. The comment should immediately indicate that the issue's severity depends on these factors. +4. Your tone should be matter-of-fact and not accusatory or overly positive. It should read as a helpful AI assistant suggestion without sounding too much like a human reviewer. +5. Write so the reader can quickly understand the issue without reading too closely. +6. AVOID flattery, do not give any comments that are not helpful to the reader. diff --git a/packages/core/src/plugin/env.ts b/packages/core/src/plugin/env.ts deleted file mode 100644 index d63936fa13..0000000000 --- a/packages/core/src/plugin/env.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Effect } from "effect" -import { PluginV2 } from "../plugin" - -export const EnvPlugin = PluginV2.define({ - id: PluginV2.ID.make("env"), - effect: Effect.gen(function* () { - return { - "provider.update": Effect.fn(function* (evt) { - const key = evt.provider.env.find((item) => process.env[item]) - if (!key) return - evt.provider.enabled = { - via: "env", - name: key, - } - }), - } - }), -}) diff --git a/packages/core/src/plugin/models-dev.ts b/packages/core/src/plugin/models-dev.ts index e67c2e75a9..a212d013ad 100644 --- a/packages/core/src/plugin/models-dev.ts +++ b/packages/core/src/plugin/models-dev.ts @@ -1,7 +1,10 @@ -import { DateTime, Effect } from "effect" +import { DateTime, Effect, Scope, Stream } from "effect" import { Catalog } from "../catalog" +import { Integration } from "../integration" +import { EventV2 } from "../event" import { ModelV2 } from "../model" -import { ModelsDev } from "../models" +import { ModelRequest } from "../model-request" +import { ModelsDev } from "../models-dev" import { PluginV2 } from "../plugin" import { ProviderV2 } from "../provider" @@ -37,72 +40,104 @@ function cost(input: ModelsDev.Model["cost"]) { ] } -function variants(model: ModelsDev.Model) { - return Object.entries(model.experimental?.modes ?? {}).map(([id, item]) => ({ - id: ModelV2.VariantID.make(id), - headers: { ...(item.provider?.headers ?? {}) }, - body: { ...(item.provider?.body ?? {}) }, - aisdk: { - provider: {}, - request: {}, - }, - })) +function variants(model: ModelsDev.Model, packageName?: string) { + return Object.entries(model.experimental?.modes ?? {}).map(([id, item]) => { + const request = ModelRequest.normalizeAiSdkOptions(packageName, item.provider?.body ?? {}) + return { + id: ModelV2.VariantID.make(id), + headers: { ...(item.provider?.headers ?? {}) }, + ...request, + } + }) } export const ModelsDevPlugin = PluginV2.define({ id: PluginV2.ID.make("models-dev"), effect: Effect.gen(function* () { const catalog = yield* Catalog.Service + const integrations = yield* Integration.Service const modelsDev = yield* ModelsDev.Service - for (const item of Object.values(yield* modelsDev.get())) { - const providerID = ProviderV2.ID.make(item.id) - yield* catalog.provider.update(providerID, (provider) => { - provider.name = item.name - provider.env = [...item.env] - provider.endpoint = item.npm - ? { - type: "aisdk", - package: item.npm, - url: item.api, - } - : { - type: "unknown", - } + const events = yield* EventV2.Service + const scope = yield* Scope.Scope + const transform = yield* catalog.transform() + const integrationTransform = yield* integrations.transform() + const refresh = Effect.fn("ModelsDevPlugin.refresh")(function* () { + const data = yield* modelsDev.get() + yield* integrationTransform((integrations) => { + for (const item of Object.values(data)) { + if (item.env.length === 0) continue + const integrationID = Integration.ID.make(item.id) + integrations.update(integrationID, (integration) => (integration.name = item.name)) + integrations.method.update({ + integrationID, + method: { type: "key" }, + }) + integrations.method.update({ + integrationID, + method: { type: "env", names: [...item.env] }, + }) + } }) - - for (const model of Object.values(item.models)) { - const modelID = ModelV2.ID.make(model.id) - yield* catalog.model - .update(providerID, modelID, (draft) => { - draft.name = model.name - draft.family = model.family ? ModelV2.Family.make(model.family) : undefined - draft.endpoint = model.provider?.npm + yield* transform((catalog) => { + for (const item of Object.values(data)) { + const providerID = ProviderV2.ID.make(item.id) + catalog.provider.update(providerID, (provider) => { + provider.name = item.name + provider.api = item.npm ? { type: "aisdk", - package: model.provider?.npm, - url: model.provider.api, + package: item.npm, + url: item.api, } : { - type: "unknown", + type: "native", + url: item.api, + settings: {}, } - draft.capabilities = { - tools: model.tool_call, - input: [...(model.modalities?.input ?? [])], - output: [...(model.modalities?.output ?? [])], - } - draft.variants = variants(model) - draft.time.released = released(model.release_date) - draft.cost = cost(model.cost) - draft.status = model.status ?? "active" - draft.enabled = true - draft.limit = { - context: model.limit.context, - input: model.limit.input, - output: model.limit.output, - } }) - .pipe(Effect.orDie) - } - } - }).pipe(Effect.provide(ModelsDev.defaultLayer)), + + for (const model of Object.values(item.models)) { + const modelID = ModelV2.ID.make(model.id) + catalog.model.update(providerID, modelID, (draft) => { + draft.name = model.name + draft.family = model.family ? ModelV2.Family.make(model.family) : undefined + draft.api = model.provider?.npm + ? { + id: draft.api.id, + type: "aisdk", + package: model.provider?.npm, + url: model.provider.api, + } + : { + id: draft.api.id, + type: "native", + url: model.provider?.api, + settings: {}, + } + draft.capabilities = { + tools: model.tool_call, + input: [...(model.modalities?.input ?? [])], + output: [...(model.modalities?.output ?? [])], + } + draft.variants = variants(model, model.provider?.npm ?? item.npm) + draft.time.released = released(model.release_date) + draft.cost = cost(model.cost) + draft.status = model.status ?? "active" + draft.enabled = true + draft.limit = { + context: model.limit.context, + input: model.limit.input, + output: model.limit.output, + } + }) + } + } + }) + }) + yield* refresh() + yield* events.subscribe(ModelsDev.Event.Refreshed).pipe( + Stream.runForEach(() => refresh()), + Effect.forkScoped({ startImmediately: true }), + ) + }), }) diff --git a/packages/core/src/plugin/provider.ts b/packages/core/src/plugin/provider.ts index 1880787495..ea3939b750 100644 --- a/packages/core/src/plugin/provider.ts +++ b/packages/core/src/plugin/provider.ts @@ -1 +1,69 @@ -export { ProviderPlugins } from "./provider/index" +import { AlibabaPlugin } from "./provider/alibaba" +import { AmazonBedrockPlugin } from "./provider/amazon-bedrock" +import { AnthropicPlugin } from "./provider/anthropic" +import { AzureCognitiveServicesPlugin, AzurePlugin } from "./provider/azure" +import { CerebrasPlugin } from "./provider/cerebras" +import { CloudflareAIGatewayPlugin } from "./provider/cloudflare-ai-gateway" +import { CloudflareWorkersAIPlugin } from "./provider/cloudflare-workers-ai" +import { CoherePlugin } from "./provider/cohere" +import { DeepInfraPlugin } from "./provider/deepinfra" +import { DynamicProviderPlugin } from "./provider/dynamic" +import { GatewayPlugin } from "./provider/gateway" +import { GithubCopilotPlugin } from "./provider/github-copilot" +import { GitLabPlugin } from "./provider/gitlab" +import { GooglePlugin } from "./provider/google" +import { GoogleVertexAnthropicPlugin, GoogleVertexPlugin } from "./provider/google-vertex" +import { GroqPlugin } from "./provider/groq" +import { KiloPlugin } from "./provider/kilo" +import { LLMGatewayPlugin } from "./provider/llmgateway" +import { MistralPlugin } from "./provider/mistral" +import { NvidiaPlugin } from "./provider/nvidia" +import { OpenAIPlugin } from "./provider/openai" +import { SnowflakeCortexPlugin } from "./provider/snowflake-cortex" +import { OpenAICompatiblePlugin } from "./provider/openai-compatible" +import { OpencodePlugin } from "./provider/opencode" +import { OpenRouterPlugin } from "./provider/openrouter" +import { PerplexityPlugin } from "./provider/perplexity" +import { SapAICorePlugin } from "./provider/sap-ai-core" +import { TogetherAIPlugin } from "./provider/togetherai" +import { VercelPlugin } from "./provider/vercel" +import { VenicePlugin } from "./provider/venice" +import { XAIPlugin } from "./provider/xai" +import { ZenmuxPlugin } from "./provider/zenmux" + +export const ProviderPlugins = [ + AlibabaPlugin, + AmazonBedrockPlugin, + AnthropicPlugin, + AzureCognitiveServicesPlugin, + AzurePlugin, + CerebrasPlugin, + CloudflareAIGatewayPlugin, + CloudflareWorkersAIPlugin, + CoherePlugin, + DeepInfraPlugin, + GatewayPlugin, + GithubCopilotPlugin, + GitLabPlugin, + GooglePlugin, + GoogleVertexAnthropicPlugin, + GoogleVertexPlugin, + GroqPlugin, + KiloPlugin, + LLMGatewayPlugin, + MistralPlugin, + NvidiaPlugin, + OpencodePlugin, + SnowflakeCortexPlugin, + OpenAICompatiblePlugin, + OpenAIPlugin, + OpenRouterPlugin, + PerplexityPlugin, + SapAICorePlugin, + TogetherAIPlugin, + VercelPlugin, + VenicePlugin, + XAIPlugin, + ZenmuxPlugin, + DynamicProviderPlugin, +] diff --git a/packages/core/src/plugin/provider/amazon-bedrock.ts b/packages/core/src/plugin/provider/amazon-bedrock.ts index 366548a0a3..9c7fd65665 100644 --- a/packages/core/src/plugin/provider/amazon-bedrock.ts +++ b/packages/core/src/plugin/provider/amazon-bedrock.ts @@ -1,7 +1,14 @@ import { Effect } from "effect" +import type { LanguageModelV3 } from "@ai-sdk/provider" import { PluginV2 } from "../../plugin" import { ProviderV2 } from "../../provider" +type MantleSDK = { + languageModel: (modelID: string) => LanguageModelV3 + chat: (modelID: string) => LanguageModelV3 + responses: (modelID: string) => LanguageModelV3 +} + // Bedrock cross-region inference profiles require regional prefixes only for // specific model/region combinations. Keep the mapping narrow and avoid // double-prefixing model IDs that models.dev already marks as global/us/eu/etc. @@ -46,21 +53,32 @@ function resolveModelID(modelID: string, region: string | undefined) { : modelID } +function selectMantleModel(sdk: MantleSDK, modelID: string) { + if (modelID === "openai.gpt-oss-safeguard-20b" || modelID === "openai.gpt-oss-safeguard-120b") + return sdk.chat(modelID) + return sdk.responses(modelID) +} + export const AmazonBedrockPlugin = PluginV2.define({ id: PluginV2.ID.make("amazon-bedrock"), effect: Effect.gen(function* () { return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== ProviderV2.ID.amazonBedrock) return - if (evt.provider.endpoint.type !== "aisdk") return - if (typeof evt.provider.options.aisdk.provider.endpoint !== "string") return - // The AI SDK expects a base URL, but users configure Bedrock private/VPC - // endpoints as `endpoint`; move it into the catalog endpoint URL once. - evt.provider.endpoint.url = evt.provider.options.aisdk.provider.endpoint - delete evt.provider.options.aisdk.provider.endpoint + "catalog.transform": Effect.fn(function* (evt) { + for (const item of evt.provider.list()) { + if (item.provider.api.type !== "aisdk") continue + if (item.provider.api.package !== "@ai-sdk/amazon-bedrock") continue + evt.provider.update(item.provider.id, (provider) => { + if (provider.api.type !== "aisdk") return + if (typeof provider.request.body.endpoint !== "string") return + // The AI SDK expects a base URL, but users configure Bedrock private/VPC + // endpoints as `endpoint`; move it into the catalog endpoint URL once. + provider.api.url = provider.request.body.endpoint + delete provider.request.body.endpoint + }) + } }), "aisdk.sdk": Effect.fn(function* (evt) { - if (evt.package !== "@ai-sdk/amazon-bedrock") return + if (!["@ai-sdk/amazon-bedrock", "@ai-sdk/amazon-bedrock/mantle"].includes(evt.package)) return const options = { ...evt.options } const profile = typeof options.profile === "string" ? options.profile : process.env.AWS_PROFILE const region = typeof options.region === "string" ? options.region : (process.env.AWS_REGION ?? "us-east-1") @@ -81,13 +99,23 @@ export const AmazonBedrockPlugin = PluginV2.define({ options.credentialProvider = fromNodeProviderChain(profile ? { profile } : {}) } + if (evt.package === "@ai-sdk/amazon-bedrock/mantle") { + const mod = yield* Effect.promise(() => import("@ai-sdk/amazon-bedrock/mantle")) + evt.sdk = mod.createBedrockMantle(options) + return + } + const mod = yield* Effect.promise(() => import("@ai-sdk/amazon-bedrock")) evt.sdk = mod.createAmazonBedrock(options) }), "aisdk.language": Effect.fn(function* (evt) { if (evt.model.providerID !== ProviderV2.ID.amazonBedrock) return + if (evt.model.api.type === "aisdk" && evt.model.api.package === "@ai-sdk/amazon-bedrock/mantle") { + evt.language = selectMantleModel(evt.sdk, evt.model.api.id) + return + } const region = typeof evt.options.region === "string" ? evt.options.region : process.env.AWS_REGION - evt.language = evt.sdk.languageModel(resolveModelID(evt.model.apiID, region)) + evt.language = evt.sdk.languageModel(resolveModelID(evt.model.api.id, region)) }), } }), diff --git a/packages/core/src/plugin/provider/anthropic.ts b/packages/core/src/plugin/provider/anthropic.ts index 14851c4a31..9bd69fe036 100644 --- a/packages/core/src/plugin/provider/anthropic.ts +++ b/packages/core/src/plugin/provider/anthropic.ts @@ -1,15 +1,19 @@ import { Effect } from "effect" import { PluginV2 } from "../../plugin" -import { ProviderV2 } from "../../provider" export const AnthropicPlugin = PluginV2.define({ id: PluginV2.ID.make("anthropic"), effect: Effect.gen(function* () { return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== ProviderV2.ID.anthropic) return - evt.provider.options.headers["anthropic-beta"] = - "interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14" + "catalog.transform": Effect.fn(function* (evt) { + for (const item of evt.provider.list()) { + if (item.provider.api.type !== "aisdk") continue + if (item.provider.api.package !== "@ai-sdk/anthropic") continue + evt.provider.update(item.provider.id, (provider) => { + provider.request.headers["anthropic-beta"] = + "interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14" + }) + } }), "aisdk.sdk": Effect.fn(function* (evt) { if (evt.package !== "@ai-sdk/anthropic") return diff --git a/packages/core/src/plugin/provider/azure.ts b/packages/core/src/plugin/provider/azure.ts index 6c29a16103..173fd36621 100644 --- a/packages/core/src/plugin/provider/azure.ts +++ b/packages/core/src/plugin/provider/azure.ts @@ -14,12 +14,18 @@ export const AzurePlugin = PluginV2.define({ id: PluginV2.ID.make("azure"), effect: Effect.gen(function* () { return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== ProviderV2.ID.azure) return - const configured = evt.provider.options.aisdk.provider.resourceName - const resourceName = - typeof configured === "string" && configured.trim() !== "" ? configured : process.env.AZURE_RESOURCE_NAME - if (resourceName) evt.provider.options.aisdk.provider.resourceName = resourceName + "catalog.transform": Effect.fn(function* (evt) { + for (const item of evt.provider.list()) { + if (item.provider.api.type !== "aisdk") continue + if (item.provider.api.package !== "@ai-sdk/azure") continue + const configured = item.provider.request.body.resourceName + const resourceName = + typeof configured === "string" && configured.trim() !== "" ? configured : process.env.AZURE_RESOURCE_NAME + if (!resourceName) continue + evt.provider.update(item.provider.id, (provider) => { + provider.request.body.resourceName = resourceName + }) + } }), "aisdk.sdk": Effect.fn(function* (evt) { if (evt.package !== "@ai-sdk/azure") return @@ -27,7 +33,7 @@ export const AzurePlugin = PluginV2.define({ if ( !evt.options.resourceName && !evt.options.baseURL && - (evt.model.endpoint.type !== "aisdk" || !evt.model.endpoint.url) + (evt.model.api.type !== "aisdk" || !evt.model.api.url) ) { throw new Error( "AZURE_RESOURCE_NAME is missing, set it using env var or reconnecting the azure provider and setting it", @@ -39,7 +45,7 @@ export const AzurePlugin = PluginV2.define({ }), "aisdk.language": Effect.fn(function* (evt) { if (evt.model.providerID !== ProviderV2.ID.azure) return - evt.language = selectLanguage(evt.sdk, evt.model.apiID, Boolean(evt.options.useCompletionUrls)) + evt.language = selectLanguage(evt.sdk, evt.model.api.id, Boolean(evt.options.useCompletionUrls)) }), } }), @@ -49,15 +55,21 @@ export const AzureCognitiveServicesPlugin = PluginV2.define({ id: PluginV2.ID.make("azure-cognitive-services"), effect: Effect.gen(function* () { return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== ProviderV2.ID.make("azure-cognitive-services")) return + "catalog.transform": Effect.fn(function* (evt) { const resourceName = process.env.AZURE_COGNITIVE_SERVICES_RESOURCE_NAME - if (resourceName) - evt.provider.options.aisdk.provider.baseURL = `https://${resourceName}.cognitiveservices.azure.com/openai` + if (!resourceName) return + for (const item of evt.provider.list()) { + if (item.provider.api.type !== "aisdk") continue + if (item.provider.api.package !== "@ai-sdk/openai-compatible") continue + if (!item.provider.id.includes("azure-cognitive-services")) continue + evt.provider.update(item.provider.id, (provider) => { + provider.request.body.baseURL = `https://${resourceName}.cognitiveservices.azure.com/openai` + }) + } }), "aisdk.language": Effect.fn(function* (evt) { if (evt.model.providerID !== ProviderV2.ID.make("azure-cognitive-services")) return - evt.language = selectLanguage(evt.sdk, evt.model.apiID, Boolean(evt.options.useCompletionUrls)) + evt.language = selectLanguage(evt.sdk, evt.model.api.id, Boolean(evt.options.useCompletionUrls)) }), } }), diff --git a/packages/core/src/plugin/provider/cerebras.ts b/packages/core/src/plugin/provider/cerebras.ts index b2fadd8bf1..f871943687 100644 --- a/packages/core/src/plugin/provider/cerebras.ts +++ b/packages/core/src/plugin/provider/cerebras.ts @@ -1,14 +1,18 @@ import { Effect } from "effect" import { PluginV2 } from "../../plugin" -import { ProviderV2 } from "../../provider" export const CerebrasPlugin = PluginV2.define({ id: PluginV2.ID.make("cerebras"), effect: Effect.gen(function* () { return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== ProviderV2.ID.make("cerebras")) return - evt.provider.options.headers["X-Cerebras-3rd-Party-Integration"] = "opencode" + "catalog.transform": Effect.fn(function* (ctx) { + for (const item of ctx.provider.list()) { + if (item.provider.api.type !== "aisdk") continue + if (item.provider.api.package !== "@ai-sdk/cerebras") continue + ctx.provider.update(item.provider.id, (provider) => { + provider.request.headers["X-Cerebras-3rd-Party-Integration"] = "opencode" + }) + } }), "aisdk.sdk": Effect.fn(function* (evt) { if (evt.package !== "@ai-sdk/cerebras") return diff --git a/packages/core/src/plugin/provider/cloudflare-ai-gateway.ts b/packages/core/src/plugin/provider/cloudflare-ai-gateway.ts index ffcd4adcf4..ba7856b635 100644 --- a/packages/core/src/plugin/provider/cloudflare-ai-gateway.ts +++ b/packages/core/src/plugin/provider/cloudflare-ai-gateway.ts @@ -24,7 +24,7 @@ export const CloudflareAIGatewayPlugin = PluginV2.define({ apiKey: config.apiKey, options: gatewayOptions(evt.options, metadata), } as any) - const unified = createUnified() + const unified = createUnified({ apiKey: config.apiKey }) evt.sdk = { languageModel(modelID: string) { return gateway(unified(modelID)) @@ -45,7 +45,7 @@ const decodeJson = Schema.decodeUnknownOption(Schema.UnknownFromJsonString) function gatewayConfig(options: Record): GatewayConfig | undefined { const accountId = process.env.CLOUDFLARE_ACCOUNT_ID ?? stringOption(options, "accountId") - // AuthPlugin copies CLI prompt metadata into options. The prompt stores the + // Credential projection copies key metadata into options. The prompt stores the // gateway as gatewayId, while older config examples may use gateway. const gatewayId = process.env.CLOUDFLARE_GATEWAY_ID ?? stringOption(options, "gatewayId") ?? stringOption(options, "gateway") diff --git a/packages/core/src/plugin/provider/cloudflare-workers-ai.ts b/packages/core/src/plugin/provider/cloudflare-workers-ai.ts index f39869b57d..10f3f5200a 100644 --- a/packages/core/src/plugin/provider/cloudflare-workers-ai.ts +++ b/packages/core/src/plugin/provider/cloudflare-workers-ai.ts @@ -10,25 +10,33 @@ export const CloudflareWorkersAIPlugin = PluginV2.define({ id: PluginV2.ID.make("cloudflare-workers-ai"), effect: Effect.gen(function* () { return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== providerID) return - if (evt.provider.endpoint.type !== "aisdk") return - if (evt.provider.endpoint.url) return - - const accountId = resolveAccountId(evt.provider.options.aisdk.provider) - if (accountId) evt.provider.endpoint.url = workersEndpoint(accountId) + "catalog.transform": Effect.fn(function* (evt) { + const item = evt.provider.get(providerID) + if (!item) return + evt.provider.update(item.provider.id, (provider) => { + if (provider.api.type !== "aisdk") return + if (provider.api.url) return + const accountId = resolveAccountId(provider.request.body) + if (accountId) provider.api.url = workersEndpoint(accountId) + }) }), "aisdk.sdk": Effect.fn(function* (evt) { if (evt.model.providerID !== providerID) return if (evt.package !== "@ai-sdk/openai-compatible") return - if (!hasWorkersEndpoint(evt.model.endpoint)) return + const accountId = resolveAccountId(evt.options) + if (!hasWorkersEndpoint(evt.model.api) && !accountId) return const mod = yield* Effect.promise(() => import("@ai-sdk/openai-compatible")) - evt.sdk = mod.createOpenAICompatible(sdkOptions(evt.options) as any) + evt.sdk = mod.createOpenAICompatible( + sdkOptions({ + ...evt.options, + baseURL: evt.options.baseURL ?? (accountId ? workersEndpoint(accountId) : undefined), + }) as any, + ) }), "aisdk.language": Effect.fn(function* (evt) { if (evt.model.providerID !== providerID) return - evt.language = evt.sdk.languageModel(evt.model.apiID) + evt.language = evt.sdk.languageModel(evt.model.api.id) }), } }), @@ -42,8 +50,8 @@ function workersEndpoint(accountId: string) { return `https://api.cloudflare.com/client/v4/accounts/${accountId}/ai/v1` } -function hasWorkersEndpoint(endpoint: ProviderV2.Endpoint) { - return endpoint.type === "aisdk" && Boolean(endpoint.url) +function hasWorkersEndpoint(api: ProviderV2.Api) { + return api.type === "aisdk" && Boolean(api.url) } function sdkOptions(options: Record) { diff --git a/packages/core/src/plugin/provider/github-copilot.ts b/packages/core/src/plugin/provider/github-copilot.ts index 31e57ba12a..1fc7c0c799 100644 --- a/packages/core/src/plugin/provider/github-copilot.ts +++ b/packages/core/src/plugin/provider/github-copilot.ts @@ -15,9 +15,6 @@ export const GithubCopilotPlugin = PluginV2.define({ id: PluginV2.ID.make("github-copilot"), effect: Effect.gen(function* () { return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== ProviderV2.ID.githubCopilot) return - }), "aisdk.sdk": Effect.fn(function* (evt) { if (evt.package !== "@ai-sdk/github-copilot") return const mod = yield* Effect.promise(() => import("../../github-copilot/copilot-provider")) @@ -26,18 +23,21 @@ export const GithubCopilotPlugin = PluginV2.define({ "aisdk.language": Effect.fn(function* (evt) { if (evt.model.providerID !== ProviderV2.ID.githubCopilot) return if (evt.sdk.responses === undefined && evt.sdk.chat === undefined) { - evt.language = evt.sdk.languageModel(evt.model.apiID) + evt.language = evt.sdk.languageModel(evt.model.api.id) return } - evt.language = shouldUseResponses(evt.model.apiID) - ? evt.sdk.responses(evt.model.apiID) - : evt.sdk.chat(evt.model.apiID) + evt.language = shouldUseResponses(evt.model.api.id) + ? evt.sdk.responses(evt.model.api.id) + : evt.sdk.chat(evt.model.api.id) }), - "model.update": Effect.fn(function* (evt) { - if (evt.model.providerID !== ProviderV2.ID.githubCopilot) return - // This chat-only alias conflicts with the Copilot GPT-5 Responses route, - // so hide it only for Copilot rather than for every provider catalog. - if (evt.model.id === ModelV2.ID.make("gpt-5-chat-latest")) evt.cancel = true + "catalog.transform": Effect.fn(function* (evt) { + const item = evt.provider.get(ProviderV2.ID.githubCopilot) + if (!item || !item.models.has(ModelV2.ID.make("gpt-5-chat-latest"))) return + evt.model.update(item.provider.id, ModelV2.ID.make("gpt-5-chat-latest"), (model) => { + // This chat-only alias conflicts with the Copilot GPT-5 Responses route, + // so hide it only for Copilot rather than for every provider catalog. + model.enabled = false + }) }), } }), diff --git a/packages/core/src/plugin/provider/gitlab.ts b/packages/core/src/plugin/provider/gitlab.ts index 226f5a45eb..9de090a95d 100644 --- a/packages/core/src/plugin/provider/gitlab.ts +++ b/packages/core/src/plugin/provider/gitlab.ts @@ -34,18 +34,16 @@ export const GitLabPlugin = PluginV2.define({ if (evt.model.providerID !== ProviderV2.ID.gitlab) return const featureFlags = typeof evt.options.featureFlags === "object" && evt.options.featureFlags ? evt.options.featureFlags : {} - if (evt.model.apiID.startsWith("duo-workflow-")) { + if (evt.model.api.id.startsWith("duo-workflow-")) { const gitlab = yield* Effect.promise(() => import("gitlab-ai-provider")).pipe(Effect.orDie) const workflowRef = - typeof evt.model.options.aisdk.request.workflowRef === "string" - ? evt.model.options.aisdk.request.workflowRef - : undefined + typeof evt.model.request.body.workflowRef === "string" ? evt.model.request.body.workflowRef : undefined const workflowDefinition = - typeof evt.model.options.aisdk.request.workflowDefinition === "string" - ? evt.model.options.aisdk.request.workflowDefinition + typeof evt.model.request.body.workflowDefinition === "string" + ? evt.model.request.body.workflowDefinition : undefined const language = evt.sdk.workflowChat( - gitlab.isWorkflowModel(evt.model.apiID) ? evt.model.apiID : "duo-workflow", + gitlab.isWorkflowModel(evt.model.api.id) ? evt.model.api.id : "duo-workflow", { featureFlags, workflowDefinition, @@ -55,7 +53,7 @@ export const GitLabPlugin = PluginV2.define({ evt.language = language return } - evt.language = evt.sdk.agenticChat(evt.model.apiID, { + evt.language = evt.sdk.agenticChat(evt.model.api.id, { aiGatewayHeaders: evt.options.aiGatewayHeaders, featureFlags, }) diff --git a/packages/core/src/plugin/provider/google-vertex.ts b/packages/core/src/plugin/provider/google-vertex.ts index 0c335df931..a7168d59ad 100644 --- a/packages/core/src/plugin/provider/google-vertex.ts +++ b/packages/core/src/plugin/provider/google-vertex.ts @@ -25,7 +25,8 @@ function resolveLocation(options: Record) { } function vertexEndpoint(location: string) { - return location === "global" ? "aiplatform.googleapis.com" : `${location}-aiplatform.googleapis.com` + if (location === "global") return "aiplatform.googleapis.com" + return `${location}-aiplatform.googleapis.com` } function replaceVertexVars(value: string, project: string | undefined, location: string) { @@ -42,9 +43,9 @@ function authFetch(fetchWithRuntimeOptions?: unknown) { // do not, so inject a Google access token into their fetch path. return async (input: Parameters[0], init?: RequestInit) => { const { GoogleAuth } = await import("google-auth-library") - const auth = new GoogleAuth() - const client = await auth.getApplicationDefault() - const token = await client.credential.getAccessToken() + const auth = new GoogleAuth({ scopes: ["https://www.googleapis.com/auth/cloud-platform"] }) + const client = await auth.getClient() + const token = await client.getAccessToken() const headers = new Headers(init?.headers) headers.set("Authorization", `Bearer ${token.token}`) return typeof fetchWithRuntimeOptions === "function" @@ -57,20 +58,29 @@ export const GoogleVertexPlugin = PluginV2.define({ id: PluginV2.ID.make("google-vertex"), effect: Effect.gen(function* () { return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== ProviderV2.ID.googleVertex) return - const project = resolveProject(evt.provider.options.aisdk.provider) - const location = String(resolveLocation(evt.provider.options.aisdk.provider)) - if (project) evt.provider.options.aisdk.provider.project = project - evt.provider.options.aisdk.provider.location = location - if (evt.provider.endpoint.type === "aisdk" && evt.provider.endpoint.url) { - evt.provider.endpoint.url = replaceVertexVars(evt.provider.endpoint.url, project, location) - } - if ( - evt.provider.endpoint.type === "aisdk" && - evt.provider.endpoint.package.includes("@ai-sdk/openai-compatible") - ) { - evt.provider.options.aisdk.provider.fetch = authFetch(evt.provider.options.aisdk.provider.fetch) + "catalog.transform": Effect.fn(function* (evt) { + for (const item of evt.provider.list()) { + if (item.provider.api.type !== "aisdk") continue + if ( + item.provider.api.package !== "@ai-sdk/google-vertex" && + !( + item.provider.id === ProviderV2.ID.googleVertex && + item.provider.api.package.includes("@ai-sdk/openai-compatible") + ) + ) + continue + const project = resolveProject(item.provider.request.body) + const location = String(resolveLocation(item.provider.request.body)) + evt.provider.update(item.provider.id, (provider) => { + if (project) provider.request.body.project = project + provider.request.body.location = location + if (provider.api.type === "aisdk" && provider.api.url) { + provider.api.url = replaceVertexVars(provider.api.url, project, location) + } + if (provider.api.type === "aisdk" && provider.api.package.includes("@ai-sdk/openai-compatible")) { + provider.request.body.fetch = authFetch(provider.request.body.fetch) + } + }) } }), "aisdk.sdk": Effect.fn(function* (evt) { @@ -92,7 +102,7 @@ export const GoogleVertexPlugin = PluginV2.define({ }), "aisdk.language": Effect.fn(function* (evt) { if (evt.model.providerID !== ProviderV2.ID.googleVertex) return - evt.language = evt.sdk.languageModel(String(evt.model.apiID).trim()) + evt.language = evt.sdk.languageModel(String(evt.model.api.id).trim()) }), } }), @@ -102,39 +112,53 @@ export const GoogleVertexAnthropicPlugin = PluginV2.define({ id: PluginV2.ID.make("google-vertex-anthropic"), effect: Effect.gen(function* () { return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== ProviderV2.ID.make("google-vertex-anthropic")) return - const project = - evt.provider.options.aisdk.provider.project ?? - process.env.GOOGLE_CLOUD_PROJECT ?? - process.env.GCP_PROJECT ?? - process.env.GCLOUD_PROJECT - const location = - evt.provider.options.aisdk.provider.location ?? - process.env.GOOGLE_CLOUD_LOCATION ?? - process.env.VERTEX_LOCATION ?? - "global" - if (project) evt.provider.options.aisdk.provider.project = project - evt.provider.options.aisdk.provider.location = location + "catalog.transform": Effect.fn(function* (evt) { + for (const item of evt.provider.list()) { + if (item.provider.api.type !== "aisdk") continue + if (item.provider.api.package !== "@ai-sdk/google-vertex/anthropic") continue + const project = + item.provider.request.body.project ?? + process.env.GOOGLE_CLOUD_PROJECT ?? + process.env.GCP_PROJECT ?? + process.env.GCLOUD_PROJECT + const location = + item.provider.request.body.location ?? + process.env.GOOGLE_CLOUD_LOCATION ?? + process.env.VERTEX_LOCATION ?? + "global" + evt.provider.update(item.provider.id, (provider) => { + if (project) provider.request.body.project = project + provider.request.body.location = location + }) + } }), "aisdk.sdk": Effect.fn(function* (evt) { if (evt.package !== "@ai-sdk/google-vertex/anthropic") return const mod = yield* Effect.promise(() => import("@ai-sdk/google-vertex/anthropic")) + const project = + typeof evt.options.project === "string" + ? evt.options.project + : (process.env.GOOGLE_CLOUD_PROJECT ?? process.env.GCP_PROJECT ?? process.env.GCLOUD_PROJECT) + const location = + typeof evt.options.location === "string" + ? evt.options.location + : (process.env.GOOGLE_CLOUD_LOCATION ?? process.env.VERTEX_LOCATION ?? "global") evt.sdk = mod.createVertexAnthropic({ ...evt.options, - project: - typeof evt.options.project === "string" - ? evt.options.project - : (process.env.GOOGLE_CLOUD_PROJECT ?? process.env.GCP_PROJECT ?? process.env.GCLOUD_PROJECT), - location: - typeof evt.options.location === "string" - ? evt.options.location - : (process.env.GOOGLE_CLOUD_LOCATION ?? process.env.VERTEX_LOCATION ?? "global"), + project, + location, + // Continental multi-regions (eu, us) require Regional Endpoint Platform + // domains; the default {region}-aiplatform.googleapis.com does not resolve. + ...((location === "eu" || location === "us") && project && !evt.options.baseURL + ? { + baseURL: `https://aiplatform.${location}.rep.googleapis.com/v1/projects/${project}/locations/${location}/publishers/anthropic/models`, + } + : {}), }) }), "aisdk.language": Effect.fn(function* (evt) { if (evt.model.providerID !== ProviderV2.ID.make("google-vertex-anthropic")) return - evt.language = evt.sdk.languageModel(String(evt.model.apiID).trim()) + evt.language = evt.sdk.languageModel(String(evt.model.api.id).trim()) }), } }), diff --git a/packages/core/src/plugin/provider/index.ts b/packages/core/src/plugin/provider/index.ts deleted file mode 100644 index fd02d322a1..0000000000 --- a/packages/core/src/plugin/provider/index.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { AlibabaPlugin } from "./alibaba" -import { AmazonBedrockPlugin } from "./amazon-bedrock" -import { AnthropicPlugin } from "./anthropic" -import { AzureCognitiveServicesPlugin, AzurePlugin } from "./azure" -import { CerebrasPlugin } from "./cerebras" -import { CloudflareAIGatewayPlugin } from "./cloudflare-ai-gateway" -import { CloudflareWorkersAIPlugin } from "./cloudflare-workers-ai" -import { CoherePlugin } from "./cohere" -import { DeepInfraPlugin } from "./deepinfra" -import { DynamicProviderPlugin } from "./dynamic" -import { GatewayPlugin } from "./gateway" -import { GithubCopilotPlugin } from "./github-copilot" -import { GitLabPlugin } from "./gitlab" -import { GooglePlugin } from "./google" -import { GoogleVertexAnthropicPlugin, GoogleVertexPlugin } from "./google-vertex" -import { GroqPlugin } from "./groq" -import { KiloPlugin } from "./kilo" -import { LLMGatewayPlugin } from "./llmgateway" -import { MistralPlugin } from "./mistral" -import { NvidiaPlugin } from "./nvidia" -import { OpenAIPlugin } from "./openai" -import { OpenAICompatiblePlugin } from "./openai-compatible" -import { OpencodePlugin } from "./opencode" -import { OpenRouterPlugin } from "./openrouter" -import { PerplexityPlugin } from "./perplexity" -import { SapAICorePlugin } from "./sap-ai-core" -import { TogetherAIPlugin } from "./togetherai" -import { VercelPlugin } from "./vercel" -import { VenicePlugin } from "./venice" -import { XAIPlugin } from "./xai" -import { ZenmuxPlugin } from "./zenmux" - -export const ProviderPlugins = [ - AlibabaPlugin, - AmazonBedrockPlugin, - AnthropicPlugin, - AzureCognitiveServicesPlugin, - AzurePlugin, - CerebrasPlugin, - CloudflareAIGatewayPlugin, - CloudflareWorkersAIPlugin, - CoherePlugin, - DeepInfraPlugin, - GatewayPlugin, - GithubCopilotPlugin, - GitLabPlugin, - GooglePlugin, - GoogleVertexAnthropicPlugin, - GoogleVertexPlugin, - GroqPlugin, - KiloPlugin, - LLMGatewayPlugin, - MistralPlugin, - NvidiaPlugin, - OpencodePlugin, - OpenAICompatiblePlugin, - OpenAIPlugin, - OpenRouterPlugin, - PerplexityPlugin, - SapAICorePlugin, - TogetherAIPlugin, - VercelPlugin, - VenicePlugin, - XAIPlugin, - ZenmuxPlugin, - DynamicProviderPlugin, -] diff --git a/packages/core/src/plugin/provider/kilo.ts b/packages/core/src/plugin/provider/kilo.ts index 82eca003d1..bf6666c252 100644 --- a/packages/core/src/plugin/provider/kilo.ts +++ b/packages/core/src/plugin/provider/kilo.ts @@ -1,37 +1,45 @@ -// kilocode_change - new file -import { createKilo, KILO_OPENROUTER_BASE } from "@kilocode/kilo-gateway" +import { createKilo, KILO_OPENROUTER_BASE } from "@kilocode/kilo-gateway" // kilocode_change import { Effect } from "effect" import { PluginV2 } from "../../plugin" -import { ProviderV2 } from "../../provider" +import { ProviderV2 } from "../../provider" // kilocode_change -const id = ProviderV2.ID.make("kilo") +const id = ProviderV2.ID.make("kilo") // kilocode_change export const KiloPlugin = PluginV2.define({ id: PluginV2.ID.make("kilo"), effect: Effect.gen(function* () { return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== id) return + "catalog.transform": Effect.fn(function* (evt) { + for (const item of evt.provider.list()) { + if (item.provider.id !== id) continue // kilocode_change + evt.provider.update(item.provider.id, (provider) => { + // kilocode_change start + const options = provider.request.body + const token = options.kilocodeToken ?? options.apiKey ?? process.env.KILO_API_KEY + const org = process.env.KILO_ORG_ID ?? options.kilocodeOrganizationId - const options = evt.provider.options.aisdk.provider - const token = options.kilocodeToken ?? options.apiKey ?? process.env.KILO_API_KEY - const org = process.env.KILO_ORG_ID ?? options.kilocodeOrganizationId - - evt.provider.endpoint = { - type: "aisdk", - package: "@kilocode/kilo-gateway", - url: KILO_OPENROUTER_BASE, + provider.api = { + type: "aisdk", + package: "@kilocode/kilo-gateway", + url: KILO_OPENROUTER_BASE, + } + // kilocode_change end + provider.request.headers["HTTP-Referer"] = "https://kilo.ai/" + // kilocode_change start + provider.request.headers["X-Title"] = "Kilo Code" + options.apiKey = token ?? "anonymous" + options.kilocodeToken = options.apiKey + if (org) options.kilocodeOrganizationId = org + // kilocode_change end + }) } - evt.provider.options.headers["HTTP-Referer"] = "https://kilo.ai/" - evt.provider.options.headers["X-Title"] = "Kilo Code" - options.kilocodeToken = token ?? "anonymous" - if (org) options.kilocodeOrganizationId = org - if (!evt.provider.enabled) evt.provider.enabled = { via: "custom", data: { anonymous: true } } }), + // kilocode_change start "aisdk.sdk": Effect.fn(function* (evt) { if (evt.model.providerID !== id) return evt.sdk = createKilo(evt.options) }), + // kilocode_change end } }), }) diff --git a/packages/core/src/plugin/provider/llmgateway.ts b/packages/core/src/plugin/provider/llmgateway.ts index dd656dfc59..b416abd284 100644 --- a/packages/core/src/plugin/provider/llmgateway.ts +++ b/packages/core/src/plugin/provider/llmgateway.ts @@ -1,17 +1,29 @@ import { Effect } from "effect" +import { Integration } from "../../integration" import { PluginV2 } from "../../plugin" -import { ProviderV2 } from "../../provider" +import { ProviderV2 } from "../../provider" // kilocode_change export const LLMGatewayPlugin = PluginV2.define({ id: PluginV2.ID.make("llmgateway"), effect: Effect.gen(function* () { + const integrations = yield* Integration.Service return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== ProviderV2.ID.make("llmgateway")) return - if (evt.provider.enabled === false) return - evt.provider.options.headers["HTTP-Referer"] = "https://kilo.ai/" // kilocode_change - evt.provider.options.headers["X-Title"] = "Kilo Code" // kilocode_change - evt.provider.options.headers["X-Source"] = "kilo" // kilocode_change + "catalog.transform": Effect.fn(function* (evt) { + for (const item of evt.provider.list()) { + if (item.provider.disabled) continue + if (!(yield* integrations.get(Integration.ID.make(item.provider.id)))) continue + if (item.provider.api.type !== "aisdk") continue + if (item.provider.api.package !== "@ai-sdk/openai-compatible") continue + if (item.provider.api.url !== "https://api.llmgateway.io/v1") continue + if (item.provider.id !== ProviderV2.ID.make("llmgateway")) continue // kilocode_change + evt.provider.update(item.provider.id, (provider) => { + provider.request.headers["HTTP-Referer"] = "https://kilo.ai/" + // kilocode_change start + provider.request.headers["X-Title"] = "Kilo Code" + provider.request.headers["X-Source"] = "kilo" + // kilocode_change end + }) + } }), } }), diff --git a/packages/core/src/plugin/provider/nvidia.ts b/packages/core/src/plugin/provider/nvidia.ts index ebbca16d2a..94e8163a5d 100644 --- a/packages/core/src/plugin/provider/nvidia.ts +++ b/packages/core/src/plugin/provider/nvidia.ts @@ -1,16 +1,25 @@ import { Effect } from "effect" import { PluginV2 } from "../../plugin" -import { ProviderV2 } from "../../provider" +import { ProviderV2 } from "../../provider" // kilocode_change export const NvidiaPlugin = PluginV2.define({ id: PluginV2.ID.make("nvidia"), effect: Effect.gen(function* () { return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== ProviderV2.ID.make("nvidia")) return - evt.provider.options.headers["HTTP-Referer"] = "https://kilo.ai/" // kilocode_change - evt.provider.options.headers["X-Title"] = "Kilo Code" // kilocode_change - evt.provider.options.headers["X-BILLING-INVOKE-ORIGIN"] ??= "KiloCode" // kilocode_change + "catalog.transform": Effect.fn(function* (evt) { + for (const item of evt.provider.list()) { + if (item.provider.api.type !== "aisdk") continue + if (item.provider.api.package !== "@ai-sdk/openai-compatible") continue + if (item.provider.api.url !== "https://integrate.api.nvidia.com/v1") continue + if (item.provider.id !== ProviderV2.ID.make("nvidia")) continue // kilocode_change + evt.provider.update(item.provider.id, (provider) => { + provider.request.headers["HTTP-Referer"] = "https://kilo.ai/" // kilocode_change + // kilocode_change start + provider.request.headers["X-Title"] = "Kilo Code" + provider.request.headers["X-BILLING-INVOKE-ORIGIN"] ??= "KiloCode" + // kilocode_change end + }) + } }), } }), diff --git a/packages/core/src/plugin/provider/openai-auth.ts b/packages/core/src/plugin/provider/openai-auth.ts new file mode 100644 index 0000000000..fb9e8d300a --- /dev/null +++ b/packages/core/src/plugin/provider/openai-auth.ts @@ -0,0 +1,263 @@ +import { createServer } from "node:http" +import { Deferred, Effect } from "effect" +import { Integration } from "../../integration" +import { Credential } from "../../credential" +import { InstallationVersion } from "../../installation/version" + +const clientID = "app_EMoamEEZ73f0CkXaXp7hrann" +const issuer = "https://auth.openai.com" +const callbackPort = 1455 +const pollingSafetyMargin = 3000 + +type Pkce = { + verifier: string + challenge: string +} + +type TokenResponse = { + id_token: string + access_token: string + refresh_token: string + expires_in?: number +} + +type Claims = { + chatgpt_account_id?: string + organizations?: Array<{ id: string }> + "https://api.openai.com/auth"?: { chatgpt_account_id?: string } +} + +const browserMethodID = Integration.MethodID.make("chatgpt-browser") +const headlessMethodID = Integration.MethodID.make("chatgpt-headless") + +export const browser = { + integrationID: Integration.ID.make("openai"), + method: { + id: browserMethodID, + type: "oauth", + label: "ChatGPT Pro/Plus (browser)", + }, + authorize: () => + Effect.gen(function* () { + const pkce = yield* Effect.promise(generatePKCE) + const state = base64UrlEncode(crypto.getRandomValues(new Uint8Array(32)).buffer) + const code = yield* Deferred.make() + const redirect = `http://localhost:${callbackPort}/auth/callback` + const server = createServer((request, response) => { + const url = new URL(request.url ?? "/", `http://localhost:${callbackPort}`) + if (url.pathname !== "/auth/callback") { + response.writeHead(404).end("Not found") + return + } + // kilocode_change start - unrelated localhost requests must not terminate the active OAuth attempt + if (url.searchParams.get("state") !== state) { + response.writeHead(400, { "Content-Type": "text/html" }).end(errorPage("Invalid OAuth state")) + return + } + // kilocode_change end + const error = url.searchParams.get("error_description") ?? url.searchParams.get("error") + const value = url.searchParams.get("code") + if (error) { + Effect.runFork(Deferred.fail(code, new Error(error))) + response.writeHead(400, { "Content-Type": "text/html" }).end(errorPage(error)) + return + } + if (!value) { + const message = "Missing authorization code" + Effect.runFork(Deferred.fail(code, new Error(message))) + response.writeHead(400, { "Content-Type": "text/html" }).end(errorPage(message)) + return + } + Effect.runFork(Deferred.succeed(code, value)) + response.writeHead(200, { "Content-Type": "text/html" }).end(successPage) + }) + yield* Effect.callback((resume) => { + server.once("error", (error) => resume(Effect.fail(error))) + server.listen(callbackPort, "localhost", () => resume(Effect.void)) + }) + yield* Effect.addFinalizer(() => + Effect.sync(() => { + server.close() + }), + ) + return { + mode: "auto" as const, + url: authorizeURL(redirect, pkce, state), + instructions: "Complete authorization in your browser. This window will close automatically.", + callback: Deferred.await(code).pipe( + Effect.flatMap((value) => exchange(value, redirect, pkce)), + Effect.map((tokens) => credential(browserMethodID, tokens)), + ), + } + }), + refresh: (value) => refresh(value), +} satisfies Integration.OAuthImplementation + +export const headless = { + integrationID: Integration.ID.make("openai"), + method: { + id: headlessMethodID, + type: "oauth", + label: "ChatGPT Pro/Plus (headless)", + }, + authorize: () => + Effect.gen(function* () { + const device = yield* request<{ device_auth_id: string; user_code: string; interval: string }>( + `${issuer}/api/accounts/deviceauth/usercode`, + { + method: "POST", + headers: headers("application/json"), + body: JSON.stringify({ client_id: clientID }), + }, + ) + const interval = Math.max(Number.parseInt(device.interval) || 5, 1) * 1000 + return { + mode: "auto" as const, + url: `${issuer}/codex/device`, + instructions: `Enter code: ${device.user_code}`, + callback: Effect.gen(function* () { + while (true) { + const response = yield* Effect.tryPromise({ + try: (signal) => + fetch(`${issuer}/api/accounts/deviceauth/token`, { + method: "POST", + headers: headers("application/json"), + body: JSON.stringify({ device_auth_id: device.device_auth_id, user_code: device.user_code }), + signal, + }), + catch: (cause) => cause, + }) + if (response.ok) { + const data = (yield* Effect.promise(() => response.json())) as { + authorization_code: string + code_verifier: string + } + return credential( + headlessMethodID, + yield* exchange(data.authorization_code, `${issuer}/deviceauth/callback`, { + verifier: data.code_verifier, + challenge: "", + }), + ) + } + if (response.status !== 403 && response.status !== 404) { + return yield* Effect.fail(new Error(`Device authorization failed: ${response.status}`)) + } + yield* Effect.sleep(interval + pollingSafetyMargin) + } + }), + } + }), + refresh: (value) => refresh(value), +} satisfies Integration.OAuthImplementation + +function headers(contentType: string) { + return { "Content-Type": contentType, "User-Agent": `kilo/${InstallationVersion}` } // kilocode_change +} + +function exchange(code: string, redirect: string, pkce: Pkce) { + return request(`${issuer}/oauth/token`, { + method: "POST", + headers: headers("application/x-www-form-urlencoded"), + body: new URLSearchParams({ + grant_type: "authorization_code", + code, + redirect_uri: redirect, + client_id: clientID, + code_verifier: pkce.verifier, + }).toString(), + }) +} + +function refresh(value: Credential.OAuth) { + return request(`${issuer}/oauth/token`, { + method: "POST", + headers: headers("application/x-www-form-urlencoded"), + body: new URLSearchParams({ + grant_type: "refresh_token", + refresh_token: value.refresh, + client_id: clientID, + }).toString(), + }).pipe( + Effect.map((tokens) => { + const next = credential(value.methodID, tokens) + return new Credential.OAuth({ + ...next, + metadata: next.metadata ?? value.metadata, + }) + }), + ) +} + +function request(url: string, init: RequestInit) { + return Effect.tryPromise({ + try: async (signal) => { + const response = await fetch(url, { ...init, signal }) + if (!response.ok) throw new Error(`Request failed: ${response.status}`) + return response.json() as Promise + }, + catch: (cause) => cause, + }) +} + +function credential(methodID: Integration.MethodID, tokens: TokenResponse) { + const accountID = extractAccountID(tokens) + return new Credential.OAuth({ + type: "oauth", + methodID, + refresh: tokens.refresh_token, + access: tokens.access_token, + expires: Date.now() + (tokens.expires_in ?? 3600) * 1000, + metadata: accountID ? { accountID } : undefined, + }) +} + +async function generatePKCE(): Promise { + const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~" + const verifier = Array.from(crypto.getRandomValues(new Uint8Array(43)), (byte) => chars[byte % chars.length]).join("") + const challenge = base64UrlEncode(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(verifier))) + return { verifier, challenge } +} + +function base64UrlEncode(buffer: ArrayBuffer) { + return Buffer.from(buffer).toString("base64url") +} + +function authorizeURL(redirect: string, pkce: Pkce, state: string) { + return `${issuer}/oauth/authorize?${new URLSearchParams({ + response_type: "code", + client_id: clientID, + redirect_uri: redirect, + scope: "openid profile email offline_access", + code_challenge: pkce.challenge, + code_challenge_method: "S256", + id_token_add_organizations: "true", + codex_cli_simplified_flow: "true", + state, + originator: "kilo", // kilocode_change + })}` +} + +function extractAccountID(tokens: TokenResponse) { + return claim(tokens.id_token) ?? claim(tokens.access_token) +} + +function claim(token: string) { + const part = token.split(".")[1] + if (!part) return + try { + const claims = JSON.parse(Buffer.from(part, "base64url").toString()) as Claims + return ( + claims.chatgpt_account_id ?? + claims["https://api.openai.com/auth"]?.chatgpt_account_id ?? + claims.organizations?.[0]?.id + ) + } catch { + return + } +} + +const successPage = + "Kilo

Authorization successful

You can close this window.

" +const errorPage = (message: string) => + `Kilo

Authorization failed

${message.replace(/[&<>"']/g, "")}

` diff --git a/packages/core/src/plugin/provider/openai.ts b/packages/core/src/plugin/provider/openai.ts index a81455f198..d58bd784f5 100644 --- a/packages/core/src/plugin/provider/openai.ts +++ b/packages/core/src/plugin/provider/openai.ts @@ -2,10 +2,17 @@ import { Effect } from "effect" import { ModelV2 } from "../../model" import { PluginV2 } from "../../plugin" import { ProviderV2 } from "../../provider" +import { Integration } from "../../integration" +import { browser, headless } from "./openai-auth" export const OpenAIPlugin = PluginV2.define({ id: PluginV2.ID.make("openai"), effect: Effect.gen(function* () { + const integrations = yield* Integration.Service + yield* integrations.update((editor) => { + editor.method.update(browser) + editor.method.update(headless) + }) return { "aisdk.sdk": Effect.fn(function* (evt) { if (evt.package !== "@ai-sdk/openai") return @@ -14,13 +21,19 @@ export const OpenAIPlugin = PluginV2.define({ }), "aisdk.language": Effect.fn(function* (evt) { if (evt.model.providerID !== ProviderV2.ID.openai) return - evt.language = evt.sdk.responses(evt.model.apiID) + evt.language = evt.sdk.responses(evt.model.api.id) }), - "model.update": Effect.fn(function* (evt) { - if (evt.model.providerID !== ProviderV2.ID.openai) return - // OpenAIPlugin sends OpenAI models through Responses; this alias is a - // chat-completions-only model, so remove it only from OpenAI's catalog. - if (evt.model.id === ModelV2.ID.make("gpt-5-chat-latest")) evt.cancel = true + "catalog.transform": Effect.fn(function* (evt) { + for (const item of evt.provider.list()) { + if (item.provider.api.type !== "aisdk") continue + if (item.provider.api.package !== "@ai-sdk/openai") continue + if (!item.models.has(ModelV2.ID.make("gpt-5-chat-latest"))) continue + evt.model.update(item.provider.id, ModelV2.ID.make("gpt-5-chat-latest"), (model) => { + // OpenAIPlugin sends OpenAI models through Responses; this alias is a + // chat-completions-only model, so hide it only from OpenAI's catalog. + model.enabled = false + }) + } }), } }), diff --git a/packages/core/src/plugin/provider/opencode.ts b/packages/core/src/plugin/provider/opencode.ts index 10bbb62dad..56e71f822d 100644 --- a/packages/core/src/plugin/provider/opencode.ts +++ b/packages/core/src/plugin/provider/opencode.ts @@ -1,26 +1,31 @@ import { Effect } from "effect" +import { Integration } from "../../integration" import { PluginV2 } from "../../plugin" import { ProviderV2 } from "../../provider" export const OpencodePlugin = PluginV2.define({ id: PluginV2.ID.make("opencode"), effect: Effect.gen(function* () { + const integrations = yield* Integration.Service let hasKey = false return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== ProviderV2.ID.opencode) return + "catalog.transform": Effect.fn(function* (evt) { + const item = evt.provider.get(ProviderV2.ID.opencode) + if (!item) return + const integration = yield* integrations.get(Integration.ID.make(item.provider.id)) hasKey = Boolean( - process.env.OPENCODE_API_KEY || - evt.provider.env.some((item) => process.env[item]) || - evt.provider.options.aisdk.provider.apiKey || - (evt.provider.enabled && evt.provider.enabled.via === "auth"), + process.env.OPENCODE_API_KEY || integration?.connections.length || item.provider.request.body.apiKey, ) - if (!hasKey) evt.provider.options.aisdk.provider.apiKey = "public" - }), - "model.update": Effect.fn(function* (evt) { - if (evt.model.providerID !== ProviderV2.ID.opencode) return + evt.provider.update(item.provider.id, (provider) => { + if (!hasKey) provider.request.body.apiKey = "public" + }) if (hasKey) return - if (evt.model.cost.some((item) => item.input > 0)) evt.cancel = true + for (const model of item.models.values()) { + if (!model.cost.some((cost) => cost.input > 0)) continue + evt.model.update(item.provider.id, model.id, (draft) => { + draft.enabled = false + }) + } }), } }), diff --git a/packages/core/src/plugin/provider/openrouter.ts b/packages/core/src/plugin/provider/openrouter.ts index b3e926137f..a27e4288da 100644 --- a/packages/core/src/plugin/provider/openrouter.ts +++ b/packages/core/src/plugin/provider/openrouter.ts @@ -1,29 +1,36 @@ import { Effect } from "effect" import { ModelV2 } from "../../model" import { PluginV2 } from "../../plugin" -import { ProviderV2 } from "../../provider" +import { ProviderV2 } from "../../provider" // kilocode_change export const OpenRouterPlugin = PluginV2.define({ id: PluginV2.ID.make("openrouter"), effect: Effect.gen(function* () { return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== ProviderV2.ID.openrouter) return - evt.provider.options.headers["HTTP-Referer"] = "https://kilo.ai/" // kilocode_change - evt.provider.options.headers["X-Title"] = "Kilo Code" // kilocode_change + "catalog.transform": Effect.fn(function* (evt) { + for (const item of evt.provider.list()) { + if (item.provider.api.type !== "aisdk") continue + if (item.provider.api.package !== "@openrouter/ai-sdk-provider") continue + if (item.provider.id !== ProviderV2.ID.openrouter) continue // kilocode_change + evt.provider.update(item.provider.id, (provider) => { + provider.request.headers["HTTP-Referer"] = "https://kilo.ai/" // kilocode_change + provider.request.headers["X-Title"] = "Kilo Code" // kilocode_change + }) + for (const modelID of [ModelV2.ID.make("gpt-5-chat-latest"), ModelV2.ID.make("openai/gpt-5-chat")]) { + if (!item.models.has(modelID)) continue + evt.model.update(item.provider.id, modelID, (model) => { + // These are OpenRouter-specific OpenAI chat aliases that do not work + // on the generic path. Keep custom providers with matching IDs untouched. + model.enabled = false + }) + } + } }), "aisdk.sdk": Effect.fn(function* (evt) { if (evt.package !== "@openrouter/ai-sdk-provider") return const mod = yield* Effect.promise(() => import("@openrouter/ai-sdk-provider")) evt.sdk = mod.createOpenRouter(evt.options) }), - "model.update": Effect.fn(function* (evt) { - if (evt.model.providerID !== ProviderV2.ID.openrouter) return - // These are OpenRouter-specific OpenAI chat aliases that do not work on - // the generic path. Keep custom providers with matching IDs untouched. - if (evt.model.id === ModelV2.ID.make("gpt-5-chat-latest")) evt.cancel = true - if (evt.model.id === ModelV2.ID.make("openai/gpt-5-chat")) evt.cancel = true - }), } }), }) diff --git a/packages/core/src/plugin/provider/sap-ai-core.ts b/packages/core/src/plugin/provider/sap-ai-core.ts index 7c57b785bf..47c8b7eaa8 100644 --- a/packages/core/src/plugin/provider/sap-ai-core.ts +++ b/packages/core/src/plugin/provider/sap-ai-core.ts @@ -37,7 +37,7 @@ export const SapAICorePlugin = PluginV2.define({ }), "aisdk.language": Effect.fn(function* (evt) { if (evt.model.providerID !== ProviderV2.ID.make("sap-ai-core")) return - evt.language = evt.sdk(evt.model.apiID) + evt.language = evt.sdk(evt.model.api.id) }), } }), diff --git a/packages/core/src/plugin/provider/snowflake-cortex.ts b/packages/core/src/plugin/provider/snowflake-cortex.ts new file mode 100644 index 0000000000..0971f3518d --- /dev/null +++ b/packages/core/src/plugin/provider/snowflake-cortex.ts @@ -0,0 +1,89 @@ +import { Effect } from "effect" +import { PluginV2 } from "../../plugin" +import { ProviderV2 } from "../../provider" + +type FetchLike = (url: string | URL | Request, init?: RequestInit) => Promise + +// Exported for testing: intercepts Cortex-specific request/response quirks. +export function cortexFetch(upstream: FetchLike = fetch) { + return async (url: string | URL | Request, init?: RequestInit): Promise => { + if (init?.body && typeof init.body === "string") { + try { + const body = JSON.parse(init.body) + if ("max_tokens" in body) { + body.max_completion_tokens = body.max_tokens + delete body.max_tokens + init = { ...init, body: JSON.stringify(body) } + } + } catch {} + } + + const response = await upstream(url, init) + + // Cortex returns 400 "conversation complete" as a normal stop condition + if (!response.ok && response.status === 400) { + try { + const errorData = (await response.clone().json()) as Record + if ( + String(errorData.message || errorData.error || "") + .toLowerCase() + .includes("conversation complete") + ) { + return new Response( + JSON.stringify({ choices: [{ finish_reason: "stop", message: { content: "", role: "assistant" } }] }), + { status: 200, headers: new Headers({ "content-type": "application/json" }) }, + ) + } + } catch {} + } + + // Cortex returns role:"" in streaming deltas; the AI SDK schema requires "assistant" + if (response.body && response.headers.get("content-type")?.includes("text/event-stream")) { + const reader = response.body.getReader() + const encoder = new TextEncoder() + const decoder = new TextDecoder() + const stream = new ReadableStream({ + async pull(ctrl) { + const { done, value } = await reader.read() + if (done) { + ctrl.close() + return + } + ctrl.enqueue( + encoder.encode(decoder.decode(value, { stream: true }).replace(/"role"\s*:\s*""/g, '"role":"assistant"')), + ) + }, + cancel() { + reader.cancel() + }, + }) + return new Response(stream, { headers: response.headers, status: response.status }) + } + + return response + } +} + +export const SnowflakeCortexPlugin = PluginV2.define({ + id: PluginV2.ID.make("snowflake-cortex"), + effect: Effect.gen(function* () { + return { + "aisdk.sdk": Effect.fn(function* (evt) { + if (evt.model.providerID !== ProviderV2.ID.make("snowflake-cortex")) return + const token = + process.env.SNOWFLAKE_CORTEX_TOKEN ?? + process.env.SNOWFLAKE_CORTEX_PAT ?? + (typeof evt.options.token === "string" ? evt.options.token : undefined) ?? + (typeof evt.options.apiKey === "string" ? evt.options.apiKey : undefined) + const upstream = typeof evt.options.fetch === "function" ? (evt.options.fetch as FetchLike) : undefined + if (evt.options.includeUsage !== false) evt.options.includeUsage = true + const mod = yield* Effect.promise(() => import("@ai-sdk/openai-compatible")) + evt.sdk = mod.createOpenAICompatible({ + ...evt.options, + ...(token ? { apiKey: token } : {}), + fetch: cortexFetch(upstream) as typeof fetch, + } as any) + }), + } + }), +}) diff --git a/packages/core/src/plugin/provider/vercel.ts b/packages/core/src/plugin/provider/vercel.ts index 2d50e3b093..7334f1804f 100644 --- a/packages/core/src/plugin/provider/vercel.ts +++ b/packages/core/src/plugin/provider/vercel.ts @@ -1,15 +1,21 @@ import { Effect } from "effect" import { PluginV2 } from "../../plugin" -import { ProviderV2 } from "../../provider" +import { ProviderV2 } from "../../provider" // kilocode_change export const VercelPlugin = PluginV2.define({ id: PluginV2.ID.make("vercel"), effect: Effect.gen(function* () { return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== ProviderV2.ID.make("vercel")) return - evt.provider.options.headers["http-referer"] = "https://kilo.ai/" // kilocode_change - evt.provider.options.headers["x-title"] = "Kilo Code" // kilocode_change + "catalog.transform": Effect.fn(function* (evt) { + for (const item of evt.provider.list()) { + if (item.provider.api.type !== "aisdk") continue + if (item.provider.api.package !== "@ai-sdk/vercel") continue + if (item.provider.id !== ProviderV2.ID.make("vercel")) continue // kilocode_change + evt.provider.update(item.provider.id, (provider) => { + provider.request.headers["http-referer"] = "https://kilo.ai/" // kilocode_change + provider.request.headers["x-title"] = "Kilo Code" // kilocode_change + }) + } }), "aisdk.sdk": Effect.fn(function* (evt) { if (evt.package !== "@ai-sdk/vercel") return diff --git a/packages/core/src/plugin/provider/xai.ts b/packages/core/src/plugin/provider/xai.ts index b54aa7374c..4e9d53e47a 100644 --- a/packages/core/src/plugin/provider/xai.ts +++ b/packages/core/src/plugin/provider/xai.ts @@ -13,7 +13,7 @@ export const XAIPlugin = PluginV2.define({ }), "aisdk.language": Effect.fn(function* (evt) { if (evt.model.providerID !== ProviderV2.ID.make("xai")) return - evt.language = evt.sdk.responses(evt.model.apiID) + evt.language = evt.sdk.responses(evt.model.api.id) }), } }), diff --git a/packages/core/src/plugin/provider/zenmux.ts b/packages/core/src/plugin/provider/zenmux.ts index be8086f482..4b505875f6 100644 --- a/packages/core/src/plugin/provider/zenmux.ts +++ b/packages/core/src/plugin/provider/zenmux.ts @@ -1,15 +1,22 @@ import { Effect } from "effect" import { PluginV2 } from "../../plugin" -import { ProviderV2 } from "../../provider" +import { ProviderV2 } from "../../provider" // kilocode_change export const ZenmuxPlugin = PluginV2.define({ id: PluginV2.ID.make("zenmux"), effect: Effect.gen(function* () { return { - "provider.update": Effect.fn(function* (evt) { - if (evt.provider.id !== ProviderV2.ID.make("zenmux")) return - evt.provider.options.headers["HTTP-Referer"] ??= "https://kilo.ai/" // kilocode_change - evt.provider.options.headers["X-Title"] ??= "Kilo Code" // kilocode_change + "catalog.transform": Effect.fn(function* (evt) { + for (const item of evt.provider.list()) { + if (item.provider.api.type !== "aisdk") continue + if (item.provider.api.package !== "@ai-sdk/openai-compatible") continue + if (item.provider.api.url !== "https://zenmux.ai/api/v1") continue + if (item.provider.id !== ProviderV2.ID.make("zenmux")) continue // kilocode_change + evt.provider.update(item.provider.id, (provider) => { + provider.request.headers["HTTP-Referer"] ??= "https://kilo.ai/" // kilocode_change + provider.request.headers["X-Title"] ??= "Kilo Code" // kilocode_change + }) + } }), } }), diff --git a/packages/core/src/plugin/skill.ts b/packages/core/src/plugin/skill.ts new file mode 100644 index 0000000000..620fdc8b9a --- /dev/null +++ b/packages/core/src/plugin/skill.ts @@ -0,0 +1,34 @@ +/// + +export * as SkillPlugin from "./skill" + +import { Effect } from "effect" +import { PluginV2 } from "../plugin" +import { AbsolutePath } from "../schema" +import { SkillV2 } from "../skill" +import customizeOpencodeContent from "./skill/customize-opencode.md" with { type: "text" } + +export const CustomizeOpencodeContent = customizeOpencodeContent + +export const Plugin = PluginV2.define({ + id: PluginV2.ID.make("skill"), + effect: Effect.gen(function* () { + const skill = yield* SkillV2.Service + const transform = yield* skill.transform() + + yield* transform((editor) => { + editor.source( + new SkillV2.EmbeddedSource({ + type: "embedded", + skill: new SkillV2.Info({ + name: "customize-opencode", + description: + "Use ONLY when the user is editing or creating opencode's own configuration: opencode.json, opencode.jsonc, files under .opencode/, or files under ~/.config/opencode/. Also use when creating or fixing opencode agents, subagents, commands, skills, plugins, MCP servers, or permission rules. Do not use for the user's own application code, or for any project that is not configuring opencode itself.", + location: AbsolutePath.make("/builtin/customize-opencode.md"), + content: CustomizeOpencodeContent, + }), + }), + ) + }) + }), +}) diff --git a/packages/opencode/src/skill/prompt/customize-opencode.md b/packages/core/src/plugin/skill/customize-opencode.md similarity index 77% rename from packages/opencode/src/skill/prompt/customize-opencode.md rename to packages/core/src/plugin/skill/customize-opencode.md index 2dd9df7c13..f5235cc23f 100644 --- a/packages/opencode/src/skill/prompt/customize-opencode.md +++ b/packages/core/src/plugin/skill/customize-opencode.md @@ -1,6 +1,6 @@ @@ -43,6 +43,8 @@ already-loaded config until then. | Global config | `~/.config/opencode/opencode.json` (NOT `~/.opencode/`) | | Project agents | `.opencode/agent/.md` or `.opencode/agents/.md` | | Global agents | `~/.config/opencode/agent(s)/.md` | +| Project commands | `.opencode/command/.md` or `.opencode/commands/.md` | +| Global commands | `~/.config/opencode/command(s)/.md` | | Project skills | `.opencode/skill(s)//SKILL.md` | | Global skills | `~/.config/opencode/skill(s)//SKILL.md` | | External skills (auto-loaded) | `~/.claude/skills//SKILL.md`, `~/.agents/skills//SKILL.md` | @@ -73,6 +75,19 @@ Every field is optional. "urls": ["https://example.com/.well-known/skills/"] }, + "references": { + "docs": { + "path": "../docs", + "description": "Use for product behavior and documentation conventions" + }, + "sdk": { + "repository": "owner/sdk", + "branch": "main", + "description": "Use for SDK implementation details", + "hidden": true + } + }, + "agent": { "my-agent": { "model": "anthropic/claude-sonnet-4-6", @@ -83,7 +98,7 @@ Every field is optional. }, "command": { - "deploy": { "description": "...", "prompt": "..." } + "deploy": { "description": "...", "template": "..." } }, "provider": { @@ -136,7 +151,9 @@ Shape notes worth being explicit about: - `model` always carries a provider prefix: `"anthropic/claude-sonnet-4-6"`. - `skills` is an object with `paths` and/or `urls`, not an array. +- `references` is an object keyed by alias. Each value is a local path, Git repository, or string shorthand. - `agent` is an object keyed by agent name, not an array. +- `command` is an object keyed by command name, not an array. - `plugin` is an array of strings or `[name, options]` tuples, not an object. - `mcp[name].command` is an array of strings, never a single string. `type` is required. - `permission` is either a string action or an object keyed by tool name. @@ -172,6 +189,38 @@ Register skills from non-default locations via `skills.paths` (scanned recursively for `**/SKILL.md`) and `skills.urls` (each URL serves a list of skills). +## References + +References make local directories and Git repositories outside the active +project available as supporting context. Configure them under `references`, +keyed by the alias used in `@` autocomplete: + +```json +{ + "references": { + "docs": { + "path": "../product-docs", + "description": "Use for product behavior and terminology" + }, + "effect": { + "repository": "Effect-TS/effect", + "branch": "main", + "description": "Use for Effect implementation details" + } + } +} +``` + +Local `path` values may be relative to the declaring config, absolute, or use +`~/`. Git `repository` values accept Git URLs, host/path references, and GitHub +`owner/repo` shorthand; `branch` is optional. Both forms support optional +`description` and `hidden` fields. + +- Only references with a `description` are advertised to agents in system context. +- `hidden: true` removes a reference from TUI `@` autocomplete only. It remains available to agents and by direct path. +- Reference directories are automatically allowed through the external-directory boundary; normal read/edit/tool permissions still apply. +- String shorthand is supported: use `"docs": "../docs"` for local paths or `"effect": "Effect-TS/effect"` for Git repositories. + ## Agents Two ways to define an agent. Use the file form for anything non-trivial. @@ -227,11 +276,35 @@ file, `disable: true` in frontmatter. ### Built-in agents -opencode ships with `build`, `plan`, `general`, `explore`, plus optionally -`scout` (gated on `KILO_EXPERIMENTAL_SCOUT`). Hidden internal agents: +opencode ships with `build`, `plan`, `general`, `explore`. Hidden internal agents: `compaction`, `title`, `summary`. To override a built-in's fields, define the same key in `agent: { : { ... } }`. +## Commands + +opencode's command loader scans for `**/*.md` inside command directories. The +file is named after the command, and lives directly inside the `command` folder: + +``` +.opencode/command/deploy.md +``` + +Frontmatter: + +```markdown +--- +description: One sentence describing what the command does. +agent: build +model: anthropic/claude-sonnet-4-6 +--- + +(command body in markdown: the prompt opencode runs, with $ARGUMENTS for the user's input) +``` + +- `template` is the command body — everything below the frontmatter — and is required: it is the prompt opencode runs when the command is invoked. Do not also put a `template:` key in the frontmatter. +- `$ARGUMENTS` is replaced with everything the user typed after the command; `$1`, `$2`, … pull individual positional arguments. +- Optional: `description`, `agent`, `model`, `variant`, `subtask`. + ## Plugins `plugin:` is an array. Each entry is one of: @@ -304,7 +377,7 @@ Special object-shaped (not callbacks): `tool: { my_tool: { ... } }`, "type": "remote", "url": "https://...", "enabled": true, - "headers": { "Authorization": "Bearer ${GITHUB_TOKEN}" } + "headers": { "Authorization": "Bearer {env:GITHUB_TOKEN}" } }, "old-server": { "enabled": false } } @@ -312,7 +385,9 @@ Special object-shaped (not callbacks): `tool: { my_tool: { ... } }`, ``` `command` is an array of strings. `type` is required. Use `enabled: false` to -disable a server inherited from a parent config. +disable a server inherited from a parent config. String values such as header +tokens support `{env:VAR}` interpolation (and `{file:path}`); the shell-style +`${VAR}` is not substituted. ## Permissions @@ -335,8 +410,8 @@ rules last. everything" and is rarely what the user wants. Known permission keys: `read, edit, glob, grep, list, bash, task, -external_directory, todowrite, question, webfetch, websearch, repo_clone, -repo_overview, lsp, doom_loop, skill`. Some of these (`todowrite, +external_directory, todowrite, question, webfetch, websearch, lsp, doom_loop, +skill`. Some of these (`todowrite, question, webfetch, websearch, doom_loop`) only accept a flat action, not a per-pattern object. @@ -368,8 +443,8 @@ When a user's config is broken and opencode won't start, these env vars help: exact shape, or the field is not covered in this skill, fetch `https://opencode.ai/config.json` and read the schema rather than guessing. - Preserve `$schema` and any existing fields the user did not ask to change. -- For agent, skill, and plugin definitions, prefer creating new files in the - correct location over inlining everything in `opencode.json`. +- For agent, command, skill, and plugin definitions, prefer creating new files + in the correct location over inlining everything in `opencode.json`. - If the user's existing config is malformed, point them at the env-var escape hatches above so they can edit from inside opencode without breaking their session. diff --git a/packages/core/src/policy.ts b/packages/core/src/policy.ts new file mode 100644 index 0000000000..9b7438f4ff --- /dev/null +++ b/packages/core/src/policy.ts @@ -0,0 +1,46 @@ +export * as Policy from "./policy" + +import { Context, Effect as EffectRuntime, Layer, Schema } from "effect" +import { Wildcard } from "./util/wildcard" +import { Location } from "./location" + +export const Effect = Schema.Literals(["allow", "deny"]).annotate({ identifier: "Policy.Effect" }) +export type Effect = typeof Effect.Type + +export class Info extends Schema.Class("Policy.Info")({ + action: Schema.String, + effect: Effect, + resource: Schema.String, +}) {} + +export interface Interface { + readonly load: (statements: Info[]) => EffectRuntime.Effect + readonly evaluate: (action: string, resource: string, fallback: Effect) => EffectRuntime.Effect + readonly hasStatements: () => boolean +} + +export class Service extends Context.Service()("@opencode/v2/Policy") {} + +export const layer = Layer.effect( + Service, + EffectRuntime.gen(function* () { + let statements: Info[] = [] + yield* Location.Service + + return Service.of({ + load: EffectRuntime.fn("Policy.load")(function* (input) { + statements = input + }), + hasStatements: () => statements.length > 0, + evaluate: EffectRuntime.fn("Policy.evaluate")(function* (action, resource, fallback) { + return ( + statements.findLast( + (statement) => Wildcard.match(action, statement.action) && Wildcard.match(resource, statement.resource), + )?.effect ?? fallback + ) + }), + }) + }), +) + +export const locationLayer = layer diff --git a/packages/core/src/process.ts b/packages/core/src/process.ts index f076ea4e42..44418d74c1 100644 --- a/packages/core/src/process.ts +++ b/packages/core/src/process.ts @@ -3,6 +3,7 @@ import type { PlatformError } from "effect/PlatformError" import { ChildProcess } from "effect/unstable/process" import { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner" import { CrossSpawnSpawner } from "./cross-spawn-spawner" +import { LayerNode } from "./effect/layer-node" export class AppProcessError extends Schema.TaggedErrorClass()("AppProcessError", { command: Schema.String, @@ -79,7 +80,7 @@ const describeCommand = (command: ChildProcess.Command): string => { const wrapError = (description: string, cause: unknown): AppProcessError => cause instanceof AppProcessError ? cause : new AppProcessError({ command: description, cause }) -const abortError = (signal: AbortSignal): Error => { +export const abortError = (signal: AbortSignal): Error => { const reason = signal.reason if (reason instanceof Error) return reason const err = new Error("Aborted") @@ -87,7 +88,7 @@ const abortError = (signal: AbortSignal): Error => { return err } -const waitForAbort = (signal: AbortSignal) => +export const waitForAbort = (signal: AbortSignal) => Effect.callback((resume) => { if (signal.aborted) { resume(Effect.fail(abortError(signal))) @@ -107,7 +108,7 @@ const normalizeStdin = ( ? Stream.make(input) : input -const collectStream = (stream: Stream.Stream, maxOutputBytes: number | undefined) => +export const collectStream = (stream: Stream.Stream, maxOutputBytes: number | undefined) => Stream.runFold( stream, () => ({ chunks: [] as Uint8Array[], bytes: 0, truncated: false }), @@ -230,5 +231,6 @@ export const layer = Layer.effect( ) export const defaultLayer = layer.pipe(Layer.provide(CrossSpawnSpawner.defaultLayer)) +export const node = LayerNode.make(layer, [CrossSpawnSpawner.node]) export * as AppProcess from "./process" diff --git a/packages/core/src/project.ts b/packages/core/src/project.ts new file mode 100644 index 0000000000..4f94193098 --- /dev/null +++ b/packages/core/src/project.ts @@ -0,0 +1,137 @@ +export * as ProjectV2 from "./project" +export * as Project from "./project" + +import { Context, Effect, Layer, Schema } from "effect" +import path from "path" +import { AbsolutePath } from "./schema" +import { FSUtil } from "./fs-util" +import { Git } from "./git" +import { LayerNode } from "./effect/layer-node" +import { Hash } from "./util/hash" +import { ProjectDirectories } from "./project/directories" +import { ProjectSchema } from "./project/schema" + +export const ID = ProjectSchema.ID +export type ID = ProjectSchema.ID + +export const Vcs = ProjectSchema.Vcs +export type Vcs = ProjectSchema.Vcs + +export class Info extends Schema.Class("Project.Info")({ + id: ID, +}) {} + +export const DirectoriesInput = ProjectDirectories.ListInput +export type DirectoriesInput = typeof DirectoriesInput.Type + +export const Directories = ProjectDirectories.ListOutput +export type Directories = typeof Directories.Type + +export interface Resolved { + readonly previous?: ID + readonly id: ID + readonly directory: AbsolutePath + readonly vcs?: Vcs +} + +export interface Interface { + readonly directories: (input: DirectoriesInput) => Effect.Effect + readonly resolve: (input: AbsolutePath) => Effect.Effect + /** + * Temporary bridge method for writing the resolved project ID to the repo-local cache. + * + * This exists while the old opencode project service and this core project + * service work together: core resolves the ID, while the old service still owns + * database migration and persistence. The old service should call this after it + * finishes migrating from `resolve().previous` to `resolve().id`; once project + * persistence moves into core, this separate bridge method can go away. + */ + readonly commit: (input: { store: AbsolutePath; id: ID }) => Effect.Effect +} + +export class Service extends Context.Service()("@opencode/ProjectV2") {} + +export const layer = Layer.effect( + Service, + Effect.gen(function* () { + const fs = yield* FSUtil.Service + const git = yield* Git.Service + const projectDirectories = yield* ProjectDirectories.Service + + const directories = Effect.fn("Project.directories")(function* (input: DirectoriesInput) { + return yield* projectDirectories.list(input.projectID) + }) + + const cached = Effect.fnUntraced(function* (dir: string) { + return yield* fs.readFileString(path.join(dir, "kilo")).pipe( // kilocode_change + Effect.map((value) => value.trim()), + Effect.map((value) => (value ? ID.make(value) : undefined)), + Effect.catch(() => Effect.succeed(undefined)), + ) + }) + + const remote = Effect.fnUntraced(function* (repo: Git.Repo) { + const origin = yield* git.remote(repo) + if (!origin) return undefined + const normalized = url(origin) + if (!normalized) return undefined + return ID.make(Hash.fast(`git-remote:${normalized}`)) + }) + + function url(input: string) { + const value = input.trim() + if (!value) return undefined + + try { + const parsed = new URL(value) + if (parsed.protocol === "file:") return undefined + return parts(parsed.hostname, parsed.pathname) + } catch { + const scp = value.match(/^([^@/:]+@)?([^/:]+):(.+)$/) + if (scp) return parts(scp[2], scp[3]) + return undefined + } + } + + function parts(host: string, name: string) { + const pathname = name + .replace(/^\/+/, "") + .replace(/\.git\/?$/, "") + .replace(/\/+$/, "") + if (!host || !pathname) return undefined + return `${host.toLowerCase()}/${pathname}` + } + + const root = Effect.fnUntraced(function* (repo: Git.Repo) { + const root = (yield* git.roots(repo))[0] + return root ? ID.make(root) : undefined + }) + + const resolve = Effect.fn("Project.resolve")(function* (input: AbsolutePath) { + const repo = yield* git.find(input) + if (!repo) return { id: ID.global, directory: AbsolutePath.make(path.parse(input).root), vcs: undefined } + + const previous = yield* cached(repo.store) + const id = (yield* remote(repo)) ?? previous ?? (yield* root(repo)) + return { + previous, + id: id ?? ID.global, + directory: repo.directory, + vcs: { type: "git" as const, store: repo.store }, + } + }) + + const commit = Effect.fn("Project.commit")(function* (input: { store: AbsolutePath; id: ID }) { + yield* fs.writeFileString(path.join(input.store, "kilo"), input.id).pipe(Effect.ignore) // kilocode_change + }) + + return Service.of({ directories, resolve, commit }) + }), +) + +export const defaultLayer = layer.pipe( + Layer.provide(FSUtil.defaultLayer), + Layer.provide(Git.defaultLayer), + Layer.provideMerge(ProjectDirectories.defaultLayer), +) +export const node = LayerNode.make(layer, [FSUtil.node, Git.node, ProjectDirectories.node]) diff --git a/packages/core/src/project/copy-strategies.ts b/packages/core/src/project/copy-strategies.ts new file mode 100644 index 0000000000..1199964f6c --- /dev/null +++ b/packages/core/src/project/copy-strategies.ts @@ -0,0 +1,38 @@ +import path from "path" +import { Effect } from "effect" +import { AbsolutePath } from "../schema" +import { Git } from "../git" +import { DirectoryUnavailableError, StrategyID, type ListEntry, type Strategy } from "./copy" + +export function makeGitWorktreeStrategy(input: { + git: Git.Interface + canonical: (directory: AbsolutePath) => Effect.Effect +}) { + const repo = (sourceDirectory: AbsolutePath) => + ({ directory: sourceDirectory, store: sourceDirectory }) satisfies Git.Repo + + return { + id: StrategyID.make("git_worktree"), + create: Effect.fn("ProjectCopy.GitWorktree.create")(function* (options) { + yield* input.git.worktreeCreate({ repo: repo(options.sourceDirectory), directory: options.directory }) + return { directory: yield* input.canonical(options.directory) } + }), + remove: Effect.fn("ProjectCopy.GitWorktree.remove")(function* (options) { + const found = yield* input.git.find(options.directory) + if (!found) return yield* new DirectoryUnavailableError({ directory: options.directory }) + yield* input.git.worktreeRemove({ repo: found, directory: options.directory, force: options.force }) + }), + list: Effect.fn("ProjectCopy.GitWorktree.list")(function* (directory) { + const found = yield* input.git.find(directory) + if (!found) return yield* new DirectoryUnavailableError({ directory }) + const core = path.basename(found.store) === ".git" ? path.dirname(found.store) : found.store + const entries = yield* input.git.worktreeList(found) + return yield* Effect.forEach(entries, (entry) => + input.canonical(entry).pipe( + Effect.map((directory) => ({ directory, type: entry === core ? "root" : "copy" }) as const), + Effect.catchTag("ProjectCopy.DirectoryUnavailableError", () => Effect.succeed(undefined)), + ), + ).pipe(Effect.map((items) => items.filter((item): item is ListEntry => item !== undefined))) + }), + } satisfies Strategy +} diff --git a/packages/core/src/project/copy.ts b/packages/core/src/project/copy.ts new file mode 100644 index 0000000000..0e3246b3b2 --- /dev/null +++ b/packages/core/src/project/copy.ts @@ -0,0 +1,300 @@ +export * as ProjectCopy from "./copy" + +import { Context, Effect, Layer, Schema } from "effect" +import path from "path" +import { AbsolutePath } from "../schema" +import { FSUtil } from "../fs-util" +import { Git } from "../git" +import { LayerNode } from "../effect/layer-node" +import { Project } from "../project" +import { ProjectDirectories } from "./directories" +import { makeGitWorktreeStrategy } from "./copy-strategies" +import { Slug } from "../util/slug" +import { EventV2 } from "../event" +import { Database } from "../database/database" +import { Location } from "../location" +import { PluginBoot } from "../plugin/boot" + +export const StrategyID = Schema.Trim.pipe(Schema.check(Schema.isNonEmpty()), Schema.brand("ProjectCopy.StrategyID")) +export type StrategyID = typeof StrategyID.Type + +export const CreateInput = Schema.Struct({ + projectID: Project.ID, + strategy: StrategyID, + sourceDirectory: AbsolutePath, + directory: AbsolutePath, + name: Schema.optional(Schema.String), +}).annotate({ identifier: "ProjectCopy.CreateInput" }) +export type CreateInput = typeof CreateInput.Type + +export const RemoveInput = Schema.Struct({ + projectID: Project.ID, + directory: AbsolutePath, + force: Schema.Boolean, +}).annotate({ identifier: "ProjectCopy.RemoveInput" }) +export type RemoveInput = typeof RemoveInput.Type + +export const RefreshInput = Schema.Struct({ + projectID: Project.ID, +}).annotate({ identifier: "ProjectCopy.RefreshInput" }) +export type RefreshInput = typeof RefreshInput.Type + +export const RefreshResult = Schema.Struct({ + updated: Schema.Array(AbsolutePath), + removed: Schema.Array(AbsolutePath), +}).annotate({ identifier: "ProjectCopy.RefreshResult" }) +export type RefreshResult = typeof RefreshResult.Type + +export const Copy = Schema.Struct({ + directory: AbsolutePath, +}).annotate({ identifier: "ProjectCopy.Copy" }) +export type Copy = typeof Copy.Type + +export const ListEntry = Schema.Struct({ + directory: AbsolutePath, + type: Schema.Literals(["root", "copy"]), +}).annotate({ identifier: "ProjectCopy.ListEntry" }) +export type ListEntry = typeof ListEntry.Type + +export class SourceDirectoryNotFoundError extends Schema.TaggedErrorClass()( + "ProjectCopy.SourceDirectoryNotFoundError", + { directory: AbsolutePath }, +) {} + +export class DestinationExistsError extends Schema.TaggedErrorClass()( + "ProjectCopy.DestinationExistsError", + { directory: AbsolutePath }, +) {} + +export class DirectoryUnavailableError extends Schema.TaggedErrorClass()( + "ProjectCopy.DirectoryUnavailableError", + { directory: AbsolutePath }, +) {} + +export class InvalidDirectoryError extends Schema.TaggedErrorClass()( + "ProjectCopy.InvalidDirectoryError", + { directory: AbsolutePath }, +) {} + +export class StrategyUnavailableError extends Schema.TaggedErrorClass()( + "ProjectCopy.StrategyUnavailableError", + { strategy: StrategyID }, +) {} + +export class DuplicateStrategyError extends Schema.TaggedErrorClass()( + "ProjectCopy.DuplicateStrategyError", + { strategy: StrategyID }, +) {} + +export type Error = + | SourceDirectoryNotFoundError + | DestinationExistsError + | DirectoryUnavailableError + | InvalidDirectoryError + | StrategyUnavailableError + | Git.WorktreeError + +export interface Strategy { + readonly id: StrategyID + readonly create: (input: { + sourceDirectory: AbsolutePath + directory: AbsolutePath + }) => Effect.Effect + readonly remove: (input: { + directory: AbsolutePath + force: boolean + }) => Effect.Effect + readonly list: (directory: AbsolutePath) => Effect.Effect +} + +export const Event = { + Updated: EventV2.define({ + type: "project.directories.updated", + schema: { projectID: Project.ID }, + }), +} + +export interface Interface { + readonly register: (strategy: Strategy) => Effect.Effect + readonly create: (input: CreateInput) => Effect.Effect + readonly remove: (input: RemoveInput) => Effect.Effect + readonly refresh: (input: RefreshInput) => Effect.Effect +} + +export class Service extends Context.Service()("@opencode/ProjectCopy") {} + +export const refreshAfterBoot = Effect.gen(function* () { + const location = yield* Location.Service + const boot = yield* PluginBoot.Service + const copies = yield* Service + yield* Effect.gen(function* () { + yield* boot.wait() + yield* Effect.logInfo("project copy refresh started", { projectID: location.project.id }) + const result = yield* copies.refresh({ projectID: location.project.id }) + yield* Effect.logInfo("project copy refresh done", { + projectID: location.project.id, + updated: result.updated, + removed: result.removed, + }) + }).pipe( + Effect.catchCause((cause) => Effect.logWarning("project copy refresh failed", { cause })), + Effect.forkScoped, + Effect.asVoid, + ) +}) + +export const layer = Layer.effect( + Service, + Effect.gen(function* () { + const fs = yield* FSUtil.Service + const git = yield* Git.Service + const directories = yield* ProjectDirectories.Service + const db = (yield* Database.Service).db + const events = yield* EventV2.Service + + const changed = Effect.fnUntraced(function* (projectID: Project.ID, update: boolean) { + if (update) yield* events.publish(Event.Updated, { projectID }) + }) + + const canonical = Effect.fnUntraced(function* (input: AbsolutePath) { + const resolved = AbsolutePath.make(FSUtil.resolve(input)) + if (!(yield* fs.isDir(resolved))) return yield* new DirectoryUnavailableError({ directory: input }) + return resolved + }) + + const registry = new Map() + + const register = Effect.fn("ProjectCopy.register")(function* (strategy: Strategy) { + if (registry.has(strategy.id)) return yield* new DuplicateStrategyError({ strategy: strategy.id }) + registry.set(strategy.id, strategy) + }) + + // Register default strategies + yield* register(makeGitWorktreeStrategy({ git, canonical })).pipe(Effect.orDie) + + const strategies = () => Array.from(registry.values()) + + const source = Effect.fnUntraced(function* (input: AbsolutePath, projectID: Project.ID) { + const sourceDirectory = yield* canonical(input) + if (!(yield* directories.contains({ projectID, directory: sourceDirectory }))) + return yield* new SourceDirectoryNotFoundError({ directory: sourceDirectory }) + return sourceDirectory + }) + + const getStrategy = Effect.fnUntraced(function* (id: StrategyID) { + const found = registry.get(id) + if (!found) return yield* new StrategyUnavailableError({ strategy: id }) + return found + }) + + const create = Effect.fn("ProjectCopy.create")(function* (input: CreateInput) { + const selected = yield* getStrategy(input.strategy) + const sourceDirectory = yield* source(input.sourceDirectory, input.projectID) + yield* fs.makeDirectory(input.directory, { recursive: true }).pipe(Effect.orDie) + const name = input.name ?? Slug.create() + let suffix = 1 + let copyDirectory = AbsolutePath.make(path.join(input.directory, name)) + while (yield* fs.existsSafe(copyDirectory)) { + suffix++ + if (suffix > 10) return yield* new DestinationExistsError({ directory: copyDirectory }) + copyDirectory = AbsolutePath.make(path.join(input.directory, `${name}-${suffix}`)) + } + + const result = yield* selected.create({ + directory: copyDirectory, + sourceDirectory, + }) + yield* changed( + input.projectID, + yield* directories.create({ + projectID: input.projectID, + directory: result.directory, + strategy: input.strategy, + behavior: "replace", + }), + ) + return result + }) + + const remove = Effect.fn("ProjectCopy.remove")(function* (input: RemoveInput) { + const copyDirectory = yield* canonical(input.directory) + const stored = yield* directories.get({ projectID: input.projectID, directory: copyDirectory }) + if (!stored?.strategy) return yield* new InvalidDirectoryError({ directory: copyDirectory }) + yield* (yield* getStrategy(StrategyID.make(stored.strategy))).remove({ + directory: copyDirectory, + force: input.force, + }) + yield* changed( + input.projectID, + yield* directories.remove({ projectID: input.projectID, directory: copyDirectory }), + ) + }) + + const refresh = Effect.fn("ProjectCopy.refresh")(function* (input: RefreshInput) { + const stored = yield* directories.list(input.projectID) + const checked = yield* Effect.forEach( + stored, + (item) => fs.isDir(item.directory).pipe(Effect.map((exists) => ({ ...item, exists }))), + { concurrency: "unbounded" }, + ) + const sourceDirectories = checked + .filter((item) => item.strategy === undefined && item.exists) + .map((item) => item.directory) + const discovered = yield* Effect.forEach( + sourceDirectories, + (sourceDirectory) => + Effect.forEach(strategies(), (strategy) => + strategy.list(sourceDirectory).pipe( + Effect.catchTag("ProjectCopy.DirectoryUnavailableError", () => Effect.succeed([])), + Effect.map((items) => + items.map((item) => ({ + directory: item.directory, + strategy: item.type === "copy" ? strategy.id : undefined, + })), + ), + ), + ), + { concurrency: "unbounded" }, + ).pipe( + Effect.map((sets) => new Map(sets.flat(2).map((item) => [item.directory, item] as const)).values().toArray()), + ) + const removed = checked.filter((item) => !item.exists).map((item) => item.directory) + const result = yield* db + .transaction((tx) => + Effect.all({ + updated: Effect.forEach(discovered, (item) => + directories.create( + { + projectID: input.projectID, + directory: item.directory, + strategy: item.strategy, + behavior: "replace", + }, + tx, + ), + ), + removed: Effect.forEach(removed, (directory) => + directories.remove({ projectID: input.projectID, directory }, tx), + ), + }), + ) + .pipe(Effect.orDie) + const changes = { + updated: discovered.filter((_, index) => result.updated[index]).map((item) => item.directory), + removed: removed.filter((_, index) => result.removed[index]), + } + yield* changed(input.projectID, changes.updated.length > 0 || changes.removed.length > 0) + return changes + }) + + return Service.of({ + register, + create, + remove, + refresh, + }) + }), +) + +export const locationLayer = layer +export const node = LayerNode.make(layer, [FSUtil.node, Git.node, ProjectDirectories.node, EventV2.node, Database.node]) diff --git a/packages/core/src/project/directories.ts b/packages/core/src/project/directories.ts new file mode 100644 index 0000000000..7c0522107a --- /dev/null +++ b/packages/core/src/project/directories.ts @@ -0,0 +1,159 @@ +export * as ProjectDirectories from "./directories" + +import { and, asc, desc, eq, isNotNull, isNull, ne, or } from "drizzle-orm" +import { Context, Effect, Layer, Schema } from "effect" +import { Database } from "../database/database" +import { LayerNode } from "../effect/layer-node" +import { AbsolutePath, optionalOmitUndefined } from "../schema" +import { ProjectSchema } from "./schema" +import { ProjectDirectoryTable } from "./sql" +import type { EffectDrizzleSqlite } from "@opencode-ai/effect-drizzle-sqlite" + +export interface Directory { + readonly directory: AbsolutePath + readonly strategy?: string +} + +export const CreateInput = Schema.Struct({ + projectID: ProjectSchema.ID, + directory: AbsolutePath, + strategy: Schema.optional(Schema.String), + behavior: Schema.Literals(["ignore", "replace"]).pipe(Schema.optional), +}) +export type CreateInput = typeof CreateInput.Type + +export const RemoveInput = Schema.Struct({ + projectID: ProjectSchema.ID, + directory: AbsolutePath, +}) +export type RemoveInput = typeof RemoveInput.Type + +type DatabaseClient = EffectDrizzleSqlite.EffectSQLiteDatabase +export type Transaction = Parameters[0]>[0] + +export const ListInput = Schema.Struct({ + projectID: ProjectSchema.ID, +}).annotate({ identifier: "Project.DirectoriesInput" }) +export type ListInput = typeof ListInput.Type + +export const ListOutput = Schema.Array( + Schema.Struct({ + directory: AbsolutePath, + strategy: optionalOmitUndefined(Schema.String), + }), +).annotate({ identifier: "Project.Directories" }) +export type ListOutput = typeof ListOutput.Type + +export interface Interface { + readonly list: (projectID: ProjectSchema.ID) => Effect.Effect> + readonly get: (input: { + projectID: ProjectSchema.ID + directory: AbsolutePath + }) => Effect.Effect + readonly contains: (input: { projectID: ProjectSchema.ID; directory: AbsolutePath }) => Effect.Effect + readonly create: (input: CreateInput, tx?: Transaction) => Effect.Effect + readonly remove: (input: RemoveInput, tx?: Transaction) => Effect.Effect +} + +export class Service extends Context.Service()("@opencode/ProjectDirectories") {} + +export const layer = Layer.effect( + Service, + Effect.gen(function* () { + const db = (yield* Database.Service).db + + const create = Effect.fn("ProjectDirectories.create")(function* (input: CreateInput, tx?: Transaction) { + const insert = (tx ?? db) + .insert(ProjectDirectoryTable) + .values({ project_id: input.projectID, directory: input.directory, strategy: input.strategy }) + const query = + input.behavior === "replace" + ? insert.onConflictDoUpdate({ + target: [ProjectDirectoryTable.project_id, ProjectDirectoryTable.directory], + set: { strategy: input.strategy ?? null }, + setWhere: input.strategy + ? or(isNull(ProjectDirectoryTable.strategy), ne(ProjectDirectoryTable.strategy, input.strategy)) + : isNotNull(ProjectDirectoryTable.strategy), + }) + : insert.onConflictDoNothing() + return ( + (yield* query.returning({ directory: ProjectDirectoryTable.directory }).get().pipe(Effect.orDie)) !== undefined + ) + }) + + const remove = Effect.fn("ProjectDirectories.remove")(function* (input: RemoveInput, tx?: Transaction) { + return ( + (yield* (tx ?? db) + .delete(ProjectDirectoryTable) + .where( + and( + eq(ProjectDirectoryTable.project_id, input.projectID), + eq(ProjectDirectoryTable.directory, input.directory), + ), + ) + .returning({ directory: ProjectDirectoryTable.directory }) + .get() + .pipe(Effect.orDie)) !== undefined + ) + }) + + const list = Effect.fn("ProjectDirectories.list")(function* (projectID: ProjectSchema.ID) { + const rows = yield* db + .select({ directory: ProjectDirectoryTable.directory, strategy: ProjectDirectoryTable.strategy }) + .from(ProjectDirectoryTable) + .where(eq(ProjectDirectoryTable.project_id, projectID)) + .orderBy(desc(ProjectDirectoryTable.time_created), asc(ProjectDirectoryTable.directory)) + .all() + .pipe(Effect.orDie) + return rows.map((row) => ({ directory: row.directory, strategy: row.strategy ?? undefined })) + }) + + const contains = Effect.fn("ProjectDirectories.contains")(function* (input: { + projectID: ProjectSchema.ID + directory: AbsolutePath + }) { + return ( + (yield* db + .select({ directory: ProjectDirectoryTable.directory }) + .from(ProjectDirectoryTable) + .where( + and( + eq(ProjectDirectoryTable.project_id, input.projectID), + eq(ProjectDirectoryTable.directory, input.directory), + ), + ) + .get() + .pipe(Effect.orDie)) !== undefined + ) + }) + + const get = Effect.fn("ProjectDirectories.get")(function* (input: { + projectID: ProjectSchema.ID + directory: AbsolutePath + }) { + const row = yield* db + .select({ directory: ProjectDirectoryTable.directory, strategy: ProjectDirectoryTable.strategy }) + .from(ProjectDirectoryTable) + .where( + and( + eq(ProjectDirectoryTable.project_id, input.projectID), + eq(ProjectDirectoryTable.directory, input.directory), + ), + ) + .get() + .pipe(Effect.orDie) + return row ? { directory: row.directory, strategy: row.strategy ?? undefined } : undefined + }) + + return Service.of({ + list, + get, + contains, + create, + remove, + }) + }), +) + +export const defaultLayer = layer.pipe(Layer.provide(Database.defaultLayer)) +export const node = LayerNode.make(layer, [Database.node]) diff --git a/packages/core/src/project/schema.ts b/packages/core/src/project/schema.ts new file mode 100644 index 0000000000..51d9581cc6 --- /dev/null +++ b/packages/core/src/project/schema.ts @@ -0,0 +1,20 @@ +export * as ProjectSchema from "./schema" + +import { Schema } from "effect" +import { AbsolutePath, withStatics } from "../schema" + +export const ID = Schema.String.pipe( + Schema.brand("Project.ID"), + withStatics((schema) => ({ + global: schema.make("global"), + })), +) +export type ID = typeof ID.Type + +export const Vcs = Schema.Union([ + Schema.Struct({ + type: Schema.Literal("git"), + store: AbsolutePath, + }), +]) +export type Vcs = typeof Vcs.Type diff --git a/packages/core/src/project/sql.ts b/packages/core/src/project/sql.ts new file mode 100644 index 0000000000..ab05fdac4a --- /dev/null +++ b/packages/core/src/project/sql.ts @@ -0,0 +1,35 @@ +import { sqliteTable, text, integer, primaryKey } from "drizzle-orm/sqlite-core" +import * as DatabasePath from "../database/path" +import { Timestamps } from "../database/schema.sql" +import { ProjectSchema } from "./schema" + +export const ProjectTable = sqliteTable("project", { + id: text().$type().primaryKey(), + worktree: DatabasePath.absoluteColumn().notNull(), + vcs: text(), + name: text(), + icon_url: text(), + icon_url_override: text(), + icon_color: text(), + ...Timestamps, + time_initialized: integer(), + sandboxes: DatabasePath.absoluteArrayColumn().notNull(), + commands: text({ mode: "json" }).$type<{ start?: string }>(), +}) + +export const ProjectDirectoryTable = sqliteTable( + "project_directory", + { + project_id: text() + .$type() + .notNull() + .references(() => ProjectTable.id, { onDelete: "cascade" }), + directory: DatabasePath.absoluteColumn().notNull(), + type: text().$type<"main" | "root" | "git_worktree">(), + strategy: text(), + time_created: integer() + .notNull() + .$default(() => Date.now()), + }, + (table) => [primaryKey({ columns: [table.project_id, table.directory] })], +) diff --git a/packages/core/src/provider.ts b/packages/core/src/provider.ts index 7c1c966654..0d6084257b 100644 --- a/packages/core/src/provider.ts +++ b/packages/core/src/provider.ts @@ -7,6 +7,7 @@ export const ID = Schema.String.pipe( Schema.brand("ProviderV2.ID"), withStatics((schema) => ({ // Well-known providers + kilo: schema.make("kilo"), // kilocode_change - Kilo well-known provider id opencode: schema.make("opencode"), anthropic: schema.make("anthropic"), openai: schema.make("openai"), @@ -22,98 +23,46 @@ export const ID = Schema.String.pipe( ) export type ID = typeof ID.Type -const OpenAIResponses = Schema.Struct({ - type: Schema.Literal("openai/responses"), - url: Schema.String, - websocket: Schema.optional(Schema.Boolean), -}) - -const OpenAICompletions = Schema.Struct({ - type: Schema.Literal("openai/completions"), - url: Schema.String, - reasoning: Schema.Union([ - Schema.Struct({ - type: Schema.Literal("reasoning_content"), - }), - Schema.Struct({ - type: Schema.Literal("reasoning_details"), - }), - ]).pipe(Schema.optional), -}) -export type OpenAICompletions = typeof OpenAICompletions.Type - -const AISDK = Schema.Struct({ +export const AISDK = Schema.Struct({ type: Schema.Literal("aisdk"), package: Schema.String, url: Schema.String.pipe(Schema.optional), + settings: Schema.Record(Schema.String, Schema.Unknown).pipe(Schema.optional), }) -const AnthropicMessages = Schema.Struct({ - type: Schema.Literal("anthropic/messages"), - url: Schema.String, -}) - -const UnknownEndpoint = Schema.Struct({ - type: Schema.Literal("unknown"), +export const Native = Schema.Struct({ + type: Schema.Literal("native"), + url: Schema.String.pipe(Schema.optional), + settings: Schema.Record(Schema.String, Schema.Unknown), }) -export const Endpoint = Schema.Union([ - UnknownEndpoint, - OpenAIResponses, - OpenAICompletions, - AnthropicMessages, - AISDK, -]).pipe(Schema.toTaggedUnion("type")) -export type Endpoint = typeof Endpoint.Type +export const Api = Schema.Union([AISDK, Native]).pipe(Schema.toTaggedUnion("type")) +export type Api = typeof Api.Type -export const Options = Schema.Struct({ +export const Request = Schema.Struct({ headers: Schema.Record(Schema.String, Schema.String), body: Schema.Record(Schema.String, Schema.Any), - aisdk: Schema.Struct({ - provider: Schema.Record(Schema.String, Schema.Any), - request: Schema.Record(Schema.String, Schema.Any), - }), }) -export type Options = typeof Options.Type +export type Request = typeof Request.Type export class Info extends Schema.Class("ProviderV2.Info")({ id: ID, name: Schema.String, - enabled: Schema.Union([ - Schema.Literal(false), - Schema.Struct({ - via: Schema.Literal("env"), - name: Schema.String, - }), - Schema.Struct({ - via: Schema.Literal("auth"), - service: Schema.String, - }), - Schema.Struct({ - via: Schema.Literal("custom"), - data: Schema.Record(Schema.String, Schema.Any), - }), - ]), - env: Schema.String.pipe(Schema.Array), - endpoint: Endpoint, - options: Options, + disabled: Schema.Boolean.pipe(Schema.optional), + api: Api, + request: Request, }) { - static empty(providerID: ID) { + static empty(providerID: ID): Info { return new Info({ id: providerID, name: providerID, - enabled: false, - env: [], - endpoint: { - type: "unknown", + api: { + type: "native", + settings: {}, }, - options: { + request: { headers: {}, body: {}, - aisdk: { - provider: {}, - request: {}, - }, }, }) } diff --git a/packages/core/src/pty.ts b/packages/core/src/pty.ts new file mode 100644 index 0000000000..0157c0d8d1 --- /dev/null +++ b/packages/core/src/pty.ts @@ -0,0 +1,380 @@ +export * as Pty from "./pty" + +import type { Disp, Proc } from "#pty" +import { Context, Effect, Layer, Schema, Types } from "effect" +import { Config } from "./config" +import { EventV2 } from "./event" +import { Location } from "./location" +import { NonNegativeInt, PositiveInt } from "./schema" +import { PtyID } from "./pty/schema" +import { SessionSchema } from "./session/schema" // kilocode_change +import { Shell } from "./shell" +import { lazy } from "./util/lazy" +import { KiloPtySelfCommand } from "./kilocode/pty-self-command" // kilocode_change +import { KiloPtyTermination } from "./kilocode/pty/termination" // kilocode_change + +const BUFFER_LIMIT = 1024 * 1024 * 2 +// Exited sessions stay observable (status, exit code, retained output) until removed explicitly. +// Cap retention so abandoned terminals do not accumulate unbounded buffers. +const EXITED_LIMIT = 25 +const pty = lazy(() => import("#pty")) + +type Subscriber = { + readonly onData: (chunk: string) => void + readonly onEnd: (event: { exitCode?: number }) => void + active: boolean + detached: boolean + pending: string[] + end?: { exitCode?: number } +} + +type Active = { + info: Info + process: Proc + buffer: string + bufferCursor: number + cursor: number + subscribers: Map + listeners: Disp[] + stopping: boolean // kilocode_change +} + +export const Info = Schema.Struct({ + id: PtyID, + title: Schema.String, + command: Schema.String, + args: Schema.Array(Schema.String), + cwd: Schema.String, + status: Schema.Literals(["running", "exited"]), + // Windows ConPTY assigns the child pid asynchronously, so 0 is valid at spawn time. + pid: NonNegativeInt, + // Present once status is "exited". + exitCode: Schema.optional(NonNegativeInt), + sessionID: Schema.optional(Schema.NullOr(SessionSchema.ID)), // kilocode_change +}).annotate({ identifier: "Pty" }) + +export type Info = Types.DeepMutable + +export const CreateInput = Schema.Struct({ + command: Schema.optional(Schema.String), + args: Schema.optional(Schema.Array(Schema.String)), + cwd: Schema.optional(Schema.String), + title: Schema.optional(Schema.String), + env: Schema.optional(Schema.Record(Schema.String, Schema.String)), +}) + +export type CreateInput = Types.DeepMutable + +export const UpdateInput = Schema.Struct({ + title: Schema.optional(Schema.String), + sessionID: Schema.optional(Schema.NullOr(SessionSchema.ID)), // kilocode_change + size: Schema.optional( + Schema.Struct({ + rows: PositiveInt, + cols: PositiveInt, + }), + ), +}) + +export type UpdateInput = Types.DeepMutable + +export type AttachInput = { + // Absolute output cursor to replay from. -1 tails from the current end; omitted replays the full retained buffer. + readonly cursor?: number + // Callbacks fire synchronously from the native PTY data path; keep them non-blocking. + readonly onData: (chunk: string) => void + // Fired once when the session stops producing output: process exit (exitCode set), removal, or service teardown. + readonly onEnd: (event: { exitCode?: number }) => void + // Canonical routes can replay retained output after exit; legacy callers retain the former error. + readonly allowExited?: boolean // kilocode_change +} + +export type Attachment = { + // Retained output from the requested cursor to the current end. + readonly replay: string + // Absolute output cursor after replay. + readonly cursor: number + readonly write: (data: string) => void + // Starts live delivery after the caller has applied replay and cursor metadata. + readonly activate: () => void + readonly detach: () => void +} + +export class NotFoundError extends Schema.TaggedErrorClass()("Pty.NotFoundError", { + ptyID: PtyID, +}) {} + +export class ExitedError extends Schema.TaggedErrorClass()("Pty.ExitedError", { + ptyID: PtyID, +}) {} + +export const Event = { + Created: EventV2.define({ type: "pty.created", schema: { info: Info } }), + Updated: EventV2.define({ type: "pty.updated", schema: { info: Info } }), + Exited: EventV2.define({ type: "pty.exited", schema: { id: PtyID, exitCode: NonNegativeInt } }), + Deleted: EventV2.define({ type: "pty.deleted", schema: { id: PtyID } }), +} + +export interface Interface { + readonly list: () => Effect.Effect + readonly get: (id: PtyID) => Effect.Effect + readonly create: (input: CreateInput) => Effect.Effect + readonly update: (id: PtyID, input: UpdateInput) => Effect.Effect + readonly remove: (id: PtyID) => Effect.Effect + readonly write: (id: PtyID, data: string) => Effect.Effect + readonly attach: (id: PtyID, input: AttachInput) => Effect.Effect +} + +export class Service extends Context.Service()("@opencode/v2/Pty") {} + +export const layer = Layer.effect( + Service, + Effect.gen(function* () { + const events = yield* EventV2.Service + const location = yield* Location.Service + const config = yield* Config.Service + const context = yield* Effect.context() + const runFork = Effect.runForkWith(context) + const sessions = new Map() + const exitOrder: PtyID[] = [] + + function notifyEnd(session: Active, event: { exitCode?: number }) { + for (const subscriber of session.subscribers.values()) { + if (!subscriber.active) { + subscriber.end = event + continue + } + try { + subscriber.onEnd(event) + } catch {} + } + session.subscribers.clear() + } + + // kilocode_change start - terminate the complete PTY tree before reporting removal. + async function teardown(session: Active) { + session.stopping = true + if (session.info.status === "running") await KiloPtyTermination.terminate(session.process) + for (const listener of session.listeners) listener.dispose() + session.listeners.length = 0 + notifyEnd(session, session.info.status === "exited" ? { exitCode: session.info.exitCode } : {}) + } + // kilocode_change end + + yield* Effect.addFinalizer( + () => + // kilocode_change start - wait for process-tree termination during async service teardown. + Effect.promise(async () => { + await Promise.all(Array.from(sessions.values()).map(teardown)) + sessions.clear() + exitOrder.length = 0 + }), + // kilocode_change end + ) + + const requireSession = Effect.fn("Pty.requireSession")(function* (id: PtyID) { + const session = sessions.get(id) + if (!session) return yield* new NotFoundError({ ptyID: id }) + return session + }) + + const removeSession = Effect.fnUntraced(function* (id: PtyID) { + // kilocode_change start - removal and its deleted event are one uninterruptible lifecycle transition. + yield* Effect.gen(function* () { + const session = sessions.get(id) + if (!session) return + yield* Effect.logInfo("removing session", { id }) + yield* Effect.promise(() => teardown(session)) + sessions.delete(id) + const index = exitOrder.indexOf(id) + if (index !== -1) exitOrder.splice(index, 1) + yield* events.publish(Event.Deleted, { id: session.info.id }) + }).pipe(Effect.uninterruptible) + // kilocode_change end + }) + + const remove = Effect.fn("Pty.remove")(function* (id: PtyID) { + yield* requireSession(id) + yield* removeSession(id) + }) + + const list = Effect.fn("Pty.list")(function* () { + return Array.from(sessions.values()).map((session) => session.info) + }) + + const get = Effect.fn("Pty.get")(function* (id: PtyID) { + return (yield* requireSession(id)).info + }) + + const create = Effect.fn("Pty.create")(function* (input: CreateInput) { + const id = PtyID.ascending() + // kilocode_change start - resolve Kilo self-commands to the real binary, arguments, and project cwd + const resolved = KiloPtySelfCommand.resolve({ + command: input.command, + args: input.args ? [...input.args] : undefined, + cwd: input.cwd, + }) + const implicit = !resolved.command + const command = resolved.command || Shell.preferred(Config.latest(yield* config.entries(), "shell")) + const base = resolved.args ?? [] + const args = implicit && Shell.login(command) ? [...base, "-l"] : [...base] + const cwd = resolved.cwd || location.directory + // kilocode_change end + const env = { + ...process.env, + ...input.env, + TERM: "xterm-256color", + KILO_TERMINAL: "1", + KILO_PTY_ID: id, // kilocode_change - let nested Kilo processes identify their parent terminal + } as Record + // kilocode_change start - do not expose local server credentials to user terminals. + // node-pty inherits parent values for omitted keys, so empty tombstones are required. + env.KILO_SERVER_PASSWORD = "" + env.KILO_SERVER_USERNAME = "" + // kilocode_change end + if (process.platform === "win32") { + env.LC_ALL = "C.UTF-8" + env.LC_CTYPE = "C.UTF-8" + env.LANG = "C.UTF-8" + } + yield* Effect.logInfo("creating session", { id, cmd: command, args, cwd }) + const { spawn } = yield* Effect.promise(() => pty()) + const proc = yield* Effect.sync(() => spawn(command, args, { name: "xterm-256color", cwd, env })) + const info: Info = { + id, + title: input.title || `Terminal ${id.slice(-4)}`, + command, + args, + cwd, + status: "running", + pid: proc.pid, + } + const session: Active = { + info, + process: proc, + buffer: "", + bufferCursor: 0, + cursor: 0, + subscribers: new Map(), + listeners: [], + stopping: false, // kilocode_change + } + sessions.set(id, session) + session.listeners.push( + proc.onData((chunk) => { + session.cursor += chunk.length + for (const [token, subscriber] of session.subscribers.entries()) { + if (!subscriber.active) { + subscriber.pending.push(chunk) + continue + } + try { + subscriber.onData(chunk) + } catch { + session.subscribers.delete(token) + } + } + session.buffer += chunk + if (session.buffer.length <= BUFFER_LIMIT) return + const excess = session.buffer.length - BUFFER_LIMIT + session.buffer = session.buffer.slice(excess) + session.bufferCursor += excess + }), + proc.onExit(({ exitCode }) => { + if (session.info.status === "exited" || session.stopping) return // kilocode_change + session.info.status = "exited" + session.info.exitCode = exitCode + notifyEnd(session, { exitCode }) + exitOrder.push(id) + runFork( + Effect.gen(function* () { + yield* Effect.logInfo("session exited", { id, exitCode }) + yield* events.publish(Event.Exited, { id, exitCode }) + while (exitOrder.length > EXITED_LIMIT) { + const oldest = exitOrder[0] + if (!oldest) break + yield* removeSession(oldest) + } + }), + ) + }), + ) + yield* events.publish(Event.Created, { info }) + return info + }) + + const update = Effect.fn("Pty.update")(function* (id: PtyID, input: UpdateInput) { + const session = yield* requireSession(id) + if (input.title) session.info.title = input.title + // kilocode_change start - associate nested Kilo TUI terminals with the viewed session + if ("sessionID" in input) session.info.sessionID = input.sessionID ?? undefined + // kilocode_change end + if (input.size && session.info.status === "running") session.process.resize(input.size.cols, input.size.rows) + yield* events.publish(Event.Updated, { info: session.info }) + return session.info + }) + + const write = Effect.fn("Pty.write")(function* (id: PtyID, data: string) { + const session = yield* requireSession(id) + if (session.info.status === "running") session.process.write(data) + }) + + const attach = Effect.fn("Pty.attach")(function* (id: PtyID, input: AttachInput) { + const session = yield* requireSession(id) + if (session.info.status !== "running" && !input.allowExited) return yield* new ExitedError({ ptyID: id }) // kilocode_change + yield* Effect.logInfo("client attached to session", { id, directory: location.directory }) + const token = {} + const subscriber: Subscriber = { + onData: input.onData, + onEnd: input.onEnd, + active: false, + detached: false, + pending: [], + end: session.info.status === "exited" ? { exitCode: session.info.exitCode } : undefined, // kilocode_change + } + session.subscribers.set(token, subscriber) + const start = session.bufferCursor + const end = session.cursor + const from = + input.cursor === -1 + ? end + : typeof input.cursor === "number" && Number.isSafeInteger(input.cursor) + ? Math.max(0, input.cursor) + : 0 + const replay = (() => { + if (!session.buffer || from >= end) return "" + const offset = Math.max(0, from - start) + if (offset >= session.buffer.length) return "" + return session.buffer.slice(offset) + })() + return { + replay, + cursor: end, + write: (data: string) => { + if (session.info.status === "running") session.process.write(data) + }, + activate: () => { + if (subscriber.active || subscriber.detached) return + subscriber.active = true + try { + for (const chunk of subscriber.pending) subscriber.onData(chunk) + subscriber.pending.length = 0 + if (subscriber.end) subscriber.onEnd(subscriber.end) + } catch { + session.subscribers.delete(token) + } + }, + detach: () => { + subscriber.detached = true + subscriber.pending.length = 0 + subscriber.end = undefined + session.subscribers.delete(token) + }, + } + }) + + return Service.of({ list, get, create, update, remove, write, attach }) + }), +) + +export const locationLayer = layer.pipe(Layer.provide(Config.locationLayer)) diff --git a/packages/core/src/pty/driver.ts b/packages/core/src/pty/driver.ts new file mode 100644 index 0000000000..4fab47ff97 --- /dev/null +++ b/packages/core/src/pty/driver.ts @@ -0,0 +1,2 @@ +// kilocode_change - expose the conditional PTY driver to Kilo's legacy interactive terminal +export * from "#pty" diff --git a/packages/core/src/pty/protocol.ts b/packages/core/src/pty/protocol.ts new file mode 100644 index 0000000000..21c6a89f73 --- /dev/null +++ b/packages/core/src/pty/protocol.ts @@ -0,0 +1,37 @@ +export * as PtyProtocol from "./protocol" + +// Wire protocol for PTY websocket transports. The PTY domain service is transport-free; server +// routes adapt Pty.attach to websockets with these helpers so every surface speaks one protocol. +// +// Outbound frames are raw UTF-8 terminal chunks. One control frame — a 0x00 byte followed by +// UTF-8 JSON — carries the absolute output cursor after replay so clients can resume later. + +const encoder = new TextEncoder() +const decoder = new TextDecoder("utf-8", { fatal: true }) + +// Replay can be megabytes; send it in bounded frames. +export const REPLAY_CHUNK = 64 * 1024 + +export function metaFrame(cursor: number) { + const bytes = encoder.encode(JSON.stringify({ cursor })) + const out = new Uint8Array(bytes.length + 1) + out[0] = 0 + out.set(bytes, 1) + return out +} + +export function chunks(data: string) { + const out: string[] = [] + for (let i = 0; i < data.length; i += REPLAY_CHUNK) out.push(data.slice(i, i + REPLAY_CHUNK)) + return out +} + +// Inbound client frames are UTF-8 text or binary; invalid UTF-8 input is dropped. +export function decodeInput(message: string | Uint8Array | ArrayBuffer) { + if (typeof message === "string") return message + try { + return decoder.decode(message instanceof ArrayBuffer ? new Uint8Array(message) : message) + } catch { + return undefined + } +} diff --git a/packages/opencode/src/pty/pty.bun.ts b/packages/core/src/pty/pty.bun.ts similarity index 100% rename from packages/opencode/src/pty/pty.bun.ts rename to packages/core/src/pty/pty.bun.ts diff --git a/packages/opencode/src/pty/pty.node.ts b/packages/core/src/pty/pty.node.ts similarity index 95% rename from packages/opencode/src/pty/pty.node.ts rename to packages/core/src/pty/pty.node.ts index b45c5bf509..76f415f4cd 100644 --- a/packages/opencode/src/pty/pty.node.ts +++ b/packages/core/src/pty/pty.node.ts @@ -1,4 +1,3 @@ -/** @ts-expect-error */ import * as pty from "@lydell/node-pty" import type { Opts, Proc } from "./pty" diff --git a/packages/opencode/src/pty/pty.ts b/packages/core/src/pty/pty.ts similarity index 100% rename from packages/opencode/src/pty/pty.ts rename to packages/core/src/pty/pty.ts diff --git a/packages/core/src/pty/schema.ts b/packages/core/src/pty/schema.ts new file mode 100644 index 0000000000..b8c973862f --- /dev/null +++ b/packages/core/src/pty/schema.ts @@ -0,0 +1,13 @@ +import { Schema } from "effect" +import { Identifier } from "../id/id" +import { withStatics } from "../schema" + +const ptyIdSchema = Schema.String.check(Schema.isStartsWith("pty")).pipe(Schema.brand("PtyID")) + +export type PtyID = typeof ptyIdSchema.Type + +export const PtyID = ptyIdSchema.pipe( + withStatics((schema: typeof ptyIdSchema) => ({ + ascending: (id?: string) => schema.make(Identifier.ascending("pty", id)), + })), +) diff --git a/packages/opencode/src/pty/ticket.ts b/packages/core/src/pty/ticket.ts similarity index 81% rename from packages/opencode/src/pty/ticket.ts rename to packages/core/src/pty/ticket.ts index 0978e52083..c625390be0 100644 --- a/packages/opencode/src/pty/ticket.ts +++ b/packages/core/src/pty/ticket.ts @@ -1,10 +1,10 @@ export * as PtyTicket from "./ticket" -import { WorkspaceID } from "@/control-plane/schema" -import { InstanceRef, WorkspaceRef } from "@/effect/instance-ref" -import { PtyID } from "@/pty/schema" -import { PositiveInt } from "@opencode-ai/core/schema" +import { WorkspaceV2 } from "../workspace" +import { PositiveInt } from "../schema" +import { PtyID } from "./schema" import { Cache, Context, Duration, Effect, Layer, Schema } from "effect" +import { LayerNode } from "../effect/layer-node" const DEFAULT_TTL = Duration.seconds(60) const CAPACITY = 10_000 @@ -17,7 +17,7 @@ export const ConnectToken = Schema.Struct({ export type Scope = { readonly ptyID: PtyID readonly directory?: string - readonly workspaceID?: WorkspaceID + readonly workspaceID?: WorkspaceV2.ID } export interface Interface { @@ -57,12 +57,4 @@ export const make = (ttl: Duration.Input = DEFAULT_TTL) => export const layer = Layer.effect(Service, make()) export const defaultLayer = layer - -export const scope = Effect.gen(function* () { - const instance = yield* InstanceRef - const workspaceID = yield* WorkspaceRef - return { - directory: instance?.directory, - workspaceID, - } -}) +export const node = LayerNode.make(layer, []) diff --git a/packages/core/src/public/agent.ts b/packages/core/src/public/agent.ts new file mode 100644 index 0000000000..ade2096f89 --- /dev/null +++ b/packages/core/src/public/agent.ts @@ -0,0 +1,6 @@ +export * as Agent from "./agent" + +import { AgentV2 } from "../agent" + +export const ID = AgentV2.ID +export type ID = AgentV2.ID diff --git a/packages/core/src/public/index.ts b/packages/core/src/public/index.ts new file mode 100644 index 0000000000..2229039b9a --- /dev/null +++ b/packages/core/src/public/index.ts @@ -0,0 +1,9 @@ +/** Intentional supported native API. Other core subpaths remain internal implementation surfaces. */ +export { Agent } from "./agent" +export { Model } from "./model" +export { OpenCode } from "./opencode" +export { Session } from "./session" +export { Tool } from "./tool" +export { Location } from "./location" +export { Prompt } from "../session/prompt" +export { AbsolutePath } from "../schema" diff --git a/packages/core/src/public/location.ts b/packages/core/src/public/location.ts new file mode 100644 index 0000000000..aab15181d1 --- /dev/null +++ b/packages/core/src/public/location.ts @@ -0,0 +1,6 @@ +export * as Location from "./location" + +import { Location } from "../location" + +export const Ref = Location.Ref +export type Ref = Location.Ref diff --git a/packages/core/src/public/model.ts b/packages/core/src/public/model.ts new file mode 100644 index 0000000000..ab92b8dfe7 --- /dev/null +++ b/packages/core/src/public/model.ts @@ -0,0 +1,9 @@ +export * as Model from "./model" + +import { ModelV2 } from "../model" + +export const ID = ModelV2.ID +export type ID = ModelV2.ID + +export const Ref = ModelV2.Ref +export type Ref = ModelV2.Ref diff --git a/packages/core/src/public/opencode.ts b/packages/core/src/public/opencode.ts new file mode 100644 index 0000000000..7388705d8c --- /dev/null +++ b/packages/core/src/public/opencode.ts @@ -0,0 +1,129 @@ +export * as OpenCode from "./opencode" + +import { Context, Effect, Layer } from "effect" +import { Catalog } from "../catalog" +import { Database } from "../database/database" +import { EventV2 } from "../event" +import { LocationServiceMap } from "../location-layer" +import { PluginBoot } from "../plugin/boot" +import { ProjectV2 } from "../project" +import { SessionV2 } from "../session" +import * as SessionExecutionLocal from "../session/execution/local" +import { SessionProjector } from "../session/projector" +import { SessionStore } from "../session/store" +import { ApplicationTools } from "../tool/application-tools" +import { Session } from "./session" +import { Tool } from "./tool" + +export interface Interface { + readonly sessions: Session.Interface + readonly tools: Tool.Interface +} + +/** Intentional public native API for Effect applications embedding OpenCode. */ +export class Service extends Context.Service()("@opencode/public/OpenCode") {} + +class SessionModelValidation extends Context.Service< + SessionModelValidation, + { + readonly validate: ( + input: Session.SwitchModelInput & { readonly location: Session.Info["location"] }, + ) => Effect.Effect + } +>()("@opencode/public/OpenCode/SessionModelValidation") {} + +const ApplicationToolsLayer = ApplicationTools.layer +const LocationServicesLayer = LocationServiceMap.layer.pipe(Layer.provide(ApplicationToolsLayer)) +const SessionModelValidationLayer = Layer.effect( + SessionModelValidation, + Effect.gen(function* () { + const locations = yield* LocationServiceMap + return SessionModelValidation.of({ + validate: Effect.fn("OpenCode.sessions.validateModel")(function* (input) { + yield* Effect.gen(function* () { + yield* (yield* PluginBoot.Service).wait() + const catalog = yield* Catalog.Service + const model = (yield* catalog.model.available()).find( + (model) => model.providerID === input.model.providerID && model.id === input.model.id, + ) + if (!model) + return yield* new Session.ModelUnavailableError({ + providerID: input.model.providerID, + modelID: input.model.id, + }) + if ( + input.model.variant !== undefined && + input.model.variant !== "default" && + !model.variants.some((variant) => variant.id === input.model.variant) + ) + return yield* new Session.VariantUnavailableError({ + providerID: input.model.providerID, + modelID: input.model.id, + variant: input.model.variant, + }) + }).pipe(Effect.provide(locations.get(input.location))) + }), + }) + }), +) + +const SessionsLayer = Layer.merge( + SessionV2.layer.pipe( + Layer.provide(SessionProjector.layer), + Layer.provide(SessionExecutionLocal.layer), + Layer.provide(SessionStore.layer), + Layer.provide(EventV2.layer), + Layer.provide(Database.defaultLayer), + Layer.provide(ProjectV2.defaultLayer), + Layer.orDie, + ), + SessionModelValidationLayer, +).pipe(Layer.provide(LocationServicesLayer)) +// TODO: Accept explicit storage so tests and embeddings can select disposable or application-owned persistence. +export const layer = Layer.effect( + Service, + Effect.gen(function* () { + const sessions = yield* SessionV2.Service + const tools = yield* ApplicationTools.Service + const validation = yield* SessionModelValidation + return Service.of({ + tools: { register: tools.register }, + sessions: { + create: (input) => + sessions.create({ + id: input.id, + agent: input.agent, + model: input.model, + location: input.location, + }), + get: sessions.get, + list: sessions.list, + switchModel: Effect.fn("OpenCode.sessions.switchModel")(function* (input) { + const session = yield* sessions.get(input.sessionID) + yield* validation.validate({ ...input, location: session.location }) + yield* sessions.switchModel(input) + }), + interrupt: sessions.interrupt, + prompt: (input) => + sessions.prompt({ + id: input.id, + sessionID: input.sessionID, + prompt: input.prompt, + delivery: input.delivery, + }), + messages: (input) => + sessions.messages({ + sessionID: input.sessionID, + limit: input.limit, + order: input.order, + cursor: input.cursor, + }), + message: (input) => sessions.message({ sessionID: input.sessionID, messageID: input.messageID }), + context: sessions.context, + events: (input) => sessions.events({ sessionID: input.sessionID, after: input.after }), + }, + }) + }), +).pipe(Layer.provide(Layer.merge(ApplicationToolsLayer, SessionsLayer))) + +// TODO: Add OpenCode.create(...) as the Promise facade over the same native API semantics. diff --git a/packages/core/src/public/session.ts b/packages/core/src/public/session.ts new file mode 100644 index 0000000000..6c61aff3b6 --- /dev/null +++ b/packages/core/src/public/session.ts @@ -0,0 +1,119 @@ +export * as Session from "./session" + +import { Effect, Schema, Stream } from "effect" +import { EventV2 } from "../event" +import { ModelV2 } from "../model" +import { SessionV2 } from "../session" +import { MessageDecodeError } from "../session/error" +import { SessionEvent } from "../session/event" +import { SessionInput } from "../session/input" +import { SessionMessage } from "../session/message" +import { Prompt } from "../session/prompt" +import { Agent } from "./agent" +import { Location } from "./location" +import { Model } from "./model" + +export const ID = SessionV2.ID +export type ID = SessionV2.ID + +export const Info = SessionV2.Info +export type Info = SessionV2.Info + +export const MessageID = SessionMessage.ID +export type MessageID = SessionMessage.ID + +export const Message = SessionMessage.Message +export type Message = SessionMessage.Message + +export const Admission = SessionInput.Admitted +export type Admission = SessionInput.Admitted + +export const Delivery = SessionInput.Delivery +export type Delivery = SessionInput.Delivery + +export const ListInput = SessionV2.ListInput +export type ListInput = SessionV2.ListInput + +export const EventCursor = EventV2.Cursor +export type EventCursor = EventV2.Cursor +export type Event = EventV2.CursorEvent + +export const NotFoundError = SessionV2.NotFoundError +export type NotFoundError = SessionV2.NotFoundError + +export const PromptConflictError = SessionV2.PromptConflictError +export type PromptConflictError = SessionV2.PromptConflictError + +export class ModelUnavailableError extends Schema.TaggedErrorClass()( + "Session.ModelUnavailableError", + { + providerID: Model.Ref.fields.providerID, + modelID: Model.Ref.fields.id, + }, +) {} + +export class VariantUnavailableError extends Schema.TaggedErrorClass()( + "Session.VariantUnavailableError", + { + providerID: Model.Ref.fields.providerID, + modelID: Model.Ref.fields.id, + variant: ModelV2.VariantID, + }, +) {} + +export { MessageDecodeError } + +export interface CreateInput { + readonly id?: ID + readonly agent?: Agent.ID + readonly model?: Model.Ref + readonly location: Location.Ref +} + +export interface PromptInput { + readonly id?: MessageID + readonly sessionID: ID + readonly prompt: Prompt + readonly delivery?: Delivery +} + +export interface SwitchModelInput { + readonly sessionID: ID + readonly model: Model.Ref +} + +export interface MessagesInput { + readonly sessionID: ID + readonly limit?: number + readonly order?: "asc" | "desc" + readonly cursor?: { + readonly id: MessageID + readonly direction: "previous" | "next" + } +} + +export interface MessageInput { + readonly sessionID: ID + readonly messageID: MessageID +} + +export interface EventsInput { + readonly sessionID: ID + readonly after?: EventCursor +} + +export interface Interface { + readonly create: (input: CreateInput) => Effect.Effect + readonly get: (sessionID: ID) => Effect.Effect + readonly list: (input?: ListInput) => Effect.Effect + readonly prompt: (input: PromptInput) => Effect.Effect + readonly switchModel: ( + input: SwitchModelInput, + ) => Effect.Effect + /** Interrupt the active V2 execution chain for one Session on this process. Interrupting an idle or missing Session is a no-op. */ + readonly interrupt: (sessionID: ID) => Effect.Effect + readonly messages: (input: MessagesInput) => Effect.Effect + readonly message: (input: MessageInput) => Effect.Effect + readonly context: (sessionID: ID) => Effect.Effect + readonly events: (input: EventsInput) => Stream.Stream +} diff --git a/packages/core/src/public/tool.ts b/packages/core/src/public/tool.ts new file mode 100644 index 0000000000..97b436fed9 --- /dev/null +++ b/packages/core/src/public/tool.ts @@ -0,0 +1,17 @@ +export * as Tool from "./tool" + +import { Effect, Scope } from "effect" +import type { AnyTool, RegistrationError } from "../tool/tool" + +export { Failure, RegistrationError, make } from "../tool/tool" +export type { AnyTool, Content, Context, Definition } from "../tool/tool" + +export interface Interface { + /** + * Register same-process tools on this OpenCode instance for the current Scope. + * Location tools with the same name take precedence where they are installed. + * Closing the Scope removes the tools immediately, so calls that have not + * started settling may fail because the tool is no longer available. + */ + readonly register: (tools: Readonly>) => Effect.Effect +} diff --git a/packages/core/src/question.ts b/packages/core/src/question.ts new file mode 100644 index 0000000000..a489fb9aac --- /dev/null +++ b/packages/core/src/question.ts @@ -0,0 +1,198 @@ +export * as QuestionV2 from "./question" + +import { Context, Deferred, Effect, Layer, Schema } from "effect" +import { EventV2 } from "./event" +import { Identifier } from "./id/id" +import { withStatics } from "./schema" +import { SessionSchema } from "./session/schema" + +export const ID = Schema.String.check(Schema.isStartsWith("que")).pipe( + Schema.brand("QuestionV2.ID"), + withStatics((schema) => ({ ascending: (id?: string) => schema.make(Identifier.ascending("question", id)) })), +) +export type ID = typeof ID.Type + +export const Option = Schema.Struct({ + label: Schema.String.annotate({ description: "Display text (1-5 words, concise)" }), + description: Schema.String.annotate({ description: "Explanation of choice" }), +}).annotate({ identifier: "QuestionV2.Option" }) +export type Option = typeof Option.Type + +const base = { + question: Schema.String.annotate({ description: "Complete question" }), + header: Schema.String.annotate({ description: "Very short label (max 30 chars)" }), + options: Schema.Array(Option).annotate({ description: "Available choices" }), + multiple: Schema.Boolean.pipe(Schema.optional).annotate({ description: "Allow selecting multiple choices" }), +} + +export const Info = Schema.Struct({ + ...base, + custom: Schema.Boolean.pipe(Schema.optional).annotate({ + description: "Allow typing a custom answer (default: true)", + }), +}).annotate({ identifier: "QuestionV2.Info" }) +export type Info = typeof Info.Type + +export const Prompt = Schema.Struct(base).annotate({ identifier: "QuestionV2.Prompt" }) +export type Prompt = typeof Prompt.Type + +export const Tool = Schema.Struct({ + messageID: Schema.String, + callID: Schema.String, +}).annotate({ identifier: "QuestionV2.Tool" }) +export type Tool = typeof Tool.Type + +export const Request = Schema.Struct({ + id: ID, + sessionID: SessionSchema.ID, + questions: Schema.Array(Info).annotate({ description: "Questions to ask" }), + tool: Tool.pipe(Schema.optional), +}).annotate({ identifier: "QuestionV2.Request" }) +export type Request = typeof Request.Type + +export const Answer = Schema.Array(Schema.String).annotate({ identifier: "QuestionV2.Answer" }) +export type Answer = typeof Answer.Type + +export const Reply = Schema.Struct({ + answers: Schema.Array(Answer).annotate({ + description: "User answers in order of questions (each answer is an array of selected labels)", + }), +}).annotate({ identifier: "QuestionV2.Reply" }) +export type Reply = typeof Reply.Type + +export const Event = { + Asked: EventV2.define({ type: "question.v2.asked", schema: Request.fields }), + Replied: EventV2.define({ + type: "question.v2.replied", + schema: { + sessionID: SessionSchema.ID, + requestID: ID, + answers: Schema.Array(Answer), + }, + }), + Rejected: EventV2.define({ + type: "question.v2.rejected", + schema: { + sessionID: SessionSchema.ID, + requestID: ID, + }, + }), +} + +export class RejectedError extends Schema.TaggedErrorClass()("QuestionV2.RejectedError", {}) { + override get message() { + return "The user dismissed this question" + } +} + +export class NotFoundError extends Schema.TaggedErrorClass()("QuestionV2.NotFoundError", { + requestID: ID, +}) {} + +export interface AskInput { + readonly sessionID: SessionSchema.ID + readonly questions: ReadonlyArray + readonly tool?: Tool +} + +export interface ReplyInput { + readonly requestID: ID + readonly answers: ReadonlyArray +} + +export interface Interface { + readonly ask: (input: AskInput) => Effect.Effect, RejectedError> + readonly reply: (input: ReplyInput) => Effect.Effect + readonly reject: (requestID: ID) => Effect.Effect + readonly list: () => Effect.Effect> +} + +export class Service extends Context.Service()("@opencode/v2/Question") {} + +interface Pending { + readonly request: Request + readonly deferred: Deferred.Deferred, RejectedError> +} + +/** + * Location-owned pending prompts. The Location layer map must materialize this + * layer once per embedded Location so replies cannot settle another Location's + * deferred request. + */ +export const layer = Layer.effect( + Service, + Effect.gen(function* () { + const events = yield* EventV2.Service + const pending = new Map() + + yield* Effect.addFinalizer(() => + Effect.forEach(pending.values(), (item) => Deferred.fail(item.deferred, new RejectedError()), { + discard: true, + }).pipe( + Effect.ensuring( + Effect.sync(() => { + pending.clear() + }), + ), + ), + ) + + const ask = Effect.fn("QuestionV2.ask")((input: AskInput) => + Effect.uninterruptibleMask((restore) => + Effect.gen(function* () { + const id = ID.ascending() + const deferred = yield* Deferred.make, RejectedError>() + const request: Request = { id, ...input } + pending.set(id, { request, deferred }) + return yield* events.publish(Event.Asked, request).pipe( + Effect.andThen(restore(Deferred.await(deferred))), + Effect.ensuring( + Effect.sync(() => { + pending.delete(id) + }), + ), + ) + }), + ), + ) + + const reply = Effect.fn("QuestionV2.reply")((input: ReplyInput) => + Effect.uninterruptible( + Effect.gen(function* () { + const existing = pending.get(input.requestID) + if (!existing) return yield* new NotFoundError({ requestID: input.requestID }) + yield* events.publish(Event.Replied, { + sessionID: existing.request.sessionID, + requestID: existing.request.id, + answers: input.answers.map((answer) => [...answer]), + }) + yield* Deferred.succeed(existing.deferred, input.answers) + pending.delete(input.requestID) + }), + ), + ) + + const reject = Effect.fn("QuestionV2.reject")((requestID: ID) => + Effect.uninterruptible( + Effect.gen(function* () { + const existing = pending.get(requestID) + if (!existing) return yield* new NotFoundError({ requestID }) + yield* events.publish(Event.Rejected, { + sessionID: existing.request.sessionID, + requestID: existing.request.id, + }) + yield* Deferred.fail(existing.deferred, new RejectedError()) + pending.delete(requestID) + }), + ), + ) + + const list = Effect.fn("QuestionV2.list")(function* () { + return Array.from(pending.values(), (item) => item.request) + }) + + return Service.of({ ask, reply, reject, list }) + }), +) + +export const locationLayer = layer diff --git a/packages/core/src/reference.ts b/packages/core/src/reference.ts new file mode 100644 index 0000000000..a7890243c5 --- /dev/null +++ b/packages/core/src/reference.ts @@ -0,0 +1,148 @@ +export * as Reference from "./reference" + +import { Context, Effect, Layer, Schema, Scope } from "effect" +import { castDraft } from "immer" +import { Global } from "./global" +import { EventV2 } from "./event" +import { Repository } from "./repository" +import { RepositoryCache } from "./repository-cache" +import { AbsolutePath } from "./schema" +import { State } from "./state" + +export class LocalSource extends Schema.Class("Reference.LocalSource")({ + type: Schema.Literal("local"), + path: AbsolutePath, + description: Schema.String.pipe(Schema.optional), + hidden: Schema.Boolean.pipe(Schema.optional), +}) {} + +export class GitSource extends Schema.Class("Reference.GitSource")({ + type: Schema.Literal("git"), + repository: Schema.String, + branch: Schema.String.pipe(Schema.optional), + description: Schema.String.pipe(Schema.optional), + hidden: Schema.Boolean.pipe(Schema.optional), +}) {} + +export const Source = Schema.Union([LocalSource, GitSource]).pipe(Schema.toTaggedUnion("type")) +export type Source = typeof Source.Type + +export const Event = { + Updated: EventV2.define({ type: "reference.updated", schema: {} }), +} + +export class Info extends Schema.Class("Reference.Info")({ + name: Schema.String, + path: AbsolutePath, + description: Schema.String.pipe(Schema.optional), + hidden: Schema.Boolean.pipe(Schema.optional), + source: Source, +}) {} + +type Data = { + sources: Map +} + +type Editor = { + add(name: string, source: Source): void + remove(name: string): void + list(): readonly [string, Source][] +} + +export interface Interface { + readonly transform: State.Interface["transform"] + readonly replace: (sources: readonly (readonly [string, Source])[]) => Effect.Effect // kilocode_change + readonly list: () => Effect.Effect +} + +export class Service extends Context.Service()("@opencode/v2/Reference") {} + +export const layer = Layer.effect( + Service, + Effect.gen(function* () { + const global = yield* Global.Service + const events = yield* EventV2.Service + const cache = yield* RepositoryCache.Service + const scope = yield* Scope.Scope + const materialized = new Map() + const state = State.create({ + initial: () => ({ sources: new Map() }), + editor: (draft) => ({ + add: (name, source) => draft.sources.set(name, castDraft(source)), + remove: (name) => draft.sources.delete(name), + list: () => Array.from(draft.sources.entries()) as [string, Source][], + }), + finalize: (editor) => + Effect.gen(function* () { + materialized.clear() + const seen = new Map() + for (const [name, source] of editor.list()) { + if (source.type === "local") { + materialized.set( + name, + new Info({ + name, + path: source.path, + description: source.description, + hidden: source.hidden, + source, + }), + ) + continue + } + const repository = Repository.parse(source.repository) + if (!repository || !Repository.isRemote(repository)) continue + if (source.branch) { + try { + Repository.validateBranch(source.branch) + } catch { + continue + } + } + const target = Repository.cachePath(global.repos, repository) + if (seen.has(target) && seen.get(target) !== source.branch) continue + seen.set(target, source.branch) + materialized.set( + name, + new Info({ + name, + path: AbsolutePath.make(target), + description: source.description, + hidden: source.hidden, + source, + }), + ) + yield* cache.ensure({ reference: repository, branch: source.branch, refresh: true }).pipe( + Effect.catchCause((cause) => + Effect.logWarning("failed to materialize reference", { + name, + repository: source.repository, + cause, + }), + ), + Effect.forkIn(scope), + ) + } + yield* events.publish(Event.Updated, {}) + }), + }) + + return Service.of({ + transform: state.transform, + // kilocode_change start - reconcile Kilo's effective config without a request-scoped transform slot. + replace: (sources) => + state.mutate((editor) => + Effect.sync(() => { + for (const [name] of editor.list()) editor.remove(name) + for (const [name, source] of sources) editor.add(name, source) + }), + ), + // kilocode_change end + list: Effect.fn("Reference.list")(function* () { + return Array.from(materialized.values()) + }), + }) + }), +) + +export const locationLayer = layer diff --git a/packages/core/src/reference/guidance.ts b/packages/core/src/reference/guidance.ts new file mode 100644 index 0000000000..f567264768 --- /dev/null +++ b/packages/core/src/reference/guidance.ts @@ -0,0 +1,69 @@ +export * as ReferenceGuidance from "./guidance" + +import { Context, Effect, Layer, Schema } from "effect" +import { PluginBoot } from "../plugin/boot" +import { Reference } from "../reference" +import { SystemContext } from "../system-context/index" + +const Summary = Schema.Struct({ + name: Schema.String, + path: Schema.String, + description: Schema.String.pipe(Schema.optional), +}) + +const render = (references: ReadonlyArray) => + [ + "Project references provide additional directories that can be accessed when relevant.", + "", + ...references.flatMap((reference) => [ + " ", + ` ${reference.name}`, + ` ${reference.path}`, + ...(reference.description === undefined ? [] : [` ${reference.description}`]), + " ", + ]), + "", + ].join("\n") + +export interface Interface { + readonly load: () => Effect.Effect +} + +export class Service extends Context.Service()("@opencode/v2/ReferenceGuidance") {} + +export const layer = Layer.effect( + Service, + Effect.gen(function* () { + const boot = yield* PluginBoot.Service + const references = yield* Reference.Service + + return Service.of({ + load: Effect.fn("ReferenceGuidance.load")(function* () { + yield* boot.wait() + const available = (yield* references.list()) + .filter((reference) => reference.description !== undefined) + .map((reference) => ({ + name: reference.name, + path: reference.path, + description: reference.description, + })) + .toSorted((a, b) => a.name.localeCompare(b.name)) + if (available.length === 0) return SystemContext.empty + return SystemContext.make({ + key: SystemContext.Key.make("core/reference-guidance"), + codec: Schema.toCodecJson(Schema.Array(Summary)), + load: Effect.succeed(available), + baseline: render, + update: (_previous, current) => + [ + "The available project references have changed. This list supersedes the previous reference list.", + render(current), + ].join("\n"), + removed: () => "Project reference guidance is no longer available. Do not use previously listed references.", + }) + }), + }) + }), +) + +export const locationLayer = layer diff --git a/packages/core/src/repository-cache.ts b/packages/core/src/repository-cache.ts new file mode 100644 index 0000000000..894dc38faa --- /dev/null +++ b/packages/core/src/repository-cache.ts @@ -0,0 +1,291 @@ +import path from "path" +import { Context, Effect, Layer, Schema } from "effect" +import { FSUtil } from "./fs-util" +import { Git } from "./git" +import { Global } from "./global" +import { Repository } from "./repository" +import { EffectFlock } from "./util/effect-flock" + +export type Result = { + readonly repository: string + readonly host: string + readonly remote: string + readonly localPath: string + readonly status: "cached" | "cloned" | "refreshed" + readonly head?: string + readonly branch?: string +} + +export type EnsureInput = { + readonly reference: Repository.RemoteReference + readonly refresh?: boolean + readonly branch?: string +} + +export class InvalidRepositoryError extends Schema.TaggedErrorClass()( + "RepositoryCacheInvalidRepositoryError", + { + repository: Schema.String, + message: Schema.String, + }, +) {} + +export class InvalidBranchError extends Schema.TaggedErrorClass()( + "RepositoryCacheInvalidBranchError", + { + branch: Schema.String, + message: Schema.String, + }, +) {} + +export class CloneFailedError extends Schema.TaggedErrorClass()("RepositoryCacheCloneFailedError", { + repository: Schema.String, + message: Schema.String, +}) {} + +export class FetchFailedError extends Schema.TaggedErrorClass()("RepositoryCacheFetchFailedError", { + repository: Schema.String, + message: Schema.String, +}) {} + +export class CheckoutFailedError extends Schema.TaggedErrorClass()( + "RepositoryCacheCheckoutFailedError", + { + repository: Schema.String, + branch: Schema.String, + message: Schema.String, + }, +) {} + +export class ResetFailedError extends Schema.TaggedErrorClass()("RepositoryCacheResetFailedError", { + repository: Schema.String, + message: Schema.String, +}) {} + +export class LockFailedError extends Schema.TaggedErrorClass()("RepositoryCacheLockFailedError", { + localPath: Schema.String, + message: Schema.String, +}) {} + +export class CacheOperationError extends Schema.TaggedErrorClass()( + "RepositoryCacheOperationError", + { + operation: Schema.String, + path: Schema.String, + message: Schema.String, + }, +) {} + +export type Error = + | InvalidRepositoryError + | InvalidBranchError + | CloneFailedError + | FetchFailedError + | CheckoutFailedError + | ResetFailedError + | LockFailedError + | CacheOperationError + +export interface Interface { + readonly ensure: (input: EnsureInput) => Effect.Effect +} + +export class Service extends Context.Service()("@opencode/RepositoryCache") {} + +export function isError(error: unknown): error is Error { + return ( + error instanceof InvalidRepositoryError || + error instanceof InvalidBranchError || + error instanceof CloneFailedError || + error instanceof FetchFailedError || + error instanceof CheckoutFailedError || + error instanceof ResetFailedError || + error instanceof LockFailedError || + error instanceof CacheOperationError + ) +} + +export const parseRemote = Effect.fn("RepositoryCache.parseRemote")(function* (repository: string) { + return yield* Effect.try({ + try: () => Repository.parseRemote(repository), + catch: (error) => new InvalidRepositoryError({ repository, message: errorMessage(error) }), + }) +}) + +export const validateBranch = Effect.fn("RepositoryCache.validateBranch")(function* (branch: string) { + return yield* Effect.try({ + try: () => Repository.validateBranch(branch), + catch: (error) => new InvalidBranchError({ branch, message: errorMessage(error) }), + }) +}) + +export const layer: Layer.Layer = + Layer.effect( + Service, + Effect.gen(function* () { + const fs = yield* FSUtil.Service + const git = yield* Git.Service + const flock = yield* EffectFlock.Service + const global = yield* Global.Service + + return Service.of({ + ensure: Effect.fn("RepositoryCache.ensure")(function* (input) { + if (input.branch) yield* validateBranch(input.branch) + + const repository = input.reference.label + const localPath = Repository.cachePath(global.repos, input.reference) + const cloneTarget = Repository.parse(input.reference.remote) ?? input.reference + + return yield* flock + .withLock( + Effect.gen(function* () { + yield* cacheOperation(fs.ensureDir(path.dirname(localPath)), "ensure cache directory", localPath) + + const exists = yield* fs.existsSafe(localPath) + const hasGitDir = yield* fs.existsSafe(path.join(localPath, ".git")) + const origin = hasGitDir ? yield* git.origin(localPath) : undefined + const originReference = origin ? Repository.parse(origin) : undefined + const reuse = hasGitDir && Boolean(originReference && Repository.same(originReference, cloneTarget)) + if (exists && !reuse) { + yield* cacheOperation(fs.remove(localPath, { recursive: true }), "remove stale cache", localPath) + } + + const currentBranch = reuse ? yield* git.branch(localPath) : undefined + const status = statusForRepository({ + reuse, + refresh: input.refresh, + branchMatches: input.branch ? currentBranch === input.branch : undefined, + }) + + if (status === "cloned") { + const result = yield* git + .clone({ remote: input.reference.remote, target: localPath, branch: input.branch }) + .pipe( + Effect.mapError((error) => new CloneFailedError({ repository, message: errorMessage(error) })), + ) + if (result.exitCode !== 0) { + return yield* new CloneFailedError({ + repository, + message: resultMessage(result, `Failed to clone ${repository}`), + }) + } + } + + if (status === "refreshed") { + const fetch = yield* git + .fetch(localPath) + .pipe( + Effect.mapError((error) => new FetchFailedError({ repository, message: errorMessage(error) })), + ) + if (fetch.exitCode !== 0) { + return yield* new FetchFailedError({ + repository, + message: resultMessage(fetch, `Failed to refresh ${repository}`), + }) + } + + if (input.branch) { + const requestedBranch = input.branch + const fetchBranch = yield* git + .fetchBranch(localPath, requestedBranch) + .pipe( + Effect.mapError((error) => new FetchFailedError({ repository, message: errorMessage(error) })), + ) + if (fetchBranch.exitCode !== 0) { + return yield* new FetchFailedError({ + repository, + message: resultMessage(fetchBranch, `Failed to fetch ${requestedBranch}`), + }) + } + + const checkout = yield* git.checkout(localPath, requestedBranch).pipe( + Effect.mapError( + (error) => + new CheckoutFailedError({ + repository, + branch: requestedBranch, + message: errorMessage(error), + }), + ), + ) + if (checkout.exitCode !== 0) { + return yield* new CheckoutFailedError({ + repository, + branch: requestedBranch, + message: resultMessage(checkout, `Failed to checkout ${requestedBranch}`), + }) + } + } + + const reset = yield* git + .reset(localPath, yield* resetTarget(git, localPath, input.branch)) + .pipe( + Effect.mapError((error) => new ResetFailedError({ repository, message: errorMessage(error) })), + ) + if (reset.exitCode !== 0) { + return yield* new ResetFailedError({ + repository, + message: resultMessage(reset, `Failed to reset ${repository}`), + }) + } + } + + return { + repository, + host: input.reference.host, + remote: input.reference.remote, + localPath, + status, + head: yield* git.head(localPath), + branch: yield* git.branch(localPath), + } satisfies Result + }), + `repository-cache:${localPath}`, + ) + .pipe( + Effect.mapError((error) => + isError(error) ? error : new LockFailedError({ localPath, message: errorMessage(error) }), + ), + ) + }), + }) + }), + ) + +export const defaultLayer: Layer.Layer = layer.pipe( + Layer.provide(EffectFlock.defaultLayer), + Layer.provide(FSUtil.defaultLayer), + Layer.provide(Git.defaultLayer), + Layer.provide(Global.defaultLayer), +) + +function statusForRepository(input: { reuse: boolean; refresh?: boolean; branchMatches?: boolean }) { + if (!input.reuse) return "cloned" as const + if (input.branchMatches === false || input.refresh) return "refreshed" as const + return "cached" as const +} + +function errorMessage(error: unknown) { + return error instanceof globalThis.Error ? error.message : String(error) +} + +function cacheOperation(effect: Effect.Effect, operation: string, target: string) { + return effect.pipe( + Effect.mapError((error) => new CacheOperationError({ operation, path: target, message: errorMessage(error) })), + ) +} + +const resetTarget = Effect.fnUntraced(function* (git: Git.Interface, cwd: string, requestedBranch?: string) { + if (requestedBranch) return `origin/${requestedBranch}` + const remoteHead = yield* git.remoteHead(cwd) + if (remoteHead) return remoteHead + const currentBranch = yield* git.branch(cwd) + if (currentBranch) return `origin/${currentBranch}` + return "HEAD" +}) + +function resultMessage(result: Git.Result, fallback: string) { + return result.stderr.trim() || result.text.trim() || fallback +} + +export * as RepositoryCache from "./repository-cache" diff --git a/packages/core/src/repository.ts b/packages/core/src/repository.ts new file mode 100644 index 0000000000..ec5d743966 --- /dev/null +++ b/packages/core/src/repository.ts @@ -0,0 +1,208 @@ +import path from "path" +import { fileURLToPath } from "url" +import { Schema } from "effect" + +type BaseReference = { + readonly host: string + readonly path: string + readonly segments: string[] + readonly owner?: string + readonly repo: string + readonly remote: string + readonly label: string +} + +export type RemoteReference = BaseReference & { + readonly protocol?: string +} + +export type FileReference = BaseReference & { + readonly host: "file" + readonly protocol: "file:" +} + +export type Reference = RemoteReference | FileReference + +export class InvalidReferenceError extends Schema.TaggedErrorClass()( + "RepositoryInvalidReferenceError", + { + repository: Schema.String, + message: Schema.String, + }, +) {} + +export class UnsupportedLocalRepositoryError extends Schema.TaggedErrorClass()( + "RepositoryUnsupportedLocalRepositoryError", + { + repository: Schema.String, + message: Schema.String, + }, +) {} + +export class InvalidBranchError extends Schema.TaggedErrorClass()("RepositoryInvalidBranchError", { + branch: Schema.String, + message: Schema.String, +}) {} + +export type Error = InvalidReferenceError | UnsupportedLocalRepositoryError | InvalidBranchError + +export function isError(error: unknown): error is Error { + return ( + error instanceof InvalidReferenceError || + error instanceof UnsupportedLocalRepositoryError || + error instanceof InvalidBranchError + ) +} + +export function parse(input: string): Reference | undefined { + const cleaned = normalizeInput(input) + if (!cleaned) return + + const githubPrefixed = cleaned.match(/^github:([^/\s]+)\/([^/\s]+)$/) + if (githubPrefixed) return buildRemote({ host: "github.com", segments: [githubPrefixed[1], githubPrefixed[2]] }) + + if (!cleaned.includes("://")) { + const scp = cleaned.match(/^(?:[^@/\s]+@)?([^:/\s]+):(.+)$/) + if (scp) return buildRemote({ host: scp[1], segments: parts(scp[2]), remote: cleaned }) + + const direct = parts(cleaned) + if (direct.length >= 2 && hostLike(direct[0])) return buildRemote({ host: direct[0], segments: direct.slice(1) }) + if (direct.length === 2) return buildRemote({ host: "github.com", segments: direct }) + } + + try { + const url = new URL(cleaned) + if (url.protocol === "file:") return buildFile({ url, remote: cleaned }) + const segments = parts(url.pathname) + return buildRemote({ + host: url.host, + segments, + remote: url.host === "github.com" ? githubRemote(segments.join("/")) : cleaned, + protocol: url.protocol, + }) + } catch { + return + } +} + +export function parseRemote(input: string): RemoteReference { + const reference = parse(input) + if (!reference) { + throw new InvalidReferenceError({ + repository: input, + message: "Repository must be a git URL, host/path reference, or GitHub owner/repo shorthand", + }) + } + if (!isRemote(reference)) { + throw new UnsupportedLocalRepositoryError({ + repository: input, + message: "Local file repositories are not supported", + }) + } + return reference +} + +export function validateBranch(branch: string): void { + if (/^[A-Za-z0-9/_.-]+$/.test(branch) && !branch.startsWith("-") && !branch.includes("..")) return + throw new InvalidBranchError({ + branch, + message: "Branch must contain only alphanumeric characters, /, _, ., and -, and cannot start with - or contain ..", + }) +} + +export function isFile(reference: Reference): reference is FileReference { + return reference.protocol === "file:" +} + +export function isRemote(reference: Reference): reference is RemoteReference { + return !isFile(reference) +} + +export function cachePath(root: string, reference: Reference): string { + return path.join(root, ...reference.host.split(":"), ...reference.segments) +} + +export function cacheIdentity(reference: Reference): string { + return `${reference.host}/${reference.path}` +} + +export function same(left: Reference, right: Reference): boolean { + return cacheIdentity(left) === cacheIdentity(right) +} + +function normalizeInput(input: string) { + return input + .trim() + .replace(/^git\+/, "") + .replace(/#.*$/, "") + .replace(/\/+$/, "") +} + +function trimGitSuffix(input: string) { + return input.replace(/\.git$/, "") +} + +function parts(input: string) { + return input + .split("/") + .map((item) => trimGitSuffix(item.trim())) + .filter(Boolean) +} + +function safeHost(input: string) { + return Boolean(input) && !input.startsWith("-") && !/[\s/\\]/.test(input) +} + +function safeSegment(input: string) { + return input !== "." && input !== ".." && !input.includes(":") && !/[\s/\\]/.test(input) +} + +function hostLike(input: string) { + return input.includes(".") || input.includes(":") || input === "localhost" +} + +function withSlash(input: string) { + return input.endsWith("/") ? input : `${input}/` +} + +function githubRemote(pathname: string) { + const base = process.env.KILO_REPO_CLONE_GITHUB_BASE_URL + if (!base) return `https://github.com/${pathname}.git` + return new URL(`${pathname}.git`, withSlash(base)).href +} + +function buildRemote(input: { host: string; segments: string[]; remote?: string; protocol?: string }) { + const segments = input.segments.map(trimGitSuffix).filter(Boolean) + if (!safeHost(input.host) || !segments.length || segments.some((segment) => !safeSegment(segment))) return + const repositoryPath = segments.join("/") + const host = input.host.toLowerCase() + return { + host, + path: repositoryPath, + segments, + owner: segments.length === 2 ? segments[0] : undefined, + repo: segments[segments.length - 1], + remote: + input.remote ?? (host === "github.com" ? githubRemote(repositoryPath) : `https://${host}/${repositoryPath}.git`), + label: host === "github.com" && segments.length === 2 ? repositoryPath : `${host}/${repositoryPath}`, + protocol: input.protocol, + } satisfies RemoteReference +} + +function buildFile(input: { url: URL; remote: string }) { + const filePath = path.normalize(fileURLToPath(input.url)) + const segments = filePath.split(/[\\/]+/).filter(Boolean) + if (!segments.length) return + return { + host: "file", + path: filePath, + segments: segments.map((segment) => segment.replace(/:$/, "")), + owner: undefined, + repo: trimGitSuffix(segments[segments.length - 1]), + remote: input.remote, + label: filePath, + protocol: "file:", + } satisfies FileReference +} + +export * as Repository from "./repository" diff --git a/packages/core/src/ripgrep.ts b/packages/core/src/ripgrep.ts new file mode 100644 index 0000000000..e154519560 --- /dev/null +++ b/packages/core/src/ripgrep.ts @@ -0,0 +1,318 @@ +export * as Ripgrep from "./ripgrep" + +import { Context, Effect, Fiber, Layer, Schema, Stream } from "effect" +import { ChildProcess } from "effect/unstable/process" +import path from "path" +import { LayerNode } from "./effect/layer-node" +import { Entry, Match } from "./filesystem/schema" +import { FSUtil } from "./fs-util" +import * as SpawnValidation from "./kilocode/spawn-validation" // kilocode_change +import { AppProcess, collectStream, waitForAbort } from "./process" +import { NonNegativeInt, PositiveInt, RelativePath } from "./schema" +import { RipgrepBinary } from "./ripgrep/binary" + +/** + * Small core-owned ripgrep execution adapter. It deliberately exposes raw + * process-oriented rows, not model text or permission behavior. Search maps + * these rows into filesystem results; leaf tools own + * presentation and permission prompts. + */ + +const ERROR_BYTES = 8 * 1024 +const MAX_RECORD_BYTES = 64 * 1024 +const MAX_SUBMATCHES = 100 + +const RawMatch = Schema.Struct({ + type: Schema.Literal("match"), + data: Schema.Struct({ + path: Schema.Struct({ text: Schema.String }), + lines: Schema.Struct({ text: Schema.String }), + line_number: PositiveInt, + absolute_offset: NonNegativeInt, + submatches: Schema.Array( + Schema.Struct({ + match: Schema.Struct({ text: Schema.String }), + start: NonNegativeInt, + end: NonNegativeInt, + }), + ), + }), +}) + +type RawMatchData = (typeof RawMatch.Type)["data"] + +export class Error extends Schema.TaggedErrorClass()("Ripgrep.Error", { + message: Schema.String, + cause: Schema.optional(Schema.Defect), +}) {} + +export class InvalidPatternError extends Schema.TaggedErrorClass()("Ripgrep.InvalidPatternError", { + pattern: Schema.String, + message: Schema.String, +}) {} + +export interface FindInput { + readonly cwd: string + readonly pattern: string + readonly limit: number + readonly hidden?: boolean + readonly follow?: boolean + readonly signal?: AbortSignal + readonly onEntry?: (entry: Entry) => Effect.Effect +} + +export interface GlobInput { + readonly cwd: string + readonly pattern: string + readonly limit: number + readonly hidden?: boolean + readonly follow?: boolean + readonly signal?: AbortSignal + readonly validate?: Effect.Effect // kilocode_change - bind approved searches at spawn +} + +export interface GrepInput { + readonly cwd: string + readonly pattern: string + readonly file?: string + readonly include?: string + readonly limit: number + readonly signal?: AbortSignal + readonly validate?: Effect.Effect // kilocode_change - bind approved searches at spawn +} + +export interface Interface { + readonly find: (input: FindInput) => Effect.Effect + readonly glob: (input: GlobInput) => Effect.Effect, Error> // kilocode_change + readonly grep: (input: GrepInput) => Effect.Effect, Error | InvalidPatternError> // kilocode_change +} + +// kilocode_change start - retain truncation state through model-facing tools +export interface SearchResult
{ + readonly items: readonly A[] + readonly truncated: boolean + readonly partial: boolean +} +// kilocode_change end + +export class Service extends Context.Service()("@opencode/v2/Ripgrep") {} + +const failure = (message: string, cause?: unknown) => new Error({ message, cause }) + +const isInvalidPattern = (stderr: string) => + stderr.includes("regex parse error") || stderr.includes("error parsing regex") + +export const layer = Layer.effect( + Service, + Effect.gen(function* () { + const process = yield* AppProcess.Service + const binary = yield* RipgrepBinary.Service + + const run = (input: { + readonly cwd: string + readonly args: string[] + readonly limit: number + readonly signal?: AbortSignal + readonly parse: (line: string) => Effect.Effect + readonly pattern?: string + readonly onItem?: (item: A) => Effect.Effect + readonly validate?: Effect.Effect // kilocode_change - spawn-bound target validation + }) => { + const program = Effect.scoped( + Effect.gen(function* () { + const filepath = yield* binary.filepath + // kilocode_change start - validate approved targets after all spawn preparation + const command = ChildProcess.make(filepath, input.args, { + cwd: input.cwd, + extendEnv: true, + stdin: "ignore", + }) + const handle = yield* process.spawn( + input.validate ? SpawnValidation.attach(command, input.validate) : command, + ) + // kilocode_change end + const stderrFiber = yield* collectStream(handle.stderr, ERROR_BYTES).pipe( + Effect.map((output) => output.buffer.toString("utf8")), + Effect.forkScoped, + ) + let observed = 0 + const rows = yield* Stream.decodeText(handle.stdout).pipe( + Stream.splitLines, + Stream.filter((line) => line.length > 0), + Stream.mapEffect(input.parse), + Stream.filter((row): row is A => row !== undefined), + Stream.tap((row) => { + if (!input.onItem || observed++ >= input.limit) return Effect.void + return input.onItem(row) + }), + Stream.take(input.limit + 1), + Stream.runCollect, + Effect.map((chunk) => [...chunk]), + ) + const truncated = rows.length > input.limit + if (truncated) return { items: rows.slice(0, input.limit), truncated, partial: false } + + const code = yield* handle.exitCode + const stderr = yield* Fiber.join(stderrFiber) + if (input.pattern && code === 2 && isInvalidPattern(stderr)) { + return yield* new InvalidPatternError({ pattern: input.pattern, message: stderr.trim() }) + } + if (code !== 0 && code !== 1 && code !== 2) { + return yield* failure(stderr.trim() || `ripgrep failed with code ${code}`) + } + return { items: code === 1 ? [] : rows, truncated: false, partial: code === 2 } + }), + ) + const abortable = input.signal ? program.pipe(Effect.raceFirst(waitForAbort(input.signal))) : program + return abortable.pipe( + // kilocode_change start - surface the underlying reason instead of a bare wrapper message + Effect.mapError((cause) => { + if (cause instanceof Error || cause instanceof InvalidPatternError) return cause + const detail = cause instanceof globalThis.Error && cause.message.trim() ? `: ${cause.message.trim()}` : "" + return failure(`ripgrep execution failed${detail}`, cause) + }), + // kilocode_change end + ) + } + + return Service.of({ + glob: (input) => + run({ + cwd: input.cwd, + limit: input.limit, + signal: input.signal, + validate: input.validate, // kilocode_change - preserve spawn-bound target validation + args: [ + "--no-config", + "--files", + ...(input.hidden ? ["--hidden"] : []), + ...(input.follow ? ["--follow"] : []), + `--glob=${input.pattern}`, + "--glob=!**/.git/**", + ".", + ], + parse: (line) => + Effect.succeed( + line + .replace(/^(?:\.[\\/])+/u, "") + .replace(/^[\\/]+/u, "") + .replaceAll("\\", "/"), + ), + }).pipe( + // kilocode_change start - retain spawn metadata after mapping paths + Effect.map((result) => ({ + ...result, + items: result.items.map((relative) => { + const absolute = path.resolve(input.cwd, relative) + return new Entry({ + path: RelativePath.make(relative), + type: "file", + mime: FSUtil.mimeType(absolute), + }) + }), + })), + // kilocode_change end + Effect.catchTag("Ripgrep.InvalidPatternError", (cause) => Effect.fail(failure(cause.message, cause))), + ), + find: (input) => + run({ + cwd: input.cwd, + limit: input.limit, + signal: input.signal, + args: [ + "--no-config", + "--files", + ...(input.hidden ? ["--hidden"] : []), + ...(input.follow ? ["--follow"] : []), + ...(input.pattern === "*" ? [] : [`--glob=${input.pattern}`]), + "--glob=!**/.git/**", + ".", + ], + parse: (line) => { + const relative = line + .replace(/^(?:\.[\\/])+/u, "") + .replace(/^[\\/]+/u, "") + .replaceAll("\\", "/") + return Effect.succeed( + new Entry({ + path: RelativePath.make(relative), + type: "file", + mime: FSUtil.mimeType(path.resolve(input.cwd, relative)), + }), + ) + }, + onItem: input.onEntry, + }).pipe( + Effect.map((result) => result.items), + Effect.catchTag("Ripgrep.InvalidPatternError", (cause) => Effect.fail(failure(cause.message, cause))), + ), + grep: (input) => + run({ + ...input, + args: [ + "--no-config", + "--json", + "--hidden", + "--no-messages", + ...(input.include ? [`--glob=${input.include}`] : []), + "--glob=!**/.git/**", + "--", + input.pattern, + input.file ?? ".", + ], + parse: (line) => + (Buffer.byteLength(line, "utf8") > MAX_RECORD_BYTES + ? Effect.fail(failure(`Ripgrep JSON record exceeded ${MAX_RECORD_BYTES} bytes`)) + : Effect.try({ + try: () => JSON.parse(line) as unknown, + catch: (cause) => failure("Invalid ripgrep JSON output", cause), + }) + ).pipe( + Effect.flatMap((json) => { + if (!json || typeof json !== "object" || !("type" in json) || json.type !== "match") + return Effect.succeed(undefined) + return Schema.decodeUnknownEffect(RawMatch)(json).pipe( + Effect.map((match) => ({ + ...match.data, + path: { text: match.data.path.text.replace(/^\.[\\/]/, "") }, + submatches: match.data.submatches.slice(0, MAX_SUBMATCHES), + })), + Effect.mapError((cause) => failure("Invalid ripgrep match output", cause)), + ) + }), + ), + }).pipe( + // kilocode_change start - retain spawn metadata after mapping matches + Effect.map((result) => ({ + ...result, + items: result.items.map((match) => { + const relative = match.path.text + .replace(/^(?:\.[\\/])+/u, "") + .replace(/^[\\/]+/u, "") + .replaceAll("\\", "/") + const absolute = path.resolve(input.cwd, relative) + return new Match({ + entry: new Entry({ + path: RelativePath.make(relative), + type: "file", + mime: FSUtil.mimeType(absolute), + }), + line: match.line_number, + offset: match.absolute_offset, + text: match.lines.text.length > 2_000 ? match.lines.text.slice(0, 2_000) + "..." : match.lines.text, + submatches: match.submatches.map((submatch) => ({ + text: submatch.match.text, + start: submatch.start, + end: submatch.end, + })), + }) + }), + })), + // kilocode_change end + ), + }) + }), +) + +export const defaultLayer = layer.pipe(Layer.provide(Layer.merge(RipgrepBinary.defaultLayer, AppProcess.defaultLayer))) +export const node = LayerNode.make(layer, [RipgrepBinary.node, AppProcess.node]) diff --git a/packages/core/src/ripgrep/binary.ts b/packages/core/src/ripgrep/binary.ts new file mode 100644 index 0000000000..4d34a7d4bd --- /dev/null +++ b/packages/core/src/ripgrep/binary.ts @@ -0,0 +1,135 @@ +import path from "path" +import { Context, Effect, Layer, Stream } from "effect" +import { FetchHttpClient, HttpClient, HttpClientRequest } from "effect/unstable/http" +import { ChildProcess } from "effect/unstable/process" +import { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner" +import { CrossSpawnSpawner } from "../cross-spawn-spawner" +import { LayerNode } from "../effect/layer-node" +import { httpClient } from "../effect/layer-node-platform" +import { FSUtil } from "../fs-util" +import { Global } from "../global" +import { which } from "../util/which" + +export namespace RipgrepBinary { + const VERSION = "15.1.0" + const PLATFORM = { + "arm64-darwin": { platform: "aarch64-apple-darwin", extension: "tar.gz" }, + "arm64-linux": { platform: "aarch64-unknown-linux-gnu", extension: "tar.gz" }, + "x64-darwin": { platform: "x86_64-apple-darwin", extension: "tar.gz" }, + "x64-linux": { platform: "x86_64-unknown-linux-musl", extension: "tar.gz" }, + "arm64-win32": { platform: "aarch64-pc-windows-msvc", extension: "zip" }, + "ia32-win32": { platform: "i686-pc-windows-msvc", extension: "zip" }, + "x64-win32": { platform: "x86_64-pc-windows-msvc", extension: "zip" }, + } as const + + interface Interface { + readonly filepath: Effect.Effect + } + + export class Service extends Context.Service()("@opencode/RipgrepBinary") {} + + export const layer = Layer.effect( + Service, + Effect.gen(function* () { + const fs = yield* FSUtil.Service + const http = HttpClient.filterStatusOk(yield* HttpClient.HttpClient) + const spawner = yield* ChildProcessSpawner + + const run = Effect.fnUntraced(function* (command: string, args: string[]) { + const handle = yield* spawner.spawn(ChildProcess.make(command, args, { extendEnv: true, stdin: "ignore" })) + const [stdout, stderr, code] = yield* Effect.all( + [ + Stream.mkString(Stream.decodeText(handle.stdout)), + Stream.mkString(Stream.decodeText(handle.stderr)), + handle.exitCode, + ], + { concurrency: "unbounded" }, + ) + return { stdout, stderr, code } + }, Effect.scoped) + + const extract = Effect.fnUntraced(function* ( + archive: string, + config: (typeof PLATFORM)[keyof typeof PLATFORM], + target: string, + ) { + const dir = yield* fs.makeTempDirectoryScoped({ directory: Global.Path.bin, prefix: "ripgrep-" }) + + if (config.extension === "zip") { + const shell = (yield* Effect.sync(() => which("powershell.exe") ?? which("pwsh.exe"))) ?? "powershell.exe" + const result = yield* run(shell, [ + "-NoProfile", + "-NonInteractive", + "-Command", + `$global:ProgressPreference = 'SilentlyContinue'; Expand-Archive -LiteralPath '${archive.replaceAll("'", "''")}' -DestinationPath '${dir.replaceAll("'", "''")}' -Force`, + ]) + if (result.code !== 0) + throw new Error( + result.stderr.trim() || result.stdout.trim() || `ripgrep extraction failed with code ${result.code}`, + ) + } + + if (config.extension === "tar.gz") { + const result = yield* run("tar", ["-xzf", archive, "-C", dir]) + if (result.code !== 0) + throw new Error( + result.stderr.trim() || result.stdout.trim() || `ripgrep extraction failed with code ${result.code}`, + ) + } + + const extracted = path.join( + dir, + `ripgrep-${VERSION}-${config.platform}`, + process.platform === "win32" ? "rg.exe" : "rg", + ) + if (!(yield* fs.isFile(extracted))) throw new Error(`ripgrep archive did not contain executable: ${extracted}`) + + yield* fs.copyFile(extracted, target) + if (process.platform !== "win32") yield* fs.chmod(target, 0o755) + }, Effect.scoped) + + return Service.of({ + filepath: yield* Effect.cached( + Effect.gen(function* () { + // kilocode_change - Git for Windows may expose an incompatible MSYS rg.exe + const system = yield* Effect.sync(() => (process.platform === "win32" ? undefined : which("rg"))) + if (system && (yield* fs.isFile(system).pipe(Effect.orDie))) return system + + const target = path.join(Global.Path.bin, `rg${process.platform === "win32" ? ".exe" : ""}`) + if (yield* fs.isFile(target).pipe(Effect.orDie)) return target + + const platformKey = `${process.arch}-${process.platform}` as keyof typeof PLATFORM + const config = PLATFORM[platformKey] + if (!config) throw new Error(`unsupported platform for ripgrep: ${platformKey}`) + + const filename = `ripgrep-${VERSION}-${config.platform}.${config.extension}` + const url = `https://github.com/BurntSushi/ripgrep/releases/download/${VERSION}/${filename}` + const archive = path.join(Global.Path.bin, filename) + + yield* Effect.logInfo("downloading ripgrep", { url }) + yield* fs.ensureDir(Global.Path.bin).pipe(Effect.orDie) + const bytes = yield* HttpClientRequest.get(url).pipe( + http.execute, + Effect.flatMap((response) => response.arrayBuffer), + Effect.mapError((cause) => (cause instanceof Error ? cause : new Error(String(cause)))), + ) + if (bytes.byteLength === 0) throw new Error(`failed to download ripgrep from ${url}`) + + yield* fs.writeWithDirs(archive, new Uint8Array(bytes)) + yield* extract(archive, config, target) + yield* fs.remove(archive, { force: true }).pipe(Effect.ignore) + return target + }), + ), + }) + }), + ) + + export const defaultLayer = layer.pipe( + Layer.provide(FetchHttpClient.layer), + Layer.provide(FSUtil.defaultLayer), + Layer.provide(CrossSpawnSpawner.defaultLayer), + ) + + export const node = LayerNode.make(layer, [FSUtil.node, httpClient, CrossSpawnSpawner.node]) +} diff --git a/packages/core/src/schema.ts b/packages/core/src/schema.ts index 5b4042c736..97b24dbda8 100644 --- a/packages/core/src/schema.ts +++ b/packages/core/src/schema.ts @@ -1,4 +1,13 @@ import { Option, Schema, SchemaGetter } from "effect" +import { Hash } from "./util/hash" + +export type ExternalID = { + readonly namespace: string + readonly key: string +} + +export const externalID = (prefix: string, input: ExternalID) => + `${prefix}_${Hash.sha256(JSON.stringify([input.namespace, input.key]))}` /** * Integer greater than zero. @@ -10,6 +19,18 @@ export const PositiveInt = Schema.Int.check(Schema.isGreaterThan(0)) */ export const NonNegativeInt = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)) +/** + * Relative file path (e.g., `src/components/Button.tsx`). + */ +export const RelativePath = Schema.String.pipe(Schema.brand("RelativePath")) +export type RelativePath = Schema.Schema.Type + +/** + * Absolute file path (e.g., `/home/user/projects/myapp/src/main.ts`). + */ +export const AbsolutePath = Schema.String.pipe(Schema.brand("AbsolutePath")) +export type AbsolutePath = Schema.Schema.Type + /** * Optional public JSON field that can hold explicit `undefined` on the type * side but encodes it as an omitted key, matching legacy `JSON.stringify`. diff --git a/packages/core/src/session-event.ts b/packages/core/src/session-event.ts deleted file mode 100644 index a98d9cc051..0000000000 --- a/packages/core/src/session-event.ts +++ /dev/null @@ -1,402 +0,0 @@ -import { Schema } from "effect" -import { EventV2 } from "./event" -import { ModelV2 } from "./model" -import { NonNegativeInt } from "./schema" -import { Session } from "./session" -import { FileAttachment, Prompt } from "./session-prompt" -import { ToolOutput } from "./tool-output" -import { V2Schema } from "./v2-schema" - -export { FileAttachment } - -export const Source = Schema.Struct({ - start: NonNegativeInt, - end: NonNegativeInt, - text: Schema.String, -}).annotate({ - identifier: "session.next.event.source", -}) -export type Source = typeof Source.Type - -const Base = { - timestamp: V2Schema.DateTimeUtcFromMillis, - sessionID: Session.ID, -} - -const options = { - aggregate: "sessionID", - version: 1, -} as const - -export const UnknownError = Schema.Struct({ - type: Schema.Literal("unknown"), - message: Schema.String, -}).annotate({ - identifier: "Session.Error.Unknown", -}) -export type UnknownError = typeof UnknownError.Type - -export const AgentSwitched = EventV2.define({ - type: "session.next.agent.switched", - ...options, - schema: { - ...Base, - agent: Schema.String, - }, -}) -export type AgentSwitched = typeof AgentSwitched.Type - -export const ModelSwitched = EventV2.define({ - type: "session.next.model.switched", - ...options, - schema: { - ...Base, - model: ModelV2.Ref, - }, -}) -export type ModelSwitched = typeof ModelSwitched.Type - -export const Prompted = EventV2.define({ - type: "session.next.prompted", - ...options, - schema: { - ...Base, - prompt: Prompt, - }, -}) -export type Prompted = typeof Prompted.Type - -export const Synthetic = EventV2.define({ - type: "session.next.synthetic", - ...options, - schema: { - ...Base, - text: Schema.String, - }, -}) -export type Synthetic = typeof Synthetic.Type - -export namespace Shell { - export const Started = EventV2.define({ - type: "session.next.shell.started", - ...options, - schema: { - ...Base, - callID: Schema.String, - command: Schema.String, - }, - }) - export type Started = typeof Started.Type - - export const Ended = EventV2.define({ - type: "session.next.shell.ended", - ...options, - schema: { - ...Base, - callID: Schema.String, - output: Schema.String, - }, - }) - export type Ended = typeof Ended.Type -} - -export namespace Step { - export const Started = EventV2.define({ - type: "session.next.step.started", - ...options, - schema: { - ...Base, - agent: Schema.String, - model: ModelV2.Ref, - snapshot: Schema.String.pipe(Schema.optional), - }, - }) - export type Started = typeof Started.Type - - export const Ended = EventV2.define({ - type: "session.next.step.ended", - ...options, - schema: { - ...Base, - finish: Schema.String, - cost: Schema.Finite, - tokens: Schema.Struct({ - input: Schema.Finite, - output: Schema.Finite, - reasoning: Schema.Finite, - cache: Schema.Struct({ - read: Schema.Finite, - write: Schema.Finite, - }), - }), - snapshot: Schema.String.pipe(Schema.optional), - }, - }) - export type Ended = typeof Ended.Type - - export const Failed = EventV2.define({ - type: "session.next.step.failed", - ...options, - schema: { - ...Base, - error: UnknownError, - }, - }) - export type Failed = typeof Failed.Type -} - -export namespace Text { - export const Started = EventV2.define({ - type: "session.next.text.started", - ...options, - schema: { - ...Base, - }, - }) - export type Started = typeof Started.Type - - export const Delta = EventV2.define({ - type: "session.next.text.delta", - ...options, - schema: { - ...Base, - delta: Schema.String, - }, - }) - export type Delta = typeof Delta.Type - - export const Ended = EventV2.define({ - type: "session.next.text.ended", - ...options, - schema: { - ...Base, - text: Schema.String, - }, - }) - export type Ended = typeof Ended.Type -} - -export namespace Reasoning { - export const Started = EventV2.define({ - type: "session.next.reasoning.started", - ...options, - schema: { - ...Base, - reasoningID: Schema.String, - }, - }) - export type Started = typeof Started.Type - - export const Delta = EventV2.define({ - type: "session.next.reasoning.delta", - ...options, - schema: { - ...Base, - reasoningID: Schema.String, - delta: Schema.String, - }, - }) - export type Delta = typeof Delta.Type - - export const Ended = EventV2.define({ - type: "session.next.reasoning.ended", - ...options, - schema: { - ...Base, - reasoningID: Schema.String, - text: Schema.String, - }, - }) - export type Ended = typeof Ended.Type -} - -export namespace Tool { - export namespace Input { - export const Started = EventV2.define({ - type: "session.next.tool.input.started", - ...options, - schema: { - ...Base, - callID: Schema.String, - name: Schema.String, - }, - }) - export type Started = typeof Started.Type - - export const Delta = EventV2.define({ - type: "session.next.tool.input.delta", - ...options, - schema: { - ...Base, - callID: Schema.String, - delta: Schema.String, - }, - }) - export type Delta = typeof Delta.Type - - export const Ended = EventV2.define({ - type: "session.next.tool.input.ended", - ...options, - schema: { - ...Base, - callID: Schema.String, - text: Schema.String, - }, - }) - export type Ended = typeof Ended.Type - } - - export const Called = EventV2.define({ - type: "session.next.tool.called", - ...options, - schema: { - ...Base, - callID: Schema.String, - tool: Schema.String, - input: Schema.Record(Schema.String, Schema.Unknown), - provider: Schema.Struct({ - executed: Schema.Boolean, - metadata: Schema.Record(Schema.String, Schema.Unknown).pipe(Schema.optional), - }), - }, - }) - export type Called = typeof Called.Type - - export const Progress = EventV2.define({ - type: "session.next.tool.progress", - ...options, - schema: { - ...Base, - callID: Schema.String, - structured: ToolOutput.Structured, - content: Schema.Array(ToolOutput.Content), - }, - }) - export type Progress = typeof Progress.Type - - export const Success = EventV2.define({ - type: "session.next.tool.success", - ...options, - schema: { - ...Base, - callID: Schema.String, - structured: ToolOutput.Structured, - content: Schema.Array(ToolOutput.Content), - provider: Schema.Struct({ - executed: Schema.Boolean, - metadata: Schema.Record(Schema.String, Schema.Unknown).pipe(Schema.optional), - }), - }, - }) - export type Success = typeof Success.Type - - export const Failed = EventV2.define({ - type: "session.next.tool.failed", - ...options, - schema: { - ...Base, - callID: Schema.String, - error: UnknownError, - provider: Schema.Struct({ - executed: Schema.Boolean, - metadata: Schema.Record(Schema.String, Schema.Unknown).pipe(Schema.optional), - }), - }, - }) - export type Failed = typeof Failed.Type -} - -export const RetryError = Schema.Struct({ - message: Schema.String, - statusCode: Schema.Finite.pipe(Schema.optional), - isRetryable: Schema.Boolean, - responseHeaders: Schema.Record(Schema.String, Schema.String).pipe(Schema.optional), - responseBody: Schema.String.pipe(Schema.optional), - metadata: Schema.Record(Schema.String, Schema.String).pipe(Schema.optional), -}).annotate({ - identifier: "session.next.retry_error", -}) -export type RetryError = typeof RetryError.Type - -export const Retried = EventV2.define({ - type: "session.next.retried", - ...options, - schema: { - ...Base, - attempt: Schema.Finite, - error: RetryError, - }, -}) -export type Retried = typeof Retried.Type - -export namespace Compaction { - export const Started = EventV2.define({ - type: "session.next.compaction.started", - ...options, - schema: { - ...Base, - reason: Schema.Union([Schema.Literal("auto"), Schema.Literal("manual")]), - }, - }) - export type Started = typeof Started.Type - - export const Delta = EventV2.define({ - type: "session.next.compaction.delta", - ...options, - schema: { - ...Base, - text: Schema.String, - }, - }) - export type Delta = typeof Delta.Type - - export const Ended = EventV2.define({ - type: "session.next.compaction.ended", - ...options, - schema: { - ...Base, - text: Schema.String, - include: Schema.String.pipe(Schema.optional), - }, - }) - export type Ended = typeof Ended.Type -} - -export const All = Schema.Union( - [ - AgentSwitched, - ModelSwitched, - Prompted, - Synthetic, - Shell.Started, - Shell.Ended, - Step.Started, - Step.Ended, - Step.Failed, - Text.Started, - Text.Delta, - Text.Ended, - Tool.Input.Started, - Tool.Input.Delta, - Tool.Input.Ended, - Tool.Called, - Tool.Progress, - Tool.Success, - Tool.Failed, - Reasoning.Started, - Reasoning.Delta, - Reasoning.Ended, - Retried, - Compaction.Started, - Compaction.Delta, - Compaction.Ended, - ], - { - mode: "oneOf", - }, -).pipe(Schema.toTaggedUnion("type")) - -export type Event = typeof All.Type -export type Type = Event["type"] - -export * as SessionEvent from "./session-event" diff --git a/packages/core/src/session-message-updater.ts b/packages/core/src/session-message-updater.ts deleted file mode 100644 index bbdf59c555..0000000000 --- a/packages/core/src/session-message-updater.ts +++ /dev/null @@ -1,417 +0,0 @@ -import { produce, type WritableDraft } from "immer" -import { SessionEvent } from "./session-event" -import { SessionMessage } from "./session-message" - -export type MemoryState = { - messages: SessionMessage.Message[] -} - -export interface Adapter { - readonly getCurrentAssistant: () => SessionMessage.Assistant | undefined - readonly getCurrentCompaction: () => SessionMessage.Compaction | undefined - readonly getCurrentShell: (callID: string) => SessionMessage.Shell | undefined - readonly updateAssistant: (assistant: SessionMessage.Assistant) => void - readonly updateCompaction: (compaction: SessionMessage.Compaction) => void - readonly updateShell: (shell: SessionMessage.Shell) => void - readonly appendMessage: (message: SessionMessage.Message) => void - readonly finish: () => Result -} - -export function memory(state: MemoryState): Adapter { - const activeAssistantIndex = () => - state.messages.findLastIndex((message) => message.type === "assistant" && !message.time.completed) - const activeCompactionIndex = () => state.messages.findLastIndex((message) => message.type === "compaction") - const activeShellIndex = (callID: string) => - state.messages.findLastIndex((message) => message.type === "shell" && message.callID === callID) - - return { - getCurrentAssistant() { - const index = activeAssistantIndex() - if (index < 0) return - const assistant = state.messages[index] - return assistant?.type === "assistant" ? assistant : undefined - }, - getCurrentCompaction() { - const index = activeCompactionIndex() - if (index < 0) return - const compaction = state.messages[index] - return compaction?.type === "compaction" ? compaction : undefined - }, - getCurrentShell(callID) { - const index = activeShellIndex(callID) - if (index < 0) return - const shell = state.messages[index] - return shell?.type === "shell" ? shell : undefined - }, - updateAssistant(assistant) { - const index = activeAssistantIndex() - if (index < 0) return - const current = state.messages[index] - if (current?.type !== "assistant") return - state.messages[index] = assistant - }, - updateCompaction(compaction) { - const index = activeCompactionIndex() - if (index < 0) return - const current = state.messages[index] - if (current?.type !== "compaction") return - state.messages[index] = compaction - }, - updateShell(shell) { - const index = activeShellIndex(shell.callID) - if (index < 0) return - const current = state.messages[index] - if (current?.type !== "shell") return - state.messages[index] = shell - }, - appendMessage(message) { - state.messages.push(message) - }, - finish() { - return state - }, - } -} - -export function update(adapter: Adapter, event: SessionEvent.Event): Result { - const currentAssistant = adapter.getCurrentAssistant() - type DraftAssistant = WritableDraft - type DraftTool = WritableDraft - type DraftText = WritableDraft - type DraftReasoning = WritableDraft - - const latestTool = (assistant: DraftAssistant | undefined, callID?: string) => - assistant?.content.findLast( - (item): item is DraftTool => item.type === "tool" && (callID === undefined || item.id === callID), - ) - - const latestText = (assistant: DraftAssistant | undefined) => - assistant?.content.findLast((item): item is DraftText => item.type === "text") - - const latestReasoning = (assistant: DraftAssistant | undefined, reasoningID: string) => - assistant?.content.findLast((item): item is DraftReasoning => item.type === "reasoning" && item.id === reasoningID) - - SessionEvent.All.match(event, { - "session.next.agent.switched": (event) => { - adapter.appendMessage( - new SessionMessage.AgentSwitched({ - id: event.id, - type: "agent-switched", - metadata: event.metadata, - agent: event.data.agent, - time: { created: event.data.timestamp }, - }), - ) - }, - "session.next.model.switched": (event) => { - adapter.appendMessage( - new SessionMessage.ModelSwitched({ - id: event.id, - type: "model-switched", - metadata: event.metadata, - model: event.data.model, - time: { created: event.data.timestamp }, - }), - ) - }, - "session.next.prompted": (event) => { - adapter.appendMessage( - new SessionMessage.User({ - id: event.id, - type: "user", - metadata: event.metadata, - text: event.data.prompt.text, - files: event.data.prompt.files, - agents: event.data.prompt.agents, - references: event.data.prompt.references, - time: { created: event.data.timestamp }, - }), - ) - }, - "session.next.synthetic": (event) => { - adapter.appendMessage( - new SessionMessage.Synthetic({ - sessionID: event.data.sessionID, - text: event.data.text, - id: event.id, - type: "synthetic", - time: { created: event.data.timestamp }, - }), - ) - }, - "session.next.shell.started": (event) => { - adapter.appendMessage( - new SessionMessage.Shell({ - id: event.id, - type: "shell", - metadata: event.metadata, - callID: event.data.callID, - command: event.data.command, - output: "", - time: { created: event.data.timestamp }, - }), - ) - }, - "session.next.shell.ended": (event) => { - const currentShell = adapter.getCurrentShell(event.data.callID) - if (currentShell) { - adapter.updateShell( - produce(currentShell, (draft) => { - draft.output = event.data.output - draft.time.completed = event.data.timestamp - }), - ) - } - }, - "session.next.step.started": (event) => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - draft.time.completed = event.data.timestamp - }), - ) - } - adapter.appendMessage( - new SessionMessage.Assistant({ - id: event.id, - type: "assistant", - agent: event.data.agent, - model: event.data.model, - time: { created: event.data.timestamp }, - content: [], - snapshot: event.data.snapshot ? { start: event.data.snapshot } : undefined, - }), - ) - }, - "session.next.step.ended": (event) => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - draft.time.completed = event.data.timestamp - draft.finish = event.data.finish - draft.cost = event.data.cost - draft.tokens = event.data.tokens - if (event.data.snapshot) draft.snapshot = { ...draft.snapshot, end: event.data.snapshot } - }), - ) - } - }, - "session.next.step.failed": (event) => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - draft.time.completed = event.data.timestamp - draft.finish = "error" - draft.error = event.data.error - }), - ) - } - }, - "session.next.text.started": () => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - draft.content.push({ - type: "text", - text: "", - }) - }), - ) - } - }, - "session.next.text.delta": (event) => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - const match = latestText(draft) - if (match) match.text += event.data.delta - }), - ) - } - }, - "session.next.text.ended": (event) => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - const match = latestText(draft) - if (match) match.text = event.data.text - }), - ) - } - }, - "session.next.tool.input.started": (event) => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - draft.content.push({ - type: "tool", - id: event.data.callID, - name: event.data.name, - time: { - created: event.data.timestamp, - }, - state: { - status: "pending", - input: "", - }, - }) - }), - ) - } - }, - "session.next.tool.input.delta": (event) => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - const match = latestTool(draft, event.data.callID) - // oxlint-disable-next-line no-base-to-string -- event.delta is a Schema.String (runtime string) - if (match && match.state.status === "pending") match.state.input += event.data.delta - }), - ) - } - }, - "session.next.tool.input.ended": () => {}, - "session.next.tool.called": (event) => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - const match = latestTool(draft, event.data.callID) - if (match) { - match.provider = event.data.provider - match.time.ran = event.data.timestamp - match.state = { - status: "running", - input: event.data.input, - structured: {}, - content: [], - } - } - }), - ) - } - }, - "session.next.tool.progress": (event) => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - const match = latestTool(draft, event.data.callID) - if (match && match.state.status === "running") { - match.state.structured = event.data.structured - match.state.content = [...event.data.content] - } - }), - ) - } - }, - "session.next.tool.success": (event) => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - const match = latestTool(draft, event.data.callID) - if (match && match.state.status === "running") { - match.provider = event.data.provider - match.time.completed = event.data.timestamp - match.state = { - status: "completed", - input: match.state.input, - structured: event.data.structured, - content: [...event.data.content], - } - } - }), - ) - } - }, - "session.next.tool.failed": (event) => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - const match = latestTool(draft, event.data.callID) - if (match && match.state.status === "running") { - match.provider = event.data.provider - match.time.completed = event.data.timestamp - match.state = { - status: "error", - error: event.data.error, - input: match.state.input, - structured: match.state.structured, - content: match.state.content, - } - } - }), - ) - } - }, - "session.next.reasoning.started": (event) => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - draft.content.push({ - type: "reasoning", - id: event.data.reasoningID, - text: "", - }) - }), - ) - } - }, - "session.next.reasoning.delta": (event) => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - const match = latestReasoning(draft, event.data.reasoningID) - if (match) match.text += event.data.delta - }), - ) - } - }, - "session.next.reasoning.ended": (event) => { - if (currentAssistant) { - adapter.updateAssistant( - produce(currentAssistant, (draft) => { - const match = latestReasoning(draft, event.data.reasoningID) - if (match) match.text = event.data.text - }), - ) - } - }, - "session.next.retried": () => {}, - "session.next.compaction.started": (event) => { - adapter.appendMessage( - new SessionMessage.Compaction({ - id: event.id, - type: "compaction", - metadata: event.metadata, - reason: event.data.reason, - summary: "", - time: { created: event.data.timestamp }, - }), - ) - }, - "session.next.compaction.delta": (event) => { - const currentCompaction = adapter.getCurrentCompaction() - if (currentCompaction) { - adapter.updateCompaction( - produce(currentCompaction, (draft) => { - draft.summary += event.data.text - }), - ) - } - }, - "session.next.compaction.ended": (event) => { - const currentCompaction = adapter.getCurrentCompaction() - if (currentCompaction) { - adapter.updateCompaction( - produce(currentCompaction, (draft) => { - draft.summary = event.data.text - draft.include = event.data.include - }), - ) - } - }, - }) - - return adapter.finish() -} - -export * as SessionMessageUpdater from "./session-message-updater" diff --git a/packages/core/src/session-message.ts b/packages/core/src/session-message.ts deleted file mode 100644 index 73b6dd7da2..0000000000 --- a/packages/core/src/session-message.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { Schema } from "effect" -import { Prompt } from "./session-prompt" -import { SessionEvent } from "./session-event" -import { EventV2 } from "./event" -import { ToolOutput } from "./tool-output" -import { V2Schema } from "./v2-schema" -import { ModelV2 } from "./model" - -export const ID = EventV2.ID -export type ID = Schema.Schema.Type - -const Base = { - id: ID, - metadata: Schema.Record(Schema.String, Schema.Unknown).pipe(Schema.optional), - time: Schema.Struct({ - created: V2Schema.DateTimeUtcFromMillis, - }), -} - -export class AgentSwitched extends Schema.Class("Session.Message.AgentSwitched")({ - ...Base, - type: Schema.Literal("agent-switched"), - agent: SessionEvent.AgentSwitched.data.fields.agent, -}) {} - -export class ModelSwitched extends Schema.Class("Session.Message.ModelSwitched")({ - ...Base, - type: Schema.Literal("model-switched"), - model: ModelV2.Ref, -}) {} - -export class User extends Schema.Class("Session.Message.User")({ - ...Base, - text: Prompt.fields.text, - files: Prompt.fields.files, - agents: Prompt.fields.agents, - references: Prompt.fields.references, - type: Schema.Literal("user"), - time: Schema.Struct({ - created: V2Schema.DateTimeUtcFromMillis, - }), -}) {} - -export class Synthetic extends Schema.Class("Session.Message.Synthetic")({ - ...Base, - sessionID: SessionEvent.Synthetic.data.fields.sessionID, - text: SessionEvent.Synthetic.data.fields.text, - type: Schema.Literal("synthetic"), -}) {} - -export class Shell extends Schema.Class("Session.Message.Shell")({ - ...Base, - type: Schema.Literal("shell"), - callID: SessionEvent.Shell.Started.data.fields.callID, - command: SessionEvent.Shell.Started.data.fields.command, - output: Schema.String, - time: Schema.Struct({ - created: V2Schema.DateTimeUtcFromMillis, - completed: V2Schema.DateTimeUtcFromMillis.pipe(Schema.optional), - }), -}) {} - -export class ToolStatePending extends Schema.Class("Session.Message.ToolState.Pending")({ - status: Schema.Literal("pending"), - input: Schema.String, -}) {} - -export class ToolStateRunning extends Schema.Class("Session.Message.ToolState.Running")({ - status: Schema.Literal("running"), - input: Schema.Record(Schema.String, Schema.Unknown), - structured: ToolOutput.Structured, - content: ToolOutput.Content.pipe(Schema.Array), -}) {} - -export class ToolStateCompleted extends Schema.Class("Session.Message.ToolState.Completed")({ - status: Schema.Literal("completed"), - input: Schema.Record(Schema.String, Schema.Unknown), - attachments: SessionEvent.FileAttachment.pipe(Schema.Array, Schema.optional), - content: ToolOutput.Content.pipe(Schema.Array), - structured: ToolOutput.Structured, -}) {} - -export class ToolStateError extends Schema.Class("Session.Message.ToolState.Error")({ - status: Schema.Literal("error"), - input: Schema.Record(Schema.String, Schema.Unknown), - content: ToolOutput.Content.pipe(Schema.Array), - structured: ToolOutput.Structured, - error: SessionEvent.UnknownError, -}) {} - -export const ToolState = Schema.Union([ToolStatePending, ToolStateRunning, ToolStateCompleted, ToolStateError]).pipe( - Schema.toTaggedUnion("status"), -) -export type ToolState = Schema.Schema.Type - -export class AssistantTool extends Schema.Class("Session.Message.Assistant.Tool")({ - type: Schema.Literal("tool"), - id: Schema.String, - name: Schema.String, - provider: Schema.Struct({ - executed: Schema.Boolean, - metadata: Schema.Record(Schema.String, Schema.Unknown).pipe(Schema.optional), - }).pipe(Schema.optional), - state: ToolState, - time: Schema.Struct({ - created: V2Schema.DateTimeUtcFromMillis, - ran: V2Schema.DateTimeUtcFromMillis.pipe(Schema.optional), - completed: V2Schema.DateTimeUtcFromMillis.pipe(Schema.optional), - pruned: V2Schema.DateTimeUtcFromMillis.pipe(Schema.optional), - }), -}) {} - -export class AssistantText extends Schema.Class("Session.Message.Assistant.Text")({ - type: Schema.Literal("text"), - text: Schema.String, -}) {} - -export class AssistantReasoning extends Schema.Class("Session.Message.Assistant.Reasoning")({ - type: Schema.Literal("reasoning"), - id: Schema.String, - text: Schema.String, -}) {} - -export const AssistantContent = Schema.Union([AssistantText, AssistantReasoning, AssistantTool]).pipe( - Schema.toTaggedUnion("type"), -) -export type AssistantContent = Schema.Schema.Type - -export class Assistant extends Schema.Class("Session.Message.Assistant")({ - ...Base, - type: Schema.Literal("assistant"), - agent: Schema.String, - model: SessionEvent.Step.Started.data.fields.model, - content: AssistantContent.pipe(Schema.Array), - snapshot: Schema.Struct({ - start: Schema.String.pipe(Schema.optional), - end: Schema.String.pipe(Schema.optional), - }).pipe(Schema.optional), - finish: Schema.String.pipe(Schema.optional), - cost: Schema.Finite.pipe(Schema.optional), - tokens: Schema.Struct({ - input: Schema.Finite, - output: Schema.Finite, - reasoning: Schema.Finite, - cache: Schema.Struct({ - read: Schema.Finite, - write: Schema.Finite, - }), - }).pipe(Schema.optional), - error: SessionEvent.Step.Failed.data.fields.error.pipe(Schema.optional), - time: Schema.Struct({ - created: V2Schema.DateTimeUtcFromMillis, - completed: V2Schema.DateTimeUtcFromMillis.pipe(Schema.optional), - }), -}) {} - -export class Compaction extends Schema.Class("Session.Message.Compaction")({ - type: Schema.Literal("compaction"), - reason: SessionEvent.Compaction.Started.data.fields.reason, - summary: Schema.String, - include: Schema.String.pipe(Schema.optional), - ...Base, -}) {} - -export const Message = Schema.Union([AgentSwitched, ModelSwitched, User, Synthetic, Shell, Assistant, Compaction]) - .pipe(Schema.toTaggedUnion("type")) - .annotate({ identifier: "Session.Message" }) - -export type Message = Schema.Schema.Type - -export type Type = Message["type"] - -export * as SessionMessage from "./session-message" diff --git a/packages/core/src/session-prompt.ts b/packages/core/src/session-prompt.ts deleted file mode 100644 index 14167fc288..0000000000 --- a/packages/core/src/session-prompt.ts +++ /dev/null @@ -1,49 +0,0 @@ -import * as Schema from "effect/Schema" - -export class Source extends Schema.Class("Prompt.Source")({ - start: Schema.Finite, - end: Schema.Finite, - text: Schema.String, -}) {} - -export class FileAttachment extends Schema.Class("Prompt.FileAttachment")({ - uri: Schema.String, - mime: Schema.String, - name: Schema.String.pipe(Schema.optional), - description: Schema.String.pipe(Schema.optional), - source: Source.pipe(Schema.optional), -}) { - static create(input: FileAttachment) { - return new FileAttachment({ - uri: input.uri, - mime: input.mime, - name: input.name, - description: input.description, - source: input.source, - }) - } -} - -export class AgentAttachment extends Schema.Class("Prompt.AgentAttachment")({ - name: Schema.String, - source: Source.pipe(Schema.optional), -}) {} - -export class ReferenceAttachment extends Schema.Class("Prompt.ReferenceAttachment")({ - name: Schema.String, - kind: Schema.Literals(["local", "git", "invalid"]), - uri: Schema.String.pipe(Schema.optional), - repository: Schema.String.pipe(Schema.optional), - branch: Schema.String.pipe(Schema.optional), - target: Schema.String.pipe(Schema.optional), - targetUri: Schema.String.pipe(Schema.optional), - problem: Schema.String.pipe(Schema.optional), - source: Source.pipe(Schema.optional), -}) {} - -export class Prompt extends Schema.Class("Prompt")({ - text: Schema.String, - files: Schema.Array(FileAttachment).pipe(Schema.optional), - agents: Schema.Array(AgentAttachment).pipe(Schema.optional), - references: Schema.Array(ReferenceAttachment).pipe(Schema.optional), -}) {} diff --git a/packages/core/src/session.ts b/packages/core/src/session.ts index 756531e328..e629108994 100644 --- a/packages/core/src/session.ts +++ b/packages/core/src/session.ts @@ -1,13 +1,444 @@ -export * as Session from "./session" +export * as SessionV2 from "./session" +export * from "./session/schema" -import { Schema } from "effect" -import { withStatics } from "./schema" -import { Identifier } from "./util/identifier" +import { Cause, DateTime, Effect, Layer, Schema, Context, Stream } from "effect" +import { and, asc, desc, eq, gt, isNotNull, like, lt, or, type SQL } from "drizzle-orm" // kilocode_change +import { ProjectV2 } from "./project" +import { WorkspaceV2 } from "./workspace" +import { ModelV2 } from "./model" +import { Location } from "./location" +import { SessionMessage } from "./session/message" +import { Prompt } from "./session/prompt" +import { EventV2 } from "./event" +import { Database } from "./database/database" +import { SessionProjector } from "./session/projector" +import { SessionMessageTable, SessionTable } from "./session/sql" +import { SessionSchema } from "./session/schema" +import { AbsolutePath, PositiveInt, RelativePath } from "./schema" +import { AgentV2 } from "./agent" +import { SessionV1 } from "./v1/session" +import { InstallationVersion } from "./installation/version" +import { Slug } from "./util/slug" +import { ProjectTable } from "./project/sql" +import path from "path" +import { fromRow } from "./session/info" +import { SessionRunner } from "./session/runner/index" +import { SessionStore } from "./session/store" +import { SessionExecution } from "./session/execution" +import { logFailure } from "./session/logging" +import { MessageDecodeError } from "./session/error" +import { SessionEvent } from "./session/event" +import { SessionInput } from "./session/input" +import { normalize } from "./kilocode/session-message" // kilocode_change -export const ID = Schema.String.check(Schema.isStartsWith("ses")).pipe( - Schema.brand("SessionID"), - withStatics((schema) => ({ - descending: (id?: string) => schema.make(id ?? "ses_" + Identifier.descending()), - })), +// get project -> project.locations +// +// get all sessions +// + +// - by project +// - by subpath +// - by workspace (home is special) + +export const ListAnchor = Schema.Struct({ + id: SessionSchema.ID, + time: Schema.Finite, + direction: Schema.Literals(["previous", "next"]), +}) +export type ListAnchor = typeof ListAnchor.Type + +const ListInputBase = { + workspaceID: WorkspaceV2.ID.pipe(Schema.optional), + search: Schema.String.pipe(Schema.optional), + limit: PositiveInt.pipe(Schema.optional), + order: Schema.Literals(["asc", "desc"]).pipe(Schema.optional), + anchor: ListAnchor.pipe(Schema.optional), +} + +const ListDirectoryInput = Schema.Struct({ + ...ListInputBase, + directory: AbsolutePath, +}) + +const ListProjectInput = Schema.Struct({ + ...ListInputBase, + project: ProjectV2.ID, + subpath: RelativePath.pipe(Schema.optional), +}) + +const ListAllInput = Schema.Struct(ListInputBase) + +export const ListInput = Schema.Union([ListDirectoryInput, ListProjectInput, ListAllInput]) +export type ListInput = typeof ListInput.Type + +type CreateInput = { + id?: SessionSchema.ID + agent?: AgentV2.ID + model?: ModelV2.Ref + location: Location.Ref +} + +type CompactInput = { + sessionID: SessionSchema.ID + prompt?: Prompt +} + +export class NotFoundError extends Schema.TaggedErrorClass()("Session.NotFoundError", { + sessionID: SessionSchema.ID, +}) {} + +export class OperationUnavailableError extends Schema.TaggedErrorClass()( + "Session.OperationUnavailableError", + { + operation: Schema.Literals(["move", "shell", "skill", "switchAgent", "compact", "wait"]), + }, +) {} + +export { ContextSnapshotDecodeError, MessageDecodeError } from "./session/error" + +export class PromptConflictError extends Schema.TaggedErrorClass()("Session.PromptConflictError", { + sessionID: SessionSchema.ID, + messageID: SessionMessage.ID, +}) {} + +export type Error = NotFoundError | MessageDecodeError | OperationUnavailableError | PromptConflictError + +export interface Interface { + readonly list: (input?: ListInput) => Effect.Effect + readonly create: (input: CreateInput) => Effect.Effect + readonly get: (sessionID: SessionSchema.ID) => Effect.Effect + readonly messages: (input: { + sessionID: SessionSchema.ID + limit?: number + order?: "asc" | "desc" + cursor?: { + id: SessionMessage.ID + direction: "previous" | "next" + } + }) => Effect.Effect + readonly message: (input: { + sessionID: SessionSchema.ID + messageID: SessionMessage.ID + }) => Effect.Effect + readonly context: ( + sessionID: SessionSchema.ID, + ) => Effect.Effect + readonly events: (input: { + sessionID: SessionSchema.ID + after?: EventV2.Cursor + }) => Stream.Stream, NotFoundError> + readonly switchAgent: (input: { + sessionID: SessionSchema.ID + agent: string + }) => Effect.Effect + readonly switchModel: (input: { + sessionID: SessionSchema.ID + model: ModelV2.Ref + }) => Effect.Effect + readonly prompt: (input: { + id?: SessionMessage.ID + sessionID: SessionSchema.ID + prompt: Prompt + delivery?: SessionInput.Delivery + resume?: boolean + }) => Effect.Effect + readonly shell: (input: { + id?: EventV2.ID + sessionID: SessionSchema.ID + command: string + resume?: boolean + }) => Effect.Effect + readonly skill: (input: { + id?: EventV2.ID + sessionID: SessionSchema.ID + skill: string + resume?: boolean + }) => Effect.Effect + readonly compact: (input: CompactInput) => Effect.Effect + readonly wait: (id: SessionSchema.ID) => Effect.Effect + readonly resume: (sessionID: SessionSchema.ID) => Effect.Effect + readonly interrupt: (sessionID: SessionSchema.ID) => Effect.Effect +} + +export class Service extends Context.Service()("@opencode/v2/Session") {} + +export const layer = Layer.effect( + Service, + Effect.gen(function* () { + const db = (yield* Database.Service).db + const events = yield* EventV2.Service + const projects = yield* ProjectV2.Service + const execution = yield* SessionExecution.Service + const store = yield* SessionStore.Service + const decodeMessage = Schema.decodeUnknownEffect(SessionMessage.Message) + const isDurableSessionEvent = Schema.is(SessionEvent.Durable) + const scope = yield* Effect.scope + + const enqueueWake = (admitted: SessionInput.Admitted) => + execution.wake(admitted.sessionID, admitted.admittedSeq).pipe( + Effect.tapCause((cause) => + Cause.hasInterruptsOnly(cause) + ? Effect.void + : logFailure("Failed to wake Session", admitted.sessionID, cause), + ), + Effect.ignore, + Effect.forkIn(scope, { startImmediately: true }), + Effect.asVoid, + ) + + const decode = (row: typeof SessionMessageTable.$inferSelect) => + decodeMessage(normalize({ ...row.data, id: row.id, type: row.type })).pipe( + // kilocode_change - normalize released tool content on paginated reads + Effect.mapError( + () => + new MessageDecodeError({ + sessionID: SessionSchema.ID.make(row.session_id), + messageID: SessionMessage.ID.make(row.id), + }), + ), + ) + + const result = Service.of({ + create: Effect.fn("V2Session.create")(function* (input) { + const sessionID = input.id ?? SessionSchema.ID.create() + const recorded = yield* store.get(sessionID) + if (recorded) return recorded + const project = yield* projects.resolve(input.location.directory) + yield* db + .insert(ProjectTable) + .values({ id: project.id, worktree: project.directory, vcs: project.vcs?.type, sandboxes: [] }) + .onConflictDoNothing() + .run() + .pipe(Effect.orDie) + const now = Date.now() + const info = SessionV1.SessionInfo.make({ + id: sessionID, + slug: Slug.create(), + version: InstallationVersion, + projectID: project.id, + directory: input.location.directory, + path: path.relative(project.directory, input.location.directory).replaceAll("\\", "/"), + workspaceID: input.location.workspaceID ? WorkspaceV2.ID.make(input.location.workspaceID) : undefined, + title: `New session - ${new Date(now).toISOString()}`, + agent: input.agent, + model: input.model + ? { + id: ModelV2.ID.make(input.model.id), + providerID: input.model.providerID, + variant: input.model.variant, + } + : undefined, + cost: 0, + tokens: { input: 0, output: 0, reasoning: 0, cache: { read: 0, write: 0 } }, + time: { created: now, updated: now }, + }) + const projected = yield* events + .publish(SessionV1.Event.Created, { sessionID, info }, { location: input.location }) + .pipe( + Effect.as({ type: "created" } as const), + Effect.catchDefect((defect) => { + if (!(defect instanceof SessionProjector.SessionAlreadyProjected)) { + return Effect.die(defect) + } + // Concurrent creation lost the projection race. The existing Session identity wins. + return store + .get(sessionID) + .pipe( + Effect.flatMap((session) => + session ? Effect.succeed({ type: "existing", session } as const) : Effect.die(defect), + ), + ) + }), + ) + if (projected.type === "existing") return projected.session + // TODO: Restore recorded sessions onto replacement synchronized workspaces in a future API slice. + return yield* result.get(sessionID).pipe(Effect.orDie) + }), + get: Effect.fn("V2Session.get")(function* (sessionID) { + const session = yield* store.get(sessionID) + if (!session) return yield* new NotFoundError({ sessionID }) + return session + }), + list: Effect.fn("V2Session.list")(function* (input = {}) { + const direction = input.anchor?.direction ?? "next" + const requestedOrder = input.order ?? "desc" + const order = direction === "previous" ? (requestedOrder === "asc" ? "desc" : "asc") : requestedOrder + const sortColumn = SessionTable.time_created + const conditions: SQL[] = [] + if ("directory" in input) conditions.push(eq(SessionTable.directory, input.directory)) + if (input.workspaceID) conditions.push(eq(SessionTable.workspace_id, input.workspaceID)) + if ("project" in input) conditions.push(eq(SessionTable.project_id, input.project)) + if (input.search) conditions.push(like(SessionTable.title, `%${input.search}%`)) + if (input.anchor) { + conditions.push( + order === "asc" + ? or( + gt(sortColumn, input.anchor.time), + and(eq(sortColumn, input.anchor.time), gt(SessionTable.id, input.anchor.id)), + )! + : or( + lt(sortColumn, input.anchor.time), + and(eq(sortColumn, input.anchor.time), lt(SessionTable.id, input.anchor.id)), + )!, + ) + } + const query = db + .select() + .from(SessionTable) + .where(conditions.length > 0 ? and(...conditions) : undefined) + .orderBy( + order === "asc" ? asc(sortColumn) : desc(sortColumn), + order === "asc" ? asc(SessionTable.id) : desc(SessionTable.id), + ) + const rows = yield* (input.limit === undefined ? query.all() : query.limit(input.limit).all()).pipe( + Effect.orDie, + ) + return (direction === "previous" ? rows.toReversed() : rows).map((row) => fromRow(row)) + }), + messages: Effect.fn("V2Session.messages")(function* (input) { + yield* result.get(input.sessionID) + const direction = input.cursor?.direction ?? "next" + const requestedOrder = input.order ?? "desc" + const order = direction === "previous" ? (requestedOrder === "asc" ? "desc" : "asc") : requestedOrder + const anchor = input.cursor + ? yield* db + .select({ seq: SessionMessageTable.seq }) + .from(SessionMessageTable) + .where( + and( + eq(SessionMessageTable.session_id, input.sessionID), + eq(SessionMessageTable.id, input.cursor.id), + isNotNull(SessionMessageTable.seq), // kilocode_change + ), + ) + .get() + .pipe(Effect.orDie) + : undefined + const seq = anchor?.seq + if (input.cursor && seq == null) return [] + const boundary = seq != null + ? order === "asc" + ? gt(SessionMessageTable.seq, seq) + : lt(SessionMessageTable.seq, seq) + : undefined + const where = boundary + ? and(eq(SessionMessageTable.session_id, input.sessionID), isNotNull(SessionMessageTable.seq), boundary) + : and(eq(SessionMessageTable.session_id, input.sessionID), isNotNull(SessionMessageTable.seq)) // kilocode_change + const query = db + .select() + .from(SessionMessageTable) + .where(where) + .orderBy(order === "asc" ? asc(SessionMessageTable.seq) : desc(SessionMessageTable.seq)) + const rows = yield* (input.limit === undefined ? query.all() : query.limit(input.limit).all()).pipe( + Effect.orDie, + ) + return yield* Effect.forEach(direction === "previous" ? rows.toReversed() : rows, decode) + }), + message: Effect.fn("V2Session.message")(function* (input) { + const stored = yield* store.message(input.messageID) + return stored?.sessionID === input.sessionID ? stored.message : undefined + }), + context: Effect.fn("V2Session.context")(function* (sessionID) { + yield* result.get(sessionID) + return yield* store.context(sessionID) + }), + events: (input) => + Stream.unwrap( + result + .get(input.sessionID) + .pipe(Effect.as(events.aggregateEvents({ aggregateID: input.sessionID, after: input.after }))), + ).pipe( + Stream.filter((event): event is EventV2.CursorEvent => + isDurableSessionEvent(event.event), + ), + ), + prompt: Effect.fn("V2Session.prompt")((input) => + Effect.uninterruptible( + Effect.gen(function* () { + yield* result.get(input.sessionID) + const returnPrompt = Effect.fnUntraced(function* (admitted: SessionInput.Admitted) { + if (input.resume !== false) yield* enqueueWake(admitted) + return admitted + }, Effect.uninterruptible) + const messageID = input.id ?? SessionMessage.ID.create() + const delivery = input.delivery ?? "steer" + const expected = { sessionID: input.sessionID, messageID, prompt: input.prompt, delivery } + const admitted = yield* SessionInput.admit(db, events, { + id: messageID, + sessionID: input.sessionID, + prompt: input.prompt, + delivery, + }).pipe( + Effect.catchDefect((defect) => + defect instanceof SessionInput.LifecycleConflict + ? new PromptConflictError({ sessionID: input.sessionID, messageID }) + : Effect.die(defect), + ), + ) + if (!SessionInput.equivalent(admitted, expected)) + return yield* new PromptConflictError({ sessionID: input.sessionID, messageID }) + return yield* returnPrompt(admitted) + }), + ), + ), + shell: Effect.fn("V2Session.shell")(function* () { + return yield* new OperationUnavailableError({ operation: "shell" }) + }), + skill: Effect.fn("V2Session.skill")(function* () { + return yield* new OperationUnavailableError({ operation: "skill" }) + }), + switchAgent: Effect.fn("V2Session.switchAgent")(function* () { + return yield* new OperationUnavailableError({ operation: "switchAgent" }) + }), + switchModel: Effect.fn("V2Session.switchModel")(function* (input) { + yield* result.get(input.sessionID) + yield* events.publish(SessionEvent.ModelSwitched, { + sessionID: input.sessionID, + messageID: SessionMessage.ID.create(), + timestamp: yield* DateTime.now, + model: input.model, + }) + }), + compact: Effect.fn("V2Session.compact")(function* (input) { + yield* result.get(input.sessionID) + return yield* new OperationUnavailableError({ operation: "compact" }) + }), + wait: Effect.fn("V2Session.wait")(function* (sessionID) { + yield* result.get(sessionID) + return yield* new OperationUnavailableError({ operation: "wait" }) + }), + resume: Effect.fn("V2Session.resume")(function* (sessionID) { + yield* result.get(sessionID) + yield* execution.resume(sessionID) + }), + interrupt: Effect.fn("V2Session.interrupt")((sessionID) => + Effect.uninterruptible( + Effect.gen(function* () { + const session = yield* store.get(sessionID) + if (!session) return yield* execution.interrupt(sessionID) + // kilocode_change start - keep interrupt operational while preserving released durable event compatibility. + const seq = yield* SessionInput.latestSeq(db, sessionID) + yield* events.publish(SessionEvent.InterruptRequested, { + sessionID, + timestamp: yield* DateTime.now, + }) + yield* execution.interrupt(sessionID, seq) + // kilocode_change end + }), + ), + ), + }) + + return result + }), +) + +export const defaultLayer = layer.pipe( + Layer.provide(SessionExecution.noopLayer), + Layer.provide(SessionStore.defaultLayer), + Layer.provide(SessionProjector.defaultLayer), + Layer.provide(EventV2.defaultLayer), + Layer.provide(Database.defaultLayer), + Layer.provide(ProjectV2.defaultLayer), + Layer.orDie, ) -export type ID = typeof ID.Type diff --git a/packages/core/src/session/compaction.ts b/packages/core/src/session/compaction.ts new file mode 100644 index 0000000000..1c0cc62fea --- /dev/null +++ b/packages/core/src/session/compaction.ts @@ -0,0 +1,247 @@ +export * as SessionCompaction from "./compaction" + +import { LLM, LLMError, LLMEvent, Message, type LLMRequest, type Model } from "@opencode-ai/llm" +import { DateTime, Effect, Stream } from "effect" +import type { Config } from "../config" +import type { EventV2 } from "../event" +import { SessionEvent } from "./event" +import { SessionMessage } from "./message" +import { SessionSchema } from "./schema" +import { Token } from "../util/token" + +const DEFAULT_BUFFER = 20_000 +const DEFAULT_KEEP_TOKENS = 8_000 +const TOOL_OUTPUT_MAX_CHARS = 2_000 +const SUMMARY_OUTPUT_TOKENS = 4_096 +const SUMMARY_TEMPLATE = `Output exactly the Markdown structure shown inside