@bastani/atomic 0.9.15 → 0.9.16-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/builtin/intercom/CHANGELOG.md +10 -0
- package/dist/builtin/intercom/README.md +8 -8
- package/dist/builtin/intercom/contact-supervisor-tool.ts +68 -32
- package/dist/builtin/intercom/index-heavy.ts +1 -0
- package/dist/builtin/intercom/index.ts +21 -15
- package/dist/builtin/intercom/intercom-tool.ts +66 -10
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/intercom/parent-ask-handoff.ts +72 -0
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +26 -0
- package/dist/builtin/subagents/README.md +37 -114
- package/dist/builtin/subagents/agents/worker.md +2 -2
- package/dist/builtin/subagents/package.json +1 -5
- package/dist/builtin/subagents/skills/subagent/SKILL.md +26 -103
- package/dist/builtin/subagents/src/extension/index.ts +5 -30
- package/dist/builtin/subagents/src/extension/notification-content.ts +1 -1
- package/dist/builtin/subagents/src/extension/schemas.ts +2 -14
- package/dist/builtin/subagents/src/extension/tool-description.ts +1 -4
- package/dist/builtin/subagents/src/extension/tool-rendering.ts +53 -0
- package/dist/builtin/subagents/src/intercom/intercom-bridge.ts +1 -54
- package/dist/builtin/subagents/src/intercom/result-intercom.ts +4 -4
- package/dist/builtin/subagents/src/runs/foreground/execution-parent-ask-handoff.ts +78 -0
- package/dist/builtin/subagents/src/runs/foreground/inprocess-run-sync.ts +7 -5
- package/dist/builtin/subagents/src/runs/foreground/notify.ts +5 -6
- package/dist/builtin/subagents/src/runs/foreground/parent-ask-output.ts +48 -0
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-burst-display.ts +46 -0
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-burst.ts +403 -0
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-context.ts +48 -9
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-input.ts +3 -1
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-live-update.ts +11 -0
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel-task.ts +164 -93
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel.ts +36 -29
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parent-ask-projection.ts +11 -0
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-single.ts +42 -17
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-status.ts +3 -121
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-types.ts +7 -2
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor.ts +30 -257
- package/dist/builtin/subagents/src/runs/inprocess/control-status.ts +0 -34
- package/dist/builtin/subagents/src/runs/inprocess/index.ts +0 -12
- package/dist/builtin/subagents/src/runs/inprocess/prompt-behavior.ts +1 -1
- package/dist/builtin/subagents/src/runs/inprocess/runner.ts +2 -141
- package/dist/builtin/subagents/src/runs/shared/parallel-utils.ts +8 -0
- package/dist/builtin/subagents/src/shared/status-format.ts +3 -3
- package/dist/builtin/subagents/src/shared/types-config.ts +41 -0
- package/dist/builtin/subagents/src/shared/types-foreground-state.ts +7 -15
- package/dist/builtin/subagents/src/shared/types-results.ts +3 -1
- package/dist/builtin/subagents/src/shared/types-runtime.ts +1 -11
- package/dist/builtin/subagents/src/slash/slash-commands.ts +4 -468
- package/dist/builtin/subagents/src/tui/render-progress.ts +2 -2
- package/dist/builtin/subagents/src/tui/render-result-compact.ts +2 -2
- package/dist/builtin/subagents/src/tui/render-result.ts +38 -14
- package/dist/builtin/subagents/src/tui/render-status-progress.ts +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +16 -0
- package/dist/builtin/workflows/README.md +1 -1
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/skills/bro/LICENSE.txt +21 -0
- package/dist/builtin/workflows/skills/bro/SKILL.md +14 -0
- package/dist/builtin/workflows/skills/how/LICENSE.txt +21 -0
- package/dist/builtin/workflows/skills/how/SKILL.md +162 -0
- package/dist/builtin/workflows/skills/how/references/critic-prompt.md +59 -0
- package/dist/builtin/workflows/skills/how/references/critique-rubric.md +58 -0
- package/dist/builtin/workflows/skills/how/references/explainer-prompt.md +55 -0
- package/dist/builtin/workflows/skills/how/references/explorer-prompt.md +52 -0
- package/dist/builtin/workflows/skills/teach/LICENSE.txt +21 -0
- package/dist/builtin/workflows/skills/teach/SKILL.md +28 -0
- package/dist/builtin/workflows/skills/unslop/LICENSE.txt +21 -0
- package/dist/builtin/workflows/skills/unslop/SKILL.md +87 -0
- package/dist/builtin/workflows/skills/why/LICENSE.txt +21 -0
- package/dist/builtin/workflows/skills/why/SKILL.md +267 -0
- package/dist/builtin/workflows/skills/why/references/epistemics.md +144 -0
- package/dist/builtin/workflows/skills/why/references/investigator-prompt.md +103 -0
- package/dist/builtin/workflows/skills/why/references/source-playbook.md +17 -0
- package/dist/builtin/workflows/skills/why/references/sources/code-archaeology.md +88 -0
- package/dist/builtin/workflows/skills/why/references/sources/databricks.md +70 -0
- package/dist/builtin/workflows/skills/why/references/sources/datadog.md +99 -0
- package/dist/builtin/workflows/skills/why/references/sources/incident-postmortem.md +15 -0
- package/dist/builtin/workflows/skills/why/references/sources/linear.md +48 -0
- package/dist/builtin/workflows/skills/why/references/sources/notion.md +55 -0
- package/dist/builtin/workflows/skills/why/references/sources/sentry.md +100 -0
- package/dist/builtin/workflows/skills/why/references/sources/slack.md +54 -0
- package/dist/builtin/workflows/skills/why/references/synthesizer-prompt.md +135 -0
- package/dist/builtin/workflows/src/durable/dbos-embedded-postgres-root.ts +548 -39
- package/dist/builtin/workflows/src/durable/dbos-embedded-postgres.ts +529 -65
- package/dist/builtin/workflows/src/durable/dbos-lifecycle.ts +30 -8
- package/dist/builtin/workflows/src/durable/dbos-local-postgres.ts +36 -3
- package/dist/builtin/workflows/src/durable/local-command.ts +68 -10
- package/dist/builtin/workflows/src/extension/companions.ts +1 -1
- package/dist/builtin/workflows/src/extension/dispatcher.ts +7 -1
- package/dist/builtin/workflows/src/extension/extension-factory.ts +2 -2
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +1094 -298
- package/dist/builtin/workflows/src/extension/public-types.ts +2 -2
- package/dist/builtin/workflows/src/extension/render-result.ts +16 -2
- package/dist/builtin/workflows/src/extension/runtime.ts +8 -1
- package/dist/builtin/workflows/src/extension/workflow-request-abort.ts +15 -0
- package/dist/builtin/workflows/src/extension/workflow-tool-content.ts +4 -3
- package/dist/builtin/workflows/src/extension/workflow-tool-registration.ts +107 -13
- package/dist/builtin/workflows/src/extension/workflow-tool.ts +22 -12
- package/dist/builtin/workflows/src/tui/widget.ts +25 -6
- package/dist/core/agent-session-auto-compaction.js +10 -10
- package/dist/core/agent-session-auto-compaction.js.map +1 -1
- package/dist/core/agent-session-events.d.ts.map +1 -1
- package/dist/core/agent-session-events.js +11 -13
- package/dist/core/agent-session-events.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +1 -1
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-models.d.ts.map +1 -1
- package/dist/core/agent-session-models.js +5 -7
- package/dist/core/agent-session-models.js.map +1 -1
- package/dist/core/agent-session-prompt.js +4 -4
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-retry.d.ts +4 -4
- package/dist/core/agent-session-retry.d.ts.map +1 -1
- package/dist/core/agent-session-retry.js +8 -34
- package/dist/core/agent-session-retry.js.map +1 -1
- package/dist/core/agent-session-tool-hooks.js +4 -4
- package/dist/core/agent-session-tool-hooks.js.map +1 -1
- package/dist/core/atomic-guide-command.d.ts.map +1 -1
- package/dist/core/atomic-guide-command.js +3 -10
- package/dist/core/atomic-guide-command.js.map +1 -1
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js +19 -3
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +0 -3
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +0 -12
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/modes/interactive-engine/remote-command-catalog.d.ts +1 -1
- package/dist/modes/interactive-engine/remote-command-catalog.js +1 -1
- package/dist/modes/interactive-engine/remote-command-catalog.js.map +1 -1
- package/docs/intercom.md +29 -27
- package/docs/settings.md +2 -2
- package/docs/subagents.md +18 -15
- package/docs/usage.md +0 -9
- package/docs/workflows.md +27 -10
- package/npm-shrinkwrap.json +32 -32
- package/package.json +3 -3
- package/dist/builtin/subagents/prompts/gather-context-and-clarify.md +0 -27
- package/dist/builtin/subagents/prompts/parallel-cleanup.md +0 -61
- package/dist/builtin/subagents/prompts/parallel-context-build.md +0 -43
- package/dist/builtin/subagents/prompts/parallel-handoff-plan.md +0 -47
- package/dist/builtin/subagents/prompts/parallel-research.md +0 -34
- package/dist/builtin/subagents/prompts/parallel-review.md +0 -47
- package/dist/builtin/subagents/prompts/review-loop.md +0 -39
- package/dist/builtin/subagents/src/extension/doctor.ts +0 -188
- package/dist/builtin/subagents/src/runs/inprocess/attempt-handles.ts +0 -104
- /package/dist/builtin/subagents/src/runs/foreground/{subagent-executor-resume.ts → subagent-executor-cwd.ts} +0 -0
|
@@ -3261,8 +3261,8 @@ Defaulting to 2020, but this will stop working in the future.`)), t3.ecmaVersion
|
|
|
3261
3261
|
const He = /^[/\\]{2}/, ze = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, Je = /^[A-Za-z]:$/, Ye = /.(\.[^./]+|\.)$/, pathe_M_eThtNZ_normalize = function(e3) {
|
|
3262
3262
|
if (e3.length === 0)
|
|
3263
3263
|
return ".";
|
|
3264
|
-
const t3 = (e3 = pathe_M_eThtNZ_normalizeWindowsPath(e3)).match(He), i2 =
|
|
3265
|
-
return (e3 = normalizeString(e3, !i2)).length === 0 ? i2 ? "/" : n2 ? "./" : "." : (n2 && (e3 += "/"), Je.test(e3) && (e3 += "/"), t3 ? i2 ? `//${e3}` : `//./${e3}` : i2 && !
|
|
3264
|
+
const t3 = (e3 = pathe_M_eThtNZ_normalizeWindowsPath(e3)).match(He), i2 = isAbsolute4(e3), n2 = e3[e3.length - 1] === "/";
|
|
3265
|
+
return (e3 = normalizeString(e3, !i2)).length === 0 ? i2 ? "/" : n2 ? "./" : "." : (n2 && (e3 += "/"), Je.test(e3) && (e3 += "/"), t3 ? i2 ? `//${e3}` : `//./${e3}` : i2 && !isAbsolute4(e3) ? `/${e3}` : e3);
|
|
3266
3266
|
}, pathe_M_eThtNZ_join = function(...e3) {
|
|
3267
3267
|
let t3 = "";
|
|
3268
3268
|
for (const i2 of e3)
|
|
@@ -3281,9 +3281,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t3.ecmaVersion
|
|
|
3281
3281
|
let t3 = "", i2 = false;
|
|
3282
3282
|
for (let n2 = (e3 = e3.map((e4) => pathe_M_eThtNZ_normalizeWindowsPath(e4))).length - 1;n2 >= -1 && !i2; n2--) {
|
|
3283
3283
|
const a2 = n2 >= 0 ? e3[n2] : pathe_M_eThtNZ_cwd();
|
|
3284
|
-
a2 && a2.length !== 0 && (t3 = `${a2}/${t3}`, i2 =
|
|
3284
|
+
a2 && a2.length !== 0 && (t3 = `${a2}/${t3}`, i2 = isAbsolute4(a2));
|
|
3285
3285
|
}
|
|
3286
|
-
return t3 = normalizeString(t3, !i2), i2 && !
|
|
3286
|
+
return t3 = normalizeString(t3, !i2), i2 && !isAbsolute4(t3) ? `/${t3}` : t3.length > 0 ? t3 : ".";
|
|
3287
3287
|
};
|
|
3288
3288
|
function normalizeString(e3, t3) {
|
|
3289
3289
|
let i2 = "", n2 = 0, a2 = -1, c2 = 0, l2 = null;
|
|
@@ -3319,7 +3319,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t3.ecmaVersion
|
|
|
3319
3319
|
}
|
|
3320
3320
|
return i2;
|
|
3321
3321
|
}
|
|
3322
|
-
const
|
|
3322
|
+
const isAbsolute4 = function(e3) {
|
|
3323
3323
|
return ze.test(e3);
|
|
3324
3324
|
}, extname = function(e3) {
|
|
3325
3325
|
if (e3 === "..")
|
|
@@ -3328,7 +3328,7 @@ Defaulting to 2020, but this will stop working in the future.`)), t3.ecmaVersion
|
|
|
3328
3328
|
return t3 && t3[1] || "";
|
|
3329
3329
|
}, pathe_M_eThtNZ_dirname = function(e3) {
|
|
3330
3330
|
const t3 = pathe_M_eThtNZ_normalizeWindowsPath(e3).replace(/\/$/, "").split("/").slice(0, -1);
|
|
3331
|
-
return t3.length === 1 && Je.test(t3[0]) && (t3[0] += "/"), t3.join("/") || (
|
|
3331
|
+
return t3.length === 1 && Je.test(t3[0]) && (t3[0] += "/"), t3.join("/") || (isAbsolute4(e3) ? "/" : ".");
|
|
3332
3332
|
}, basename2 = function(e3, t3) {
|
|
3333
3333
|
const i2 = pathe_M_eThtNZ_normalizeWindowsPath(e3).split("/");
|
|
3334
3334
|
let n2 = "";
|
|
@@ -3861,7 +3861,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
3861
3861
|
return e3;
|
|
3862
3862
|
if (st.has(e3))
|
|
3863
3863
|
return "node:" + e3;
|
|
3864
|
-
if (e3.startsWith("file://") && (e3 = fileURLToPath3(e3)),
|
|
3864
|
+
if (e3.startsWith("file://") && (e3 = fileURLToPath3(e3)), isAbsolute4(e3))
|
|
3865
3865
|
try {
|
|
3866
3866
|
if ((0, $e.statSync)(e3).isFile())
|
|
3867
3867
|
return pathToFileURL(e3);
|
|
@@ -4148,7 +4148,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
4148
4148
|
}
|
|
4149
4149
|
function nativeImportOrRequire(e3, t3, i2) {
|
|
4150
4150
|
return i2 && e3.nativeImport ? e3.nativeImport(function(e4) {
|
|
4151
|
-
return ni &&
|
|
4151
|
+
return ni && isAbsolute4(e4) ? pathToFileURL(e4) : e4;
|
|
4152
4152
|
}(t3)).then((t4) => jitiInteropDefault(e3, t4)) : jitiInteropDefault(e3, e3.nativeRequire(t3));
|
|
4153
4153
|
}
|
|
4154
4154
|
const Ti = "9";
|
|
@@ -61331,7 +61331,7 @@ var require_bignumber = __commonJS(function(exports, module) {
|
|
|
61331
61331
|
return arr.reverse();
|
|
61332
61332
|
}
|
|
61333
61333
|
return function(str2, baseIn, baseOut, sign, callerIsToString) {
|
|
61334
|
-
var alphabet, d, e2, k, r2, x2, xc, y, i2 = str2.indexOf("."), dp = DECIMAL_PLACES,
|
|
61334
|
+
var alphabet, d, e2, k, r2, x2, xc, y, i2 = str2.indexOf("."), dp = DECIMAL_PLACES, rm3 = ROUNDING_MODE;
|
|
61335
61335
|
if (i2 >= 0) {
|
|
61336
61336
|
k = POW_PRECISION;
|
|
61337
61337
|
POW_PRECISION = 0;
|
|
@@ -61354,7 +61354,7 @@ var require_bignumber = __commonJS(function(exports, module) {
|
|
|
61354
61354
|
x2.c = xc;
|
|
61355
61355
|
x2.e = e2;
|
|
61356
61356
|
x2.s = sign;
|
|
61357
|
-
x2 = div(x2, y, dp,
|
|
61357
|
+
x2 = div(x2, y, dp, rm3, baseOut);
|
|
61358
61358
|
xc = x2.c;
|
|
61359
61359
|
r2 = x2.r;
|
|
61360
61360
|
e2 = x2.e;
|
|
@@ -61363,7 +61363,7 @@ var require_bignumber = __commonJS(function(exports, module) {
|
|
|
61363
61363
|
i2 = xc[d];
|
|
61364
61364
|
k = baseOut / 2;
|
|
61365
61365
|
r2 = r2 || d < 0 || xc[d + 1] != null;
|
|
61366
|
-
r2 =
|
|
61366
|
+
r2 = rm3 < 4 ? (i2 != null || r2) && (rm3 == 0 || rm3 == (x2.s < 0 ? 3 : 2)) : i2 > k || i2 == k && (rm3 == 4 || r2 || rm3 == 6 && xc[d - 1] & 1 || rm3 == (x2.s < 0 ? 8 : 7));
|
|
61367
61367
|
if (d < 1 || !xc[0]) {
|
|
61368
61368
|
str2 = r2 ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);
|
|
61369
61369
|
} else {
|
|
@@ -61425,7 +61425,7 @@ var require_bignumber = __commonJS(function(exports, module) {
|
|
|
61425
61425
|
for (;!a[0] && a.length > 1; a.splice(0, 1))
|
|
61426
61426
|
;
|
|
61427
61427
|
}
|
|
61428
|
-
return function(x2, y, dp,
|
|
61428
|
+
return function(x2, y, dp, rm3, base) {
|
|
61429
61429
|
var cmp, e2, i2, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, yL, yz, s2 = x2.s == y.s ? 1 : -1, xc = x2.c, yc = y.c;
|
|
61430
61430
|
if (!xc || !xc[0] || !yc || !yc[0]) {
|
|
61431
61431
|
return new BigNumber2(!x2.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN : xc && xc[0] == 0 || !yc ? s2 * 0 : s2 / 0);
|
|
@@ -61525,7 +61525,7 @@ var require_bignumber = __commonJS(function(exports, module) {
|
|
|
61525
61525
|
if (base == BASE) {
|
|
61526
61526
|
for (i2 = 1, s2 = qc[0];s2 >= 10; s2 /= 10, i2++)
|
|
61527
61527
|
;
|
|
61528
|
-
round(q, dp + (q.e = i2 + e2 * LOG_BASE - 1) + 1,
|
|
61528
|
+
round(q, dp + (q.e = i2 + e2 * LOG_BASE - 1) + 1, rm3, more);
|
|
61529
61529
|
} else {
|
|
61530
61530
|
q.e = e2;
|
|
61531
61531
|
q.r = +more;
|
|
@@ -61533,12 +61533,12 @@ var require_bignumber = __commonJS(function(exports, module) {
|
|
|
61533
61533
|
return q;
|
|
61534
61534
|
};
|
|
61535
61535
|
}();
|
|
61536
|
-
function format(n, i2,
|
|
61536
|
+
function format(n, i2, rm3, id) {
|
|
61537
61537
|
var c0, e2, ne, len, str2;
|
|
61538
|
-
if (
|
|
61539
|
-
|
|
61538
|
+
if (rm3 == null)
|
|
61539
|
+
rm3 = ROUNDING_MODE;
|
|
61540
61540
|
else
|
|
61541
|
-
intCheck(
|
|
61541
|
+
intCheck(rm3, 0, 8);
|
|
61542
61542
|
if (!n.c)
|
|
61543
61543
|
return n.toString();
|
|
61544
61544
|
c0 = n.c[0];
|
|
@@ -61547,7 +61547,7 @@ var require_bignumber = __commonJS(function(exports, module) {
|
|
|
61547
61547
|
str2 = coeffToString(n.c);
|
|
61548
61548
|
str2 = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS) ? toExponential(str2, ne) : toFixedPoint(str2, ne, "0");
|
|
61549
61549
|
} else {
|
|
61550
|
-
n = round(new BigNumber2(n), i2,
|
|
61550
|
+
n = round(new BigNumber2(n), i2, rm3);
|
|
61551
61551
|
e2 = n.e;
|
|
61552
61552
|
str2 = coeffToString(n.c);
|
|
61553
61553
|
len = str2.length;
|
|
@@ -61628,7 +61628,7 @@ var require_bignumber = __commonJS(function(exports, module) {
|
|
|
61628
61628
|
x2.c = x2.e = null;
|
|
61629
61629
|
};
|
|
61630
61630
|
}();
|
|
61631
|
-
function round(x2, sd,
|
|
61631
|
+
function round(x2, sd, rm3, r2) {
|
|
61632
61632
|
var d, i2, j, k, n, ni, rd, xc = x2.c, pows10 = POWS_TEN;
|
|
61633
61633
|
if (xc) {
|
|
61634
61634
|
out: {
|
|
@@ -61663,7 +61663,7 @@ var require_bignumber = __commonJS(function(exports, module) {
|
|
|
61663
61663
|
}
|
|
61664
61664
|
}
|
|
61665
61665
|
r2 = r2 || sd < 0 || xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);
|
|
61666
|
-
r2 =
|
|
61666
|
+
r2 = rm3 < 4 ? (rd || r2) && (rm3 == 0 || rm3 == (x2.s < 0 ? 3 : 2)) : rd > 5 || rd == 5 && (rm3 == 4 || r2 || rm3 == 6 && (i2 > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10 & 1 || rm3 == (x2.s < 0 ? 8 : 7));
|
|
61667
61667
|
if (sd < 1 || !xc[0]) {
|
|
61668
61668
|
xc.length = 0;
|
|
61669
61669
|
if (r2) {
|
|
@@ -61735,15 +61735,15 @@ var require_bignumber = __commonJS(function(exports, module) {
|
|
|
61735
61735
|
P.comparedTo = function(y, b) {
|
|
61736
61736
|
return compare(this, new BigNumber2(y, b));
|
|
61737
61737
|
};
|
|
61738
|
-
P.decimalPlaces = P.dp = function(dp,
|
|
61738
|
+
P.decimalPlaces = P.dp = function(dp, rm3) {
|
|
61739
61739
|
var c, n, v, x2 = this;
|
|
61740
61740
|
if (dp != null) {
|
|
61741
61741
|
intCheck(dp, 0, MAX);
|
|
61742
|
-
if (
|
|
61743
|
-
|
|
61742
|
+
if (rm3 == null)
|
|
61743
|
+
rm3 = ROUNDING_MODE;
|
|
61744
61744
|
else
|
|
61745
|
-
intCheck(
|
|
61746
|
-
return round(new BigNumber2(x2), dp + x2.e + 1,
|
|
61745
|
+
intCheck(rm3, 0, 8);
|
|
61746
|
+
return round(new BigNumber2(x2), dp + x2.e + 1, rm3);
|
|
61747
61747
|
}
|
|
61748
61748
|
if (!(c = x2.c))
|
|
61749
61749
|
return null;
|
|
@@ -61842,13 +61842,13 @@ var require_bignumber = __commonJS(function(exports, module) {
|
|
|
61842
61842
|
y = ONE.div(y);
|
|
61843
61843
|
return m2 ? y.mod(m2) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;
|
|
61844
61844
|
};
|
|
61845
|
-
P.integerValue = function(
|
|
61845
|
+
P.integerValue = function(rm3) {
|
|
61846
61846
|
var n = new BigNumber2(this);
|
|
61847
|
-
if (
|
|
61848
|
-
|
|
61847
|
+
if (rm3 == null)
|
|
61848
|
+
rm3 = ROUNDING_MODE;
|
|
61849
61849
|
else
|
|
61850
|
-
intCheck(
|
|
61851
|
-
return round(n, n.e + 1,
|
|
61850
|
+
intCheck(rm3, 0, 8);
|
|
61851
|
+
return round(n, n.e + 1, rm3);
|
|
61852
61852
|
};
|
|
61853
61853
|
P.isEqualTo = P.eq = function(y, b) {
|
|
61854
61854
|
return compare(this, new BigNumber2(y, b)) === 0;
|
|
@@ -62085,15 +62085,15 @@ var require_bignumber = __commonJS(function(exports, module) {
|
|
|
62085
62085
|
}
|
|
62086
62086
|
return normalise(y, xc, ye);
|
|
62087
62087
|
};
|
|
62088
|
-
P.precision = P.sd = function(sd,
|
|
62088
|
+
P.precision = P.sd = function(sd, rm3) {
|
|
62089
62089
|
var c, n, v, x2 = this;
|
|
62090
62090
|
if (sd != null && sd !== !!sd) {
|
|
62091
62091
|
intCheck(sd, 1, MAX);
|
|
62092
|
-
if (
|
|
62093
|
-
|
|
62092
|
+
if (rm3 == null)
|
|
62093
|
+
rm3 = ROUNDING_MODE;
|
|
62094
62094
|
else
|
|
62095
|
-
intCheck(
|
|
62096
|
-
return round(new BigNumber2(x2), sd,
|
|
62095
|
+
intCheck(rm3, 0, 8);
|
|
62096
|
+
return round(new BigNumber2(x2), sd, rm3);
|
|
62097
62097
|
}
|
|
62098
62098
|
if (!(c = x2.c))
|
|
62099
62099
|
return null;
|
|
@@ -62170,36 +62170,36 @@ var require_bignumber = __commonJS(function(exports, module) {
|
|
|
62170
62170
|
}
|
|
62171
62171
|
return round(r2, r2.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m2);
|
|
62172
62172
|
};
|
|
62173
|
-
P.toExponential = function(dp,
|
|
62173
|
+
P.toExponential = function(dp, rm3) {
|
|
62174
62174
|
if (dp != null) {
|
|
62175
62175
|
intCheck(dp, 0, MAX);
|
|
62176
62176
|
dp++;
|
|
62177
62177
|
}
|
|
62178
|
-
return format(this, dp,
|
|
62178
|
+
return format(this, dp, rm3, 1);
|
|
62179
62179
|
};
|
|
62180
|
-
P.toFixed = function(dp,
|
|
62180
|
+
P.toFixed = function(dp, rm3) {
|
|
62181
62181
|
if (dp != null) {
|
|
62182
62182
|
intCheck(dp, 0, MAX);
|
|
62183
62183
|
dp = dp + this.e + 1;
|
|
62184
62184
|
}
|
|
62185
|
-
return format(this, dp,
|
|
62185
|
+
return format(this, dp, rm3);
|
|
62186
62186
|
};
|
|
62187
|
-
P.toFormat = function(dp,
|
|
62187
|
+
P.toFormat = function(dp, rm3, format2) {
|
|
62188
62188
|
var str2, x2 = this;
|
|
62189
62189
|
if (format2 == null) {
|
|
62190
|
-
if (dp != null &&
|
|
62191
|
-
format2 =
|
|
62192
|
-
|
|
62190
|
+
if (dp != null && rm3 && typeof rm3 == "object") {
|
|
62191
|
+
format2 = rm3;
|
|
62192
|
+
rm3 = null;
|
|
62193
62193
|
} else if (dp && typeof dp == "object") {
|
|
62194
62194
|
format2 = dp;
|
|
62195
|
-
dp =
|
|
62195
|
+
dp = rm3 = null;
|
|
62196
62196
|
} else {
|
|
62197
62197
|
format2 = FORMAT;
|
|
62198
62198
|
}
|
|
62199
62199
|
} else if (typeof format2 != "object") {
|
|
62200
62200
|
throw Error(bignumberError + "Argument not an object: " + format2);
|
|
62201
62201
|
}
|
|
62202
|
-
str2 = x2.toFixed(dp,
|
|
62202
|
+
str2 = x2.toFixed(dp, rm3);
|
|
62203
62203
|
if (x2.c) {
|
|
62204
62204
|
var i2, arr = str2.split("."), g1 = +format2.groupSize, g2 = +format2.secondaryGroupSize, groupSeparator = format2.groupSeparator || "", intPart = arr[0], fractionPart = arr[1], isNeg = x2.s < 0, intDigits = isNeg ? intPart.slice(1) : intPart, len = intDigits.length;
|
|
62205
62205
|
if (g2) {
|
|
@@ -62267,10 +62267,10 @@ var require_bignumber = __commonJS(function(exports, module) {
|
|
|
62267
62267
|
P.toNumber = function() {
|
|
62268
62268
|
return +valueOf(this);
|
|
62269
62269
|
};
|
|
62270
|
-
P.toPrecision = function(sd,
|
|
62270
|
+
P.toPrecision = function(sd, rm3) {
|
|
62271
62271
|
if (sd != null)
|
|
62272
62272
|
intCheck(sd, 1, MAX);
|
|
62273
|
-
return format(this, sd,
|
|
62273
|
+
return format(this, sd, rm3, 2);
|
|
62274
62274
|
};
|
|
62275
62275
|
P.toString = function(b) {
|
|
62276
62276
|
var str2, n = this, s2 = n.s, e2 = n.e;
|
|
@@ -66986,8 +66986,8 @@ var require_filesubjecttokensupplier = __commonJS(function(exports) {
|
|
|
66986
66986
|
var util_1 = __require("util");
|
|
66987
66987
|
var fs8 = __require("fs");
|
|
66988
66988
|
var readFile4 = (0, util_1.promisify)(fs8.readFile ?? (() => {}));
|
|
66989
|
-
var
|
|
66990
|
-
var
|
|
66989
|
+
var realpath2 = (0, util_1.promisify)(fs8.realpath ?? (() => {}));
|
|
66990
|
+
var lstat2 = (0, util_1.promisify)(fs8.lstat ?? (() => {}));
|
|
66991
66991
|
|
|
66992
66992
|
class FileSubjectTokenSupplier {
|
|
66993
66993
|
filePath;
|
|
@@ -67001,8 +67001,8 @@ var require_filesubjecttokensupplier = __commonJS(function(exports) {
|
|
|
67001
67001
|
async getSubjectToken() {
|
|
67002
67002
|
let parsedFilePath = this.filePath;
|
|
67003
67003
|
try {
|
|
67004
|
-
parsedFilePath = await
|
|
67005
|
-
if (!(await
|
|
67004
|
+
parsedFilePath = await realpath2(parsedFilePath);
|
|
67005
|
+
if (!(await lstat2(parsedFilePath)).isFile()) {
|
|
67006
67006
|
throw new Error;
|
|
67007
67007
|
}
|
|
67008
67008
|
} catch (err) {
|
|
@@ -70943,7 +70943,7 @@ var require_websocket = __commonJS(function(exports, module) {
|
|
|
70943
70943
|
var http3 = __require("http");
|
|
70944
70944
|
var net = __require("net");
|
|
70945
70945
|
var tls = __require("tls");
|
|
70946
|
-
var { randomBytes, createHash:
|
|
70946
|
+
var { randomBytes, createHash: createHash5 } = __require("crypto");
|
|
70947
70947
|
var { Duplex, Readable } = __require("stream");
|
|
70948
70948
|
var { URL: URL2 } = __require("url");
|
|
70949
70949
|
var PerMessageDeflate = require_permessage_deflate();
|
|
@@ -71486,7 +71486,7 @@ var require_websocket = __commonJS(function(exports, module) {
|
|
|
71486
71486
|
abortHandshake(websocket, socket, "Invalid Upgrade header");
|
|
71487
71487
|
return;
|
|
71488
71488
|
}
|
|
71489
|
-
const digest =
|
|
71489
|
+
const digest = createHash5("sha1").update(key2 + GUID).digest("base64");
|
|
71490
71490
|
if (res.headers["sec-websocket-accept"] !== digest) {
|
|
71491
71491
|
abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Accept header");
|
|
71492
71492
|
return;
|
|
@@ -71773,7 +71773,7 @@ var require_stream = __commonJS(function(exports, module) {
|
|
|
71773
71773
|
};
|
|
71774
71774
|
duplex._final = function(callback) {
|
|
71775
71775
|
if (ws.readyState === ws.CONNECTING) {
|
|
71776
|
-
ws.once("open", function
|
|
71776
|
+
ws.once("open", function open2() {
|
|
71777
71777
|
duplex._final(callback);
|
|
71778
71778
|
});
|
|
71779
71779
|
return;
|
|
@@ -71797,7 +71797,7 @@ var require_stream = __commonJS(function(exports, module) {
|
|
|
71797
71797
|
};
|
|
71798
71798
|
duplex._write = function(chunk, encoding, callback) {
|
|
71799
71799
|
if (ws.readyState === ws.CONNECTING) {
|
|
71800
|
-
ws.once("open", function
|
|
71800
|
+
ws.once("open", function open2() {
|
|
71801
71801
|
duplex._write(chunk, encoding, callback);
|
|
71802
71802
|
});
|
|
71803
71803
|
return;
|
|
@@ -71861,7 +71861,7 @@ var require_websocket_server = __commonJS(function(exports, module) {
|
|
|
71861
71861
|
var EventEmitter = __require("events");
|
|
71862
71862
|
var http3 = __require("http");
|
|
71863
71863
|
var { Duplex } = __require("stream");
|
|
71864
|
-
var { createHash:
|
|
71864
|
+
var { createHash: createHash5 } = __require("crypto");
|
|
71865
71865
|
var extension = require_extension();
|
|
71866
71866
|
var PerMessageDeflate = require_permessage_deflate();
|
|
71867
71867
|
var subprotocol = require_subprotocol();
|
|
@@ -72076,7 +72076,7 @@ var require_websocket_server = __commonJS(function(exports, module) {
|
|
|
72076
72076
|
}
|
|
72077
72077
|
if (this._state > RUNNING)
|
|
72078
72078
|
return abortHandshake(socket, 503);
|
|
72079
|
-
const digest =
|
|
72079
|
+
const digest = createHash5("sha1").update(key2 + GUID).digest("base64");
|
|
72080
72080
|
const headers = [
|
|
72081
72081
|
"HTTP/1.1 101 Switching Protocols",
|
|
72082
72082
|
"Upgrade: websocket",
|
|
@@ -72182,7 +72182,7 @@ var init_wrapper = __esm(() => {
|
|
|
72182
72182
|
// ../../node_modules/@google/genai/dist/node/index.mjs
|
|
72183
72183
|
import { createWriteStream } from "fs";
|
|
72184
72184
|
import * as fs8 from "fs/promises";
|
|
72185
|
-
import { writeFile as
|
|
72185
|
+
import { writeFile as writeFile13 } from "fs/promises";
|
|
72186
72186
|
import { Readable } from "node:stream";
|
|
72187
72187
|
import { finished } from "node:stream/promises";
|
|
72188
72188
|
import * as path$1 from "path";
|
|
@@ -83633,7 +83633,7 @@ class NodeDownloader {
|
|
|
83633
83633
|
await finished(writer);
|
|
83634
83634
|
} else {
|
|
83635
83635
|
try {
|
|
83636
|
-
await
|
|
83636
|
+
await writeFile13(params.downloadPath, response, {
|
|
83637
83637
|
encoding: "base64"
|
|
83638
83638
|
});
|
|
83639
83639
|
} catch (error3) {
|
|
@@ -106259,6 +106259,16 @@ function elapsedLabel(run, now) {
|
|
|
106259
106259
|
return formatDuration(elapsedRunMs(run, now));
|
|
106260
106260
|
return "";
|
|
106261
106261
|
}
|
|
106262
|
+
function activeToolNodes(run) {
|
|
106263
|
+
return (run.toolNodes ?? []).filter((node) => node.status === "pending" || node.status === "running");
|
|
106264
|
+
}
|
|
106265
|
+
function activeToolLabel(run) {
|
|
106266
|
+
const nodes = activeToolNodes(run);
|
|
106267
|
+
if (nodes.length === 0)
|
|
106268
|
+
return;
|
|
106269
|
+
const details = nodes.map((node) => `${node.name} · ${node.status}`).join(", ");
|
|
106270
|
+
return nodes.length === 1 ? details : `${nodes.length} tools · ${details}`;
|
|
106271
|
+
}
|
|
106262
106272
|
function metaLine(run, now) {
|
|
106263
106273
|
if (run.endedAt !== undefined) {
|
|
106264
106274
|
return elapsedLabel(run, now);
|
|
@@ -106271,6 +106281,9 @@ function metaLine(run, now) {
|
|
|
106271
106281
|
const prog = progressLabel(run);
|
|
106272
106282
|
if (prog)
|
|
106273
106283
|
parts.push(prog);
|
|
106284
|
+
const tools = activeToolLabel(run);
|
|
106285
|
+
if (tools)
|
|
106286
|
+
parts.push(tools);
|
|
106274
106287
|
const elapsed = elapsedLabel(run, now);
|
|
106275
106288
|
if (elapsed)
|
|
106276
106289
|
parts.push(elapsed);
|
|
@@ -106333,7 +106346,7 @@ function plainRunLines(run, now, allRuns) {
|
|
|
106333
106346
|
glyph: statusGlyph2(run, allRuns)
|
|
106334
106347
|
});
|
|
106335
106348
|
}
|
|
106336
|
-
function themedCollapsed(counts, theme) {
|
|
106349
|
+
function themedCollapsed(counts, activeTools, theme) {
|
|
106337
106350
|
const mauve = hexToAnsi(theme.mauve);
|
|
106338
106351
|
const dim = hexToAnsi(theme.dim);
|
|
106339
106352
|
const muted = hexToAnsi(theme.textMuted);
|
|
@@ -106343,14 +106356,16 @@ function themedCollapsed(counts, theme) {
|
|
|
106343
106356
|
const paused = counts.paused > 0 ? `${dim} · ${RESET}${warning}${counts.paused} ❚❚${RESET}` : "";
|
|
106344
106357
|
const quit = counts.quit > 0 ? `${dim} · ${RESET}${warning}${counts.quit} quit${RESET}` : "";
|
|
106345
106358
|
const blocked = counts.blocked > 0 ? `${dim} · ${RESET}${warning}${counts.blocked} ↑${RESET}` : "";
|
|
106346
|
-
|
|
106359
|
+
const tools = activeTools > 0 ? `${dim} · ${RESET}${warning}${activeTools} tool${activeTools === 1 ? "" : "s"}${RESET}` : "";
|
|
106360
|
+
return ` ${mauve}▾${RESET} ${muted}${total} background${RESET}${dim} · ${RESET}${warning}${active} ●${RESET}${paused}${quit}${blocked}${tools}`;
|
|
106347
106361
|
}
|
|
106348
|
-
function plainCollapsed(counts) {
|
|
106362
|
+
function plainCollapsed(counts, activeTools) {
|
|
106349
106363
|
const total = counts.active + counts.paused + counts.quit + counts.done + counts.blocked + counts.failed;
|
|
106350
106364
|
const paused = counts.paused > 0 ? ` · ${counts.paused} ❚❚` : "";
|
|
106351
106365
|
const quit = counts.quit > 0 ? ` · ${counts.quit} quit` : "";
|
|
106352
106366
|
const blocked = counts.blocked > 0 ? ` · ${counts.blocked} ↑` : "";
|
|
106353
|
-
|
|
106367
|
+
const tools = activeTools > 0 ? ` · ${activeTools} tool${activeTools === 1 ? "" : "s"}` : "";
|
|
106368
|
+
return ` ▾ ${total} background · ${counts.active} ●${paused}${quit}${blocked}${tools}`;
|
|
106354
106369
|
}
|
|
106355
106370
|
function buildThemedWidgetLines(snap, piTheme, width = 120, now = Date.now()) {
|
|
106356
106371
|
const display = selectDisplayRuns(snap, now);
|
|
@@ -106368,8 +106383,11 @@ function buildThemedWidgetLines(snap, piTheme, width = 120, now = Date.now()) {
|
|
|
106368
106383
|
};
|
|
106369
106384
|
const themed = piTheme !== undefined;
|
|
106370
106385
|
const graphTheme = deriveGraphTheme({});
|
|
106386
|
+
const activeTools = display.filter(isActive).reduce((total2, run) => total2 + activeToolNodes(run).length, 0);
|
|
106371
106387
|
if (width < COLLAPSED_BREAKPOINT_COLS) {
|
|
106372
|
-
return [
|
|
106388
|
+
return [
|
|
106389
|
+
themed ? themedCollapsed(visibleCounts, activeTools, graphTheme) : plainCollapsed(visibleCounts, activeTools)
|
|
106390
|
+
];
|
|
106373
106391
|
}
|
|
106374
106392
|
const total = display.length;
|
|
106375
106393
|
const subtitle = `${total} run${total === 1 ? "" : "s"}`;
|
|
@@ -110189,21 +110207,41 @@ import {
|
|
|
110189
110207
|
chmodSync,
|
|
110190
110208
|
chownSync,
|
|
110191
110209
|
copyFileSync,
|
|
110192
|
-
existsSync
|
|
110210
|
+
existsSync,
|
|
110211
|
+
lstatSync,
|
|
110193
110212
|
mkdirSync,
|
|
110213
|
+
readdirSync,
|
|
110194
110214
|
readFileSync,
|
|
110215
|
+
readlinkSync,
|
|
110216
|
+
renameSync,
|
|
110217
|
+
rmdirSync,
|
|
110195
110218
|
rmSync,
|
|
110196
110219
|
statSync,
|
|
110197
110220
|
symlinkSync,
|
|
110198
110221
|
writeFileSync
|
|
110199
110222
|
} from "node:fs";
|
|
110200
|
-
import {
|
|
110201
|
-
import {
|
|
110223
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
110224
|
+
import { tmpdir, uptime } from "node:os";
|
|
110225
|
+
import { dirname as dirname2, join as join2, relative as relative2 } from "node:path";
|
|
110202
110226
|
|
|
110203
110227
|
// dist/builtin/workflows/src/durable/dbos-embedded-postgres-root.ts
|
|
110204
|
-
import {
|
|
110228
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
110229
|
+
import {
|
|
110230
|
+
chmod,
|
|
110231
|
+
chown,
|
|
110232
|
+
cp,
|
|
110233
|
+
lstat,
|
|
110234
|
+
mkdir,
|
|
110235
|
+
open,
|
|
110236
|
+
readdir,
|
|
110237
|
+
readlink,
|
|
110238
|
+
realpath,
|
|
110239
|
+
rename,
|
|
110240
|
+
rm,
|
|
110241
|
+
writeFile
|
|
110242
|
+
} from "node:fs/promises";
|
|
110205
110243
|
import { homedir } from "node:os";
|
|
110206
|
-
import { dirname, join } from "node:path";
|
|
110244
|
+
import { dirname, isAbsolute, join, relative, sep } from "node:path";
|
|
110207
110245
|
|
|
110208
110246
|
// dist/builtin/workflows/src/durable/local-command.ts
|
|
110209
110247
|
import { spawn } from "node:child_process";
|
|
@@ -110221,16 +110259,65 @@ function runLocalCommand(command, args, options) {
|
|
|
110221
110259
|
});
|
|
110222
110260
|
let stdout = "";
|
|
110223
110261
|
let stderr = "";
|
|
110262
|
+
let stdoutTruncated = false;
|
|
110263
|
+
let stderrTruncated = false;
|
|
110264
|
+
let settled = false;
|
|
110265
|
+
let exitFallback;
|
|
110224
110266
|
child.stdout.setEncoding("utf8");
|
|
110225
110267
|
child.stderr.setEncoding("utf8");
|
|
110226
|
-
|
|
110227
|
-
|
|
110228
|
-
|
|
110229
|
-
|
|
110230
|
-
|
|
110231
|
-
|
|
110232
|
-
|
|
110233
|
-
|
|
110268
|
+
const onStdout = (chunk) => {
|
|
110269
|
+
const appended = boundedAppend(stdout, chunk);
|
|
110270
|
+
stdout = appended.value;
|
|
110271
|
+
stdoutTruncated ||= appended.truncated;
|
|
110272
|
+
};
|
|
110273
|
+
const onStderr = (chunk) => {
|
|
110274
|
+
const appended = boundedAppend(stderr, chunk);
|
|
110275
|
+
stderr = appended.value;
|
|
110276
|
+
stderrTruncated ||= appended.truncated;
|
|
110277
|
+
};
|
|
110278
|
+
const cleanup = () => {
|
|
110279
|
+
if (exitFallback !== undefined)
|
|
110280
|
+
clearImmediate(exitFallback);
|
|
110281
|
+
child.off("error", onError);
|
|
110282
|
+
child.off("exit", onExit);
|
|
110283
|
+
child.off("close", onClose);
|
|
110284
|
+
child.stdout.off("data", onStdout);
|
|
110285
|
+
child.stderr.off("data", onStderr);
|
|
110286
|
+
child.stdout.destroy();
|
|
110287
|
+
child.stderr.destroy();
|
|
110288
|
+
};
|
|
110289
|
+
const finish = (code) => {
|
|
110290
|
+
if (settled)
|
|
110291
|
+
return;
|
|
110292
|
+
settled = true;
|
|
110293
|
+
cleanup();
|
|
110294
|
+
resolve({
|
|
110295
|
+
exitCode: code ?? 1,
|
|
110296
|
+
stdout,
|
|
110297
|
+
stderr,
|
|
110298
|
+
...stdoutTruncated ? { stdoutTruncated: true } : {},
|
|
110299
|
+
...stderrTruncated ? { stderrTruncated: true } : {}
|
|
110300
|
+
});
|
|
110301
|
+
};
|
|
110302
|
+
const onError = (error) => {
|
|
110303
|
+
if (settled)
|
|
110304
|
+
return;
|
|
110305
|
+
settled = true;
|
|
110306
|
+
cleanup();
|
|
110307
|
+
reject(error);
|
|
110308
|
+
};
|
|
110309
|
+
const onExit = (code) => {
|
|
110310
|
+
if (code !== 0)
|
|
110311
|
+
return;
|
|
110312
|
+
exitFallback = setImmediate(() => finish(code));
|
|
110313
|
+
};
|
|
110314
|
+
const onClose = (code) => finish(code);
|
|
110315
|
+
child.stdout.on("data", onStdout);
|
|
110316
|
+
child.stderr.on("data", onStderr);
|
|
110317
|
+
child.once("error", onError);
|
|
110318
|
+
if (options?.completion === "successful-exit")
|
|
110319
|
+
child.once("exit", onExit);
|
|
110320
|
+
child.once("close", onClose);
|
|
110234
110321
|
});
|
|
110235
110322
|
}
|
|
110236
110323
|
function commandFailureDetail(result) {
|
|
@@ -110255,7 +110342,7 @@ function tcpReachable(host, port, timeoutMs = 1000) {
|
|
|
110255
110342
|
}
|
|
110256
110343
|
function boundedAppend(current, chunk) {
|
|
110257
110344
|
const next = current + chunk;
|
|
110258
|
-
return next.length <= OUTPUT_LIMIT_BYTES ? next : next.slice(-OUTPUT_LIMIT_BYTES);
|
|
110345
|
+
return next.length <= OUTPUT_LIMIT_BYTES ? { value: next, truncated: false } : { value: next.slice(-OUTPUT_LIMIT_BYTES), truncated: true };
|
|
110259
110346
|
}
|
|
110260
110347
|
|
|
110261
110348
|
// dist/builtin/workflows/src/durable/dbos-embedded-postgres-root.ts
|
|
@@ -110281,22 +110368,55 @@ async function resolveEmbeddedRunContext(runner = runLocalCommand, euid = proces
|
|
|
110281
110368
|
}
|
|
110282
110369
|
async function resolvePrivilegeDrop(runner, owner) {
|
|
110283
110370
|
const strategies = [
|
|
110284
|
-
(command, args) => runner(command, args, { uid: owner.uid, gid: owner.gid }),
|
|
110285
|
-
(command, args) => runner("setpriv", [`--reuid=${owner.uid}`, `--regid=${owner.gid}`, "--clear-groups", "--", command, ...args]),
|
|
110286
|
-
(command, args) => runner("runuser", ["-u", owner.name, "--", command, ...args]),
|
|
110287
|
-
(command, args) => runner("su", ["-s", "/bin/sh", "-c", shellCommand(command, args), owner.name])
|
|
110371
|
+
(command, args, options) => runner(command, args, { ...options, uid: owner.uid, gid: owner.gid }),
|
|
110372
|
+
(command, args, options) => runner("setpriv", [`--reuid=${owner.uid}`, `--regid=${owner.gid}`, "--clear-groups", "--", command, ...args], options),
|
|
110373
|
+
(command, args, options) => runner("runuser", ["-u", owner.name, "--", command, ...args], options),
|
|
110374
|
+
(command, args, options) => runner("su", ["-s", "/bin/sh", "-c", shellCommand(command, args), owner.name], options)
|
|
110288
110375
|
];
|
|
110289
110376
|
for (const strategy of strategies) {
|
|
110290
|
-
|
|
110291
|
-
return;
|
|
110292
|
-
});
|
|
110293
|
-
if (probe !== undefined && probe.exitCode === 0 && probe.stdout.trim() === String(owner.uid)) {
|
|
110377
|
+
if (await provesOwnerIdentity(strategy, owner))
|
|
110294
110378
|
return strategy;
|
|
110295
|
-
}
|
|
110296
110379
|
}
|
|
110297
110380
|
return;
|
|
110298
110381
|
}
|
|
110299
|
-
async function
|
|
110382
|
+
async function provesOwnerIdentity(strategy, owner) {
|
|
110383
|
+
try {
|
|
110384
|
+
const uid = parseIdentityNumber(await strategy("id", ["-u"]));
|
|
110385
|
+
if (uid !== owner.uid)
|
|
110386
|
+
return false;
|
|
110387
|
+
const gid = parseIdentityNumber(await strategy("id", ["-g"]));
|
|
110388
|
+
if (gid !== owner.gid)
|
|
110389
|
+
return false;
|
|
110390
|
+
const groups = parseIdentityGroups(await strategy("id", ["-G"]));
|
|
110391
|
+
return groups?.has(owner.gid) === true && (owner.uid === 0 || !groups.has(0));
|
|
110392
|
+
} catch {
|
|
110393
|
+
return false;
|
|
110394
|
+
}
|
|
110395
|
+
}
|
|
110396
|
+
function parseIdentityNumber(result) {
|
|
110397
|
+
if (result.exitCode !== 0 || result.stdoutTruncated === true)
|
|
110398
|
+
return;
|
|
110399
|
+
const match = /^(0|[1-9]\d*)\r?\n?$/.exec(result.stdout);
|
|
110400
|
+
if (match === null)
|
|
110401
|
+
return;
|
|
110402
|
+
const value2 = Number(match[1]);
|
|
110403
|
+
return Number.isSafeInteger(value2) ? value2 : undefined;
|
|
110404
|
+
}
|
|
110405
|
+
function parseIdentityGroups(result) {
|
|
110406
|
+
if (result.exitCode !== 0 || result.stdoutTruncated === true || !/^(0|[1-9]\d*)(?:[ \t]+(0|[1-9]\d*))*\r?\n?$/.test(result.stdout)) {
|
|
110407
|
+
return;
|
|
110408
|
+
}
|
|
110409
|
+
const values = result.stdout.trimEnd().split(/[ \t]+/).map(Number);
|
|
110410
|
+
if (values.some((value2) => !Number.isSafeInteger(value2)))
|
|
110411
|
+
return;
|
|
110412
|
+
const groups = new Set(values);
|
|
110413
|
+
return groups.size === values.length ? groups : undefined;
|
|
110414
|
+
}
|
|
110415
|
+
var STAGE_OWNER_FILE = ".atomic-stage-owner";
|
|
110416
|
+
var STAGE_PAYLOAD_DIR = "runtime";
|
|
110417
|
+
var TRAVERSAL_OPERATIONS_PER_YIELD = 16;
|
|
110418
|
+
var HASH_CHUNK_BYTES = 64 * 1024;
|
|
110419
|
+
async function prepareBinariesForOwner(binaries, context, runner = runLocalCommand, options = {}) {
|
|
110300
110420
|
const owner = context.owner;
|
|
110301
110421
|
if (owner === undefined)
|
|
110302
110422
|
return binaries;
|
|
@@ -110305,20 +110425,309 @@ async function prepareBinariesForOwner(binaries, context, runner = runLocalComma
|
|
|
110305
110425
|
});
|
|
110306
110426
|
if (probe !== undefined && probe.exitCode === 0)
|
|
110307
110427
|
return binaries;
|
|
110308
|
-
const
|
|
110309
|
-
const
|
|
110310
|
-
const
|
|
110428
|
+
const sourceNativeDir = dirname(dirname(binaries.initdb));
|
|
110429
|
+
const copiedRuntimeDir = join(context.baseDir, "pg-runtime");
|
|
110430
|
+
const publisher = publisherIdentity();
|
|
110431
|
+
const progress = runtimeProgress(options);
|
|
110432
|
+
const sourceSnapshot = await snapshotSourceRuntime(sourceNativeDir, publisher, progress);
|
|
110433
|
+
await options.afterInitialSourceSnapshot?.();
|
|
110434
|
+
const copiedNativeDir = await findOrCreateRuntimeGeneration(sourceNativeDir, sourceSnapshot, copiedRuntimeDir, publisher, runner, progress, options);
|
|
110435
|
+
return {
|
|
110311
110436
|
pg_ctl: join(copiedNativeDir, "bin", "pg_ctl"),
|
|
110312
|
-
initdb: join(copiedNativeDir, "bin", "initdb")
|
|
110437
|
+
initdb: join(copiedNativeDir, "bin", "initdb"),
|
|
110438
|
+
postgres: join(copiedNativeDir, "bin", "postgres")
|
|
110313
110439
|
};
|
|
110314
|
-
|
|
110315
|
-
|
|
110440
|
+
}
|
|
110441
|
+
async function cleanupAbandonedRuntimeStages(baseDir, abandonedOwnerTokens = new Set) {
|
|
110442
|
+
if (abandonedOwnerTokens.size === 0)
|
|
110443
|
+
return;
|
|
110444
|
+
const copiedRuntimeDir = join(baseDir, "pg-runtime");
|
|
110445
|
+
let entries;
|
|
110446
|
+
try {
|
|
110447
|
+
entries = await readdir(copiedRuntimeDir);
|
|
110448
|
+
} catch (error) {
|
|
110449
|
+
const code = error instanceof Error && "code" in error ? error.code : undefined;
|
|
110450
|
+
if (code === "ENOENT")
|
|
110451
|
+
return;
|
|
110452
|
+
throw error;
|
|
110316
110453
|
}
|
|
110317
|
-
const
|
|
110318
|
-
|
|
110319
|
-
|
|
110454
|
+
for (const entry of entries) {
|
|
110455
|
+
if (!entry.startsWith(".native-staged-"))
|
|
110456
|
+
continue;
|
|
110457
|
+
const stage = join(copiedRuntimeDir, entry);
|
|
110458
|
+
let ownerToken;
|
|
110459
|
+
try {
|
|
110460
|
+
ownerToken = await readSmallFile(join(stage, STAGE_OWNER_FILE));
|
|
110461
|
+
} catch {
|
|
110462
|
+
continue;
|
|
110463
|
+
}
|
|
110464
|
+
if (abandonedOwnerTokens.has(ownerToken))
|
|
110465
|
+
await rm(stage, { recursive: true, force: true });
|
|
110320
110466
|
}
|
|
110321
|
-
|
|
110467
|
+
}
|
|
110468
|
+
async function findOrCreateRuntimeGeneration(sourceNativeDir, sourceSnapshot, copiedRuntimeDir, publisher, runner, progress, options) {
|
|
110469
|
+
await mkdir(copiedRuntimeDir, { recursive: true, mode: 493 });
|
|
110470
|
+
const runtimeStat = await lstat(copiedRuntimeDir);
|
|
110471
|
+
if (!runtimeStat.isDirectory() || runtimeStat.isSymbolicLink()) {
|
|
110472
|
+
throw new Error(`Embedded Postgres runtime parent must be a real directory: ${copiedRuntimeDir}`);
|
|
110473
|
+
}
|
|
110474
|
+
await chown(copiedRuntimeDir, publisher.uid, publisher.gid);
|
|
110475
|
+
await chmod(copiedRuntimeDir, 493);
|
|
110476
|
+
const generationNativeDir = join(copiedRuntimeDir, `native-${sourceSnapshot.sourceIdentity}`);
|
|
110477
|
+
const existing = await lstatOrUndefined(generationNativeDir);
|
|
110478
|
+
if (existing !== undefined) {
|
|
110479
|
+
try {
|
|
110480
|
+
if (await snapshotSealedRuntime(generationNativeDir, progress) !== sourceSnapshot.sealedIdentity) {
|
|
110481
|
+
throw new Error("sealed identity mismatch");
|
|
110482
|
+
}
|
|
110483
|
+
await assertSourceSnapshotUnchanged(sourceNativeDir, sourceSnapshot, publisher, progress, "Embedded Postgres source package changed while selecting an existing generation.");
|
|
110484
|
+
return generationNativeDir;
|
|
110485
|
+
} catch (error) {
|
|
110486
|
+
if (error instanceof SourceRuntimeChangedError)
|
|
110487
|
+
throw error;
|
|
110488
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
110489
|
+
throw new Error(`Embedded Postgres runtime generation is corrupt and cannot be replaced while it may be in use (${generationNativeDir}): ${detail}`);
|
|
110490
|
+
}
|
|
110491
|
+
}
|
|
110492
|
+
const stageOwner = options.publicationLease?.ownerToken ?? `unmanaged-${process.pid}-${crypto.randomUUID()}`;
|
|
110493
|
+
const stagedRoot = join(copiedRuntimeDir, `.native-staged-${process.pid}-${crypto.randomUUID()}`);
|
|
110494
|
+
const stagedNativeDir = join(stagedRoot, STAGE_PAYLOAD_DIR);
|
|
110495
|
+
await mkdir(stagedRoot, { mode: 448 });
|
|
110496
|
+
await writeFile(join(stagedRoot, STAGE_OWNER_FILE), stageOwner, { mode: 384, flag: "wx" });
|
|
110497
|
+
try {
|
|
110498
|
+
await progress();
|
|
110499
|
+
await cp(sourceNativeDir, stagedNativeDir, { recursive: true, verbatimSymlinks: true });
|
|
110500
|
+
const copiedSnapshot = await snapshotSourceRuntime(stagedNativeDir, publisher, progress);
|
|
110501
|
+
if (copiedSnapshot.sourceIdentity !== sourceSnapshot.sourceIdentity) {
|
|
110502
|
+
throw new Error("Copied embedded Postgres runtime did not match its source package.");
|
|
110503
|
+
}
|
|
110504
|
+
await sealRuntimeForPublisher(stagedNativeDir, publisher, runner, progress);
|
|
110505
|
+
if (await snapshotSealedRuntime(stagedNativeDir, progress) !== sourceSnapshot.sealedIdentity) {
|
|
110506
|
+
throw new Error("Sealed embedded Postgres runtime did not match its source package.");
|
|
110507
|
+
}
|
|
110508
|
+
await options.beforePublish?.(stagedNativeDir);
|
|
110509
|
+
if (await snapshotSealedRuntime(stagedNativeDir, progress) !== sourceSnapshot.sealedIdentity) {
|
|
110510
|
+
throw new Error("Embedded Postgres runtime changed after sealed validation and before publication.");
|
|
110511
|
+
}
|
|
110512
|
+
await assertSourceSnapshotUnchanged(sourceNativeDir, sourceSnapshot, publisher, progress, "Embedded Postgres source package changed while preparing a generation.");
|
|
110513
|
+
assertPublicationLease(options, "Embedded Postgres runtime publication lost its setup lease.");
|
|
110514
|
+
await progress();
|
|
110515
|
+
await rename(stagedNativeDir, generationNativeDir);
|
|
110516
|
+
await options.afterPublish?.(generationNativeDir);
|
|
110517
|
+
if (await snapshotSealedRuntime(generationNativeDir, progress) !== sourceSnapshot.sealedIdentity) {
|
|
110518
|
+
throw new Error("Embedded Postgres published runtime changed during publication.");
|
|
110519
|
+
}
|
|
110520
|
+
await assertSourceSnapshotUnchanged(sourceNativeDir, sourceSnapshot, publisher, progress, "Embedded Postgres source package changed during publication.");
|
|
110521
|
+
await options.afterPublishValidation?.(generationNativeDir);
|
|
110522
|
+
assertPublicationLease(options, "Embedded Postgres runtime lost its setup lease after publication.");
|
|
110523
|
+
return generationNativeDir;
|
|
110524
|
+
} finally {
|
|
110525
|
+
await makeUnpublishedStageRemovable(stagedNativeDir).catch(() => {});
|
|
110526
|
+
await rm(stagedRoot, { recursive: true, force: true });
|
|
110527
|
+
}
|
|
110528
|
+
}
|
|
110529
|
+
|
|
110530
|
+
class SourceRuntimeChangedError extends Error {
|
|
110531
|
+
}
|
|
110532
|
+
async function assertSourceSnapshotUnchanged(sourceNativeDir, expected, publisher, progress, message) {
|
|
110533
|
+
const current = await snapshotSourceRuntime(sourceNativeDir, publisher, progress);
|
|
110534
|
+
if (current.sourceIdentity !== expected.sourceIdentity || current.sealedIdentity !== expected.sealedIdentity) {
|
|
110535
|
+
throw new SourceRuntimeChangedError(message);
|
|
110536
|
+
}
|
|
110537
|
+
}
|
|
110538
|
+
function assertPublicationLease(options, message) {
|
|
110539
|
+
if (options.publicationLease !== undefined && !options.publicationLease.refresh())
|
|
110540
|
+
throw new Error(message);
|
|
110541
|
+
}
|
|
110542
|
+
function runtimeProgress(options) {
|
|
110543
|
+
let operations = 0;
|
|
110544
|
+
const yieldToEventLoop = options.yieldToEventLoop ?? (() => new Promise((resolve) => setImmediate(resolve)));
|
|
110545
|
+
return async () => {
|
|
110546
|
+
if (operations % TRAVERSAL_OPERATIONS_PER_YIELD === 0) {
|
|
110547
|
+
if (options.publicationLease !== undefined && !options.publicationLease.refresh()) {
|
|
110548
|
+
throw new Error("Embedded Postgres runtime publication lost its setup lease.");
|
|
110549
|
+
}
|
|
110550
|
+
if (operations > 0) {
|
|
110551
|
+
await yieldToEventLoop();
|
|
110552
|
+
if (options.publicationLease !== undefined && !options.publicationLease.refresh()) {
|
|
110553
|
+
throw new Error("Embedded Postgres runtime publication lost its setup lease.");
|
|
110554
|
+
}
|
|
110555
|
+
}
|
|
110556
|
+
}
|
|
110557
|
+
operations += 1;
|
|
110558
|
+
};
|
|
110559
|
+
}
|
|
110560
|
+
async function snapshotSourceRuntime(root, publisher, progress) {
|
|
110561
|
+
const rootStat = await lstat(root);
|
|
110562
|
+
assertRuntimeRoot(root, rootStat);
|
|
110563
|
+
const rootRealPath = await realpath(root);
|
|
110564
|
+
const sourceHash = createHash2("sha256");
|
|
110565
|
+
const sealedHash = createHash2("sha256");
|
|
110566
|
+
await hashSourceEntry(sourceHash, sealedHash, root, ".", rootRealPath, publisher, progress);
|
|
110567
|
+
return { sourceIdentity: sourceHash.digest("hex"), sealedIdentity: sealedHash.digest("hex") };
|
|
110568
|
+
}
|
|
110569
|
+
async function hashSourceEntry(sourceHash, sealedHash, path, relativePath, rootRealPath, publisher, progress) {
|
|
110570
|
+
await progress();
|
|
110571
|
+
const stat = await lstat(path);
|
|
110572
|
+
if (stat.isSymbolicLink()) {
|
|
110573
|
+
const target = await validatedLinkTarget(path, relativePath, rootRealPath);
|
|
110574
|
+
hashField(sourceHash, "link", relativePath, target);
|
|
110575
|
+
hashField(sealedHash, "link", relativePath, String(publisher.uid), String(publisher.gid), target);
|
|
110576
|
+
return;
|
|
110577
|
+
}
|
|
110578
|
+
if (stat.isDirectory()) {
|
|
110579
|
+
hashField(sourceHash, "directory", relativePath, String(stat.mode & 511));
|
|
110580
|
+
hashField(sealedHash, "directory", relativePath, String(sealedDirectoryMode(relativePath === ".")), String(publisher.uid), String(publisher.gid));
|
|
110581
|
+
for (const entry of (await readdir(path)).sort()) {
|
|
110582
|
+
await hashSourceEntry(sourceHash, sealedHash, join(path, entry), relativePath === "." ? entry : join(relativePath, entry), rootRealPath, publisher, progress);
|
|
110583
|
+
}
|
|
110584
|
+
return;
|
|
110585
|
+
}
|
|
110586
|
+
if (stat.isFile()) {
|
|
110587
|
+
hashField(sourceHash, "file", relativePath, String(stat.mode & 511), String(stat.size));
|
|
110588
|
+
hashField(sealedHash, "file", relativePath, String(sealedFileMode(stat.mode)), String(publisher.uid), String(publisher.gid), String(stat.size));
|
|
110589
|
+
await hashFileInto([sourceHash, sealedHash], path, progress);
|
|
110590
|
+
return;
|
|
110591
|
+
}
|
|
110592
|
+
throw new Error(`Embedded Postgres runtime contains an unsupported entry: ${relativePath}`);
|
|
110593
|
+
}
|
|
110594
|
+
async function snapshotSealedRuntime(root, progress) {
|
|
110595
|
+
const rootStat = await lstat(root);
|
|
110596
|
+
assertRuntimeRoot(root, rootStat);
|
|
110597
|
+
const rootRealPath = await realpath(root);
|
|
110598
|
+
const hash = createHash2("sha256");
|
|
110599
|
+
await hashSealedEntry(hash, root, ".", rootRealPath, progress);
|
|
110600
|
+
return hash.digest("hex");
|
|
110601
|
+
}
|
|
110602
|
+
async function hashSealedEntry(hash, path, relativePath, rootRealPath, progress) {
|
|
110603
|
+
await progress();
|
|
110604
|
+
const stat = await lstat(path);
|
|
110605
|
+
if (stat.isSymbolicLink()) {
|
|
110606
|
+
const target = await validatedLinkTarget(path, relativePath, rootRealPath);
|
|
110607
|
+
hashField(hash, "link", relativePath, String(stat.uid), String(stat.gid), target);
|
|
110608
|
+
return;
|
|
110609
|
+
}
|
|
110610
|
+
if (stat.isDirectory()) {
|
|
110611
|
+
hashField(hash, "directory", relativePath, String(stat.mode & 511), String(stat.uid), String(stat.gid));
|
|
110612
|
+
for (const entry of (await readdir(path)).sort()) {
|
|
110613
|
+
await hashSealedEntry(hash, join(path, entry), relativePath === "." ? entry : join(relativePath, entry), rootRealPath, progress);
|
|
110614
|
+
}
|
|
110615
|
+
return;
|
|
110616
|
+
}
|
|
110617
|
+
if (stat.isFile()) {
|
|
110618
|
+
hashField(hash, "file", relativePath, String(stat.mode & 511), String(stat.uid), String(stat.gid), String(stat.size));
|
|
110619
|
+
await hashFileInto([hash], path, progress);
|
|
110620
|
+
return;
|
|
110621
|
+
}
|
|
110622
|
+
throw new Error(`Embedded Postgres runtime contains an unsupported entry: ${relativePath}`);
|
|
110623
|
+
}
|
|
110624
|
+
async function validatedLinkTarget(path, relativePath, rootRealPath) {
|
|
110625
|
+
const target = await readlink(path);
|
|
110626
|
+
if (isAbsolute(target))
|
|
110627
|
+
throw new Error(`Embedded Postgres runtime contains an absolute link: ${relativePath}`);
|
|
110628
|
+
const resolvedTarget = await realpath(path);
|
|
110629
|
+
const targetFromRoot = relative(rootRealPath, resolvedTarget);
|
|
110630
|
+
if (targetFromRoot === ".." || targetFromRoot.startsWith(`..${sep}`) || isAbsolute(targetFromRoot)) {
|
|
110631
|
+
throw new Error(`Embedded Postgres runtime link escapes its tree: ${relativePath}`);
|
|
110632
|
+
}
|
|
110633
|
+
return target;
|
|
110634
|
+
}
|
|
110635
|
+
async function hashFileInto(hashes, path, progress) {
|
|
110636
|
+
const handle = await open(path, "r");
|
|
110637
|
+
const buffer = Buffer.allocUnsafe(HASH_CHUNK_BYTES);
|
|
110638
|
+
try {
|
|
110639
|
+
for (;; ) {
|
|
110640
|
+
const { bytesRead } = await handle.read(buffer, 0, buffer.length, null);
|
|
110641
|
+
if (bytesRead === 0)
|
|
110642
|
+
return;
|
|
110643
|
+
const chunk = buffer.subarray(0, bytesRead);
|
|
110644
|
+
for (const hash of hashes)
|
|
110645
|
+
hash.update(chunk);
|
|
110646
|
+
await progress();
|
|
110647
|
+
}
|
|
110648
|
+
} finally {
|
|
110649
|
+
await handle.close();
|
|
110650
|
+
}
|
|
110651
|
+
}
|
|
110652
|
+
async function sealRuntimeForPublisher(runtimeDir, publisher, runner, progress) {
|
|
110653
|
+
const result = await runner("chown", ["-R", `${publisher.uid}:${publisher.gid}`, runtimeDir]);
|
|
110654
|
+
if (result.exitCode !== 0) {
|
|
110655
|
+
throw new Error(`Could not seal the copied embedded Postgres runtime: ${result.stderr.trim() || result.stdout.trim() || `exit ${result.exitCode}`}`);
|
|
110656
|
+
}
|
|
110657
|
+
await sealRuntimeModes(runtimeDir, progress, true);
|
|
110658
|
+
}
|
|
110659
|
+
async function sealRuntimeModes(path, progress, isRoot = false) {
|
|
110660
|
+
await progress();
|
|
110661
|
+
const stat = await lstat(path);
|
|
110662
|
+
if (stat.isSymbolicLink())
|
|
110663
|
+
return;
|
|
110664
|
+
if (stat.isDirectory()) {
|
|
110665
|
+
await chmod(path, 448);
|
|
110666
|
+
for (const entry of await readdir(path))
|
|
110667
|
+
await sealRuntimeModes(join(path, entry), progress);
|
|
110668
|
+
await chmod(path, sealedDirectoryMode(isRoot));
|
|
110669
|
+
return;
|
|
110670
|
+
}
|
|
110671
|
+
if (stat.isFile()) {
|
|
110672
|
+
await chmod(path, sealedFileMode(stat.mode));
|
|
110673
|
+
return;
|
|
110674
|
+
}
|
|
110675
|
+
throw new Error(`Embedded Postgres runtime contains an unsupported entry while sealing: ${path}`);
|
|
110676
|
+
}
|
|
110677
|
+
async function makeUnpublishedStageRemovable(path) {
|
|
110678
|
+
const stat = await lstatOrUndefined(path);
|
|
110679
|
+
if (stat === undefined || stat.isSymbolicLink())
|
|
110680
|
+
return;
|
|
110681
|
+
if (stat.isDirectory()) {
|
|
110682
|
+
await chmod(path, 448);
|
|
110683
|
+
for (const entry of await readdir(path))
|
|
110684
|
+
await makeUnpublishedStageRemovable(join(path, entry));
|
|
110685
|
+
} else if (stat.isFile()) {
|
|
110686
|
+
await chmod(path, 384);
|
|
110687
|
+
}
|
|
110688
|
+
}
|
|
110689
|
+
function sealedDirectoryMode(isRoot) {
|
|
110690
|
+
if (process.platform === "win32")
|
|
110691
|
+
return 292;
|
|
110692
|
+
return isRoot ? 493 : 365;
|
|
110693
|
+
}
|
|
110694
|
+
function sealedFileMode(mode) {
|
|
110695
|
+
if (process.platform === "win32")
|
|
110696
|
+
return 292;
|
|
110697
|
+
return (mode & 73) === 0 ? 292 : 365;
|
|
110698
|
+
}
|
|
110699
|
+
function publisherIdentity() {
|
|
110700
|
+
return { uid: process.getuid?.() ?? 0, gid: process.getgid?.() ?? 0 };
|
|
110701
|
+
}
|
|
110702
|
+
function assertRuntimeRoot(root, stat) {
|
|
110703
|
+
if (!stat.isDirectory() || stat.isSymbolicLink()) {
|
|
110704
|
+
throw new Error(`Embedded Postgres runtime must be a real directory: ${root}`);
|
|
110705
|
+
}
|
|
110706
|
+
}
|
|
110707
|
+
async function lstatOrUndefined(path) {
|
|
110708
|
+
try {
|
|
110709
|
+
return await lstat(path);
|
|
110710
|
+
} catch (error) {
|
|
110711
|
+
const code = error instanceof Error && "code" in error ? error.code : undefined;
|
|
110712
|
+
if (code === "ENOENT")
|
|
110713
|
+
return;
|
|
110714
|
+
throw error;
|
|
110715
|
+
}
|
|
110716
|
+
}
|
|
110717
|
+
async function readSmallFile(path) {
|
|
110718
|
+
const handle = await open(path, "r");
|
|
110719
|
+
try {
|
|
110720
|
+
const stat = await handle.stat();
|
|
110721
|
+
if (stat.size > 4096)
|
|
110722
|
+
throw new Error(`Unexpectedly large runtime stage owner marker: ${path}`);
|
|
110723
|
+
return (await handle.readFile("utf8")).trim();
|
|
110724
|
+
} finally {
|
|
110725
|
+
await handle.close();
|
|
110726
|
+
}
|
|
110727
|
+
}
|
|
110728
|
+
function hashField(hash, ...values) {
|
|
110729
|
+
for (const value2 of values)
|
|
110730
|
+
hash.update(`${Buffer.byteLength(value2)}:${value2}`);
|
|
110322
110731
|
}
|
|
110323
110732
|
async function lookupOwner(runner, name) {
|
|
110324
110733
|
const uid = await lookupId(runner, ["-u", name]);
|
|
@@ -110329,11 +110738,8 @@ async function lookupOwner(runner, name) {
|
|
|
110329
110738
|
}
|
|
110330
110739
|
async function lookupId(runner, args) {
|
|
110331
110740
|
try {
|
|
110332
|
-
const
|
|
110333
|
-
|
|
110334
|
-
return;
|
|
110335
|
-
const value2 = Number.parseInt(result.stdout.trim(), 10);
|
|
110336
|
-
return Number.isInteger(value2) && value2 > 0 ? value2 : undefined;
|
|
110741
|
+
const value2 = parseIdentityNumber(await runner("id", args));
|
|
110742
|
+
return value2 !== undefined && value2 > 0 ? value2 : undefined;
|
|
110337
110743
|
} catch {
|
|
110338
110744
|
return;
|
|
110339
110745
|
}
|
|
@@ -110351,10 +110757,24 @@ var EMBEDDED_PG_MAJOR = 18;
|
|
|
110351
110757
|
var READY_ATTEMPTS = 120;
|
|
110352
110758
|
var READY_DELAY_MS = 250;
|
|
110353
110759
|
var SETUP_LOCK_STALE_MS = 120000;
|
|
110760
|
+
var SHUTDOWN_TIMEOUT_MS = 60000;
|
|
110354
110761
|
var EMBEDDED_DBOS_SYSTEM_DATABASE_URL = `postgresql://${EMBEDDED_USER}:${EMBEDDED_PASSWORD}@${EMBEDDED_HOST}:${EMBEDDED_PORT}/atomic_workflows_dbos_sys?connect_timeout=10&sslmode=disable`;
|
|
110762
|
+
|
|
110763
|
+
class EmbeddedPostgresCleanupPendingError extends AggregateError {
|
|
110764
|
+
constructor(errors, message) {
|
|
110765
|
+
super(errors, message);
|
|
110766
|
+
this.name = "EmbeddedPostgresCleanupPendingError";
|
|
110767
|
+
}
|
|
110768
|
+
}
|
|
110769
|
+
var activeCluster;
|
|
110770
|
+
var ensureOperation = ensure;
|
|
110771
|
+
var retainedPostgresSpawnerOverride;
|
|
110355
110772
|
var ensured;
|
|
110356
110773
|
function ensureEmbeddedDbosPostgres() {
|
|
110357
|
-
ensured
|
|
110774
|
+
if (ensured === undefined && activeCluster !== undefined) {
|
|
110775
|
+
return Promise.reject(new EmbeddedPostgresCleanupPendingError([], "Embedded Postgres startup is blocked while retained Postgres cleanup is pending; retry shutdown first."));
|
|
110776
|
+
}
|
|
110777
|
+
ensured ??= ensureOperation().catch((error) => {
|
|
110358
110778
|
ensured = undefined;
|
|
110359
110779
|
throw error;
|
|
110360
110780
|
});
|
|
@@ -110369,25 +110789,79 @@ async function ensure() {
|
|
|
110369
110789
|
const root = context.baseDir;
|
|
110370
110790
|
const dataDir = join2(root, `v${EMBEDDED_PG_MAJOR}`);
|
|
110371
110791
|
const logFile = join2(root, `v${EMBEDDED_PG_MAJOR}.log`);
|
|
110372
|
-
mkdirSync(root, { recursive: true, mode: 448 });
|
|
110373
|
-
if (context.owner !== undefined)
|
|
110374
|
-
chownSync(root,
|
|
110375
|
-
|
|
110376
|
-
|
|
110377
|
-
|
|
110378
|
-
|
|
110379
|
-
|
|
110380
|
-
await
|
|
110381
|
-
|
|
110382
|
-
|
|
110383
|
-
|
|
110384
|
-
|
|
110385
|
-
|
|
110386
|
-
|
|
110792
|
+
mkdirSync(root, { recursive: true, mode: context.owner === undefined ? 448 : 493 });
|
|
110793
|
+
if (context.owner !== undefined) {
|
|
110794
|
+
chownSync(root, 0, 0);
|
|
110795
|
+
chmodSync(root, 493);
|
|
110796
|
+
}
|
|
110797
|
+
let startedCluster;
|
|
110798
|
+
try {
|
|
110799
|
+
await withSetupLock(join2(root, `v${EMBEDDED_PG_MAJOR}.setup-lock`), async (setup) => {
|
|
110800
|
+
await cleanupAbandonedRuntimeStages(root, setup.abandonedRuntimeStageOwnerTokens);
|
|
110801
|
+
if (await tcpReachable(EMBEDDED_HOST, EMBEDDED_PORT))
|
|
110802
|
+
return;
|
|
110803
|
+
const binaries = await prepareBinariesForOwner(loaded, context, undefined, {
|
|
110804
|
+
publicationLease: setup.runtimePublicationLease
|
|
110805
|
+
});
|
|
110806
|
+
if (!existsSync(join2(dataDir, "PG_VERSION")))
|
|
110807
|
+
await initializeCluster(binaries.initdb, dataDir, context);
|
|
110808
|
+
const lease = await startCluster(binaries.postgres, dataDir, logFile, context);
|
|
110809
|
+
if (lease !== undefined) {
|
|
110810
|
+
startedCluster = { lease };
|
|
110811
|
+
activeCluster = startedCluster;
|
|
110812
|
+
}
|
|
110813
|
+
});
|
|
110814
|
+
} catch (startupError) {
|
|
110815
|
+
await rollbackStartedCluster(startedCluster, startupError);
|
|
110816
|
+
}
|
|
110817
|
+
await waitForClusterReadiness(logFile, startedCluster);
|
|
110818
|
+
}
|
|
110819
|
+
async function rollbackStartedCluster(cluster, startupError) {
|
|
110820
|
+
if (cluster !== undefined && activeCluster === cluster) {
|
|
110821
|
+
try {
|
|
110822
|
+
await shutdownEmbeddedDbosPostgres();
|
|
110823
|
+
} catch (cleanupError) {
|
|
110824
|
+
throw new EmbeddedPostgresCleanupPendingError([startupError, cleanupError], "Embedded Postgres startup failed and its retained process could not be stopped.");
|
|
110825
|
+
}
|
|
110826
|
+
}
|
|
110827
|
+
throw startupError;
|
|
110828
|
+
}
|
|
110829
|
+
async function waitForClusterReadiness(logFile, rollbackCluster, isReachable = tcpReachable, attempts = READY_ATTEMPTS, wait = delay) {
|
|
110830
|
+
try {
|
|
110831
|
+
for (let attempt = 0;attempt < attempts; attempt += 1) {
|
|
110832
|
+
if (await isReachable(EMBEDDED_HOST, EMBEDDED_PORT))
|
|
110833
|
+
return;
|
|
110834
|
+
await wait(READY_DELAY_MS);
|
|
110835
|
+
}
|
|
110836
|
+
throw new Error(`Embedded Postgres started but never accepted connections on ${EMBEDDED_HOST}:${EMBEDDED_PORT}; see ${logFile}.`);
|
|
110837
|
+
} catch (startupError) {
|
|
110838
|
+
await rollbackStartedCluster(rollbackCluster, startupError);
|
|
110839
|
+
}
|
|
110840
|
+
}
|
|
110841
|
+
function shutdownEmbeddedDbosPostgres() {
|
|
110842
|
+
const cluster = activeCluster;
|
|
110843
|
+
if (cluster === undefined)
|
|
110844
|
+
return Promise.resolve();
|
|
110845
|
+
cluster.stopPromise ??= stopActiveCluster(cluster);
|
|
110846
|
+
return cluster.stopPromise;
|
|
110847
|
+
}
|
|
110848
|
+
async function stopActiveCluster(cluster) {
|
|
110849
|
+
try {
|
|
110850
|
+
await cluster.lease.interruptAndWait(SHUTDOWN_TIMEOUT_MS);
|
|
110851
|
+
cluster.lease.release();
|
|
110852
|
+
if (activeCluster === cluster)
|
|
110853
|
+
activeCluster = undefined;
|
|
110854
|
+
} catch (error) {
|
|
110855
|
+
cluster.stopPromise = undefined;
|
|
110856
|
+
throw error;
|
|
110387
110857
|
}
|
|
110388
|
-
throw new Error(`Embedded Postgres started but never accepted connections on ${EMBEDDED_HOST}:${EMBEDDED_PORT}; see ${logFile}.`);
|
|
110389
110858
|
}
|
|
110390
110859
|
async function initializeCluster(initdb, dataDir, context) {
|
|
110860
|
+
if (context.owner !== undefined) {
|
|
110861
|
+
mkdirSync(dataDir, { recursive: true, mode: 448 });
|
|
110862
|
+
chownSync(dataDir, context.owner.uid, context.owner.gid);
|
|
110863
|
+
chmodSync(dataDir, 448);
|
|
110864
|
+
}
|
|
110391
110865
|
const passwordFile = join2(tmpdir(), `atomic-pg-pw-${process.pid}-${crypto.randomUUID().slice(0, 8)}`);
|
|
110392
110866
|
writeFileSync(passwordFile, `${EMBEDDED_PASSWORD}
|
|
110393
110867
|
`, { mode: 384 });
|
|
@@ -110413,24 +110887,27 @@ async function initializeCluster(initdb, dataDir, context) {
|
|
|
110413
110887
|
rmSync(passwordFile, { force: true });
|
|
110414
110888
|
}
|
|
110415
110889
|
}
|
|
110416
|
-
async function startCluster(
|
|
110417
|
-
|
|
110418
|
-
|
|
110419
|
-
|
|
110420
|
-
|
|
110421
|
-
|
|
110422
|
-
|
|
110423
|
-
|
|
110424
|
-
|
|
110425
|
-
|
|
110426
|
-
|
|
110427
|
-
|
|
110428
|
-
|
|
110429
|
-
|
|
110430
|
-
|
|
110431
|
-
|
|
110432
|
-
|
|
110433
|
-
|
|
110890
|
+
async function startCluster(postgres, dataDir, logFile, context, isReachable = tcpReachable) {
|
|
110891
|
+
try {
|
|
110892
|
+
return retainedPostgresSpawner()({
|
|
110893
|
+
executable: postgres,
|
|
110894
|
+
args: ["-D", dataDir, "-p", String(EMBEDDED_PORT), "-c", `listen_addresses=${EMBEDDED_HOST}`],
|
|
110895
|
+
cwd: dataDir,
|
|
110896
|
+
logFile,
|
|
110897
|
+
...context.owner === undefined ? {} : { uid: context.owner.uid, gid: context.owner.gid }
|
|
110898
|
+
});
|
|
110899
|
+
} catch (error) {
|
|
110900
|
+
if (await isReachable(EMBEDDED_HOST, EMBEDDED_PORT, 3000))
|
|
110901
|
+
return;
|
|
110902
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
110903
|
+
throw new Error(`Could not start the embedded Postgres cluster: ${detail}${logTail(logFile)}`);
|
|
110904
|
+
}
|
|
110905
|
+
}
|
|
110906
|
+
function retainedPostgresSpawner() {
|
|
110907
|
+
if (retainedPostgresSpawnerOverride !== undefined)
|
|
110908
|
+
return retainedPostgresSpawnerOverride;
|
|
110909
|
+
const binding = createRequire2(import.meta.url)("@bastani/atomic-natives");
|
|
110910
|
+
return binding.spawnRetainedPostgres;
|
|
110434
110911
|
}
|
|
110435
110912
|
function hydrateBinaryLibraryLinks(pgCtlPath) {
|
|
110436
110913
|
const packageRoot = dirname2(dirname2(dirname2(pgCtlPath)));
|
|
@@ -110443,10 +110920,10 @@ function hydrateBinaryLibraryLinks(pgCtlPath) {
|
|
|
110443
110920
|
for (const { source, target } of manifest) {
|
|
110444
110921
|
const absoluteSource = join2(packageRoot, source);
|
|
110445
110922
|
const absoluteTarget = join2(packageRoot, target);
|
|
110446
|
-
if (
|
|
110923
|
+
if (existsSync(absoluteTarget) || !existsSync(absoluteSource))
|
|
110447
110924
|
continue;
|
|
110448
110925
|
try {
|
|
110449
|
-
symlinkSync(
|
|
110926
|
+
symlinkSync(relative2(dirname2(absoluteTarget), absoluteSource), absoluteTarget);
|
|
110450
110927
|
} catch {
|
|
110451
110928
|
try {
|
|
110452
110929
|
copyFileSync(absoluteSource, absoluteTarget);
|
|
@@ -110467,14 +110944,10 @@ async function loadEmbeddedPostgresBinaries() {
|
|
|
110467
110944
|
if (typeof binaries.pg_ctl !== "string" || typeof binaries.initdb !== "string") {
|
|
110468
110945
|
throw new Error(`Embedded Postgres package ${packageName} did not export pg_ctl/initdb paths.`);
|
|
110469
110946
|
}
|
|
110470
|
-
|
|
110471
|
-
|
|
110472
|
-
binaries.initdb,
|
|
110473
|
-
join2(dirname2(binaries.pg_ctl), process.platform === "win32" ? "postgres.exe" : "postgres")
|
|
110474
|
-
]) {
|
|
110947
|
+
const postgres = join2(dirname2(binaries.pg_ctl), process.platform === "win32" ? "postgres.exe" : "postgres");
|
|
110948
|
+
for (const binary of [binaries.pg_ctl, binaries.initdb, postgres])
|
|
110475
110949
|
ensureExecutable(binary);
|
|
110476
|
-
}
|
|
110477
|
-
return { pg_ctl: binaries.pg_ctl, initdb: binaries.initdb };
|
|
110950
|
+
return { pg_ctl: binaries.pg_ctl, initdb: binaries.initdb, postgres };
|
|
110478
110951
|
}
|
|
110479
110952
|
function ensureExecutable(filePath) {
|
|
110480
110953
|
try {
|
|
@@ -110483,34 +110956,243 @@ function ensureExecutable(filePath) {
|
|
|
110483
110956
|
chmodSync(filePath, mode | 365);
|
|
110484
110957
|
} catch {}
|
|
110485
110958
|
}
|
|
110486
|
-
async function withSetupLock(lockDir, fn) {
|
|
110487
|
-
|
|
110959
|
+
async function withSetupLock(lockDir, fn, options = {}) {
|
|
110960
|
+
const compatibilityNow = options.now;
|
|
110961
|
+
const clock = options.clock ?? (compatibilityNow === undefined ? hostLeaseTime : () => {
|
|
110962
|
+
const now = compatibilityNow();
|
|
110963
|
+
return { monotonicMs: now, wallTimeMs: now };
|
|
110964
|
+
});
|
|
110965
|
+
const wait = options.wait ?? delay;
|
|
110966
|
+
const staleMs = options.staleMs ?? SETUP_LOCK_STALE_MS;
|
|
110967
|
+
const heartbeatMs = options.heartbeatMs ?? Math.max(1, Math.floor(staleMs / 4));
|
|
110968
|
+
const attempts = options.attempts ?? READY_ATTEMPTS;
|
|
110969
|
+
const scheduleHeartbeat = options.scheduleHeartbeat ?? scheduleSetupLockHeartbeat;
|
|
110970
|
+
const isProcessAlive = options.isProcessAlive ?? processIsAlive;
|
|
110971
|
+
let lease;
|
|
110972
|
+
for (let attempt = 0;attempt < attempts; attempt += 1) {
|
|
110973
|
+
lease = acquireSetupLock(lockDir, clock(), staleMs, isProcessAlive);
|
|
110974
|
+
if (lease !== undefined)
|
|
110975
|
+
break;
|
|
110976
|
+
if (attempt === attempts - 1) {
|
|
110977
|
+
throw new Error(`Timed out waiting for another Atomic process to finish Postgres setup (${lockDir}).`);
|
|
110978
|
+
}
|
|
110979
|
+
await wait(READY_DELAY_MS);
|
|
110980
|
+
}
|
|
110981
|
+
if (lease === undefined)
|
|
110982
|
+
throw new Error(`Could not acquire the embedded Postgres setup lock (${lockDir}).`);
|
|
110983
|
+
const refresh = () => refreshSetupLockLease(lease, clock(), options.beforeHeartbeatReplace);
|
|
110984
|
+
const stopHeartbeat = scheduleHeartbeat(refresh, heartbeatMs);
|
|
110985
|
+
try {
|
|
110986
|
+
await fn({
|
|
110987
|
+
runtimePublicationLease: { ownerToken: lease.token, refresh },
|
|
110988
|
+
abandonedRuntimeStageOwnerTokens: lease.abandonedOwnerTokens
|
|
110989
|
+
});
|
|
110990
|
+
} finally {
|
|
110991
|
+
stopHeartbeat();
|
|
110992
|
+
releaseSetupLock(lease);
|
|
110993
|
+
}
|
|
110994
|
+
}
|
|
110995
|
+
function acquireSetupLock(lockDir, now, staleMs, isProcessAlive) {
|
|
110996
|
+
const abandonedOwnerTokens = new Set;
|
|
110997
|
+
for (let attempt = 0;attempt < 2; attempt += 1) {
|
|
110998
|
+
const token = `${process.pid}-${crypto.randomUUID()}`;
|
|
110999
|
+
const markerPath = join2(lockDir, `.owner-${token}`);
|
|
110488
111000
|
try {
|
|
110489
111001
|
mkdirSync(lockDir);
|
|
110490
|
-
|
|
110491
|
-
|
|
110492
|
-
|
|
110493
|
-
|
|
110494
|
-
|
|
111002
|
+
try {
|
|
111003
|
+
writeFileSync(markerPath, serializeLockOwner({ token, pid: process.pid, heartbeatMonotonicMs: now.monotonicMs }), {
|
|
111004
|
+
flag: "wx",
|
|
111005
|
+
mode: 384
|
|
111006
|
+
});
|
|
111007
|
+
return { lockDir, markerPath, token, ownerPid: process.pid, abandonedOwnerTokens };
|
|
111008
|
+
} catch (error) {
|
|
111009
|
+
try {
|
|
111010
|
+
rmdirSync(lockDir);
|
|
111011
|
+
} catch {}
|
|
111012
|
+
throw error;
|
|
110495
111013
|
}
|
|
110496
|
-
|
|
110497
|
-
|
|
110498
|
-
|
|
111014
|
+
} catch (error) {
|
|
111015
|
+
const code = error instanceof Error && "code" in error ? error.code : undefined;
|
|
111016
|
+
if (code !== "EEXIST")
|
|
111017
|
+
throw error;
|
|
110499
111018
|
}
|
|
111019
|
+
const observation = observeSetupLock(lockDir);
|
|
111020
|
+
if (observation === undefined || !setupLockIsStale(observation, now, staleMs, isProcessAlive))
|
|
111021
|
+
return;
|
|
111022
|
+
const abandoned = breakStaleSetupLock(lockDir, observation, now, staleMs, token, isProcessAlive);
|
|
111023
|
+
if (abandoned === undefined)
|
|
111024
|
+
return;
|
|
111025
|
+
for (const abandonedToken of abandoned)
|
|
111026
|
+
abandonedOwnerTokens.add(abandonedToken);
|
|
110500
111027
|
}
|
|
111028
|
+
return;
|
|
111029
|
+
}
|
|
111030
|
+
function refreshSetupLockLease(lease, now, beforeReplace) {
|
|
111031
|
+
if (!ownsSetupLock(lease))
|
|
111032
|
+
return false;
|
|
111033
|
+
const record = { token: lease.token, pid: lease.ownerPid, heartbeatMonotonicMs: now.monotonicMs };
|
|
111034
|
+
const temporaryMarkerPath = join2(lease.lockDir, `.owner-${lease.token}.tmp-${crypto.randomUUID()}`);
|
|
110501
111035
|
try {
|
|
110502
|
-
|
|
110503
|
-
|
|
110504
|
-
|
|
111036
|
+
writeFileSync(temporaryMarkerPath, serializeLockOwner(record), {
|
|
111037
|
+
flag: "wx",
|
|
111038
|
+
mode: 384,
|
|
111039
|
+
flush: true
|
|
111040
|
+
});
|
|
111041
|
+
beforeReplace?.(temporaryMarkerPath);
|
|
111042
|
+
if (!ownsSetupLock(lease)) {
|
|
111043
|
+
removeMarkerIfOwned(temporaryMarkerPath, record);
|
|
111044
|
+
return false;
|
|
111045
|
+
}
|
|
111046
|
+
renameSync(temporaryMarkerPath, lease.markerPath);
|
|
111047
|
+
return ownsSetupLock(lease);
|
|
111048
|
+
} catch {
|
|
111049
|
+
removeMarkerIfOwned(temporaryMarkerPath, record);
|
|
111050
|
+
return false;
|
|
110505
111051
|
}
|
|
110506
111052
|
}
|
|
110507
|
-
function
|
|
111053
|
+
function removeMarkerIfOwned(path, expected) {
|
|
110508
111054
|
try {
|
|
110509
|
-
|
|
111055
|
+
if (!lstatSync(path).isFile())
|
|
111056
|
+
return;
|
|
111057
|
+
const record = parseLockOwner(readFileSync(path, "utf8"));
|
|
111058
|
+
if (record?.token === expected.token && record.pid === expected.pid && record.heartbeatMonotonicMs === expected.heartbeatMonotonicMs) {
|
|
111059
|
+
rmSync(path, { force: true });
|
|
111060
|
+
}
|
|
111061
|
+
} catch {}
|
|
111062
|
+
}
|
|
111063
|
+
function ownsSetupLock(lease) {
|
|
111064
|
+
try {
|
|
111065
|
+
const record = parseLockOwner(readFileSync(lease.markerPath, "utf8"));
|
|
111066
|
+
return record?.token === lease.token && record.pid === lease.ownerPid && lstatSync(lease.markerPath).isFile();
|
|
110510
111067
|
} catch {
|
|
110511
111068
|
return false;
|
|
110512
111069
|
}
|
|
110513
111070
|
}
|
|
111071
|
+
function releaseSetupLock(lease) {
|
|
111072
|
+
if (!ownsSetupLock(lease))
|
|
111073
|
+
return;
|
|
111074
|
+
rmSync(lease.markerPath, { force: true });
|
|
111075
|
+
try {
|
|
111076
|
+
rmdirSync(lease.lockDir);
|
|
111077
|
+
} catch {}
|
|
111078
|
+
}
|
|
111079
|
+
function breakStaleSetupLock(lockDir, observed, now, staleMs, token, isProcessAlive) {
|
|
111080
|
+
const breakPath = `${lockDir}.stale-${token}`;
|
|
111081
|
+
try {
|
|
111082
|
+
renameSync(lockDir, breakPath);
|
|
111083
|
+
} catch {
|
|
111084
|
+
return;
|
|
111085
|
+
}
|
|
111086
|
+
const displaced = observeSetupLock(breakPath);
|
|
111087
|
+
if (displaced === undefined || displaced.fingerprint !== observed.fingerprint || !setupLockIsStale(displaced, now, staleMs, isProcessAlive)) {
|
|
111088
|
+
try {
|
|
111089
|
+
renameSync(breakPath, lockDir);
|
|
111090
|
+
} catch {}
|
|
111091
|
+
return;
|
|
111092
|
+
}
|
|
111093
|
+
const abandoned = displaced.owners.filter((owner) => !isProcessAlive(owner.pid)).map((owner) => owner.token);
|
|
111094
|
+
rmSync(breakPath, { recursive: true, force: true });
|
|
111095
|
+
return abandoned;
|
|
111096
|
+
}
|
|
111097
|
+
function observeSetupLock(path) {
|
|
111098
|
+
try {
|
|
111099
|
+
const parts = [];
|
|
111100
|
+
const owners = [];
|
|
111101
|
+
let latestMtimeMs = Number.NEGATIVE_INFINITY;
|
|
111102
|
+
let hasUnexpectedState = false;
|
|
111103
|
+
const visit = (entryPath, name) => {
|
|
111104
|
+
const stat = lstatSync(entryPath);
|
|
111105
|
+
latestMtimeMs = Math.max(latestMtimeMs, stat.mtimeMs);
|
|
111106
|
+
let type = "other";
|
|
111107
|
+
if (stat.isDirectory())
|
|
111108
|
+
type = "directory";
|
|
111109
|
+
else if (stat.isFile())
|
|
111110
|
+
type = "file";
|
|
111111
|
+
else if (stat.isSymbolicLink())
|
|
111112
|
+
type = "link";
|
|
111113
|
+
parts.push(`${name}:${type}:${stat.dev}:${stat.ino}:${stat.size}:${stat.mtimeMs}`);
|
|
111114
|
+
if (stat.isDirectory()) {
|
|
111115
|
+
for (const child of readdirSync(entryPath).sort())
|
|
111116
|
+
visit(join2(entryPath, child), `${name}/${child}`);
|
|
111117
|
+
} else if (stat.isFile()) {
|
|
111118
|
+
const contents = readFileSync(entryPath, "utf8");
|
|
111119
|
+
parts.push(contents);
|
|
111120
|
+
const owner = parseLockOwner(contents);
|
|
111121
|
+
if (owner !== undefined && markerNameMatchesOwner(name, owner))
|
|
111122
|
+
owners.push(owner);
|
|
111123
|
+
else
|
|
111124
|
+
hasUnexpectedState = true;
|
|
111125
|
+
} else if (stat.isSymbolicLink()) {
|
|
111126
|
+
parts.push(readlinkSync(entryPath));
|
|
111127
|
+
hasUnexpectedState = true;
|
|
111128
|
+
} else {
|
|
111129
|
+
hasUnexpectedState = true;
|
|
111130
|
+
}
|
|
111131
|
+
};
|
|
111132
|
+
visit(path, ".");
|
|
111133
|
+
return { fingerprint: parts.join("\x00"), latestMtimeMs, owners, hasUnexpectedState };
|
|
111134
|
+
} catch {
|
|
111135
|
+
return;
|
|
111136
|
+
}
|
|
111137
|
+
}
|
|
111138
|
+
function markerNameMatchesOwner(name, owner) {
|
|
111139
|
+
const stableName = `./.owner-${owner.token}`;
|
|
111140
|
+
return name === stableName || name.startsWith(`${stableName}.tmp-`);
|
|
111141
|
+
}
|
|
111142
|
+
function setupLockIsStale(observation, now, staleMs, isProcessAlive) {
|
|
111143
|
+
for (const owner of observation.owners) {
|
|
111144
|
+
if (!isProcessAlive(owner.pid))
|
|
111145
|
+
continue;
|
|
111146
|
+
if (now.monotonicMs >= owner.heartbeatMonotonicMs && now.monotonicMs - owner.heartbeatMonotonicMs <= staleMs) {
|
|
111147
|
+
return false;
|
|
111148
|
+
}
|
|
111149
|
+
}
|
|
111150
|
+
if (!observation.hasUnexpectedState)
|
|
111151
|
+
return observation.owners.length > 0;
|
|
111152
|
+
return now.wallTimeMs < observation.latestMtimeMs || now.wallTimeMs - observation.latestMtimeMs > staleMs;
|
|
111153
|
+
}
|
|
111154
|
+
function serializeLockOwner(owner) {
|
|
111155
|
+
const serialized = JSON.stringify(owner);
|
|
111156
|
+
if (serialized.length > 255)
|
|
111157
|
+
throw new Error("Embedded Postgres setup-lock owner record is unexpectedly large.");
|
|
111158
|
+
return serialized.padEnd(256, `
|
|
111159
|
+
`);
|
|
111160
|
+
}
|
|
111161
|
+
function parseLockOwner(value2) {
|
|
111162
|
+
try {
|
|
111163
|
+
const parsed = JSON.parse(value2);
|
|
111164
|
+
if (typeof parsed.token !== "string" || parsed.token === "" || !Number.isInteger(parsed.pid) || (parsed.pid ?? 0) <= 0 || !Number.isFinite(parsed.heartbeatMonotonicMs) || (parsed.heartbeatMonotonicMs ?? -1) < 0) {
|
|
111165
|
+
return;
|
|
111166
|
+
}
|
|
111167
|
+
return {
|
|
111168
|
+
token: parsed.token,
|
|
111169
|
+
pid: parsed.pid,
|
|
111170
|
+
heartbeatMonotonicMs: parsed.heartbeatMonotonicMs
|
|
111171
|
+
};
|
|
111172
|
+
} catch {
|
|
111173
|
+
return;
|
|
111174
|
+
}
|
|
111175
|
+
}
|
|
111176
|
+
function hostLeaseTime() {
|
|
111177
|
+
return { monotonicMs: uptime() * 1000, wallTimeMs: Date.now() };
|
|
111178
|
+
}
|
|
111179
|
+
function processIsAlive(pid) {
|
|
111180
|
+
try {
|
|
111181
|
+
process.kill(pid, 0);
|
|
111182
|
+
return true;
|
|
111183
|
+
} catch (error) {
|
|
111184
|
+
const code = error instanceof Error && "code" in error ? error.code : undefined;
|
|
111185
|
+
return code !== "ESRCH";
|
|
111186
|
+
}
|
|
111187
|
+
}
|
|
111188
|
+
function scheduleSetupLockHeartbeat(heartbeat, intervalMs) {
|
|
111189
|
+
const timer = setInterval(() => {
|
|
111190
|
+
if (!heartbeat())
|
|
111191
|
+
clearInterval(timer);
|
|
111192
|
+
}, intervalMs);
|
|
111193
|
+
timer.unref();
|
|
111194
|
+
return () => clearInterval(timer);
|
|
111195
|
+
}
|
|
110514
111196
|
function logTail(logFile) {
|
|
110515
111197
|
try {
|
|
110516
111198
|
const lines = readFileSync(logFile, "utf8").trimEnd().split(`
|
|
@@ -110533,6 +111215,8 @@ var resolution;
|
|
|
110533
111215
|
var resolvedProvider;
|
|
110534
111216
|
var embeddedProvider = ensureEmbeddedDbosPostgres;
|
|
110535
111217
|
var dockerProvider = ensureDockerDbosPostgres;
|
|
111218
|
+
var shutdownEmbeddedProvider = shutdownEmbeddedDbosPostgres;
|
|
111219
|
+
var embeddedShutdown;
|
|
110536
111220
|
function resolveDbosSystemDatabaseUrl() {
|
|
110537
111221
|
resolution ??= resolve().catch((error) => {
|
|
110538
111222
|
resolution = undefined;
|
|
@@ -110543,6 +111227,18 @@ function resolveDbosSystemDatabaseUrl() {
|
|
|
110543
111227
|
async function provisionResolvedLocalDbos() {
|
|
110544
111228
|
await (resolvedProvider ?? embeddedProvider)();
|
|
110545
111229
|
}
|
|
111230
|
+
function shutdownResolvedLocalDbos() {
|
|
111231
|
+
if (resolvedProvider !== embeddedProvider)
|
|
111232
|
+
return Promise.resolve();
|
|
111233
|
+
embeddedShutdown ??= shutdownEmbeddedProvider().then(() => {
|
|
111234
|
+
resolvedProvider = undefined;
|
|
111235
|
+
embeddedShutdown = undefined;
|
|
111236
|
+
}, (error) => {
|
|
111237
|
+
embeddedShutdown = undefined;
|
|
111238
|
+
throw error;
|
|
111239
|
+
});
|
|
111240
|
+
return embeddedShutdown;
|
|
111241
|
+
}
|
|
110546
111242
|
function shouldProvisionLocalDbos(error) {
|
|
110547
111243
|
if (process.env.DBOS_SYSTEM_DATABASE_URL?.trim())
|
|
110548
111244
|
return false;
|
|
@@ -110559,6 +111255,10 @@ async function resolve() {
|
|
|
110559
111255
|
resolvedProvider = embeddedProvider;
|
|
110560
111256
|
return EMBEDDED_DBOS_SYSTEM_DATABASE_URL;
|
|
110561
111257
|
} catch (embeddedError) {
|
|
111258
|
+
if (embeddedError instanceof EmbeddedPostgresCleanupPendingError) {
|
|
111259
|
+
resolvedProvider = embeddedProvider;
|
|
111260
|
+
throw embeddedError;
|
|
111261
|
+
}
|
|
110562
111262
|
try {
|
|
110563
111263
|
await dockerProvider();
|
|
110564
111264
|
resolvedProvider = dockerProvider;
|
|
@@ -110727,6 +111427,7 @@ var defaultConfigurator = async () => {
|
|
|
110727
111427
|
};
|
|
110728
111428
|
var configureDurability = defaultConfigurator;
|
|
110729
111429
|
var provisionLocalDbos = provisionResolvedLocalDbos;
|
|
111430
|
+
var shutdownLocalDbos = shutdownResolvedLocalDbos;
|
|
110730
111431
|
function owner() {
|
|
110731
111432
|
return getDbosProcessOwner();
|
|
110732
111433
|
}
|
|
@@ -110737,6 +111438,11 @@ async function durabilityFailure(action, error) {
|
|
|
110737
111438
|
const cause = error instanceof Error ? { cause: error } : undefined;
|
|
110738
111439
|
return new DbosDurabilityError(`DBOS workflow durability ${action} failed: ${detail}. ${guidance}`, cause);
|
|
110739
111440
|
}
|
|
111441
|
+
function combinedShutdownFailure(errors) {
|
|
111442
|
+
if (errors.length === 1)
|
|
111443
|
+
return errors[0];
|
|
111444
|
+
return new AggregateError(errors, errors.map((error) => readDbosFailureDetail(error)).join("; "));
|
|
111445
|
+
}
|
|
110740
111446
|
async function configureDbosOnce() {
|
|
110741
111447
|
const slot = owner();
|
|
110742
111448
|
if (slot.failure !== undefined)
|
|
@@ -110806,17 +111512,29 @@ async function shutdownDbos() {
|
|
|
110806
111512
|
const durability = await configuredPromise.catch(() => {
|
|
110807
111513
|
return;
|
|
110808
111514
|
});
|
|
110809
|
-
if (durability === undefined)
|
|
111515
|
+
if (durability === undefined) {
|
|
111516
|
+
await shutdownLocalDbos();
|
|
110810
111517
|
return;
|
|
111518
|
+
}
|
|
110811
111519
|
if (slot.launchPromise !== undefined)
|
|
110812
111520
|
await slot.launchPromise.catch(() => {
|
|
110813
111521
|
return;
|
|
110814
111522
|
});
|
|
110815
|
-
if (slot.state !== "ready")
|
|
111523
|
+
if (slot.state !== "ready") {
|
|
111524
|
+
await shutdownLocalDbos();
|
|
110816
111525
|
return;
|
|
111526
|
+
}
|
|
110817
111527
|
slot.state = "shutting_down";
|
|
110818
|
-
|
|
110819
|
-
|
|
111528
|
+
const errors = [];
|
|
111529
|
+
for (const shutdown of [() => durability.backend.flush(), () => durability.shutdown(), shutdownLocalDbos]) {
|
|
111530
|
+
try {
|
|
111531
|
+
await shutdown();
|
|
111532
|
+
} catch (error) {
|
|
111533
|
+
errors.push(error);
|
|
111534
|
+
}
|
|
111535
|
+
}
|
|
111536
|
+
if (errors.length > 0)
|
|
111537
|
+
throw combinedShutdownFailure(errors);
|
|
110820
111538
|
slot.state = "shut_down";
|
|
110821
111539
|
})().catch(async (error) => {
|
|
110822
111540
|
slot.failure = await durabilityFailure("shutdown", error);
|
|
@@ -113199,7 +113917,7 @@ async function recordWorkflowHeartbeatAnchor(backend, record) {
|
|
|
113199
113917
|
}
|
|
113200
113918
|
|
|
113201
113919
|
// dist/builtin/workflows/src/extension/config-loader.ts
|
|
113202
|
-
import { isAbsolute, join as join3 } from "node:path";
|
|
113920
|
+
import { isAbsolute as isAbsolute2, join as join3 } from "node:path";
|
|
113203
113921
|
import { CONFIG_DIR_NAME, CONFIG_DIR_NAMES, getAgentDir, getAgentDirs, getProjectConfigPaths } from "@bastani/atomic";
|
|
113204
113922
|
|
|
113205
113923
|
// dist/builtin/workflows/src/shared/budget.ts
|
|
@@ -113501,7 +114219,7 @@ function resolveWorkflowPaths(workflows, baseDir) {
|
|
|
113501
114219
|
}
|
|
113502
114220
|
return Object.fromEntries(Object.entries(workflows).map(([name, entry]) => [
|
|
113503
114221
|
name,
|
|
113504
|
-
|
|
114222
|
+
isAbsolute2(entry.path) ? entry.path : join3(baseDir, entry.path)
|
|
113505
114223
|
]));
|
|
113506
114224
|
}
|
|
113507
114225
|
function workflowAgentDirs(opts) {
|
|
@@ -113524,7 +114242,7 @@ function toScopedDiscoveryConfig(globalConfig, projectConfig, opts) {
|
|
|
113524
114242
|
if (hasWorkflows(globalConfig)) {
|
|
113525
114243
|
const projectKeys = new Set(Object.keys(projectWorkflows ?? {}));
|
|
113526
114244
|
const globalEntries = Object.entries(globalConfig.workflows).filter(([name]) => !projectKeys.has(name)).map(([name, entry]) => {
|
|
113527
|
-
return [name,
|
|
114245
|
+
return [name, isAbsolute2(entry.path) ? entry.path : join3(globalBase, entry.path)];
|
|
113528
114246
|
});
|
|
113529
114247
|
if (globalEntries.length > 0) {
|
|
113530
114248
|
result.globalWorkflows = Object.fromEntries(globalEntries);
|
|
@@ -113912,7 +114630,7 @@ function withSteeringPropagationContext(ctx) {
|
|
|
113912
114630
|
}
|
|
113913
114631
|
|
|
113914
114632
|
// dist/builtin/workflows/builtin/adversarial-verification-runner.ts
|
|
113915
|
-
import { readFile, writeFile } from "node:fs/promises";
|
|
114633
|
+
import { readFile, writeFile as writeFile2 } from "node:fs/promises";
|
|
113916
114634
|
import { join as join5 } from "node:path";
|
|
113917
114635
|
import { Type as Type3 } from "typebox";
|
|
113918
114636
|
|
|
@@ -114322,12 +115040,12 @@ async function warm_first_fan_out(ctx, steps, prefixKeyOf, options = {}) {
|
|
|
114322
115040
|
|
|
114323
115041
|
// dist/builtin/workflows/builtin/pattern-artifact-root.ts
|
|
114324
115042
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
114325
|
-
import { mkdir } from "node:fs/promises";
|
|
115043
|
+
import { mkdir as mkdir2 } from "node:fs/promises";
|
|
114326
115044
|
import { join as join4 } from "node:path";
|
|
114327
115045
|
async function stableArtifactRoot(ctx, workflowName) {
|
|
114328
115046
|
const cwd = ctx.cwd ?? process.cwd();
|
|
114329
115047
|
const artifactDir = await ctx.tool("artifact-root", { workflow: workflowName }, async () => join4(cwd, ".atomic", "workflows", "runs", `${workflowName}-${randomUUID2()}`));
|
|
114330
|
-
await
|
|
115048
|
+
await mkdir2(artifactDir, { recursive: true });
|
|
114331
115049
|
return artifactDir;
|
|
114332
115050
|
}
|
|
114333
115051
|
|
|
@@ -114471,7 +115189,7 @@ function scoreStep(cell, reaskWave, head, criteriaPath) {
|
|
|
114471
115189
|
}
|
|
114472
115190
|
async function writeInvalid(path, stage) {
|
|
114473
115191
|
const marker = { invalid: true, stage };
|
|
114474
|
-
await
|
|
115192
|
+
await writeFile2(path, `${JSON.stringify(marker, null, 2)}
|
|
114475
115193
|
`);
|
|
114476
115194
|
}
|
|
114477
115195
|
async function runAdversarialVerification(ctx) {
|
|
@@ -114479,7 +115197,7 @@ async function runAdversarialVerification(ctx) {
|
|
|
114479
115197
|
const criteriaPath = join5(root, "criteria.md");
|
|
114480
115198
|
const candidatePath = join5(root, "candidate.md");
|
|
114481
115199
|
const resolvedCriteria = resolveCriteria(ctx.inputs.criteria);
|
|
114482
|
-
await
|
|
115200
|
+
await writeFile2(criteriaPath, renderCriteriaMarkdown(resolvedCriteria));
|
|
114483
115201
|
await ctx.task("worker", { prompt: renderWorkerPrompt(ctx.inputs.task), context: "fresh", output: candidatePath, outputMode: "file-only" });
|
|
114484
115202
|
const verifierCount = ctx.inputs.verifier_count ?? 3;
|
|
114485
115203
|
const maxRepairs = ctx.inputs.max_repairs ?? 2;
|
|
@@ -114529,7 +115247,7 @@ async function runAdversarialVerification(ctx) {
|
|
|
114529
115247
|
const report = byName.get(stageName(cell, reaskWave));
|
|
114530
115248
|
const artifactPath = reaskWave === 0 ? cell.artifactPath : cell.artifactPath.replace(/\.json$/, `-reask-${reaskWave}.json`);
|
|
114531
115249
|
if (isCriterionScore(report?.structured, cell.criterion.id)) {
|
|
114532
|
-
await
|
|
115250
|
+
await writeFile2(artifactPath, `${JSON.stringify(report.structured, null, 2)}
|
|
114533
115251
|
`);
|
|
114534
115252
|
valid.push({ cell, report: report.structured, artifactPath });
|
|
114535
115253
|
} else {
|
|
@@ -114573,18 +115291,18 @@ async function runAdversarialVerification(ctx) {
|
|
|
114573
115291
|
};
|
|
114574
115292
|
if (decision.kind === "accept") {
|
|
114575
115293
|
remainingWork = [];
|
|
114576
|
-
await
|
|
115294
|
+
await writeFile2(scoreTablePath, `${JSON.stringify(summary, null, 2)}
|
|
114577
115295
|
`);
|
|
114578
|
-
await
|
|
115296
|
+
await writeFile2(reviewReportPath, `${JSON.stringify({ decision, remaining_work: [] }, null, 2)}
|
|
114579
115297
|
`);
|
|
114580
115298
|
break;
|
|
114581
115299
|
}
|
|
114582
115300
|
if (decision.kind === "indeterminate") {
|
|
114583
115301
|
consecutiveIndeterminate += 1;
|
|
114584
115302
|
remainingWork = [quorumEvidence(decision.missing, invalidCount, expectedCount, reaskLimit)];
|
|
114585
|
-
await
|
|
115303
|
+
await writeFile2(scoreTablePath, `${JSON.stringify(summary, null, 2)}
|
|
114586
115304
|
`);
|
|
114587
|
-
await
|
|
115305
|
+
await writeFile2(reviewReportPath, `${JSON.stringify({ decision, evidence: remainingWork, remaining_work: remainingWork }, null, 2)}
|
|
114588
115306
|
`);
|
|
114589
115307
|
if (consecutiveIndeterminate >= 2)
|
|
114590
115308
|
break;
|
|
@@ -114602,9 +115320,9 @@ async function runAdversarialVerification(ctx) {
|
|
|
114602
115320
|
const fallbackRemaining = confirmedFindings.length > 0 ? confirmedFindings : [`Mean score ${decision.mean} is below the acceptance threshold ${acceptMean}.`];
|
|
114603
115321
|
const consolidatedReport = structured(consolidated.structured, isConsolidatedReport) ?? { repair_guidance: "Confirmed verifier findings require repair.", remaining_work: fallbackRemaining };
|
|
114604
115322
|
remainingWork = fallbackRemaining;
|
|
114605
|
-
await
|
|
115323
|
+
await writeFile2(scoreTablePath, `${JSON.stringify(summary, null, 2)}
|
|
114606
115324
|
`);
|
|
114607
|
-
await
|
|
115325
|
+
await writeFile2(reviewReportPath, `${JSON.stringify({ ...consolidatedReport, remaining_work: remainingWork }, null, 2)}
|
|
114608
115326
|
`);
|
|
114609
115327
|
if (repairsCompleted >= maxRepairs)
|
|
114610
115328
|
break;
|
|
@@ -114659,7 +115377,7 @@ var adversarial_verification_default = workflow({
|
|
|
114659
115377
|
import { Type as Type6 } from "typebox";
|
|
114660
115378
|
|
|
114661
115379
|
// dist/builtin/workflows/builtin/classify-and-act-runner.ts
|
|
114662
|
-
import { writeFile as
|
|
115380
|
+
import { writeFile as writeFile3 } from "node:fs/promises";
|
|
114663
115381
|
import { join as join6 } from "node:path";
|
|
114664
115382
|
import { Type as Type5 } from "typebox";
|
|
114665
115383
|
|
|
@@ -114764,7 +115482,7 @@ async function runClassifyAndAct(ctx) {
|
|
|
114764
115482
|
const fallback = needsFallback ? await resolveFallbackCategory(ctx, exactCategory) : undefined;
|
|
114765
115483
|
const category = fallback?.category ?? exactCategory;
|
|
114766
115484
|
const classificationPath = join6(artifactDir, "classification.json");
|
|
114767
|
-
await
|
|
115485
|
+
await writeFile3(classificationPath, JSON.stringify({
|
|
114768
115486
|
proposed_category: proposedCategory,
|
|
114769
115487
|
selected_category: category,
|
|
114770
115488
|
confidence,
|
|
@@ -114822,7 +115540,7 @@ var classify_and_act_default = workflow({
|
|
|
114822
115540
|
import { Type as Type8 } from "typebox";
|
|
114823
115541
|
|
|
114824
115542
|
// dist/builtin/workflows/builtin/fan-out-and-synthesize-runner.ts
|
|
114825
|
-
import { writeFile as
|
|
115543
|
+
import { writeFile as writeFile4 } from "node:fs/promises";
|
|
114826
115544
|
import { join as join7 } from "node:path";
|
|
114827
115545
|
import { Type as Type7 } from "typebox";
|
|
114828
115546
|
|
|
@@ -114940,7 +115658,7 @@ async function runFanOutAndSynthesize(ctx) {
|
|
|
114940
115658
|
});
|
|
114941
115659
|
const partitions = parsedPartitions(plan.structured, ctx.inputs.max_branches, ctx.inputs.prompt);
|
|
114942
115660
|
const partitionPath = join7(artifactDir, "partition-plan.json");
|
|
114943
|
-
await
|
|
115661
|
+
await writeFile4(partitionPath, JSON.stringify({ task: ctx.inputs.prompt, partitions }, null, 2));
|
|
114944
115662
|
const branchPaths = partitions.map((partition, index) => join7(artifactDir, `branch-${safeName2(partition.label, index)}.md`));
|
|
114945
115663
|
const steps = partitions.map((partition, index) => ({
|
|
114946
115664
|
name: `branch-${safeName2(partition.label, index)}`,
|
|
@@ -114952,7 +115670,7 @@ async function runFanOutAndSynthesize(ctx) {
|
|
|
114952
115670
|
}));
|
|
114953
115671
|
await ctx.parallel(steps, { concurrency: Math.min(ctx.inputs.max_concurrency, partitions.length), failFast: false });
|
|
114954
115672
|
const manifestPath = join7(artifactDir, "manifest.json");
|
|
114955
|
-
await
|
|
115673
|
+
await writeFile4(manifestPath, JSON.stringify({
|
|
114956
115674
|
task: ctx.inputs.prompt,
|
|
114957
115675
|
partition_plan: partitionPath,
|
|
114958
115676
|
branches: partitions.map((partition, index) => ({ ...partition, artifact_path: branchPaths[index] }))
|
|
@@ -115009,7 +115727,7 @@ var fan_out_and_synthesize_default = workflow({
|
|
|
115009
115727
|
import { Type as Type10 } from "typebox";
|
|
115010
115728
|
|
|
115011
115729
|
// dist/builtin/workflows/builtin/generate-and-filter-runner.ts
|
|
115012
|
-
import { readFile as readFile2, writeFile as
|
|
115730
|
+
import { readFile as readFile2, writeFile as writeFile5 } from "node:fs/promises";
|
|
115013
115731
|
import { join as join8 } from "node:path";
|
|
115014
115732
|
import { Type as Type9 } from "typebox";
|
|
115015
115733
|
|
|
@@ -115141,7 +115859,7 @@ async function runGenerateAndFilter(ctx) {
|
|
|
115141
115859
|
outputMode: "file-only"
|
|
115142
115860
|
})), { concurrency: ctx.inputs.max_concurrency, failFast: false });
|
|
115143
115861
|
const manifestPath = join8(root, "manifest.json");
|
|
115144
|
-
await
|
|
115862
|
+
await writeFile5(manifestPath, JSON.stringify({ task: ctx.inputs.prompt, candidate_artifact_paths: candidatePaths }, null, 2));
|
|
115145
115863
|
const filterPath = join8(root, "filter.json");
|
|
115146
115864
|
const filtered = await ctx.task("dedupe-and-filter", {
|
|
115147
115865
|
prompt: renderFilterPrompt(ctx.inputs.prompt, candidatePaths, shortlistLimit),
|
|
@@ -115150,7 +115868,7 @@ async function runGenerateAndFilter(ctx) {
|
|
|
115150
115868
|
schema: filterSchema
|
|
115151
115869
|
});
|
|
115152
115870
|
const filteredDecision = filterDecision(filtered.structured);
|
|
115153
|
-
await
|
|
115871
|
+
await writeFile5(filterPath, `${JSON.stringify(filteredDecision ?? { shortlist: [], discarded: [] }, null, 2)}
|
|
115154
115872
|
`);
|
|
115155
115873
|
const selectCandidates = (paths) => [...new Set(paths.filter((path) => candidatePaths.includes(path)))].slice(0, shortlistLimit);
|
|
115156
115874
|
const fallbackShortlist = candidatePaths.slice(0, shortlistLimit);
|
|
@@ -115169,7 +115887,7 @@ async function runGenerateAndFilter(ctx) {
|
|
|
115169
115887
|
schema: judgeSchema
|
|
115170
115888
|
});
|
|
115171
115889
|
const judgedDecision = judgeDecision(judged.structured);
|
|
115172
|
-
await
|
|
115890
|
+
await writeFile5(judgePath, `${JSON.stringify(judgedDecision ?? { shortlist: [], rationale: "Judge stage produced no valid structured decision." }, null, 2)}
|
|
115173
115891
|
`);
|
|
115174
115892
|
const judgedShortlist = selectCandidates(judgedDecision?.shortlist ?? []);
|
|
115175
115893
|
shortlist = judgedShortlist.length > 0 ? judgedShortlist : shortlist;
|
|
@@ -115538,7 +116256,7 @@ var DEFAULT_BLOCKER_THRESHOLD = 3;
|
|
|
115538
116256
|
var LEDGER_FILENAME = "goal-ledger.json";
|
|
115539
116257
|
|
|
115540
116258
|
// dist/builtin/workflows/builtin/goal-artifacts.ts
|
|
115541
|
-
import { writeFile as
|
|
116259
|
+
import { writeFile as writeFile6 } from "node:fs/promises";
|
|
115542
116260
|
import { join as join9 } from "node:path";
|
|
115543
116261
|
|
|
115544
116262
|
// dist/builtin/workflows/builtin/review-convergence.ts
|
|
@@ -115639,7 +116357,7 @@ function withoutTurn(value2) {
|
|
|
115639
116357
|
}
|
|
115640
116358
|
async function writeReviewArtifact(artifactDir, reviewer, decision, rawText, convergenceDecision) {
|
|
115641
116359
|
const artifactPath = join9(artifactDir, `review-${artifactSafeName(reviewer)}.json`);
|
|
115642
|
-
await
|
|
116360
|
+
await writeFile6(artifactPath, `${JSON.stringify({ reviewer, decision, convergence_decision: convergenceDecision, raw_text: rawText }, null, 2)}
|
|
115643
116361
|
`, { encoding: "utf8" });
|
|
115644
116362
|
return artifactPath;
|
|
115645
116363
|
}
|
|
@@ -115649,20 +116367,20 @@ async function writeReviewRoundArtifact(artifactDir, reviews, consolidatedFindin
|
|
|
115649
116367
|
}))), reverification = []) {
|
|
115650
116368
|
const artifactPath = join9(artifactDir, "review-round-latest.json");
|
|
115651
116369
|
const visibleReviews = reviews.map(withoutTurn);
|
|
115652
|
-
await
|
|
116370
|
+
await writeFile6(artifactPath, `${JSON.stringify({ reviews: visibleReviews, consolidated_findings: consolidatedFindings, reverification }, null, 2)}
|
|
115653
116371
|
`, { encoding: "utf8" });
|
|
115654
116372
|
return artifactPath;
|
|
115655
116373
|
}
|
|
115656
116374
|
|
|
115657
116375
|
// dist/builtin/workflows/builtin/goal-ledger.ts
|
|
115658
116376
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
115659
|
-
import { writeFile as
|
|
116377
|
+
import { writeFile as writeFile7 } from "node:fs/promises";
|
|
115660
116378
|
import { join as join11 } from "node:path";
|
|
115661
116379
|
|
|
115662
116380
|
// dist/builtin/workflows/src/shared/workflow-artifacts.ts
|
|
115663
116381
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
115664
|
-
import { existsSync as
|
|
115665
|
-
import { mkdir as
|
|
116382
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
116383
|
+
import { mkdir as mkdir3, readdir as readdir2, rm as rm2, stat } from "node:fs/promises";
|
|
115666
116384
|
import { dirname as dirname3, join as join10 } from "node:path";
|
|
115667
116385
|
import { getAgentDir as getAgentDir2, getEnvValue as getEnvValue2 } from "@bastani/atomic";
|
|
115668
116386
|
|
|
@@ -115700,7 +116418,7 @@ function workflowRunHasArtifactReference(run) {
|
|
|
115700
116418
|
function workflowRunArtifactsIntact(run) {
|
|
115701
116419
|
if (!workflowRunHasArtifactReference(run))
|
|
115702
116420
|
return;
|
|
115703
|
-
return
|
|
116421
|
+
return existsSync2(workflowArtifactRunPath(run.id));
|
|
115704
116422
|
}
|
|
115705
116423
|
function workflowRunResumeCandidate(run) {
|
|
115706
116424
|
const artifactsIntact = workflowRunArtifactsIntact(run);
|
|
@@ -115779,7 +116497,7 @@ async function deleteTerminalDurableEntry(runId) {
|
|
|
115779
116497
|
}
|
|
115780
116498
|
async function pruneWorkflowArtifactRuns(root = workflowArtifactRunsRoot(), now = Date.now(), stateResolver) {
|
|
115781
116499
|
try {
|
|
115782
|
-
const entries = await
|
|
116500
|
+
const entries = await readdir2(root, { withFileTypes: true, encoding: "utf8" });
|
|
115783
116501
|
for (const entry of entries) {
|
|
115784
116502
|
if (!entry.isDirectory())
|
|
115785
116503
|
continue;
|
|
@@ -115801,7 +116519,7 @@ async function pruneWorkflowArtifactRuns(root = workflowArtifactRunsRoot(), now
|
|
|
115801
116519
|
continue;
|
|
115802
116520
|
if (state === "terminal" && !await deleteTerminalDurableEntry(entry.name))
|
|
115803
116521
|
continue;
|
|
115804
|
-
await
|
|
116522
|
+
await rm2(entryPath, { recursive: true, force: true });
|
|
115805
116523
|
}
|
|
115806
116524
|
} catch (error) {
|
|
115807
116525
|
if (error instanceof Error && "code" in error && error.code === "ENOENT")
|
|
@@ -115833,14 +116551,14 @@ async function ensureWorkflowArtifactRunDirectory(runId) {
|
|
|
115833
116551
|
const root = workflowArtifactRunsRoot();
|
|
115834
116552
|
await pruneArtifactRootIfDue(root, Date.now());
|
|
115835
116553
|
const directory = workflowArtifactRunPath(runId);
|
|
115836
|
-
await
|
|
116554
|
+
await mkdir3(directory, { recursive: true });
|
|
115837
116555
|
return directory;
|
|
115838
116556
|
}
|
|
115839
116557
|
async function createWorkflowArtifactDirectory(runId) {
|
|
115840
116558
|
const effectiveRunId = runId ?? randomUUID3();
|
|
115841
116559
|
const runDirectory = await ensureWorkflowArtifactRunDirectory(effectiveRunId);
|
|
115842
116560
|
const artifactDirectory = join10(runDirectory, `artifact-${randomUUID3()}`);
|
|
115843
|
-
await
|
|
116561
|
+
await mkdir3(artifactDirectory, { recursive: true });
|
|
115844
116562
|
return artifactDirectory;
|
|
115845
116563
|
}
|
|
115846
116564
|
|
|
@@ -115903,7 +116621,7 @@ async function createGoalLedger(objective, acceptanceCriteria = objective, runId
|
|
|
115903
116621
|
}
|
|
115904
116622
|
async function writeGoalLedger(ledgerPath, ledger) {
|
|
115905
116623
|
ledger.updated_at = new Date().toISOString();
|
|
115906
|
-
await
|
|
116624
|
+
await writeFile7(ledgerPath, `${JSON.stringify(modelVisibleLedger(ledger), null, 2)}
|
|
115907
116625
|
`, {
|
|
115908
116626
|
encoding: "utf8"
|
|
115909
116627
|
});
|
|
@@ -117993,7 +118711,7 @@ var open_claude_design_default = workflow({
|
|
|
117993
118711
|
import { Type as Type18 } from "typebox";
|
|
117994
118712
|
|
|
117995
118713
|
// dist/builtin/workflows/builtin/loop-until-done-runner.ts
|
|
117996
|
-
import { mkdir as
|
|
118714
|
+
import { mkdir as mkdir4, writeFile as writeFile8 } from "node:fs/promises";
|
|
117997
118715
|
import { join as join15 } from "node:path";
|
|
117998
118716
|
import { Type as Type17 } from "typebox";
|
|
117999
118717
|
|
|
@@ -118150,7 +118868,7 @@ function evaluationFrom(result) {
|
|
|
118150
118868
|
}
|
|
118151
118869
|
async function writeLedger(path, task, maxIterations, status, entries) {
|
|
118152
118870
|
const report = progressReport(entries);
|
|
118153
|
-
await
|
|
118871
|
+
await writeFile8(path, `${JSON.stringify({
|
|
118154
118872
|
task,
|
|
118155
118873
|
max_iterations: maxIterations,
|
|
118156
118874
|
status,
|
|
@@ -118166,8 +118884,8 @@ async function runLoopUntilDone(ctx) {
|
|
|
118166
118884
|
const artifactDir = await stableArtifactRoot(ctx, "loop-until-done");
|
|
118167
118885
|
const iterationsDir = join15(artifactDir, "iterations");
|
|
118168
118886
|
const evaluationsDir = join15(artifactDir, "evaluations");
|
|
118169
|
-
await
|
|
118170
|
-
await
|
|
118887
|
+
await mkdir4(iterationsDir, { recursive: true });
|
|
118888
|
+
await mkdir4(evaluationsDir, { recursive: true });
|
|
118171
118889
|
const ledgerPath = join15(artifactDir, "progress-ledger.json");
|
|
118172
118890
|
const entries = [];
|
|
118173
118891
|
const iterationArtifactPaths = [];
|
|
@@ -118202,7 +118920,7 @@ async function runLoopUntilDone(ctx) {
|
|
|
118202
118920
|
schema: evaluationSchema
|
|
118203
118921
|
});
|
|
118204
118922
|
const decision = evaluationFrom(evaluator);
|
|
118205
|
-
await
|
|
118923
|
+
await writeFile8(evaluationPath, `${JSON.stringify(evaluator.structured, null, 2)}
|
|
118206
118924
|
`);
|
|
118207
118925
|
const entry = {
|
|
118208
118926
|
iteration,
|
|
@@ -118322,7 +119040,7 @@ var loop_until_done_default = workflow({
|
|
|
118322
119040
|
import { Type as Type20 } from "typebox";
|
|
118323
119041
|
|
|
118324
119042
|
// dist/builtin/workflows/builtin/ralph-core.ts
|
|
118325
|
-
import { mkdir as
|
|
119043
|
+
import { mkdir as mkdir5, writeFile as writeFile9 } from "node:fs/promises";
|
|
118326
119044
|
import { dirname as dirname4, join as join16 } from "node:path";
|
|
118327
119045
|
import { Type as Type19 } from "typebox";
|
|
118328
119046
|
// dist/builtin/workflows/builtin/ralph-review-gate.ts
|
|
@@ -118446,7 +119164,7 @@ async function createImplementationNotesFile(prompt, runId) {
|
|
|
118446
119164
|
"- Before reporting progress, audit each claim against a tool result from this session. Report only work you can point to evidence for; say so explicitly when something is unverified."
|
|
118447
119165
|
].join(`
|
|
118448
119166
|
`);
|
|
118449
|
-
await
|
|
119167
|
+
await writeFile9(notesPath, `${initialNotes}
|
|
118450
119168
|
`, {
|
|
118451
119169
|
encoding: "utf8",
|
|
118452
119170
|
flag: "wx"
|
|
@@ -118521,8 +119239,8 @@ function artifactSafeName2(value2) {
|
|
|
118521
119239
|
return safe.length > 0 ? safe : "artifact";
|
|
118522
119240
|
}
|
|
118523
119241
|
async function writeJsonArtifact(path, content) {
|
|
118524
|
-
await
|
|
118525
|
-
await
|
|
119242
|
+
await mkdir5(dirname4(path), { recursive: true });
|
|
119243
|
+
await writeFile9(path, `${JSON.stringify(content, null, 2)}
|
|
118526
119244
|
`, {
|
|
118527
119245
|
encoding: "utf8"
|
|
118528
119246
|
});
|
|
@@ -118590,7 +119308,7 @@ function renderResearchPrompt(args) {
|
|
|
118590
119308
|
}
|
|
118591
119309
|
|
|
118592
119310
|
// dist/builtin/workflows/builtin/ralph-runner.ts
|
|
118593
|
-
import { existsSync as
|
|
119311
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
118594
119312
|
import { join as join17, resolve as resolve2 } from "node:path";
|
|
118595
119313
|
|
|
118596
119314
|
// dist/builtin/workflows/builtin/ralph-reviewer-prompt.ts
|
|
@@ -119185,7 +119903,7 @@ Read it before implementation or delegation because it is the primary current im
|
|
|
119185
119903
|
if (approved)
|
|
119186
119904
|
break;
|
|
119187
119905
|
}
|
|
119188
|
-
const qaVideoAvailable =
|
|
119906
|
+
const qaVideoAvailable = existsSync3(qaVideoPath);
|
|
119189
119907
|
const unapprovedHandoff = createPr === true && !approved;
|
|
119190
119908
|
const escalationEvidence = unapprovedHandoff ? convergence_escalation_evidence(convergenceEntries) : [];
|
|
119191
119909
|
if (createPr === true) {
|
|
@@ -119352,8 +120070,8 @@ var ralph_default = workflow({
|
|
|
119352
120070
|
import { Type as Type22 } from "typebox";
|
|
119353
120071
|
|
|
119354
120072
|
// dist/builtin/workflows/builtin/tournament-runner.ts
|
|
119355
|
-
import { mkdir as
|
|
119356
|
-
import { join as join18, isAbsolute as
|
|
120073
|
+
import { mkdir as mkdir6, readFile as readFile3, writeFile as writeFile10 } from "node:fs/promises";
|
|
120074
|
+
import { join as join18, isAbsolute as isAbsolute3, relative as relative3, resolve as resolve3 } from "node:path";
|
|
119357
120075
|
import { Type as Type21 } from "typebox";
|
|
119358
120076
|
|
|
119359
120077
|
// dist/builtin/workflows/builtin/selection-math.ts
|
|
@@ -119570,8 +120288,8 @@ function judgeArtifactPath(judgesDir, job, criterionIndex) {
|
|
|
119570
120288
|
const filename = `judge-${job.a}-${job.b}-c${criterionIndex}-${criterionSlug(job.criterionId)}-r${job.rep}.json`;
|
|
119571
120289
|
const root = resolve3(judgesDir);
|
|
119572
120290
|
const path = resolve3(judgesDir, filename);
|
|
119573
|
-
const fromRoot =
|
|
119574
|
-
if (fromRoot.startsWith("..") ||
|
|
120291
|
+
const fromRoot = relative3(root, path);
|
|
120292
|
+
if (fromRoot.startsWith("..") || isAbsolute3(fromRoot)) {
|
|
119575
120293
|
throw new Error(`tournament: judge artifact escaped its directory: ${path}`);
|
|
119576
120294
|
}
|
|
119577
120295
|
return path;
|
|
@@ -119627,8 +120345,8 @@ async function runTournament(ctx) {
|
|
|
119627
120345
|
const pivotCount = ctx.inputs.pivots ?? 1;
|
|
119628
120346
|
const seed = ctx.inputs.seed ?? 0;
|
|
119629
120347
|
const judgesDir = join18(artifactDir, "judges");
|
|
119630
|
-
await
|
|
119631
|
-
await
|
|
120348
|
+
await mkdir6(attemptsDir, { recursive: true });
|
|
120349
|
+
await mkdir6(judgesDir, { recursive: true });
|
|
119632
120350
|
const attemptArtifactPaths = Array.from({ length: numAttempts }, (_, index) => join18(attemptsDir, `attempt-${index + 1}.md`));
|
|
119633
120351
|
const models = ctx.inputs.models;
|
|
119634
120352
|
const attemptResults = await ctx.parallel(attemptArtifactPaths.map((path, index) => ({
|
|
@@ -119713,7 +120431,7 @@ The previous report was invalid. Return the required JSON schema exactly once.`,
|
|
|
119713
120431
|
report = judgeReport(retried.structured);
|
|
119714
120432
|
}
|
|
119715
120433
|
if (report === undefined) {
|
|
119716
|
-
await
|
|
120434
|
+
await writeFile10(stage.path, `${JSON.stringify({ invalid: true }, null, 2)}
|
|
119717
120435
|
`);
|
|
119718
120436
|
comparisons.push({
|
|
119719
120437
|
a: stage.job.a,
|
|
@@ -119727,7 +120445,7 @@ The previous report was invalid. Return the required JSON schema exactly once.`,
|
|
|
119727
120445
|
});
|
|
119728
120446
|
continue;
|
|
119729
120447
|
}
|
|
119730
|
-
await
|
|
120448
|
+
await writeFile10(stage.path, `${JSON.stringify(report, null, 2)}
|
|
119731
120449
|
`);
|
|
119732
120450
|
const scoreA = stage.job.swapped ? report.score_b : report.score_a;
|
|
119733
120451
|
const scoreB = stage.job.swapped ? report.score_a : report.score_b;
|
|
@@ -119824,7 +120542,7 @@ The previous report was invalid. Return the required JSON schema exactly once.`,
|
|
|
119824
120542
|
reducer: reducerUsage,
|
|
119825
120543
|
total: combineUsage([phaseUsage.attempts, phaseUsage.ring, phaseUsage.pivots, reducerUsage])
|
|
119826
120544
|
};
|
|
119827
|
-
await
|
|
120545
|
+
await writeFile10(comparisonPath, `${JSON.stringify({ ...baseLedger, usage }, null, 2)}
|
|
119828
120546
|
`);
|
|
119829
120547
|
};
|
|
119830
120548
|
await writeLedger2(fold_usage([]));
|
|
@@ -119968,13 +120686,13 @@ function createRegistry(initial = []) {
|
|
|
119968
120686
|
}
|
|
119969
120687
|
|
|
119970
120688
|
// dist/builtin/workflows/src/extension/discovery-loaders.ts
|
|
119971
|
-
import { readdir as
|
|
119972
|
-
import { extname, isAbsolute as
|
|
120689
|
+
import { readdir as readdir3, stat as stat2 } from "node:fs/promises";
|
|
120690
|
+
import { extname, isAbsolute as isAbsolute12, join as join27, resolve as resolve13 } from "node:path";
|
|
119973
120691
|
|
|
119974
120692
|
// ../../node_modules/jiti/lib/jiti-static.mjs
|
|
119975
120693
|
var import_jiti = __toESM(require_jiti(), 1);
|
|
119976
120694
|
var import_babel = __toESM(require_babel(), 1);
|
|
119977
|
-
import { createRequire as
|
|
120695
|
+
import { createRequire as createRequire3 } from "node:module";
|
|
119978
120696
|
function onError(err) {
|
|
119979
120697
|
throw err;
|
|
119980
120698
|
}
|
|
@@ -119986,7 +120704,7 @@ function createJiti(id, opts = {}) {
|
|
|
119986
120704
|
return import_jiti.default(id, opts, {
|
|
119987
120705
|
onError,
|
|
119988
120706
|
nativeImport,
|
|
119989
|
-
createRequire:
|
|
120707
|
+
createRequire: createRequire3
|
|
119990
120708
|
});
|
|
119991
120709
|
}
|
|
119992
120710
|
|
|
@@ -120406,7 +121124,7 @@ function raceAbort(promise, signal) {
|
|
|
120406
121124
|
});
|
|
120407
121125
|
}
|
|
120408
121126
|
// dist/builtin/workflows/src/runs/foreground/executor-hil.ts
|
|
120409
|
-
import { createHash as
|
|
121127
|
+
import { createHash as createHash3 } from "node:crypto";
|
|
120410
121128
|
import { createAskUserQuestionToolDefinition } from "@bastani/atomic";
|
|
120411
121129
|
|
|
120412
121130
|
// dist/builtin/workflows/src/shared/prompt-callsite-context.ts
|
|
@@ -120707,7 +121425,7 @@ function makePrompt(descriptor) {
|
|
|
120707
121425
|
};
|
|
120708
121426
|
}
|
|
120709
121427
|
function stableHash(value2) {
|
|
120710
|
-
return
|
|
121428
|
+
return createHash3("sha256").update(JSON.stringify(value2)).digest("hex").slice(0, 32);
|
|
120711
121429
|
}
|
|
120712
121430
|
function promptDescriptorHash(descriptor) {
|
|
120713
121431
|
if (isCustomPromptDescriptor(descriptor)) {
|
|
@@ -122522,7 +123240,7 @@ function stripOnePrefix(value2, prefix) {
|
|
|
122522
123240
|
}
|
|
122523
123241
|
|
|
122524
123242
|
// dist/builtin/workflows/src/runs/foreground/executor-direct-helpers.ts
|
|
122525
|
-
import { isAbsolute as
|
|
123243
|
+
import { isAbsolute as isAbsolute10, join as join25, resolve as resolve11 } from "node:path";
|
|
122526
123244
|
import { CONFIG_DIR_NAME as CONFIG_DIR_NAME2, isCodexFastModeCandidateModelId } from "@bastani/atomic";
|
|
122527
123245
|
|
|
122528
123246
|
// dist/builtin/workflows/src/runs/shared/model-fallback-candidates.ts
|
|
@@ -123071,8 +123789,8 @@ function resolveGitWorktreePath(value2, repoRoot) {
|
|
|
123071
123789
|
return canonicalizePreservingSymlinks(path3.isAbsolute(trimmed) ? trimmed : path3.resolve(repoRoot, trimmed));
|
|
123072
123790
|
}
|
|
123073
123791
|
function comparableRealPath(value2) {
|
|
123074
|
-
const
|
|
123075
|
-
return process.platform === "win32" ?
|
|
123792
|
+
const realpath2 = fs3.realpathSync.native(value2).replace(/\\/g, "/");
|
|
123793
|
+
return process.platform === "win32" ? realpath2.toLowerCase() : realpath2;
|
|
123076
123794
|
}
|
|
123077
123795
|
function comparablePathThroughExistingAncestor(value2) {
|
|
123078
123796
|
let existing = path3.resolve(value2);
|
|
@@ -123309,8 +124027,8 @@ function safePatchAgentName(agent) {
|
|
|
123309
124027
|
}
|
|
123310
124028
|
function removeSyntheticPath(worktree, syntheticPath) {
|
|
123311
124029
|
const resolved = path4.resolve(worktree.path, syntheticPath);
|
|
123312
|
-
const
|
|
123313
|
-
if (!
|
|
124030
|
+
const relative6 = path4.relative(worktree.path, resolved);
|
|
124031
|
+
if (!relative6 || relative6 === "." || relative6 === ".." || relative6.startsWith(`..${path4.sep}`) || path4.isAbsolute(relative6)) {
|
|
123314
124032
|
return;
|
|
123315
124033
|
}
|
|
123316
124034
|
let stat2;
|
|
@@ -123690,14 +124408,14 @@ function normalizeSyntheticPath(worktreePath, rawPath) {
|
|
|
123690
124408
|
if (path6.isAbsolute(trimmed))
|
|
123691
124409
|
throw new Error(`synthetic path must be relative: ${rawPath}`);
|
|
123692
124410
|
const resolved = path6.resolve(worktreePath, trimmed);
|
|
123693
|
-
const
|
|
123694
|
-
if (!
|
|
124411
|
+
const relative7 = path6.relative(worktreePath, resolved);
|
|
124412
|
+
if (!relative7 || relative7 === ".") {
|
|
123695
124413
|
throw new Error(`synthetic path cannot target the worktree root: ${rawPath}`);
|
|
123696
124414
|
}
|
|
123697
|
-
if (
|
|
124415
|
+
if (relative7 === ".." || relative7.startsWith(`..${path6.sep}`) || path6.isAbsolute(relative7)) {
|
|
123698
124416
|
throw new Error(`synthetic path escapes the worktree root: ${rawPath}`);
|
|
123699
124417
|
}
|
|
123700
|
-
return path6.normalize(
|
|
124418
|
+
return path6.normalize(relative7);
|
|
123701
124419
|
}
|
|
123702
124420
|
function hasTrackedEntries(worktreePath, relativePath) {
|
|
123703
124421
|
const result = runGit(worktreePath, ["ls-files", "--", relativePath]);
|
|
@@ -123837,11 +124555,11 @@ function cleanupWorktrees(setup) {
|
|
|
123837
124555
|
}
|
|
123838
124556
|
}
|
|
123839
124557
|
// dist/builtin/workflows/src/runs/shared/worktree-cwd.ts
|
|
123840
|
-
import { lstatSync as
|
|
123841
|
-
import { dirname as dirname9, isAbsolute as
|
|
124558
|
+
import { lstatSync as lstatSync5, realpathSync as realpathSync4 } from "node:fs";
|
|
124559
|
+
import { dirname as dirname9, isAbsolute as isAbsolute8, relative as relative7, resolve as resolve9, sep as sep6 } from "node:path";
|
|
123842
124560
|
function relativePathWithin(root, candidate) {
|
|
123843
|
-
const path7 =
|
|
123844
|
-
return path7 === ".." || path7.startsWith(`..${
|
|
124561
|
+
const path7 = relative7(root, candidate);
|
|
124562
|
+
return path7 === ".." || path7.startsWith(`..${sep6}`) || isAbsolute8(path7) ? undefined : path7;
|
|
123845
124563
|
}
|
|
123846
124564
|
function existingRealPath(path7, description) {
|
|
123847
124565
|
try {
|
|
@@ -123856,7 +124574,7 @@ function resolveWorktreeStageCwd(cwd, setup) {
|
|
|
123856
124574
|
const repositoryRoot = existingRealPath(setup.repositoryRoot, "invoking checkout");
|
|
123857
124575
|
if (cwd === undefined || cwd.length === 0)
|
|
123858
124576
|
return;
|
|
123859
|
-
const absoluteInput =
|
|
124577
|
+
const absoluteInput = isAbsolute8(cwd);
|
|
123860
124578
|
const candidate = absoluteInput ? cwd : resolve9(setup.cwd, cwd);
|
|
123861
124579
|
if (!absoluteInput && relativePathWithin(setup.worktreeRoot, candidate) === undefined) {
|
|
123862
124580
|
throw new Error(`atomic-workflows: relative cwd ${cwd} escapes gitWorktreeDir ${setup.worktreeRoot}; choose a cwd inside the worktree.`);
|
|
@@ -123865,7 +124583,7 @@ function resolveWorktreeStageCwd(cwd, setup) {
|
|
|
123865
124583
|
const worktreeRelative = relativePathWithin(worktreeRoot, candidateRealPath);
|
|
123866
124584
|
if (worktreeRelative !== undefined)
|
|
123867
124585
|
return resolve9(setup.worktreeRoot, worktreeRelative);
|
|
123868
|
-
if (!
|
|
124586
|
+
if (!isAbsolute8(cwd)) {
|
|
123869
124587
|
throw new Error(`atomic-workflows: relative cwd ${cwd} escapes gitWorktreeDir ${setup.worktreeRoot}; choose a path that remains inside the selected worktree.`);
|
|
123870
124588
|
}
|
|
123871
124589
|
if (relativePathWithin(setup.worktreeRoot, candidate) !== undefined) {
|
|
@@ -123884,8 +124602,8 @@ function resolveWorktreeStageCwd(cwd, setup) {
|
|
|
123884
124602
|
}
|
|
123885
124603
|
|
|
123886
124604
|
// dist/builtin/workflows/src/runs/foreground/executor-task-prompts.ts
|
|
123887
|
-
import { existsSync as
|
|
123888
|
-
import { isAbsolute as
|
|
124605
|
+
import { existsSync as existsSync6 } from "node:fs";
|
|
124606
|
+
import { isAbsolute as isAbsolute9, resolve as resolve10 } from "node:path";
|
|
123889
124607
|
function normalizeTaskContexts(previous) {
|
|
123890
124608
|
if (previous === undefined)
|
|
123891
124609
|
return [];
|
|
@@ -123936,7 +124654,7 @@ function taskPrevious(options) {
|
|
|
123936
124654
|
return options.previous;
|
|
123937
124655
|
}
|
|
123938
124656
|
function resolveWorkflowPath(filePath, baseDir) {
|
|
123939
|
-
if (
|
|
124657
|
+
if (isAbsolute9(filePath))
|
|
123940
124658
|
return filePath;
|
|
123941
124659
|
return resolve10(baseDir ?? process.cwd(), filePath);
|
|
123942
124660
|
}
|
|
@@ -123954,7 +124672,7 @@ function taskReadInstruction(options) {
|
|
|
123954
124672
|
return "";
|
|
123955
124673
|
const baseDir = taskBaseDir(options);
|
|
123956
124674
|
const files = options.reads.map((file) => resolveWorkflowPath(file, baseDir));
|
|
123957
|
-
const missing = files.find((file) => !
|
|
124675
|
+
const missing = files.find((file) => !existsSync6(file));
|
|
123958
124676
|
if (missing !== undefined) {
|
|
123959
124677
|
throw new Error(`atomic-workflows: referenced artifact does not exist: ${missing}`);
|
|
123960
124678
|
}
|
|
@@ -124217,7 +124935,7 @@ function workflowInvocationMetadata(inputDefaults, workflowInvocationCwd, cache,
|
|
|
124217
124935
|
function resolvedTaskCwd(cwd, workflowInvocationCwd) {
|
|
124218
124936
|
if (cwd === undefined)
|
|
124219
124937
|
return;
|
|
124220
|
-
return
|
|
124938
|
+
return isAbsolute10(cwd) ? cwd : resolve11(workflowInvocationCwd, cwd);
|
|
124221
124939
|
}
|
|
124222
124940
|
function taskWorktreeOutputsRoot(runId) {
|
|
124223
124941
|
return join25(workflowArtifactRunPath(runId), "task-outputs");
|
|
@@ -124230,7 +124948,7 @@ function prepareTaskWorktrees(tasks, options, runId, scope, workflowInvocationCw
|
|
|
124230
124948
|
throw new Error("atomic-workflows: worktree and gitWorktreeDir are mutually exclusive; use gitWorktreeDir for a reusable worktree or worktree:true for temporary isolated worktrees.");
|
|
124231
124949
|
}
|
|
124232
124950
|
const explicitCwd = tasks.find((task) => typeof task.cwd === "string")?.cwd;
|
|
124233
|
-
const sharedCwd = explicitCwd === undefined ? workflowInvocationCwd :
|
|
124951
|
+
const sharedCwd = explicitCwd === undefined ? workflowInvocationCwd : isAbsolute10(explicitCwd) ? explicitCwd : resolve11(workflowInvocationCwd, explicitCwd);
|
|
124234
124952
|
const conflict = findWorktreeTaskCwdConflict(tasks.map((task) => ({ agent: task.name, cwd: resolvedTaskCwd(task.cwd, workflowInvocationCwd) })), sharedCwd);
|
|
124235
124953
|
if (conflict !== undefined)
|
|
124236
124954
|
throw new Error(formatWorktreeTaskCwdConflict(conflict, sharedCwd));
|
|
@@ -131255,9 +131973,9 @@ class StageSessionController {
|
|
|
131255
131973
|
}
|
|
131256
131974
|
|
|
131257
131975
|
// dist/builtin/workflows/src/runs/foreground/stage-runner-output.ts
|
|
131258
|
-
import { createHash as
|
|
131259
|
-
import { mkdir as
|
|
131260
|
-
import { basename as basename4, dirname as dirname10, isAbsolute as
|
|
131976
|
+
import { createHash as createHash4 } from "node:crypto";
|
|
131977
|
+
import { mkdir as mkdir7, writeFile as writeFile11 } from "node:fs/promises";
|
|
131978
|
+
import { basename as basename4, dirname as dirname10, isAbsolute as isAbsolute11, join as join26, resolve as resolve12 } from "node:path";
|
|
131261
131979
|
var DEFAULT_MAX_OUTPUT_BYTES = 200 * 1024;
|
|
131262
131980
|
var DEFAULT_MAX_OUTPUT_LINES = 5000;
|
|
131263
131981
|
function normalizeMaxOutput2(maxOutput) {
|
|
@@ -131321,7 +132039,7 @@ function formatByteSize(bytes) {
|
|
|
131321
132039
|
return `${value2.toFixed(1)} ${units[unitIndex]}`;
|
|
131322
132040
|
}
|
|
131323
132041
|
function transcriptPath(runId, outputPath) {
|
|
131324
|
-
const digest =
|
|
132042
|
+
const digest = createHash4("sha256").update(outputPath).digest("hex").slice(0, 16);
|
|
131325
132043
|
return join26(workflowArtifactRunPath(runId), "transcripts", `${digest}-${basename4(outputPath)}.transcript.md`);
|
|
131326
132044
|
}
|
|
131327
132045
|
function appendContent(lines, content) {
|
|
@@ -131380,9 +132098,9 @@ function savedOutputReference(outputPath, fullOutput, transcriptPathValue, trans
|
|
|
131380
132098
|
function resolveOutputPath(output, runtimeCwd, requestedCwd) {
|
|
131381
132099
|
if (typeof output !== "string" || output.length === 0)
|
|
131382
132100
|
return;
|
|
131383
|
-
if (
|
|
132101
|
+
if (isAbsolute11(output))
|
|
131384
132102
|
return output;
|
|
131385
|
-
const baseCwd = requestedCwd === undefined ? runtimeCwd :
|
|
132103
|
+
const baseCwd = requestedCwd === undefined ? runtimeCwd : isAbsolute11(requestedCwd) ? requestedCwd : resolve12(runtimeCwd, requestedCwd);
|
|
131386
132104
|
return resolve12(baseCwd, output);
|
|
131387
132105
|
}
|
|
131388
132106
|
function degenerateWarning(fullOutput) {
|
|
@@ -131442,8 +132160,8 @@ async function finalizePromptOutput(fullOutput, outputOptions, runtimeCwd, runId
|
|
|
131442
132160
|
const transcriptFile = transcriptPath(runId, outputPath);
|
|
131443
132161
|
const transcript = renderTranscript(messages, fullOutput);
|
|
131444
132162
|
try {
|
|
131445
|
-
await
|
|
131446
|
-
await
|
|
132163
|
+
await mkdir7(dirname10(outputPath), { recursive: true });
|
|
132164
|
+
await writeFile11(outputPath, fullOutput, "utf8");
|
|
131447
132165
|
} catch (err) {
|
|
131448
132166
|
return `${displayOutput}
|
|
131449
132167
|
|
|
@@ -131454,8 +132172,8 @@ ${err instanceof Error ? err.message : String(err)}`;
|
|
|
131454
132172
|
let transcriptError;
|
|
131455
132173
|
try {
|
|
131456
132174
|
await ensureWorkflowArtifactRunDirectory(runId);
|
|
131457
|
-
await
|
|
131458
|
-
await
|
|
132175
|
+
await mkdir7(dirname10(transcriptFile), { recursive: true });
|
|
132176
|
+
await writeFile11(transcriptFile, transcript, "utf8");
|
|
131459
132177
|
transcriptAvailable = true;
|
|
131460
132178
|
} catch (err) {
|
|
131461
132179
|
transcriptError = err instanceof Error ? err.message : String(err);
|
|
@@ -132990,7 +133708,7 @@ function collectWorkflowModuleCandidates(mod) {
|
|
|
132990
133708
|
// dist/builtin/workflows/src/extension/discovery-loaders.ts
|
|
132991
133709
|
async function scanWorkflowDir(dir) {
|
|
132992
133710
|
try {
|
|
132993
|
-
const entries = await
|
|
133711
|
+
const entries = await readdir3(dir, { withFileTypes: true });
|
|
132994
133712
|
const WORKFLOW_EXTS = new Set([".ts", ".js", ".mjs", ".cjs"]);
|
|
132995
133713
|
return entries.filter((e) => e.isFile() && WORKFLOW_EXTS.has(extname(e.name))).map((e) => join27(dir, e.name)).sort();
|
|
132996
133714
|
} catch {
|
|
@@ -133031,7 +133749,7 @@ async function loadFromPaths(pathsOrMap, kind, baseCwd, diagnostics) {
|
|
|
133031
133749
|
const all = [];
|
|
133032
133750
|
const entries = Array.isArray(pathsOrMap) ? pathsOrMap.map((p) => ({ rawPath: p })) : Object.entries(pathsOrMap).map(([name, p]) => ({ rawPath: p, configuredName: name }));
|
|
133033
133751
|
for (const { rawPath, configuredName } of entries) {
|
|
133034
|
-
const absPath =
|
|
133752
|
+
const absPath = isAbsolute12(rawPath) ? rawPath : resolve13(baseCwd, rawPath);
|
|
133035
133753
|
let pathStats;
|
|
133036
133754
|
try {
|
|
133037
133755
|
pathStats = await stat2(absPath);
|
|
@@ -133255,6 +133973,24 @@ function discoverBundledManifest() {
|
|
|
133255
133973
|
return { registry, sources, errors: diagnostics };
|
|
133256
133974
|
}
|
|
133257
133975
|
|
|
133976
|
+
// dist/builtin/workflows/src/extension/workflow-request-abort.ts
|
|
133977
|
+
function raceWorkflowRequestAbort(operation, signal) {
|
|
133978
|
+
if (signal === undefined)
|
|
133979
|
+
return operation;
|
|
133980
|
+
if (signal.aborted) {
|
|
133981
|
+
operation.catch(() => {});
|
|
133982
|
+
return Promise.reject(signal.reason ?? new DOMException("Workflow request aborted", "AbortError"));
|
|
133983
|
+
}
|
|
133984
|
+
const abort = Promise.withResolvers();
|
|
133985
|
+
const onAbort = () => {
|
|
133986
|
+
abort.reject(signal.reason ?? new DOMException("Workflow request aborted", "AbortError"));
|
|
133987
|
+
};
|
|
133988
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
133989
|
+
return Promise.race([operation, abort.promise]).finally(() => {
|
|
133990
|
+
signal.removeEventListener("abort", onAbort);
|
|
133991
|
+
});
|
|
133992
|
+
}
|
|
133993
|
+
|
|
133258
133994
|
// dist/builtin/workflows/src/extension/dispatcher.ts
|
|
133259
133995
|
function failedRunResult(name, runId, error) {
|
|
133260
133996
|
return {
|
|
@@ -133351,7 +134087,8 @@ async function dispatch(args, opts) {
|
|
|
133351
134087
|
return failedRunResult(def.name, runId, error instanceof Error ? error.message : String(error));
|
|
133352
134088
|
}
|
|
133353
134089
|
const { accepted: accepted2 } = launch;
|
|
133354
|
-
|
|
134090
|
+
opts.onRunAccepted?.(accepted2.runId);
|
|
134091
|
+
const admission = await raceWorkflowRequestAbort(launch.wait, opts.signal);
|
|
133355
134092
|
if (!admission.started) {
|
|
133356
134093
|
const activeStore = opts.store ?? store;
|
|
133357
134094
|
const snapshot = activeStore.runs().find((run2) => run2.id === accepted2.runId);
|
|
@@ -134060,7 +134797,7 @@ function createExtensionRuntime(opts = {}) {
|
|
|
134060
134797
|
return registry;
|
|
134061
134798
|
},
|
|
134062
134799
|
async dispatch(args, options) {
|
|
134063
|
-
await ensureDbosReady();
|
|
134800
|
+
await raceWorkflowRequestAbort(ensureDbosReady(), options?.signal);
|
|
134064
134801
|
const defaultSessionDir = resolveDefaultStageSessionDir?.();
|
|
134065
134802
|
return dispatch(args, {
|
|
134066
134803
|
registry,
|
|
@@ -134074,6 +134811,8 @@ function createExtensionRuntime(opts = {}) {
|
|
|
134074
134811
|
models,
|
|
134075
134812
|
policy: options?.policy,
|
|
134076
134813
|
...options?.origin === undefined ? {} : { origin: options.origin },
|
|
134814
|
+
...options?.signal === undefined ? {} : { signal: options.signal },
|
|
134815
|
+
...options?.onRunAccepted === undefined ? {} : { onRunAccepted: options.onRunAccepted },
|
|
134077
134816
|
cwd: runtimeCwd,
|
|
134078
134817
|
...defaultSessionDir !== undefined ? { defaultSessionDir } : {}
|
|
134079
134818
|
});
|
|
@@ -134094,7 +134833,7 @@ function createExtensionRuntime(opts = {}) {
|
|
|
134094
134833
|
}
|
|
134095
134834
|
|
|
134096
134835
|
// dist/builtin/workflows/src/extension/status-writer.ts
|
|
134097
|
-
import { mkdir as
|
|
134836
|
+
import { mkdir as mkdir8, rename as rename2, writeFile as writeFile12 } from "node:fs/promises";
|
|
134098
134837
|
import { dirname as dirname11, join as join29 } from "node:path";
|
|
134099
134838
|
import { CONFIG_DIR_NAME as CONFIG_DIR_NAME3 } from "@bastani/atomic";
|
|
134100
134839
|
var DEFAULT_STATUS_SUBPATH = join29(CONFIG_DIR_NAME3, "workflows", "status.json");
|
|
@@ -134106,10 +134845,10 @@ function resolveStatusFilePath(config, opts = {}) {
|
|
|
134106
134845
|
}
|
|
134107
134846
|
async function atomicWriteJson(path7, content) {
|
|
134108
134847
|
const dir = dirname11(path7);
|
|
134109
|
-
await
|
|
134848
|
+
await mkdir8(dir, { recursive: true });
|
|
134110
134849
|
const tmpPath = `${path7}.tmp`;
|
|
134111
|
-
await
|
|
134112
|
-
await
|
|
134850
|
+
await writeFile12(tmpPath, content, "utf8");
|
|
134851
|
+
await rename2(tmpPath, path7);
|
|
134113
134852
|
}
|
|
134114
134853
|
function createStatusWriter(store2, config, opts = {}) {
|
|
134115
134854
|
if (!config.statusFile) {
|
|
@@ -135166,15 +135905,15 @@ function createWorkflowExtensionRuntimeState(pi, adapters, resolveCwd = () => pi
|
|
|
135166
135905
|
return runtimeRef.current.prepareCompletedDurable?.() ?? Promise.resolve([]);
|
|
135167
135906
|
},
|
|
135168
135907
|
openCompletedDurableWorkflow(workflowId, catalog) {
|
|
135169
|
-
const
|
|
135170
|
-
if (
|
|
135908
|
+
const open2 = runtimeRef.current.openCompletedDurableWorkflow;
|
|
135909
|
+
if (open2 === undefined) {
|
|
135171
135910
|
return {
|
|
135172
135911
|
ok: false,
|
|
135173
135912
|
reason: "not_found",
|
|
135174
135913
|
message: `No completed durable workflow found for id: ${workflowId}`
|
|
135175
135914
|
};
|
|
135176
135915
|
}
|
|
135177
|
-
return
|
|
135916
|
+
return open2(workflowId, catalog);
|
|
135178
135917
|
}
|
|
135179
135918
|
};
|
|
135180
135919
|
function runtimeForContext(ctx) {
|
|
@@ -135967,8 +136706,8 @@ function initialValue(field2, prefilled) {
|
|
|
135967
136706
|
return "";
|
|
135968
136707
|
}
|
|
135969
136708
|
async function openHostInputsForm(ui, options) {
|
|
135970
|
-
const
|
|
135971
|
-
if (typeof
|
|
136709
|
+
const open2 = ui.hostInputForm;
|
|
136710
|
+
if (typeof open2 !== "function")
|
|
135972
136711
|
return { kind: "unsupported" };
|
|
135973
136712
|
const prefilled = options.prefilled ?? {};
|
|
135974
136713
|
const fields = options.fields.map((field2) => ({
|
|
@@ -135981,7 +136720,7 @@ async function openHostInputsForm(ui, options) {
|
|
|
135981
136720
|
...field2.placeholder !== undefined ? { placeholder: field2.placeholder } : {}
|
|
135982
136721
|
}));
|
|
135983
136722
|
try {
|
|
135984
|
-
const raw = await
|
|
136723
|
+
const raw = await open2.call(ui, {
|
|
135985
136724
|
title: options.workflowName,
|
|
135986
136725
|
fields,
|
|
135987
136726
|
heading: "WORKFLOW INPUTS",
|
|
@@ -136180,7 +136919,7 @@ function renderHintsRow(width, theme, state) {
|
|
|
136180
136919
|
const dim = hexToAnsi(theme.dim);
|
|
136181
136920
|
const text = hexToAnsi(theme.text);
|
|
136182
136921
|
const muted = hexToAnsi(theme.textMuted);
|
|
136183
|
-
const
|
|
136922
|
+
const sep7 = `${dim} · ${RESET}`;
|
|
136184
136923
|
const hint = (key2, label) => `${text}${key2}${RESET} ${muted}${label}${RESET}`;
|
|
136185
136924
|
const parts = state.filterFocused ? [hint(keyText3("tui.select.confirm"), "Submit"), hint(keyText3("tui.select.cancel"), "Exit Filter")] : [
|
|
136186
136925
|
hint(`${keyText3("tui.select.up")}/${keyText3("tui.select.down")}`, "Navigate"),
|
|
@@ -136189,7 +136928,7 @@ function renderHintsRow(width, theme, state) {
|
|
|
136189
136928
|
hint("/", "Filter"),
|
|
136190
136929
|
hint(keyText3("tui.select.cancel"), "Close")
|
|
136191
136930
|
];
|
|
136192
|
-
const line = ` ${parts.join(
|
|
136931
|
+
const line = ` ${parts.join(sep7)}`;
|
|
136193
136932
|
const clipped = truncateToWidth(line, width, "…");
|
|
136194
136933
|
const lineWidth = visibleWidth(clipped);
|
|
136195
136934
|
if (lineWidth >= width)
|
|
@@ -138141,7 +138880,7 @@ var MOONSHOTAI_CN_MODELS = flattenModelCatalog("moonshotai-cn", moonshotai_cn_de
|
|
|
138141
138880
|
|
|
138142
138881
|
// ../ai/dist/providers/data/nvidia.json
|
|
138143
138882
|
var nvidia_default = {
|
|
138144
|
-
"openai-completions": { "google/gemma-3-12b-it": { id: "google/gemma-3-12b-it", name: "Gemma 3 12B IT", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 16384 }, "google/gemma-3-4b-it": { id: "google/gemma-3-4b-it", name: "Gemma 3 4B IT", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 16384 }, "meta/llama-3.1-70b-instruct": { id: "meta/llama-3.1-70b-instruct", name: "Llama 3.1 70b Instruct", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 4096 }, "meta/llama-3.1-8b-instruct": { id: "meta/llama-3.1-8b-instruct", name: "Llama 3.1 8B Instruct", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 16000, maxTokens: 4096 }, "meta/llama-3.2-11b-vision-instruct": { id: "meta/llama-3.2-11b-vision-instruct", name: "Llama 3.2 11b Vision Instruct", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 4096 }, "meta/llama-3.2-90b-vision-instruct": { id: "meta/llama-3.2-90b-vision-instruct", name: "Llama-3.2-90B-Vision-Instruct", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 8192 }, "meta/llama-3.3-70b-instruct": { id: "meta/llama-3.3-70b-instruct", name: "Llama 3.3 70b Instruct", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 4096 }, "meta/muse-glimmer-30b": { id: "meta/muse-glimmer-30b", name: "Muse Glimmer 30B", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 131072 }, "minimaxai/minimax-m3": { id: "minimaxai/minimax-m3", name: "MiniMax-M3", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 1e6, maxTokens: 16384 }, "mistralai/mistral-7b-instruct-v0.3": { id: "mistralai/mistral-7b-instruct-v0.3", name: "Mistral-7B-Instruct-v0.3", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 65536, maxTokens: 65536 }, "moonshotai/kimi-k2.6": { id: "moonshotai/kimi-k2.6", name: "Kimi K2.6", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 262144, maxTokens: 262144 }, "nvidia/cosmos-reason2-8b": { id: "nvidia/cosmos-reason2-8b", name: "Cosmos Reason2 8B", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 16384 }, "nvidia/llama-3.1-nemotron-70b-instruct": { id: "nvidia/llama-3.1-nemotron-70b-instruct", name: "Llama 3.1 Nemotron 70B Instruct", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 8192 }, "nvidia/llama-3.1-nemotron-nano-8b-v1": { id: "nvidia/llama-3.1-nemotron-nano-8b-v1", name: "Llama 3.1 Nemotron Nano 8B v1", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 16384 }, "nvidia/llama-3.1-nemotron-nano-vl-8b-v1": { id: "nvidia/llama-3.1-nemotron-nano-vl-8b-v1", name: "Llama 3.1 Nemotron Nano VL 8B v1", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 32768, maxTokens: 16384 }, "nvidia/llama-3.1-nemotron-ultra-253b-v1": { id: "nvidia/llama-3.1-nemotron-ultra-253b-v1", name: "Llama 3.1 Nemotron Ultra 253B", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 16384 }, "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", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 65536 }, "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", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 65536 }, "nvidia/nemotron-3-nano-30b-a3b": { id: "nvidia/nemotron-3-nano-30b-a3b", name: "nemotron-3-nano-30b-a3b", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 131072 }, "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning": { id: "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning", name: "Nemotron 3 Nano Omni", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 256000, maxTokens: 65536 }, "nvidia/nemotron-3-super-120b-a12b": { id: "nvidia/nemotron-3-super-120b-a12b", name: "Nemotron 3 Super", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0.2, output: 0.8, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 262144, maxTokens: 262144 }, "nvidia/nemotron-3-ultra-550b-a55b": { id: "nvidia/nemotron-3-ultra-550b-a55b", name: "Nemotron 3 Ultra 550B A55B", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0.5, output: 2.5, cacheRead: 0.15, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 1e6, maxTokens: 65536 }, "nvidia/nemotron-3.5-lightning-30b-a3b": { id: "nvidia/nemotron-3.5-lightning-30b-a3b", name: "Nemotron 3.5 Lightning 30B A3B", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 262144, maxTokens: 262144 }, "nvidia/nemotron-nano-12b-v2-vl": { id: "nvidia/nemotron-nano-12b-v2-vl", name: "Nemotron Nano 12B v2 VL", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 128000 }, "nvidia/nvidia-nemotron-nano-9b-v2": { id: "nvidia/nvidia-nemotron-nano-9b-v2", name: "nvidia-nemotron-nano-9b-v2", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 131072 }, "openai/gpt-oss-120b": { id: "openai/gpt-oss-120b", name: "GPT-OSS-120B", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 8192 }, "openai/gpt-oss-20b": { id: "openai/gpt-oss-20b", name: "GPT OSS 20B", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 32768 }, "poolside/laguna-xs-2.1": { id: "poolside/laguna-xs-2.1", name: "Laguna XS 2.1", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 262144, maxTokens: 16384 }, "stepfun-ai/step-3.7-flash": { id: "stepfun-ai/step-3.7-flash", name: "Step 3.7 Flash", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 256000, maxTokens: 16384 }, "thinkingmachines/inkling": { id: "thinkingmachines/inkling", name: "Inkling", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 1048576, maxTokens: 16384 } }
|
|
138883
|
+
"openai-completions": { "deepseek-ai/deepseek-v4-flash-0731": { id: "deepseek-ai/deepseek-v4-flash-0731", name: "DeepSeek V4 Flash 0731", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false, requiresReasoningContentOnAssistantMessages: true, thinkingFormat: "deepseek" }, contextWindow: 1e6, maxTokens: 384000, thinkingLevelMap: { minimal: null, low: null, medium: null, high: "high", max: "max" } }, "google/gemma-3-12b-it": { id: "google/gemma-3-12b-it", name: "Gemma 3 12B IT", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 16384 }, "google/gemma-3-4b-it": { id: "google/gemma-3-4b-it", name: "Gemma 3 4B IT", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 16384 }, "meta/llama-3.1-70b-instruct": { id: "meta/llama-3.1-70b-instruct", name: "Llama 3.1 70b Instruct", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 4096 }, "meta/llama-3.1-8b-instruct": { id: "meta/llama-3.1-8b-instruct", name: "Llama 3.1 8B Instruct", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 16000, maxTokens: 4096 }, "meta/llama-3.2-11b-vision-instruct": { id: "meta/llama-3.2-11b-vision-instruct", name: "Llama 3.2 11b Vision Instruct", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 4096 }, "meta/llama-3.2-90b-vision-instruct": { id: "meta/llama-3.2-90b-vision-instruct", name: "Llama-3.2-90B-Vision-Instruct", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 8192 }, "meta/llama-3.3-70b-instruct": { id: "meta/llama-3.3-70b-instruct", name: "Llama 3.3 70b Instruct", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 4096 }, "meta/muse-glimmer-30b": { id: "meta/muse-glimmer-30b", name: "Muse Glimmer 30B", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 131072 }, "minimaxai/minimax-m3": { id: "minimaxai/minimax-m3", name: "MiniMax-M3", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 1e6, maxTokens: 16384 }, "mistralai/mistral-7b-instruct-v0.3": { id: "mistralai/mistral-7b-instruct-v0.3", name: "Mistral-7B-Instruct-v0.3", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 65536, maxTokens: 65536 }, "moonshotai/kimi-k2.6": { id: "moonshotai/kimi-k2.6", name: "Kimi K2.6", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 262144, maxTokens: 262144 }, "moonshotai/kimi-k3": { id: "moonshotai/kimi-k3", name: "Kimi K3", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 1048576, maxTokens: 131072 }, "nvidia/cosmos-reason2-8b": { id: "nvidia/cosmos-reason2-8b", name: "Cosmos Reason2 8B", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 16384 }, "nvidia/llama-3.1-nemotron-70b-instruct": { id: "nvidia/llama-3.1-nemotron-70b-instruct", name: "Llama 3.1 Nemotron 70B Instruct", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 8192 }, "nvidia/llama-3.1-nemotron-nano-8b-v1": { id: "nvidia/llama-3.1-nemotron-nano-8b-v1", name: "Llama 3.1 Nemotron Nano 8B v1", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 16384 }, "nvidia/llama-3.1-nemotron-nano-vl-8b-v1": { id: "nvidia/llama-3.1-nemotron-nano-vl-8b-v1", name: "Llama 3.1 Nemotron Nano VL 8B v1", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 32768, maxTokens: 16384 }, "nvidia/llama-3.1-nemotron-ultra-253b-v1": { id: "nvidia/llama-3.1-nemotron-ultra-253b-v1", name: "Llama 3.1 Nemotron Ultra 253B", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 16384 }, "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", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 65536 }, "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", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 65536 }, "nvidia/nemotron-3-nano-30b-a3b": { id: "nvidia/nemotron-3-nano-30b-a3b", name: "nemotron-3-nano-30b-a3b", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 131072 }, "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning": { id: "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning", name: "Nemotron 3 Nano Omni", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 256000, maxTokens: 65536 }, "nvidia/nemotron-3-super-120b-a12b": { id: "nvidia/nemotron-3-super-120b-a12b", name: "Nemotron 3 Super", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0.2, output: 0.8, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 262144, maxTokens: 262144 }, "nvidia/nemotron-3-ultra-550b-a55b": { id: "nvidia/nemotron-3-ultra-550b-a55b", name: "Nemotron 3 Ultra 550B A55B", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0.5, output: 2.5, cacheRead: 0.15, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 1e6, maxTokens: 65536 }, "nvidia/nemotron-3.5-lightning-30b-a3b": { id: "nvidia/nemotron-3.5-lightning-30b-a3b", name: "Nemotron 3.5 Lightning 30B A3B", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 262144, maxTokens: 262144 }, "nvidia/nemotron-nano-12b-v2-vl": { id: "nvidia/nemotron-nano-12b-v2-vl", name: "Nemotron Nano 12B v2 VL", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 128000 }, "nvidia/nvidia-nemotron-nano-9b-v2": { id: "nvidia/nvidia-nemotron-nano-9b-v2", name: "nvidia-nemotron-nano-9b-v2", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 131072 }, "openai/gpt-oss-120b": { id: "openai/gpt-oss-120b", name: "GPT-OSS-120B", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 128000, maxTokens: 8192 }, "openai/gpt-oss-20b": { id: "openai/gpt-oss-20b", name: "GPT OSS 20B", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 131072, maxTokens: 32768 }, "poolside/laguna-xs-2.1": { id: "poolside/laguna-xs-2.1", name: "Laguna XS 2.1", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 262144, maxTokens: 16384 }, "stepfun-ai/step-3.7-flash": { id: "stepfun-ai/step-3.7-flash", name: "Step 3.7 Flash", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 256000, maxTokens: 16384 }, "thinkingmachines/inkling": { id: "thinkingmachines/inkling", name: "Inkling", api: "openai-completions", provider: "nvidia", baseUrl: "https://integrate.api.nvidia.com/v1", headers: { "NVCF-POLL-SECONDS": "3600" }, reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, compat: { supportsStore: false, supportsDeveloperRole: false, supportsReasoningEffort: false, maxTokensField: "max_tokens", supportsStrictMode: false, supportsLongCacheRetention: false }, contextWindow: 1048576, maxTokens: 16384 } }
|
|
138145
138884
|
};
|
|
138146
138885
|
|
|
138147
138886
|
// ../ai/dist/providers/nvidia.models.js
|
|
@@ -138186,7 +138925,7 @@ var OPENCODE_GO_MODELS = flattenModelCatalog("opencode-go", opencode_go_default)
|
|
|
138186
138925
|
|
|
138187
138926
|
// ../ai/dist/providers/data/openrouter.json
|
|
138188
138927
|
var openrouter_default = {
|
|
138189
|
-
"openai-completions": { "aion-labs/aion-2.0": { id: "aion-labs/aion-2.0", name: "AionLabs: Aion-2.0", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.8, output: 1.6, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "aion-labs/aion-3.0": { id: "aion-labs/aion-3.0", name: "AionLabs: Aion-3.0", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 3, output: 6, cacheRead: 0.75, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "aion-labs/aion-3.0-mini": { id: "aion-labs/aion-3.0-mini", name: "AionLabs: Aion-3.0-Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.7, output: 1.4, cacheRead: 0.18, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "amazon/nova-2-lite-v1": { id: "amazon/nova-2-lite-v1", name: "Amazon: Nova 2 Lite", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 2.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65535, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "amazon/nova-lite-v1": { id: "amazon/nova-lite-v1", name: "Amazon: Nova Lite 1.0", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.06, output: 0.24, cacheRead: 0, cacheWrite: 0 }, contextWindow: 300000, maxTokens: 5120, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "amazon/nova-micro-v1": { id: "amazon/nova-micro-v1", name: "Amazon: Nova Micro 1.0", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.035, output: 0.14, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 5120, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "amazon/nova-premier-v1": { id: "amazon/nova-premier-v1", name: "Amazon: Nova Premier 1.0", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 2.5, output: 12.5, cacheRead: 0.625, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 32000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "amazon/nova-pro-v1": { id: "amazon/nova-pro-v1", name: "Amazon: Nova Pro 1.0", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.8, output: 3.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 300000, maxTokens: 5120, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "anthropic/claude-3-haiku": { id: "anthropic/claude-3-haiku", name: "Anthropic: Claude 3 Haiku", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.25, output: 1.25, cacheRead: 0.03, cacheWrite: 0.3 }, contextWindow: 200000, maxTokens: 4096, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-fable-5": { id: "anthropic/claude-fable-5", name: "Anthropic: Claude Fable 5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { off: null, xhigh: "xhigh", max: "max" } }, "anthropic/claude-fable-5:batch": { id: "anthropic/claude-fable-5:batch", name: "Anthropic: Claude Fable 5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { off: null, xhigh: "xhigh", max: "max" } }, "anthropic/claude-haiku-4.5": { id: "anthropic/claude-haiku-4.5", name: "Anthropic: Claude Haiku 4.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 5, cacheRead: 0.1, cacheWrite: 1.25 }, contextWindow: 200000, maxTokens: 64000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-haiku-4.5:batch": { id: "anthropic/claude-haiku-4.5:batch", name: "Anthropic: Claude Haiku 4.5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 2.5, cacheRead: 0.05, cacheWrite: 0.625 }, contextWindow: 200000, maxTokens: 64000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-opus-4": { id: "anthropic/claude-opus-4", name: "Anthropic: Claude Opus 4", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 75, cacheRead: 1.5, cacheWrite: 18.75 }, contextWindow: 200000, maxTokens: 32000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-opus-4.1": { id: "anthropic/claude-opus-4.1", name: "Anthropic: Claude Opus 4.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 75, cacheRead: 1.5, cacheWrite: 18.75 }, contextWindow: 200000, maxTokens: 32000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-opus-4.1:batch": { id: "anthropic/claude-opus-4.1:batch", name: "Anthropic: Claude Opus 4.1 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 7.5, output: 37.5, cacheRead: 0.75, cacheWrite: 9.375 }, contextWindow: 200000, maxTokens: 32000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-opus-4.5": { id: "anthropic/claude-opus-4.5", name: "Anthropic: Claude Opus 4.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 200000, maxTokens: 64000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-opus-4.5:batch": { id: "anthropic/claude-opus-4.5:batch", name: "Anthropic: Claude Opus 4.5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 12.5, cacheRead: 0.25, cacheWrite: 3.125 }, contextWindow: 200000, maxTokens: 64000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-opus-4.6": { id: "anthropic/claude-opus-4.6", name: "Anthropic: Claude Opus 4.6", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { max: "max" } }, "anthropic/claude-opus-4.6:batch": { id: "anthropic/claude-opus-4.6:batch", name: "Anthropic: Claude Opus 4.6 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 12.5, cacheRead: 0.25, cacheWrite: 3.125 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { max: "max" } }, "anthropic/claude-opus-4.7": { id: "anthropic/claude-opus-4.7", name: "Anthropic: Claude Opus 4.7", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-4.7-fast": { id: "anthropic/claude-opus-4.7-fast", name: "Anthropic: Claude Opus 4.7 (Fast)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 30, output: 150, cacheRead: 3, cacheWrite: 37.5 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-4.7:batch": { id: "anthropic/claude-opus-4.7:batch", name: "Anthropic: Claude Opus 4.7 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 12.5, cacheRead: 0.25, cacheWrite: 3.125 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-4.8": { id: "anthropic/claude-opus-4.8", name: "Anthropic: Claude Opus 4.8", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-4.8-fast": { id: "anthropic/claude-opus-4.8-fast", name: "Anthropic: Claude Opus 4.8 (Fast)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-4.8:batch": { id: "anthropic/claude-opus-4.8:batch", name: "Anthropic: Claude Opus 4.8 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 12.5, cacheRead: 0.25, cacheWrite: 3.125 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-5": { id: "anthropic/claude-opus-5", name: "Claude Opus 5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-5-fast": { id: "anthropic/claude-opus-5-fast", name: "Claude Opus 5 (Fast)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-5:batch": { id: "anthropic/claude-opus-5:batch", name: "Claude Opus 5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 12.5, cacheRead: 0.25, cacheWrite: 3.125 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-sonnet-4": { id: "anthropic/claude-sonnet-4", name: "Anthropic: Claude Sonnet 4", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 }, contextWindow: 200000, maxTokens: 64000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-sonnet-4.5": { id: "anthropic/claude-sonnet-4.5", name: "Anthropic: Claude Sonnet 4.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 }, contextWindow: 1e6, maxTokens: 64000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-sonnet-4.5:batch": { id: "anthropic/claude-sonnet-4.5:batch", name: "Anthropic: Claude Sonnet 4.5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 7.5, cacheRead: 0.15, cacheWrite: 1.875 }, contextWindow: 1e6, maxTokens: 64000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-sonnet-4.6": { id: "anthropic/claude-sonnet-4.6", name: "Anthropic: Claude Sonnet 4.6", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { max: "max" } }, "anthropic/claude-sonnet-4.6:batch": { id: "anthropic/claude-sonnet-4.6:batch", name: "Anthropic: Claude Sonnet 4.6 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 7.5, cacheRead: 0.15, cacheWrite: 1.875 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { max: "max" } }, "anthropic/claude-sonnet-5": { id: "anthropic/claude-sonnet-5", name: "Anthropic: Claude Sonnet 5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-sonnet-5:batch": { id: "anthropic/claude-sonnet-5:batch", name: "Anthropic: Claude Sonnet 5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 5, cacheRead: 0.1, cacheWrite: 1.25 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "arcee-ai/trinity-large-thinking": { id: "arcee-ai/trinity-large-thinking", name: "Arcee AI: Trinity Large Thinking", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.22, output: 0.85, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "arcee-ai/virtuoso-large": { id: "arcee-ai/virtuoso-large", name: "Arcee AI: Virtuoso Large", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.75, output: 1.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 64000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, auto: { id: "auto", name: "Auto", api: "openai-completions", provider: "openrouter", baseUrl: "https://openrouter.ai/api/v1", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 30000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "bytedance-seed/seed-1.6": { id: "bytedance-seed/seed-1.6", name: "ByteDance Seed: Seed 1.6", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "bytedance-seed/seed-1.6-flash": { id: "bytedance-seed/seed-1.6-flash", name: "ByteDance Seed: Seed 1.6 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.075, output: 0.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "bytedance-seed/seed-2-1-turbo": { id: "bytedance-seed/seed-2-1-turbo", name: "ByteDance Seed: Seed 2.1 Turbo", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 2.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "bytedance-seed/seed-2.0-code": { id: "bytedance-seed/seed-2.0-code", name: "ByteDance Seed: Seed-2.0-Code", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "bytedance-seed/seed-2.0-lite": { id: "bytedance-seed/seed-2.0-lite", name: "ByteDance Seed: Seed-2.0-Lite", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "bytedance-seed/seed-2.0-mini": { id: "bytedance-seed/seed-2.0-mini", name: "ByteDance Seed: Seed-2.0-Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "cohere/command-r-08-2024": { id: "cohere/command-r-08-2024", name: "Cohere: Command R (08-2024)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.15, output: 0.6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "cohere/command-r-plus-08-2024": { id: "cohere/command-r-plus-08-2024", name: "Cohere: Command R+ (08-2024)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 2.5, output: 10, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "cohere/north-mini-code:free": { id: "cohere/north-mini-code:free", name: "Cohere: North Mini Code (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 64000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-chat": { id: "deepseek/deepseek-chat", name: "DeepSeek: DeepSeek V3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.2574, output: 1.0287, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-chat-v3-0324": { id: "deepseek/deepseek-chat-v3-0324", name: "DeepSeek: DeepSeek V3 0324", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.25, output: 1, cacheRead: 0, cacheWrite: 0 }, contextWindow: 163840, maxTokens: 163840, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-chat-v3.1": { id: "deepseek/deepseek-chat-v3.1", name: "DeepSeek: DeepSeek V3.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.55, output: 1.65, cacheRead: 0.55, cacheWrite: 0 }, contextWindow: 161000, maxTokens: 161000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-r1": { id: "deepseek/deepseek-r1", name: "DeepSeek: R1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.7, output: 2.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 64000, maxTokens: 16000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-r1-0528": { id: "deepseek/deepseek-r1-0528", name: "DeepSeek: R1 0528", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.5, output: 2.15, cacheRead: 0.35, cacheWrite: 0 }, contextWindow: 163840, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-v3.1-terminus": { id: "deepseek/deepseek-v3.1-terminus", name: "DeepSeek: DeepSeek V3.1 Terminus", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.27, output: 1, cacheRead: 0.135, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-v3.2": { id: "deepseek/deepseek-v3.2", name: "DeepSeek: DeepSeek V3.2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.26, output: 0.38, cacheRead: 0.13, cacheWrite: 0 }, contextWindow: 163840, maxTokens: 163840, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-v3.2-exp": { id: "deepseek/deepseek-v3.2-exp", name: "DeepSeek: DeepSeek V3.2 Exp", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.27, output: 0.41, cacheRead: 0, cacheWrite: 0 }, contextWindow: 163840, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-v4-flash": { id: "deepseek/deepseek-v4-flash", name: "DeepSeek: DeepSeek V4 Flash 0423", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.07686, output: 0.15372, cacheRead: 0.015372, cacheWrite: 0 }, contextWindow: 1024000, maxTokens: 384000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", requiresReasoningContentOnAssistantMessages: true }, thinkingLevelMap: { minimal: null, low: null, medium: null, high: "high", max: null, xhigh: "xhigh" } }, "deepseek/deepseek-v4-flash-0731": { id: "deepseek/deepseek-v4-flash-0731", name: "DeepSeek: DeepSeek V4 Flash 0731", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.08, output: 0.18, cacheRead: 0.016, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 384000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", requiresReasoningContentOnAssistantMessages: true }, thinkingLevelMap: { minimal: null, low: null, medium: null, high: "high", max: null, xhigh: "xhigh" } }, "deepseek/deepseek-v4-flash-vision-exp": { id: "deepseek/deepseek-v4-flash-vision-exp", name: "DeepSeek: DeepSeek V4 Flash Vision Exp", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.44, output: 1.32, cacheRead: 0.014, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 384000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", requiresReasoningContentOnAssistantMessages: true }, thinkingLevelMap: { minimal: null, low: null, medium: null, high: "high", max: null, xhigh: "xhigh" } }, "deepseek/deepseek-v4-pro": { id: "deepseek/deepseek-v4-pro", name: "DeepSeek: DeepSeek V4 Pro 0423", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.532092, output: 1.064184, cacheRead: 0.044341, cacheWrite: 0 }, contextWindow: 1024000, maxTokens: 384000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", requiresReasoningContentOnAssistantMessages: true }, thinkingLevelMap: { minimal: null, low: null, medium: null, high: "high", max: null, xhigh: "xhigh" } }, "deepseek/deepseek-v4-pro-0813": { id: "deepseek/deepseek-v4-pro-0813", name: "DeepSeek: DeepSeek V4 Pro 0813", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.188, output: 3.564, cacheRead: 0.0396, cacheWrite: 0 }, contextWindow: 1048575, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", requiresReasoningContentOnAssistantMessages: true }, thinkingLevelMap: { minimal: null, low: null, medium: null, high: "high", max: null, xhigh: "xhigh" } }, "dots-studio/dots-3-note-preview:free": { id: "dots-studio/dots-3-note-preview:free", name: "Dots Studio: Dots3-Note Preview (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 512000, maxTokens: 512000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-2.5-flash": { id: "google/gemini-2.5-flash", name: "Google: Gemini 2.5 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 2.5, cacheRead: 0.03, cacheWrite: 0.083333 }, contextWindow: 1048576, maxTokens: 65535, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-2.5-flash-lite": { id: "google/gemini-2.5-flash-lite", name: "Google: Gemini 2.5 Flash Lite", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.4, cacheRead: 0.01, cacheWrite: 0.083333 }, contextWindow: 1048576, maxTokens: 65535, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-2.5-flash-lite:batch": { id: "google/gemini-2.5-flash-lite:batch", name: "Google: Gemini 2.5 Flash Lite (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.05, output: 0.2, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65535, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-2.5-flash:batch": { id: "google/gemini-2.5-flash:batch", name: "Google: Gemini 2.5 Flash (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.15, output: 1.25, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65535, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-2.5-pro": { id: "google/gemini-2.5-pro", name: "Google: Gemini 2.5 Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0.375 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-2.5-pro-preview": { id: "google/gemini-2.5-pro-preview", name: "Google: Gemini 2.5 Pro Preview 06-05", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0.375 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "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", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0.375 }, contextWindow: 1048576, maxTokens: 65535, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-2.5-pro:batch": { id: "google/gemini-2.5-pro:batch", name: "Google: Gemini 2.5 Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.625, output: 5, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3-flash-preview": { id: "google/gemini-3-flash-preview", name: "Google: Gemini 3 Flash Preview", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 3, cacheRead: 0.05, cacheWrite: 0.083333 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3-flash-preview:batch": { id: "google/gemini-3-flash-preview:batch", name: "Google: Gemini 3 Flash Preview (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 1.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3-pro-image": { id: "google/gemini-3-pro-image", name: "Google: Nano Banana Pro (Gemini 3 Pro Image)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 0.375 }, contextWindow: 65536, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.1-flash-lite": { id: "google/gemini-3.1-flash-lite", name: "Google: Gemini 3.1 Flash Lite", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 1.5, cacheRead: 0.025, cacheWrite: 0.083333 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.1-flash-lite-preview": { id: "google/gemini-3.1-flash-lite-preview", name: "Google: Gemini 3.1 Flash Lite Preview", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 1.5, cacheRead: 0.025, cacheWrite: 0.083333 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.1-flash-lite:batch": { id: "google/gemini-3.1-flash-lite:batch", name: "Google: Gemini 3.1 Flash Lite (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.125, output: 0.75, cacheRead: 0.0125, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.1-pro-preview": { id: "google/gemini-3.1-pro-preview", name: "Google: Gemini 3.1 Pro Preview", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 0.375 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.1-pro-preview-customtools": { id: "google/gemini-3.1-pro-preview-customtools", name: "Google: Gemini 3.1 Pro Preview Custom Tools", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 0.375 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.1-pro-preview:batch": { id: "google/gemini-3.1-pro-preview:batch", name: "Google: Gemini 3.1 Pro Preview (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.5-flash": { id: "google/gemini-3.5-flash", name: "Google: Gemini 3.5 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 9, cacheRead: 0.15, cacheWrite: 0.083333 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.5-flash-lite": { id: "google/gemini-3.5-flash-lite", name: "Google: Gemini 3.5 Flash Lite", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 2.5, cacheRead: 0.03, cacheWrite: 0.083333 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.5-flash-lite:batch": { id: "google/gemini-3.5-flash-lite:batch", name: "Google: Gemini 3.5 Flash Lite (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.15, output: 1.25, cacheRead: 0.015, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.5-flash:batch": { id: "google/gemini-3.5-flash:batch", name: "Google: Gemini 3.5 Flash (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.75, output: 4.5, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.6-flash": { id: "google/gemini-3.6-flash", name: "Google: Gemini 3.6 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.75, output: 3.75, cacheRead: 0.075, cacheWrite: 0.041667 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.6-flash:batch": { id: "google/gemini-3.6-flash:batch", name: "Google: Gemini 3.6 Flash (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.375, output: 1.875, cacheRead: 0.0375, cacheWrite: 0.041667 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.7-flash": { id: "google/gemini-3.7-flash", name: "Google: Gemini 3.7 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.375, output: 1.875, cacheRead: 0.0375, cacheWrite: 0.020833 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.7-flash:batch": { id: "google/gemini-3.7-flash:batch", name: "Google: Gemini 3.7 Flash (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1875, output: 0.9375, cacheRead: 0.01875, cacheWrite: 0.020833 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemma-3-12b-it": { id: "google/gemma-3-12b-it", name: "Google: Gemma 3 12B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.05, output: 0.15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemma-3-27b-it": { id: "google/gemma-3-27b-it", name: "Google: Gemma 3 27B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.08, output: 0.45, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemma-4-26b-a4b-it": { id: "google/gemma-4-26b-a4b-it", name: "Google: Gemma 4 26B A4B ", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.07, output: 0.34, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemma-4-26b-a4b-it:free": { id: "google/gemma-4-26b-a4b-it:free", name: "Google: Gemma 4 26B A4B (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemma-4-31b-it": { id: "google/gemma-4-31b-it", name: "Google: Gemma 4 31B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.34, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemma-4-31b-it:free": { id: "google/gemma-4-31b-it:free", name: "Google: Gemma 4 31B (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "ibm-granite/granite-4.1-8b": { id: "ibm-granite/granite-4.1-8b", name: "IBM: Granite 4.1 8B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.05, output: 0.1, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "inception/mercury-2": { id: "inception/mercury-2", name: "Inception: Mercury 2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.25, output: 0.75, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 50000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" }, thinkingLevelMap: { off: null } }, "inclusionai/ling-2.6-1t": { id: "inclusionai/ling-2.6-1t", name: "inclusionAI: Ling-2.6-1T", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.075, output: 0.625, cacheRead: 0.015, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "inclusionai/ling-2.6-flash": { id: "inclusionai/ling-2.6-flash", name: "inclusionAI: Ling-2.6-flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.01, output: 0.03, cacheRead: 0.002, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "inclusionai/ling-3.0-flash": { id: "inclusionai/ling-3.0-flash", name: "Ling-3.0-flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.021, output: 0.063, cacheRead: 0.0042, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "inclusionai/ring-2.6-1t": { id: "inclusionai/ring-2.6-1t", name: "inclusionAI: Ring-2.6-1T", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.075, output: 0.625, cacheRead: 0.015, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "kwaipilot/kat-coder-air-v2.5": { id: "kwaipilot/kat-coder-air-v2.5", name: "Kwaipilot: KAT-Coder-Air V2.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.15, output: 0.6, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 80000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "kwaipilot/kat-coder-pro-v2": { id: "kwaipilot/kat-coder-pro-v2", name: "Kwaipilot: KAT-Coder-Pro V2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 80000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "kwaipilot/kat-coder-pro-v2.5": { id: "kwaipilot/kat-coder-pro-v2.5", name: "Kwaipilot: KAT-Coder-Pro V2.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.74, output: 2.96, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 80000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "liquid/lfm-2.5-2.6b:free": { id: "liquid/lfm-2.5-2.6b:free", name: "LiquidAI: LFM2.5-2.6B (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 65536, maxTokens: 8192, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meituan/longcat-2.0": { id: "meituan/longcat-2.0", name: "Meituan: LongCat 2.0", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.006, cacheWrite: 0 }, contextWindow: 1048756, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta-llama/llama-3.1-70b-instruct": { id: "meta-llama/llama-3.1-70b-instruct", name: "Meta: Llama 3.1 70B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.4, output: 0.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta-llama/llama-3.1-8b-instruct": { id: "meta-llama/llama-3.1-8b-instruct", name: "Meta: Llama 3.1 8B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.05, output: 0.08, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta-llama/llama-3.3-70b-instruct": { id: "meta-llama/llama-3.3-70b-instruct", name: "Meta: Llama 3.3 70B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.1, output: 0.32, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta-llama/llama-4-maverick": { id: "meta-llama/llama-4-maverick", name: "Meta: Llama 4 Maverick", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.2, output: 0.8, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta-llama/llama-4-scout": { id: "meta-llama/llama-4-scout", name: "Meta: Llama 4 Scout", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 327680, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta/muse-glimmer-30b": { id: "meta/muse-glimmer-30b", name: "Meta: Muse Glimmer 30B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 1.1, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta/muse-spark-1.1": { id: "meta/muse-spark-1.1", name: "Meta: Muse Spark 1.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 4.25, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta/muse-spark-1.2": { id: "meta/muse-spark-1.2", name: "Meta: Muse Spark 1.2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 4.25, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta/muse-spark-1.2-contributor": { id: "meta/muse-spark-1.2-contributor", name: "Meta: Muse Spark 1.2 Contributor", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.2, cacheRead: 0.002, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "minimax/minimax-m1": { id: "minimax/minimax-m1", name: "MiniMax: MiniMax M1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.55, output: 2.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 40000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "minimax/minimax-m2": { id: "minimax/minimax-m2", name: "MiniMax: MiniMax M2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.255, output: 1.02, cacheRead: 0, cacheWrite: 0 }, contextWindow: 204800, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "minimax/minimax-m2.1": { id: "minimax/minimax-m2.1", name: "MiniMax: MiniMax M2.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 204800, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "minimax/minimax-m2.5": { id: "minimax/minimax-m2.5", name: "MiniMax: MiniMax M2.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.27, output: 1.08, cacheRead: 0.027, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "minimax/minimax-m2.7": { id: "minimax/minimax-m2.7", name: "MiniMax: MiniMax M2.7", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 204800, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "minimax/minimax-m3": { id: "minimax/minimax-m3", name: "MiniMax: MiniMax M3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 524288, maxTokens: 512000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "minimax/minimax-m3:batch": { id: "minimax/minimax-m3:batch", name: "MiniMax: MiniMax M3 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 524288, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/codestral-2508": { id: "mistralai/codestral-2508", name: "Mistral: Codestral 2508", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.3, output: 0.9, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/ministral-14b-2512": { id: "mistralai/ministral-14b-2512", name: "Mistral: Ministral 3 14B 2512", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.2, output: 0.2, cacheRead: 0.02, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/ministral-3b-2512": { id: "mistralai/ministral-3b-2512", name: "Mistral: Ministral 3 3B 2512", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.1, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/ministral-8b-2512": { id: "mistralai/ministral-8b-2512", name: "Mistral: Ministral 3 8B 2512", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.15, output: 0.15, cacheRead: 0.015, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-large": { id: "mistralai/mistral-large", name: "Mistral Large", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 2, output: 6, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-large-2407": { id: "mistralai/mistral-large-2407", name: "Mistral Large 2407", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 2, output: 6, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-large-2512": { id: "mistralai/mistral-large-2512", name: "Mistral: Mistral Large 3 2512", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.5, output: 1.5, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-medium-3": { id: "mistralai/mistral-medium-3", name: "Mistral: Mistral Medium 3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.4, output: 2, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-medium-3-5": { id: "mistralai/mistral-medium-3-5", name: "Mistral: Mistral Medium 3.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 7.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-medium-3.1": { id: "mistralai/mistral-medium-3.1", name: "Mistral: Mistral Medium 3.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.4, output: 2, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-nemo": { id: "mistralai/mistral-nemo", name: "Mistral: Mistral Nemo", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.019, output: 0.03, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-saba": { id: "mistralai/mistral-saba", name: "Mistral: Saba", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.2, output: 0.6, cacheRead: 0.02, cacheWrite: 0 }, contextWindow: 32768, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-small-2603": { id: "mistralai/mistral-small-2603", name: "Mistral: Mistral Small 4", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.15, output: 0.6, cacheRead: 0.015, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-small-3.2-24b-instruct": { id: "mistralai/mistral-small-3.2-24b-instruct", name: "Mistral: Mistral Small 3.2 24B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.075, output: 0.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mixtral-8x22b-instruct": { id: "mistralai/mixtral-8x22b-instruct", name: "Mistral: Mixtral 8x22B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 2, output: 6, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 65536, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/voxtral-small-24b-2507": { id: "mistralai/voxtral-small-24b-2507", name: "Mistral: Voxtral Small 24B 2507", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.1, output: 0.3, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 32000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "moonshotai/kimi-k2": { id: "moonshotai/kimi-k2", name: "MoonshotAI: Kimi K2 0711", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.57, output: 2.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 100352, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "moonshotai/kimi-k2-0905": { id: "moonshotai/kimi-k2-0905", name: "MoonshotAI: Kimi K2 0905", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.6, output: 2.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 100352, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "moonshotai/kimi-k2-thinking": { id: "moonshotai/kimi-k2-thinking", name: "MoonshotAI: Kimi K2 Thinking", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.5, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 100352, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "moonshotai/kimi-k2.5": { id: "moonshotai/kimi-k2.5", name: "MoonshotAI: Kimi K2.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.41, output: 2.06, cacheRead: 0.07, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "moonshotai/kimi-k2.6": { id: "moonshotai/kimi-k2.6", name: "MoonshotAI: Kimi K2.6", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.5605, output: 2.36, cacheRead: 0.0944, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", requiresReasoningContentOnAssistantMessages: true } }, "moonshotai/kimi-k2.7-code": { id: "moonshotai/kimi-k2.7-code", name: "MoonshotAI: Kimi K2.7 Code", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.67, output: 3.4, cacheRead: 0.17, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "moonshotai/kimi-k2.7-code:batch": { id: "moonshotai/kimi-k2.7-code:batch", name: "MoonshotAI: Kimi K2.7 Code (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.95, output: 4, cacheRead: 0.19, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "moonshotai/kimi-k3": { id: "moonshotai/kimi-k3", name: "MoonshotAI: Kimi K3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nex-agi/nex-n2-mini": { id: "nex-agi/nex-n2-mini", name: "Nex AGI: Nex-N2-Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.025, output: 0.1, cacheRead: 0.0025, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nex-agi/nex-n2-pro": { id: "nex-agi/nex-n2-pro", name: "Nex AGI: Nex-N2-Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 1, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3-nano-30b-a3b": { id: "nvidia/nemotron-3-nano-30b-a3b", name: "NVIDIA: Nemotron 3 Nano 30B A3B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.05, output: 0.2, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3-nano-30b-a3b:free": { id: "nvidia/nemotron-3-nano-30b-a3b:free", name: "NVIDIA: Nemotron 3 Nano 30B A3B (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "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)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3-super-120b-a12b": { id: "nvidia/nemotron-3-super-120b-a12b", name: "NVIDIA: Nemotron 3 Super", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.085, output: 0.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3-super-120b-a12b:free": { id: "nvidia/nemotron-3-super-120b-a12b:free", name: "NVIDIA: Nemotron 3 Super (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3-ultra-550b-a55b": { id: "nvidia/nemotron-3-ultra-550b-a55b", name: "NVIDIA: Nemotron 3 Ultra", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.6, output: 3.6, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 512288, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3-ultra-550b-a55b:batch": { id: "nvidia/nemotron-3-ultra-550b-a55b:batch", name: "NVIDIA: Nemotron 3 Ultra (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.6, output: 3.6, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 512288, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3-ultra-550b-a55b:free": { id: "nvidia/nemotron-3-ultra-550b-a55b:free", name: "NVIDIA: Nemotron 3 Ultra (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3.5-lightning": { id: "nvidia/nemotron-3.5-lightning", name: "NVIDIA: Nemotron 3.5 Lightning", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.08, output: 0.2, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3.5-lightning:free": { id: "nvidia/nemotron-3.5-lightning:free", name: "NVIDIA: Nemotron 3.5 Lightning (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-nano-12b-v2-vl:free": { id: "nvidia/nemotron-nano-12b-v2-vl:free", name: "NVIDIA: Nemotron Nano 12B 2 VL (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-nano-9b-v2:free": { id: "nvidia/nemotron-nano-9b-v2:free", name: "NVIDIA: Nemotron Nano 9B V2 (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "openai/gpt-3.5-turbo": { id: "openai/gpt-3.5-turbo", name: "OpenAI: GPT-3.5 Turbo", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.5, output: 1.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 16385, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-3.5-turbo-0613": { id: "openai/gpt-3.5-turbo-0613", name: "OpenAI: GPT-3.5 Turbo (older v0613)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 1, output: 2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 4095, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-3.5-turbo-16k": { id: "openai/gpt-3.5-turbo-16k", name: "OpenAI: GPT-3.5 Turbo 16k", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 3, output: 4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 16385, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-3.5-turbo:batch": { id: "openai/gpt-3.5-turbo:batch", name: "OpenAI: GPT-3.5 Turbo (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.25, output: 0.75, cacheRead: 0, cacheWrite: 0 }, contextWindow: 16385, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4": { id: "openai/gpt-4", name: "OpenAI: GPT-4", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 30, output: 60, cacheRead: 0, cacheWrite: 0 }, contextWindow: 8191, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4-turbo": { id: "openai/gpt-4-turbo", name: "OpenAI: GPT-4 Turbo", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 10, output: 30, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4-turbo-preview": { id: "openai/gpt-4-turbo-preview", name: "OpenAI: GPT-4 Turbo Preview", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 10, output: 30, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4-turbo:batch": { id: "openai/gpt-4-turbo:batch", name: "OpenAI: GPT-4 Turbo (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 5, output: 15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4.1": { id: "openai/gpt-4.1", name: "OpenAI: GPT-4.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 2, output: 8, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4.1-mini": { id: "openai/gpt-4.1-mini", name: "OpenAI: GPT-4.1 Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.4, output: 1.6, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4.1-mini:batch": { id: "openai/gpt-4.1-mini:batch", name: "OpenAI: GPT-4.1 Mini (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.2, output: 0.8, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4.1-nano": { id: "openai/gpt-4.1-nano", name: "OpenAI: GPT-4.1 Nano", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.4, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4.1-nano:batch": { id: "openai/gpt-4.1-nano:batch", name: "OpenAI: GPT-4.1 Nano (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.05, output: 0.2, cacheRead: 0.0125, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4.1:batch": { id: "openai/gpt-4.1:batch", name: "OpenAI: GPT-4.1 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 1, output: 4, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o": { id: "openai/gpt-4o", name: "OpenAI: GPT-4o", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 2.5, output: 10, cacheRead: 1.25, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o-2024-05-13": { id: "openai/gpt-4o-2024-05-13", name: "OpenAI: GPT-4o (2024-05-13)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 5, output: 15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o-2024-08-06": { id: "openai/gpt-4o-2024-08-06", name: "OpenAI: GPT-4o (2024-08-06)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 2.5, output: 10, cacheRead: 1.25, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o-2024-11-20": { id: "openai/gpt-4o-2024-11-20", name: "OpenAI: GPT-4o (2024-11-20)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 2.5, output: 10, cacheRead: 1.25, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o-mini": { id: "openai/gpt-4o-mini", name: "OpenAI: GPT-4o-mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.15, output: 0.6, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o-mini-2024-07-18": { id: "openai/gpt-4o-mini-2024-07-18", name: "OpenAI: GPT-4o-mini (2024-07-18)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.15, output: 0.6, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o-mini:batch": { id: "openai/gpt-4o-mini:batch", name: "OpenAI: GPT-4o-mini (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.075, output: 0.3, cacheRead: 0.0375, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o:batch": { id: "openai/gpt-4o:batch", name: "OpenAI: GPT-4o (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 1.25, output: 5, cacheRead: 0.625, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5": { id: "openai/gpt-5", name: "OpenAI: GPT-5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5-codex:batch": { id: "openai/gpt-5-codex:batch", name: "OpenAI: GPT-5 Codex (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.625, output: 5, cacheRead: 0.0625, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5-mini": { id: "openai/gpt-5-mini", name: "OpenAI: GPT-5 Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5-mini:batch": { id: "openai/gpt-5-mini:batch", name: "OpenAI: GPT-5 Mini (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.125, output: 1, cacheRead: 0.0125, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5-nano": { id: "openai/gpt-5-nano", name: "OpenAI: GPT-5 Nano", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.05, output: 0.4, cacheRead: 0.005, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5-nano:batch": { id: "openai/gpt-5-nano:batch", name: "OpenAI: GPT-5 Nano (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.025, output: 0.2, cacheRead: 0.0025, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5-pro": { id: "openai/gpt-5-pro", name: "OpenAI: GPT-5 Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 120, cacheRead: 0, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5-pro:batch": { id: "openai/gpt-5-pro:batch", name: "OpenAI: GPT-5 Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 7.5, output: 60, cacheRead: 0, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5.1": { id: "openai/gpt-5.1", name: "OpenAI: GPT-5.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5.1-codex": { id: "openai/gpt-5.1-codex", name: "OpenAI: GPT-5.1-Codex", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.13, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5.1-codex-max": { id: "openai/gpt-5.1-codex-max", name: "OpenAI: GPT-5.1-Codex-Max", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5.1-codex-mini": { id: "openai/gpt-5.1-codex-mini", name: "OpenAI: GPT-5.1-Codex-Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5.1:batch": { id: "openai/gpt-5.1:batch", name: "OpenAI: GPT-5.1 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.625, output: 5, cacheRead: 0.0625, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5.2": { id: "openai/gpt-5.2", name: "OpenAI: GPT-5.2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2-chat": { id: "openai/gpt-5.2-chat", name: "OpenAI: GPT-5.2 Chat", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 32000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2-codex": { id: "openai/gpt-5.2-codex", name: "OpenAI: GPT-5.2-Codex", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2-pro": { id: "openai/gpt-5.2-pro", name: "OpenAI: GPT-5.2 Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 21, output: 168, cacheRead: 0, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2-pro:batch": { id: "openai/gpt-5.2-pro:batch", name: "OpenAI: GPT-5.2 Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 10.5, output: 84, cacheRead: 0, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2:batch": { id: "openai/gpt-5.2:batch", name: "OpenAI: GPT-5.2 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.875, output: 7, cacheRead: 0.0875, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.3-codex": { id: "openai/gpt-5.3-codex", name: "OpenAI: GPT-5.3-Codex", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4": { id: "openai/gpt-5.4", name: "OpenAI: GPT-5.4", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 15, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-mini": { id: "openai/gpt-5.4-mini", name: "OpenAI: GPT-5.4 Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.75, output: 4.5, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-mini:batch": { id: "openai/gpt-5.4-mini:batch", name: "OpenAI: GPT-5.4 Mini (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.375, output: 2.25, cacheRead: 0.0375, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-nano": { id: "openai/gpt-5.4-nano", name: "OpenAI: GPT-5.4 Nano", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 1.25, cacheRead: 0.02, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-nano:batch": { id: "openai/gpt-5.4-nano:batch", name: "OpenAI: GPT-5.4 Nano (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.625, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-pro": { id: "openai/gpt-5.4-pro", name: "OpenAI: GPT-5.4 Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 30, output: 180, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-pro:batch": { id: "openai/gpt-5.4-pro:batch", name: "OpenAI: GPT-5.4 Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 90, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4:batch": { id: "openai/gpt-5.4:batch", name: "OpenAI: GPT-5.4 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 7.5, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.5": { id: "openai/gpt-5.5", name: "OpenAI: GPT-5.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.5-pro": { id: "openai/gpt-5.5-pro", name: "OpenAI: GPT-5.5 Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 30, output: 180, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", off: null, minimal: null, low: null } }, "openai/gpt-5.5-pro:batch": { id: "openai/gpt-5.5-pro:batch", name: "OpenAI: GPT-5.5 Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 90, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.5:batch": { id: "openai/gpt-5.5:batch", name: "OpenAI: GPT-5.5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 15, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.6-luna": { id: "openai/gpt-5.6-luna", name: "OpenAI: GPT-5.6 Luna", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 1.2, cacheRead: 0.02, cacheWrite: 0.25 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-luna-pro": { id: "openai/gpt-5.6-luna-pro", name: "OpenAI: GPT-5.6 Luna Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 1.2, cacheRead: 0.02, cacheWrite: 0.25 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-luna-pro:batch": { id: "openai/gpt-5.6-luna-pro:batch", name: "OpenAI: GPT-5.6 Luna Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.6, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-luna:batch": { id: "openai/gpt-5.6-luna:batch", name: "OpenAI: GPT-5.6 Luna (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.6, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-sol": { id: "openai/gpt-5.6-sol", name: "OpenAI: GPT-5.6 Sol", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-sol-pro": { id: "openai/gpt-5.6-sol-pro", name: "OpenAI: GPT-5.6 Sol Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-sol-pro:batch": { id: "openai/gpt-5.6-sol-pro:batch", name: "OpenAI: GPT-5.6 Sol Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 5, cacheRead: 0.1, cacheWrite: 1.25 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-sol:batch": { id: "openai/gpt-5.6-sol:batch", name: "OpenAI: GPT-5.6 Sol (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 5, cacheRead: 0.1, cacheWrite: 1.25 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-terra": { id: "openai/gpt-5.6-terra", name: "OpenAI: GPT-5.6 Terra", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-terra-pro": { id: "openai/gpt-5.6-terra-pro", name: "OpenAI: GPT-5.6 Terra Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-terra-pro:batch": { id: "openai/gpt-5.6-terra-pro:batch", name: "OpenAI: GPT-5.6 Terra Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 6, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-terra:batch": { id: "openai/gpt-5.6-terra:batch", name: "OpenAI: GPT-5.6 Terra (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 6, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5:batch": { id: "openai/gpt-5:batch", name: "OpenAI: GPT-5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.625, output: 5, cacheRead: 0.0625, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-audio": { id: "openai/gpt-audio", name: "OpenAI: GPT Audio", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 2.5, output: 10, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-audio-mini": { id: "openai/gpt-audio-mini", name: "OpenAI: GPT Audio Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.6, output: 2.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-chat-latest": { id: "openai/gpt-chat-latest", name: "OpenAI: GPT Chat Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-oss-120b": { id: "openai/gpt-oss-120b", name: "OpenAI: gpt-oss-120b", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.03, output: 0.17, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-oss-20b": { id: "openai/gpt-oss-20b", name: "OpenAI: gpt-oss-20b", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.03, output: 0.13, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-oss-safeguard-20b": { id: "openai/gpt-oss-safeguard-20b", name: "OpenAI: gpt-oss-safeguard-20b", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.075, output: 0.3, cacheRead: 0.0375, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 65536, compat: { thinkingFormat: "openrouter" } }, "openai/o1": { id: "openai/o1", name: "OpenAI: o1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 60, cacheRead: 7.5, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o1:batch": { id: "openai/o1:batch", name: "OpenAI: o1 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 7.5, output: 30, cacheRead: 3.75, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3": { id: "openai/o3", name: "OpenAI: o3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 8, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3-mini": { id: "openai/o3-mini", name: "OpenAI: o3 Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.1, output: 4.4, cacheRead: 0.55, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3-mini-high": { id: "openai/o3-mini-high", name: "OpenAI: o3 Mini High", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.1, output: 4.4, cacheRead: 0.55, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3-mini-high:batch": { id: "openai/o3-mini-high:batch", name: "OpenAI: o3 Mini High (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.55, output: 2.2, cacheRead: 0.275, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3-mini:batch": { id: "openai/o3-mini:batch", name: "OpenAI: o3 Mini (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.55, output: 2.2, cacheRead: 0.275, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3-pro": { id: "openai/o3-pro", name: "OpenAI: o3 Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 20, output: 80, cacheRead: 0, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3-pro:batch": { id: "openai/o3-pro:batch", name: "OpenAI: o3 Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 40, cacheRead: 0, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3:batch": { id: "openai/o3:batch", name: "OpenAI: o3 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 4, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o4-mini": { id: "openai/o4-mini", name: "OpenAI: o4 Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.1, output: 4.4, cacheRead: 0.275, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o4-mini-high": { id: "openai/o4-mini-high", name: "OpenAI: o4 Mini High", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.1, output: 4.4, cacheRead: 0.275, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o4-mini-high:batch": { id: "openai/o4-mini-high:batch", name: "OpenAI: o4 Mini High (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.55, output: 2.2, cacheRead: 0.1375, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o4-mini:batch": { id: "openai/o4-mini:batch", name: "OpenAI: o4 Mini (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.55, output: 2.2, cacheRead: 0.1375, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openrouter/auto": { id: "openrouter/auto", name: "Auto Router", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: -1e6, output: -1e6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "openrouter/auto-beta": { id: "openrouter/auto-beta", name: "Auto Router (Beta)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: -1e6, output: -1e6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "openrouter/free": { id: "openrouter/free", name: "Free Models Router", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "openrouter/fusion": { id: "openrouter/fusion", name: "OpenRouter: Fusion", api: "openai-completions", provider: "openrouter", baseUrl: "https://openrouter.ai/api/v1", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 30000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "poolside/laguna-s-2.1": { id: "poolside/laguna-s-2.1", name: "Poolside: Laguna S 2.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.09, output: 0.18, cacheRead: 0.009, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "poolside/laguna-s-2.1:free": { id: "poolside/laguna-s-2.1:free", name: "Poolside: Laguna S 2.1 (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "poolside/laguna-xs-2.1": { id: "poolside/laguna-xs-2.1", name: "Poolside: Laguna XS 2.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.06, output: 0.12, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "poolside/laguna-xs-2.1:free": { id: "poolside/laguna-xs-2.1:free", name: "Poolside: Laguna XS 2.1 (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen-2.5-72b-instruct": { id: "qwen/qwen-2.5-72b-instruct", name: "Qwen2.5 72B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.36, output: 0.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 32768, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen-2.5-7b-instruct": { id: "qwen/qwen-2.5-7b-instruct", name: "Qwen: Qwen2.5 7B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.1, output: 0.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 32768, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen-plus": { id: "qwen/qwen-plus", name: "Qwen: Qwen-Plus", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.26, output: 0.78, cacheRead: 0.052, cacheWrite: 0.325 }, contextWindow: 1e6, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen-plus-2025-07-28": { id: "qwen/qwen-plus-2025-07-28", name: "Qwen: Qwen Plus 0728", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.26, output: 0.78, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen-plus-2025-07-28:thinking": { id: "qwen/qwen-plus-2025-07-28:thinking", name: "Qwen: Qwen Plus 0728 (thinking)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.26, output: 0.78, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-14b": { id: "qwen/qwen3-14b", name: "Qwen: Qwen3 14B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.12, output: 0.24, cacheRead: 0, cacheWrite: 0 }, contextWindow: 40960, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-235b-a22b": { id: "qwen/qwen3-235b-a22b", name: "Qwen: Qwen3 235B A22B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.455, output: 1.82, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 8192, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-235b-a22b-2507": { id: "qwen/qwen3-235b-a22b-2507", name: "Qwen: Qwen3 235B A22B Instruct 2507", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.09, output: 0.55, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-235b-a22b-thinking-2507": { id: "qwen/qwen3-235b-a22b-thinking-2507", name: "Qwen: Qwen3 235B A22B Thinking 2507", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.23, output: 2.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-30b-a3b": { id: "qwen/qwen3-30b-a3b", name: "Qwen: Qwen3 30B A3B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.13, output: 0.52, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 8192, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-30b-a3b-instruct-2507": { id: "qwen/qwen3-30b-a3b-instruct-2507", name: "Qwen: Qwen3 30B A3B Instruct 2507", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.04815, output: 0.19305, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 32000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-30b-a3b-thinking-2507": { id: "qwen/qwen3-30b-a3b-thinking-2507", name: "Qwen: Qwen3 30B A3B Thinking 2507", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.2, output: 2.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 81920, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-32b": { id: "qwen/qwen3-32b", name: "Qwen: Qwen3 32B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.08, output: 0.28, cacheRead: 0, cacheWrite: 0 }, contextWindow: 40960, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-8b": { id: "qwen/qwen3-8b", name: "Qwen: Qwen3 8B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.117, output: 0.455, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 8192, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-coder": { id: "qwen/qwen3-coder", name: "Qwen: Qwen3 Coder 480B A35B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.3, output: 1, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-coder-30b-a3b-instruct": { id: "qwen/qwen3-coder-30b-a3b-instruct", name: "Qwen: Qwen3 Coder 30B A3B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.07, output: 0.28, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-coder-flash": { id: "qwen/qwen3-coder-flash", name: "Qwen: Qwen3 Coder Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.195, output: 0.975, cacheRead: 0.039, cacheWrite: 0.24375 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-coder-next": { id: "qwen/qwen3-coder-next", name: "Qwen: Qwen3 Coder Next", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.12, output: 0.8, cacheRead: 0.07, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-coder-plus": { id: "qwen/qwen3-coder-plus", name: "Qwen: Qwen3 Coder Plus", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.65, output: 3.25, cacheRead: 0.13, cacheWrite: 0.8125 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-max": { id: "qwen/qwen3-max", name: "Qwen: Qwen3 Max", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.78, output: 3.9, cacheRead: 0.156, cacheWrite: 0.975 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-max-thinking": { id: "qwen/qwen3-max-thinking", name: "Qwen: Qwen3 Max Thinking", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.78, output: 3.9, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-next-80b-a3b-instruct": { id: "qwen/qwen3-next-80b-a3b-instruct", name: "Qwen: Qwen3 Next 80B A3B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.1, output: 1.1, cacheRead: 0.07, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-next-80b-a3b-thinking": { id: "qwen/qwen3-next-80b-a3b-thinking", name: "Qwen: Qwen3 Next 80B A3B Thinking", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.15, output: 1.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-vl-235b-a22b-instruct": { id: "qwen/qwen3-vl-235b-a22b-instruct", name: "Qwen: Qwen3 VL 235B A22B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.21, output: 1.9, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-vl-235b-a22b-thinking": { id: "qwen/qwen3-vl-235b-a22b-thinking", name: "Qwen: Qwen3 VL 235B A22B Thinking", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.4, output: 4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-vl-30b-a3b-instruct": { id: "qwen/qwen3-vl-30b-a3b-instruct", name: "Qwen: Qwen3 VL 30B A3B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.13, output: 0.52, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-vl-30b-a3b-thinking": { id: "qwen/qwen3-vl-30b-a3b-thinking", name: "Qwen: Qwen3 VL 30B A3B Thinking", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 2.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-vl-32b-instruct": { id: "qwen/qwen3-vl-32b-instruct", name: "Qwen: Qwen3 VL 32B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.104, output: 0.416, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-vl-8b-instruct": { id: "qwen/qwen3-vl-8b-instruct", name: "Qwen: Qwen3 VL 8B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.117, output: 0.455, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-vl-8b-thinking": { id: "qwen/qwen3-vl-8b-thinking", name: "Qwen: Qwen3 VL 8B Thinking", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.18, output: 2.1, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-122b-a10b": { id: "qwen/qwen3.5-122b-a10b", name: "Qwen: Qwen3.5-122B-A10B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.26, output: 2.08, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-27b": { id: "qwen/qwen3.5-27b", name: "Qwen: Qwen3.5-27B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.195, output: 1.56, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-35b-a3b": { id: "qwen/qwen3.5-35b-a3b", name: "Qwen: Qwen3.5-35B-A3B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 1.25, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-397b-a17b": { id: "qwen/qwen3.5-397b-a17b", name: "Qwen: Qwen3.5 397B A17B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.39, output: 2.34, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-9b": { id: "qwen/qwen3.5-9b", name: "Qwen: Qwen3.5-9B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-flash-02-23": { id: "qwen/qwen3.5-flash-02-23", name: "Qwen: Qwen3.5-Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.065, output: 0.26, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-plus-02-15": { id: "qwen/qwen3.5-plus-02-15", name: "Qwen: Qwen3.5 Plus 2026-02-15", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.26, output: 1.56, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-plus-20260420": { id: "qwen/qwen3.5-plus-20260420", name: "Qwen: Qwen3.5 Plus 2026-04-20", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 1.8, cacheRead: 0, cacheWrite: 0.375 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.6-27b": { id: "qwen/qwen3.6-27b", name: "Qwen: Qwen3.6 27B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.6, output: 3.6, cacheRead: 0.12, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.6-35b-a3b": { id: "qwen/qwen3.6-35b-a3b", name: "Qwen: Qwen3.6 35B A3B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.14, output: 1, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.6-flash": { id: "qwen/qwen3.6-flash", name: "Qwen: Qwen3.6 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1875, output: 1.125, cacheRead: 0, cacheWrite: 0.234375 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.6-max-preview": { id: "qwen/qwen3.6-max-preview", name: "Qwen: Qwen3.6 Max Preview", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.027, output: 6.162, cacheRead: 0, cacheWrite: 1.28375 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.6-plus": { id: "qwen/qwen3.6-plus", name: "Qwen: Qwen3.6 Plus", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.325, output: 1.95, cacheRead: 0, cacheWrite: 0.40625 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.7-flash": { id: "qwen/qwen3.7-flash", name: "Qwen: Qwen3.7 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.03, output: 0.13, cacheRead: 0.006, cacheWrite: 0.038 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.7-max": { id: "qwen/qwen3.7-max", name: "Qwen: Qwen3.7 Max", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.475, output: 4.425, cacheRead: 0.295, cacheWrite: 1.84375 }, contextWindow: 1e6, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.7-plus": { id: "qwen/qwen3.7-plus", name: "Qwen: Qwen3.7 Plus", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.32, output: 1.28, cacheRead: 0.064, cacheWrite: 0.4 }, contextWindow: 1e6, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.8-2.4t-a95b": { id: "qwen/qwen3.8-2.4t-a95b", name: "Qwen: Qwen3.8 2.4T A95B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 2, output: 6, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.8-27b": { id: "qwen/qwen3.8-27b", name: "Qwen: Qwen3.8 27B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.45, output: 3.2, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.8-max": { id: "qwen/qwen3.8-max", name: "Qwen: Qwen3.8 Max", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.25, cacheWrite: 2.5 }, contextWindow: 1e6, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "rekaai/reka-edge": { id: "rekaai/reka-edge", name: "Reka Edge", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.1, cacheRead: 0, cacheWrite: 0 }, contextWindow: 16384, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "relace/relace-search": { id: "relace/relace-search", name: "Relace: Relace Search", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 1, output: 3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "sakana/fugu-ultra": { id: "sakana/fugu-ultra", name: "Sakana: Fugu Ultra", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "sakana/sakana-namazu": { id: "sakana/sakana-namazu", name: "Sakana: Sakana Namazu", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.95, output: 4, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "sao10k/l3.1-euryale-70b": { id: "sao10k/l3.1-euryale-70b", name: "Sao10K: Llama 3.1 Euryale 70B v2.2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.85, output: 0.85, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "stealth/ox-alpha": { id: "stealth/ox-alpha", name: "Ox Alpha", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "stepfun/step-3.5-flash": { id: "stepfun/step-3.5-flash", name: "StepFun: Step 3.5 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.1, output: 0.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "stepfun/step-3.7-flash": { id: "stepfun/step-3.7-flash", name: "StepFun: Step 3.7 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 1.15, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "tencent/hy3": { id: "tencent/hy3", name: "Tencent: Hy3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.132, output: 0.528, cacheRead: 0.033, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "tencent/hy3-preview": { id: "tencent/hy3-preview", name: "Tencent: Hy3 preview", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.18, output: 0.6, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "thedrummer/unslopnemo-12b": { id: "thedrummer/unslopnemo-12b", name: "TheDrummer: UnslopNemo 12B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.4, output: 0.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1024000, maxTokens: 1024000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "thinkingmachines/inkling": { id: "thinkingmachines/inkling", name: "Thinking Machines: Inkling", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.95, output: 4.05, cacheRead: 0.16, cacheWrite: 0 }, contextWindow: 524288, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "thinkingmachines/inkling-small": { id: "thinkingmachines/inkling-small", name: "Thinking Machines: Inkling Small", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.45, output: 1.2, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 524288, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "thinkingmachines/inkling-small:free": { id: "thinkingmachines/inkling-small:free", name: "Thinking Machines: Inkling Small (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "thinkingmachines/inkling:batch": { id: "thinkingmachines/inkling:batch", name: "Thinking Machines: Inkling (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 4.05, cacheRead: 0.17, cacheWrite: 0 }, contextWindow: 524288, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "thinkingmachines/inkling:free": { id: "thinkingmachines/inkling:free", name: "Thinking Machines: Inkling (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "upstage/solar-pro-3": { id: "upstage/solar-pro-3", name: "Upstage: Solar Pro 3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.15, output: 0.6, cacheRead: 0.015, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "upstage/solar-pro4": { id: "upstage/solar-pro4", name: "Upstage: Solar Pro 4", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.03, output: 0.12, cacheRead: 0.006, cacheWrite: 0 }, contextWindow: 524288, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "x-ai/grok-4.20": { id: "x-ai/grok-4.20", name: "SpaceXAI: Grok 4.20", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "x-ai/grok-4.3": { id: "x-ai/grok-4.3", name: "SpaceXAI: Grok 4.3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "x-ai/grok-4.5": { id: "x-ai/grok-4.5", name: "SpaceXAI: Grok 4.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.3, cacheWrite: 0 }, contextWindow: 500000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "x-ai/grok-4.6": { id: "x-ai/grok-4.6", name: "SpaceXAI: Grok 4.6", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 500000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "x-ai/grok-build-0.1": { id: "x-ai/grok-build-0.1", name: "SpaceXAI: Grok Build 0.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 2, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "xiaomi/mimo-v2.5": { id: "xiaomi/mimo-v2.5", name: "Xiaomi: MiMo-V2.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.14, output: 0.28, cacheRead: 0.0028, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "xiaomi/mimo-v2.5-pro": { id: "xiaomi/mimo-v2.5-pro", name: "Xiaomi: MiMo-V2.5-Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.435, output: 0.87, cacheRead: 0.0036, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-4.5": { id: "z-ai/glm-4.5", name: "Z.ai: GLM 4.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.2, cacheRead: 0.11, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 98304, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-4.5-air": { id: "z-ai/glm-4.5-air", name: "Z.ai: GLM 4.5 Air", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.13, output: 0.85, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 98304, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-4.5v": { id: "z-ai/glm-4.5v", name: "Z.ai: GLM 4.5V", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.6, output: 1.8, cacheRead: 0.11, cacheWrite: 0 }, contextWindow: 65536, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-4.6": { id: "z-ai/glm-4.6", name: "Z.ai: GLM 4.6", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.5, output: 2, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 202752, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-4.6v": { id: "z-ai/glm-4.6v", name: "Z.ai: GLM 4.6V", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 0.9, cacheRead: 0.055, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-4.7": { id: "z-ai/glm-4.7", name: "Z.ai: GLM 4.7", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.4, output: 1.75, cacheRead: 0.08, cacheWrite: 0 }, contextWindow: 202752, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-4.7-flash": { id: "z-ai/glm-4.7-flash", name: "Z.ai: GLM 4.7 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.06, output: 0.4, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 202752, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-5": { id: "z-ai/glm-5", name: "Z.ai: GLM 5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.6, output: 1.9, cacheRead: 0.119, cacheWrite: 0 }, contextWindow: 198000, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-5-turbo": { id: "z-ai/glm-5-turbo", name: "Z.ai: GLM 5 Turbo", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.2, output: 4, cacheRead: 0.24, cacheWrite: 0 }, contextWindow: 202752, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-5.1": { id: "z-ai/glm-5.1", name: "Z.ai: GLM 5.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.966, output: 3.036, cacheRead: 0.1794, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-5.2": { id: "z-ai/glm-5.2", name: "Z.ai: GLM 5.2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.966, output: 3.036, cacheRead: 0.1932, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "z-ai/glm-5.2:batch": { id: "z-ai/glm-5.2:batch", name: "Z.ai: GLM 5.2 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 }, contextWindow: 1048575, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-5.2:free": { id: "z-ai/glm-5.2:free", name: "Z.ai: GLM 5.2 (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-5.3": { id: "z-ai/glm-5.3", name: "Z.ai: GLM 5.3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-5v-turbo": { id: "z-ai/glm-5v-turbo", name: "Z.ai: GLM 5V Turbo", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.2, output: 4, cacheRead: 0.24, cacheWrite: 0 }, contextWindow: 202752, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "~anthropic/claude-fable-latest": { id: "~anthropic/claude-fable-latest", name: "Anthropic: Claude Fable Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 }, contextWindow: 1e6, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "~anthropic/claude-haiku-latest": { id: "~anthropic/claude-haiku-latest", name: "Anthropic Claude Haiku Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 5, cacheRead: 0.1, cacheWrite: 1.25 }, contextWindow: 200000, maxTokens: 64000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "~anthropic/claude-opus-latest": { id: "~anthropic/claude-opus-latest", name: "Anthropic: Claude Opus Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "~anthropic/claude-sonnet-latest": { id: "~anthropic/claude-sonnet-latest", name: "Anthropic Claude Sonnet Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1e6, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "~deepseek/deepseek-v4-flash-latest": { id: "~deepseek/deepseek-v4-flash-latest", name: "DeepSeek V4 Flash Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.065, output: 0.18, cacheRead: 0.02, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 1048576, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", requiresReasoningContentOnAssistantMessages: true }, thinkingLevelMap: { minimal: null, low: null, medium: null, high: "high", max: null, xhigh: "xhigh" } }, "~google/gemini-flash-latest": { id: "~google/gemini-flash-latest", name: "Google Gemini Flash Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.375, output: 1.875, cacheRead: 0.0375, cacheWrite: 0.020833 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "~google/gemini-pro-latest": { id: "~google/gemini-pro-latest", name: "Google Gemini Pro Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 0.375 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "~moonshotai/kimi-latest": { id: "~moonshotai/kimi-latest", name: "MoonshotAI Kimi Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.6, output: 13, cacheRead: 0.29, cacheWrite: 0 }, contextWindow: 974842, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "~openai/gpt-latest": { id: "~openai/gpt-latest", name: "OpenAI GPT Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "~openai/gpt-mini-latest": { id: "~openai/gpt-mini-latest", name: "OpenAI GPT Mini Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.75, output: 4.5, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "~x-ai/grok-latest": { id: "~x-ai/grok-latest", name: "xAI: Grok Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 500000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "~z-ai/glm-latest": { id: "~z-ai/glm-latest", name: "Z.ai: GLM Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } } }
|
|
138928
|
+
"openai-completions": { "aion-labs/aion-2.0": { id: "aion-labs/aion-2.0", name: "AionLabs: Aion-2.0", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.8, output: 1.6, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "aion-labs/aion-3.0": { id: "aion-labs/aion-3.0", name: "AionLabs: Aion-3.0", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 3, output: 6, cacheRead: 0.75, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "aion-labs/aion-3.0-mini": { id: "aion-labs/aion-3.0-mini", name: "AionLabs: Aion-3.0-Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.7, output: 1.4, cacheRead: 0.18, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "amazon/nova-2-lite-v1": { id: "amazon/nova-2-lite-v1", name: "Amazon: Nova 2 Lite", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 2.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65535, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "amazon/nova-lite-v1": { id: "amazon/nova-lite-v1", name: "Amazon: Nova Lite 1.0", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.06, output: 0.24, cacheRead: 0, cacheWrite: 0 }, contextWindow: 300000, maxTokens: 5120, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "amazon/nova-micro-v1": { id: "amazon/nova-micro-v1", name: "Amazon: Nova Micro 1.0", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.035, output: 0.14, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 5120, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "amazon/nova-premier-v1": { id: "amazon/nova-premier-v1", name: "Amazon: Nova Premier 1.0", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 2.5, output: 12.5, cacheRead: 0.625, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 32000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "amazon/nova-pro-v1": { id: "amazon/nova-pro-v1", name: "Amazon: Nova Pro 1.0", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.8, output: 3.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 300000, maxTokens: 5120, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "anthropic/claude-3-haiku": { id: "anthropic/claude-3-haiku", name: "Anthropic: Claude 3 Haiku", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.25, output: 1.25, cacheRead: 0.03, cacheWrite: 0.3 }, contextWindow: 200000, maxTokens: 4096, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-fable-5": { id: "anthropic/claude-fable-5", name: "Anthropic: Claude Fable 5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { off: null, xhigh: "xhigh", max: "max" } }, "anthropic/claude-fable-5:batch": { id: "anthropic/claude-fable-5:batch", name: "Anthropic: Claude Fable 5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { off: null, xhigh: "xhigh", max: "max" } }, "anthropic/claude-haiku-4.5": { id: "anthropic/claude-haiku-4.5", name: "Anthropic: Claude Haiku 4.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 5, cacheRead: 0.1, cacheWrite: 1.25 }, contextWindow: 200000, maxTokens: 64000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-haiku-4.5:batch": { id: "anthropic/claude-haiku-4.5:batch", name: "Anthropic: Claude Haiku 4.5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 2.5, cacheRead: 0.05, cacheWrite: 0.625 }, contextWindow: 200000, maxTokens: 64000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-opus-4": { id: "anthropic/claude-opus-4", name: "Anthropic: Claude Opus 4", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 75, cacheRead: 1.5, cacheWrite: 18.75 }, contextWindow: 200000, maxTokens: 32000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-opus-4.1": { id: "anthropic/claude-opus-4.1", name: "Anthropic: Claude Opus 4.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 75, cacheRead: 1.5, cacheWrite: 18.75 }, contextWindow: 200000, maxTokens: 32000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-opus-4.1:batch": { id: "anthropic/claude-opus-4.1:batch", name: "Anthropic: Claude Opus 4.1 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 7.5, output: 37.5, cacheRead: 0.75, cacheWrite: 9.375 }, contextWindow: 200000, maxTokens: 32000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-opus-4.5": { id: "anthropic/claude-opus-4.5", name: "Anthropic: Claude Opus 4.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 200000, maxTokens: 64000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-opus-4.5:batch": { id: "anthropic/claude-opus-4.5:batch", name: "Anthropic: Claude Opus 4.5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 12.5, cacheRead: 0.25, cacheWrite: 3.125 }, contextWindow: 200000, maxTokens: 64000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-opus-4.6": { id: "anthropic/claude-opus-4.6", name: "Anthropic: Claude Opus 4.6", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { max: "max" } }, "anthropic/claude-opus-4.6:batch": { id: "anthropic/claude-opus-4.6:batch", name: "Anthropic: Claude Opus 4.6 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 12.5, cacheRead: 0.25, cacheWrite: 3.125 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { max: "max" } }, "anthropic/claude-opus-4.7": { id: "anthropic/claude-opus-4.7", name: "Anthropic: Claude Opus 4.7", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-4.7-fast": { id: "anthropic/claude-opus-4.7-fast", name: "Anthropic: Claude Opus 4.7 (Fast)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 30, output: 150, cacheRead: 3, cacheWrite: 37.5 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-4.7:batch": { id: "anthropic/claude-opus-4.7:batch", name: "Anthropic: Claude Opus 4.7 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 12.5, cacheRead: 0.25, cacheWrite: 3.125 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-4.8": { id: "anthropic/claude-opus-4.8", name: "Anthropic: Claude Opus 4.8", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-4.8-fast": { id: "anthropic/claude-opus-4.8-fast", name: "Anthropic: Claude Opus 4.8 (Fast)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-4.8:batch": { id: "anthropic/claude-opus-4.8:batch", name: "Anthropic: Claude Opus 4.8 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 12.5, cacheRead: 0.25, cacheWrite: 3.125 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-5": { id: "anthropic/claude-opus-5", name: "Claude Opus 5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-5-fast": { id: "anthropic/claude-opus-5-fast", name: "Claude Opus 5 (Fast)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-opus-5:batch": { id: "anthropic/claude-opus-5:batch", name: "Claude Opus 5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 12.5, cacheRead: 0.25, cacheWrite: 3.125 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-sonnet-4": { id: "anthropic/claude-sonnet-4", name: "Anthropic: Claude Sonnet 4", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 }, contextWindow: 200000, maxTokens: 64000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-sonnet-4.5": { id: "anthropic/claude-sonnet-4.5", name: "Anthropic: Claude Sonnet 4.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 }, contextWindow: 1e6, maxTokens: 64000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-sonnet-4.5:batch": { id: "anthropic/claude-sonnet-4.5:batch", name: "Anthropic: Claude Sonnet 4.5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 7.5, cacheRead: 0.15, cacheWrite: 1.875 }, contextWindow: 1e6, maxTokens: 64000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "anthropic/claude-sonnet-4.6": { id: "anthropic/claude-sonnet-4.6", name: "Anthropic: Claude Sonnet 4.6", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { max: "max" } }, "anthropic/claude-sonnet-4.6:batch": { id: "anthropic/claude-sonnet-4.6:batch", name: "Anthropic: Claude Sonnet 4.6 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 7.5, cacheRead: 0.15, cacheWrite: 1.875 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { max: "max" } }, "anthropic/claude-sonnet-5": { id: "anthropic/claude-sonnet-5", name: "Anthropic: Claude Sonnet 5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "anthropic/claude-sonnet-5:batch": { id: "anthropic/claude-sonnet-5:batch", name: "Anthropic: Claude Sonnet 5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 5, cacheRead: 0.1, cacheWrite: 1.25 }, contextWindow: 1e6, maxTokens: 128000, compat: { thinkingFormat: "openrouter", cacheControlFormat: "anthropic" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "arcee-ai/trinity-large-thinking": { id: "arcee-ai/trinity-large-thinking", name: "Arcee AI: Trinity Large Thinking", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.22, output: 0.85, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "arcee-ai/virtuoso-large": { id: "arcee-ai/virtuoso-large", name: "Arcee AI: Virtuoso Large", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.75, output: 1.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 64000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, auto: { id: "auto", name: "Auto", api: "openai-completions", provider: "openrouter", baseUrl: "https://openrouter.ai/api/v1", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 30000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "bytedance-seed/seed-1.6": { id: "bytedance-seed/seed-1.6", name: "ByteDance Seed: Seed 1.6", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "bytedance-seed/seed-1.6-flash": { id: "bytedance-seed/seed-1.6-flash", name: "ByteDance Seed: Seed 1.6 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.075, output: 0.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "bytedance-seed/seed-2-1-turbo": { id: "bytedance-seed/seed-2-1-turbo", name: "ByteDance Seed: Seed 2.1 Turbo", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 2.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "bytedance-seed/seed-2.0-code": { id: "bytedance-seed/seed-2.0-code", name: "ByteDance Seed: Seed-2.0-Code", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "bytedance-seed/seed-2.0-lite": { id: "bytedance-seed/seed-2.0-lite", name: "ByteDance Seed: Seed-2.0-Lite", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "bytedance-seed/seed-2.0-mini": { id: "bytedance-seed/seed-2.0-mini", name: "ByteDance Seed: Seed-2.0-Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "cohere/command-r-08-2024": { id: "cohere/command-r-08-2024", name: "Cohere: Command R (08-2024)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.15, output: 0.6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "cohere/command-r-plus-08-2024": { id: "cohere/command-r-plus-08-2024", name: "Cohere: Command R+ (08-2024)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 2.5, output: 10, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "cohere/north-mini-code:free": { id: "cohere/north-mini-code:free", name: "Cohere: North Mini Code (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 64000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-chat": { id: "deepseek/deepseek-chat", name: "DeepSeek: DeepSeek V3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.2574, output: 1.0287, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-chat-v3-0324": { id: "deepseek/deepseek-chat-v3-0324", name: "DeepSeek: DeepSeek V3 0324", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.25, output: 1, cacheRead: 0, cacheWrite: 0 }, contextWindow: 163840, maxTokens: 163840, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-chat-v3.1": { id: "deepseek/deepseek-chat-v3.1", name: "DeepSeek: DeepSeek V3.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.55, output: 1.65, cacheRead: 0.55, cacheWrite: 0 }, contextWindow: 161000, maxTokens: 161000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-r1": { id: "deepseek/deepseek-r1", name: "DeepSeek: R1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.7, output: 2.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 64000, maxTokens: 16000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-r1-0528": { id: "deepseek/deepseek-r1-0528", name: "DeepSeek: R1 0528", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.5, output: 2.15, cacheRead: 0.35, cacheWrite: 0 }, contextWindow: 163840, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-v3.1-terminus": { id: "deepseek/deepseek-v3.1-terminus", name: "DeepSeek: DeepSeek V3.1 Terminus", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.27, output: 1, cacheRead: 0.135, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-v3.2": { id: "deepseek/deepseek-v3.2", name: "DeepSeek: DeepSeek V3.2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.26, output: 0.38, cacheRead: 0.13, cacheWrite: 0 }, contextWindow: 163840, maxTokens: 163840, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-v3.2-exp": { id: "deepseek/deepseek-v3.2-exp", name: "DeepSeek: DeepSeek V3.2 Exp", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.27, output: 0.41, cacheRead: 0, cacheWrite: 0 }, contextWindow: 163840, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "deepseek/deepseek-v4-flash": { id: "deepseek/deepseek-v4-flash", name: "DeepSeek: DeepSeek V4 Flash 0423", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.04886, output: 0.09772, cacheRead: 0.009772, cacheWrite: 0 }, contextWindow: 1024000, maxTokens: 384000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", requiresReasoningContentOnAssistantMessages: true }, thinkingLevelMap: { minimal: null, low: null, medium: null, high: "high", max: null, xhigh: "xhigh" } }, "deepseek/deepseek-v4-flash-0731": { id: "deepseek/deepseek-v4-flash-0731", name: "DeepSeek: DeepSeek V4 Flash 0731", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.08, output: 0.18, cacheRead: 0.016, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 384000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", requiresReasoningContentOnAssistantMessages: true }, thinkingLevelMap: { minimal: null, low: null, medium: null, high: "high", max: null, xhigh: "xhigh" } }, "deepseek/deepseek-v4-flash-vision-exp": { id: "deepseek/deepseek-v4-flash-vision-exp", name: "DeepSeek: DeepSeek V4 Flash Vision Exp", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.22, output: 0.66, cacheRead: 0.007, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 384000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", requiresReasoningContentOnAssistantMessages: true }, thinkingLevelMap: { minimal: null, low: null, medium: null, high: "high", max: null, xhigh: "xhigh" } }, "deepseek/deepseek-v4-pro": { id: "deepseek/deepseek-v4-pro", name: "DeepSeek: DeepSeek V4 Pro 0423", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.396894, output: 0.793788, cacheRead: 0.033074, cacheWrite: 0 }, contextWindow: 1024000, maxTokens: 384000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", requiresReasoningContentOnAssistantMessages: true }, thinkingLevelMap: { minimal: null, low: null, medium: null, high: "high", max: null, xhigh: "xhigh" } }, "deepseek/deepseek-v4-pro-0813": { id: "deepseek/deepseek-v4-pro-0813", name: "DeepSeek: DeepSeek V4 Pro 0813", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.122, output: 3.366, cacheRead: 0.0374, cacheWrite: 0 }, contextWindow: 1048575, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", requiresReasoningContentOnAssistantMessages: true }, thinkingLevelMap: { minimal: null, low: null, medium: null, high: "high", max: null, xhigh: "xhigh" } }, "dots-studio/dots-3-note-preview:free": { id: "dots-studio/dots-3-note-preview:free", name: "Dots Studio: Dots3-Note Preview (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 512000, maxTokens: 512000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-2.5-flash": { id: "google/gemini-2.5-flash", name: "Google: Gemini 2.5 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 2.5, cacheRead: 0.03, cacheWrite: 0.083333 }, contextWindow: 1048576, maxTokens: 65535, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-2.5-flash-lite": { id: "google/gemini-2.5-flash-lite", name: "Google: Gemini 2.5 Flash Lite", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.4, cacheRead: 0.01, cacheWrite: 0.083333 }, contextWindow: 1048576, maxTokens: 65535, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-2.5-flash-lite:batch": { id: "google/gemini-2.5-flash-lite:batch", name: "Google: Gemini 2.5 Flash Lite (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.05, output: 0.2, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65535, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-2.5-flash:batch": { id: "google/gemini-2.5-flash:batch", name: "Google: Gemini 2.5 Flash (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.15, output: 1.25, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65535, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-2.5-pro": { id: "google/gemini-2.5-pro", name: "Google: Gemini 2.5 Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0.375 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-2.5-pro-preview": { id: "google/gemini-2.5-pro-preview", name: "Google: Gemini 2.5 Pro Preview 06-05", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0.375 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "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", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0.375 }, contextWindow: 1048576, maxTokens: 65535, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-2.5-pro:batch": { id: "google/gemini-2.5-pro:batch", name: "Google: Gemini 2.5 Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.625, output: 5, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3-flash-preview": { id: "google/gemini-3-flash-preview", name: "Google: Gemini 3 Flash Preview", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 3, cacheRead: 0.05, cacheWrite: 0.083333 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3-flash-preview:batch": { id: "google/gemini-3-flash-preview:batch", name: "Google: Gemini 3 Flash Preview (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 1.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3-pro-image": { id: "google/gemini-3-pro-image", name: "Google: Nano Banana Pro (Gemini 3 Pro Image)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 0.375 }, contextWindow: 65536, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.1-flash-lite": { id: "google/gemini-3.1-flash-lite", name: "Google: Gemini 3.1 Flash Lite", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 1.5, cacheRead: 0.025, cacheWrite: 0.083333 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.1-flash-lite-preview": { id: "google/gemini-3.1-flash-lite-preview", name: "Google: Gemini 3.1 Flash Lite Preview", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 1.5, cacheRead: 0.025, cacheWrite: 0.083333 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.1-flash-lite:batch": { id: "google/gemini-3.1-flash-lite:batch", name: "Google: Gemini 3.1 Flash Lite (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.125, output: 0.75, cacheRead: 0.0125, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.1-pro-preview": { id: "google/gemini-3.1-pro-preview", name: "Google: Gemini 3.1 Pro Preview", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 0.375 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.1-pro-preview-customtools": { id: "google/gemini-3.1-pro-preview-customtools", name: "Google: Gemini 3.1 Pro Preview Custom Tools", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 0.375 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.1-pro-preview:batch": { id: "google/gemini-3.1-pro-preview:batch", name: "Google: Gemini 3.1 Pro Preview (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.5-flash": { id: "google/gemini-3.5-flash", name: "Google: Gemini 3.5 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 9, cacheRead: 0.15, cacheWrite: 0.083333 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.5-flash-lite": { id: "google/gemini-3.5-flash-lite", name: "Google: Gemini 3.5 Flash Lite", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 2.5, cacheRead: 0.03, cacheWrite: 0.083333 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.5-flash-lite:batch": { id: "google/gemini-3.5-flash-lite:batch", name: "Google: Gemini 3.5 Flash Lite (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.15, output: 1.25, cacheRead: 0.015, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.5-flash:batch": { id: "google/gemini-3.5-flash:batch", name: "Google: Gemini 3.5 Flash (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.75, output: 4.5, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.6-flash": { id: "google/gemini-3.6-flash", name: "Google: Gemini 3.6 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.75, output: 3.75, cacheRead: 0.075, cacheWrite: 0.041667 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.6-flash:batch": { id: "google/gemini-3.6-flash:batch", name: "Google: Gemini 3.6 Flash (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.375, output: 1.875, cacheRead: 0.0375, cacheWrite: 0.041667 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.7-flash": { id: "google/gemini-3.7-flash", name: "Google: Gemini 3.7 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.375, output: 1.875, cacheRead: 0.0375, cacheWrite: 0.020833 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemini-3.7-flash:batch": { id: "google/gemini-3.7-flash:batch", name: "Google: Gemini 3.7 Flash (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1875, output: 0.9375, cacheRead: 0.01875, cacheWrite: 0.020833 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemma-3-12b-it": { id: "google/gemma-3-12b-it", name: "Google: Gemma 3 12B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.05, output: 0.15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemma-3-27b-it": { id: "google/gemma-3-27b-it", name: "Google: Gemma 3 27B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.08, output: 0.45, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemma-4-26b-a4b-it": { id: "google/gemma-4-26b-a4b-it", name: "Google: Gemma 4 26B A4B ", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.07, output: 0.34, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemma-4-26b-a4b-it:free": { id: "google/gemma-4-26b-a4b-it:free", name: "Google: Gemma 4 26B A4B (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemma-4-31b-it": { id: "google/gemma-4-31b-it", name: "Google: Gemma 4 31B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.34, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "google/gemma-4-31b-it:free": { id: "google/gemma-4-31b-it:free", name: "Google: Gemma 4 31B (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "ibm-granite/granite-4.1-8b": { id: "ibm-granite/granite-4.1-8b", name: "IBM: Granite 4.1 8B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.05, output: 0.1, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "inception/mercury-2": { id: "inception/mercury-2", name: "Inception: Mercury 2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.25, output: 0.75, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 50000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" }, thinkingLevelMap: { off: null } }, "inclusionai/ling-2.6-1t": { id: "inclusionai/ling-2.6-1t", name: "inclusionAI: Ling-2.6-1T", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.075, output: 0.625, cacheRead: 0.015, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "inclusionai/ling-2.6-flash": { id: "inclusionai/ling-2.6-flash", name: "inclusionAI: Ling-2.6-flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.01, output: 0.03, cacheRead: 0.002, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "inclusionai/ling-3.0-flash": { id: "inclusionai/ling-3.0-flash", name: "Ling-3.0-flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.021, output: 0.063, cacheRead: 0.0042, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "inclusionai/ring-2.6-1t": { id: "inclusionai/ring-2.6-1t", name: "inclusionAI: Ring-2.6-1T", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.075, output: 0.625, cacheRead: 0.015, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "kwaipilot/kat-coder-air-v2.5": { id: "kwaipilot/kat-coder-air-v2.5", name: "Kwaipilot: KAT-Coder-Air V2.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.15, output: 0.6, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 80000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "kwaipilot/kat-coder-pro-v2": { id: "kwaipilot/kat-coder-pro-v2", name: "Kwaipilot: KAT-Coder-Pro V2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 80000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "kwaipilot/kat-coder-pro-v2.5": { id: "kwaipilot/kat-coder-pro-v2.5", name: "Kwaipilot: KAT-Coder-Pro V2.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.74, output: 2.96, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 80000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "liquid/lfm-2.5-2.6b:free": { id: "liquid/lfm-2.5-2.6b:free", name: "LiquidAI: LFM2.5-2.6B (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 65536, maxTokens: 8192, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meituan/longcat-2.0": { id: "meituan/longcat-2.0", name: "Meituan: LongCat 2.0", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.006, cacheWrite: 0 }, contextWindow: 1048756, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta-llama/llama-3.1-70b-instruct": { id: "meta-llama/llama-3.1-70b-instruct", name: "Meta: Llama 3.1 70B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.4, output: 0.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta-llama/llama-3.1-8b-instruct": { id: "meta-llama/llama-3.1-8b-instruct", name: "Meta: Llama 3.1 8B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.05, output: 0.08, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta-llama/llama-3.3-70b-instruct": { id: "meta-llama/llama-3.3-70b-instruct", name: "Meta: Llama 3.3 70B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.1, output: 0.32, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta-llama/llama-4-maverick": { id: "meta-llama/llama-4-maverick", name: "Meta: Llama 4 Maverick", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.2, output: 0.8, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta-llama/llama-4-scout": { id: "meta-llama/llama-4-scout", name: "Meta: Llama 4 Scout", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 327680, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta/muse-glimmer-30b": { id: "meta/muse-glimmer-30b", name: "Meta: Muse Glimmer 30B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.35, output: 1.5, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta/muse-spark-1.1": { id: "meta/muse-spark-1.1", name: "Meta: Muse Spark 1.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 4.25, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta/muse-spark-1.2": { id: "meta/muse-spark-1.2", name: "Meta: Muse Spark 1.2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 4.25, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "meta/muse-spark-1.2-contributor": { id: "meta/muse-spark-1.2-contributor", name: "Meta: Muse Spark 1.2 Contributor", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.2, cacheRead: 0.002, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "minimax/minimax-m1": { id: "minimax/minimax-m1", name: "MiniMax: MiniMax M1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.55, output: 2.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 40000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "minimax/minimax-m2": { id: "minimax/minimax-m2", name: "MiniMax: MiniMax M2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.255, output: 1.02, cacheRead: 0, cacheWrite: 0 }, contextWindow: 204800, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "minimax/minimax-m2.1": { id: "minimax/minimax-m2.1", name: "MiniMax: MiniMax M2.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 204800, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "minimax/minimax-m2.5": { id: "minimax/minimax-m2.5", name: "MiniMax: MiniMax M2.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.27, output: 1.08, cacheRead: 0.027, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "minimax/minimax-m2.7": { id: "minimax/minimax-m2.7", name: "MiniMax: MiniMax M2.7", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.24, output: 0.96, cacheRead: 0.048, cacheWrite: 0 }, contextWindow: 196608, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "minimax/minimax-m3": { id: "minimax/minimax-m3", name: "MiniMax: MiniMax M3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 524288, maxTokens: 512000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "minimax/minimax-m3:batch": { id: "minimax/minimax-m3:batch", name: "MiniMax: MiniMax M3 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 524288, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/codestral-2508": { id: "mistralai/codestral-2508", name: "Mistral: Codestral 2508", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.3, output: 0.9, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/ministral-14b-2512": { id: "mistralai/ministral-14b-2512", name: "Mistral: Ministral 3 14B 2512", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.2, output: 0.2, cacheRead: 0.02, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/ministral-3b-2512": { id: "mistralai/ministral-3b-2512", name: "Mistral: Ministral 3 3B 2512", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.1, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/ministral-8b-2512": { id: "mistralai/ministral-8b-2512", name: "Mistral: Ministral 3 8B 2512", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.15, output: 0.15, cacheRead: 0.015, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-large": { id: "mistralai/mistral-large", name: "Mistral Large", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 2, output: 6, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-large-2407": { id: "mistralai/mistral-large-2407", name: "Mistral Large 2407", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 2, output: 6, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-large-2512": { id: "mistralai/mistral-large-2512", name: "Mistral: Mistral Large 3 2512", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.5, output: 1.5, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-medium-3": { id: "mistralai/mistral-medium-3", name: "Mistral: Mistral Medium 3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.4, output: 2, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-medium-3-5": { id: "mistralai/mistral-medium-3-5", name: "Mistral: Mistral Medium 3.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 7.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-medium-3.1": { id: "mistralai/mistral-medium-3.1", name: "Mistral: Mistral Medium 3.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.4, output: 2, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-nemo": { id: "mistralai/mistral-nemo", name: "Mistral: Mistral Nemo", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.019, output: 0.03, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-saba": { id: "mistralai/mistral-saba", name: "Mistral: Saba", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.2, output: 0.6, cacheRead: 0.02, cacheWrite: 0 }, contextWindow: 32768, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-small-2603": { id: "mistralai/mistral-small-2603", name: "Mistral: Mistral Small 4", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.15, output: 0.6, cacheRead: 0.015, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mistral-small-3.2-24b-instruct": { id: "mistralai/mistral-small-3.2-24b-instruct", name: "Mistral: Mistral Small 3.2 24B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.075, output: 0.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/mixtral-8x22b-instruct": { id: "mistralai/mixtral-8x22b-instruct", name: "Mistral: Mixtral 8x22B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 2, output: 6, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 65536, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "mistralai/voxtral-small-24b-2507": { id: "mistralai/voxtral-small-24b-2507", name: "Mistral: Voxtral Small 24B 2507", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.1, output: 0.3, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 32000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "moonshotai/kimi-k2": { id: "moonshotai/kimi-k2", name: "MoonshotAI: Kimi K2 0711", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.57, output: 2.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 100352, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "moonshotai/kimi-k2-0905": { id: "moonshotai/kimi-k2-0905", name: "MoonshotAI: Kimi K2 0905", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.6, output: 2.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 100352, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "moonshotai/kimi-k2-thinking": { id: "moonshotai/kimi-k2-thinking", name: "MoonshotAI: Kimi K2 Thinking", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.5, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 100352, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "moonshotai/kimi-k2.5": { id: "moonshotai/kimi-k2.5", name: "MoonshotAI: Kimi K2.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.41, output: 2.06, cacheRead: 0.07, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "moonshotai/kimi-k2.6": { id: "moonshotai/kimi-k2.6", name: "MoonshotAI: Kimi K2.6", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.5415, output: 2.28, cacheRead: 0.0912, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", requiresReasoningContentOnAssistantMessages: true } }, "moonshotai/kimi-k2.7-code": { id: "moonshotai/kimi-k2.7-code", name: "MoonshotAI: Kimi K2.7 Code", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.67, output: 3.4, cacheRead: 0.17, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "moonshotai/kimi-k2.7-code:batch": { id: "moonshotai/kimi-k2.7-code:batch", name: "MoonshotAI: Kimi K2.7 Code (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.95, output: 4, cacheRead: 0.19, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "moonshotai/kimi-k3": { id: "moonshotai/kimi-k3", name: "MoonshotAI: Kimi K3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nex-agi/nex-n2-mini": { id: "nex-agi/nex-n2-mini", name: "Nex AGI: Nex-N2-Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.025, output: 0.1, cacheRead: 0.0025, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nex-agi/nex-n2-pro": { id: "nex-agi/nex-n2-pro", name: "Nex AGI: Nex-N2-Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 1, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3-nano-30b-a3b": { id: "nvidia/nemotron-3-nano-30b-a3b", name: "NVIDIA: Nemotron 3 Nano 30B A3B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.05, output: 0.2, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3-nano-30b-a3b:free": { id: "nvidia/nemotron-3-nano-30b-a3b:free", name: "NVIDIA: Nemotron 3 Nano 30B A3B (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "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)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3-super-120b-a12b": { id: "nvidia/nemotron-3-super-120b-a12b", name: "NVIDIA: Nemotron 3 Super", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.085, output: 0.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3-super-120b-a12b:free": { id: "nvidia/nemotron-3-super-120b-a12b:free", name: "NVIDIA: Nemotron 3 Super (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3-ultra-550b-a55b": { id: "nvidia/nemotron-3-ultra-550b-a55b", name: "NVIDIA: Nemotron 3 Ultra", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.6, output: 3.6, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 512288, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3-ultra-550b-a55b:batch": { id: "nvidia/nemotron-3-ultra-550b-a55b:batch", name: "NVIDIA: Nemotron 3 Ultra (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.6, output: 3.6, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 512288, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3-ultra-550b-a55b:free": { id: "nvidia/nemotron-3-ultra-550b-a55b:free", name: "NVIDIA: Nemotron 3 Ultra (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3.5-lightning": { id: "nvidia/nemotron-3.5-lightning", name: "NVIDIA: Nemotron 3.5 Lightning", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.08, output: 0.2, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-3.5-lightning:free": { id: "nvidia/nemotron-3.5-lightning:free", name: "NVIDIA: Nemotron 3.5 Lightning (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-nano-12b-v2-vl:free": { id: "nvidia/nemotron-nano-12b-v2-vl:free", name: "NVIDIA: Nemotron Nano 12B 2 VL (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "nvidia/nemotron-nano-9b-v2:free": { id: "nvidia/nemotron-nano-9b-v2:free", name: "NVIDIA: Nemotron Nano 9B V2 (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "openai/gpt-3.5-turbo": { id: "openai/gpt-3.5-turbo", name: "OpenAI: GPT-3.5 Turbo", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.5, output: 1.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 16385, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-3.5-turbo-0613": { id: "openai/gpt-3.5-turbo-0613", name: "OpenAI: GPT-3.5 Turbo (older v0613)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 1, output: 2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 4095, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-3.5-turbo-16k": { id: "openai/gpt-3.5-turbo-16k", name: "OpenAI: GPT-3.5 Turbo 16k", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 3, output: 4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 16385, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-3.5-turbo:batch": { id: "openai/gpt-3.5-turbo:batch", name: "OpenAI: GPT-3.5 Turbo (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.25, output: 0.75, cacheRead: 0, cacheWrite: 0 }, contextWindow: 16385, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4": { id: "openai/gpt-4", name: "OpenAI: GPT-4", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 30, output: 60, cacheRead: 0, cacheWrite: 0 }, contextWindow: 8191, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4-turbo": { id: "openai/gpt-4-turbo", name: "OpenAI: GPT-4 Turbo", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 10, output: 30, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4-turbo-preview": { id: "openai/gpt-4-turbo-preview", name: "OpenAI: GPT-4 Turbo Preview", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 10, output: 30, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4-turbo:batch": { id: "openai/gpt-4-turbo:batch", name: "OpenAI: GPT-4 Turbo (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 5, output: 15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4.1": { id: "openai/gpt-4.1", name: "OpenAI: GPT-4.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 2, output: 8, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4.1-mini": { id: "openai/gpt-4.1-mini", name: "OpenAI: GPT-4.1 Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.4, output: 1.6, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4.1-mini:batch": { id: "openai/gpt-4.1-mini:batch", name: "OpenAI: GPT-4.1 Mini (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.2, output: 0.8, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4.1-nano": { id: "openai/gpt-4.1-nano", name: "OpenAI: GPT-4.1 Nano", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.4, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4.1-nano:batch": { id: "openai/gpt-4.1-nano:batch", name: "OpenAI: GPT-4.1 Nano (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.05, output: 0.2, cacheRead: 0.0125, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4.1:batch": { id: "openai/gpt-4.1:batch", name: "OpenAI: GPT-4.1 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 1, output: 4, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o": { id: "openai/gpt-4o", name: "OpenAI: GPT-4o", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 2.5, output: 10, cacheRead: 1.25, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o-2024-05-13": { id: "openai/gpt-4o-2024-05-13", name: "OpenAI: GPT-4o (2024-05-13)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 5, output: 15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4096, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o-2024-08-06": { id: "openai/gpt-4o-2024-08-06", name: "OpenAI: GPT-4o (2024-08-06)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 2.5, output: 10, cacheRead: 1.25, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o-2024-11-20": { id: "openai/gpt-4o-2024-11-20", name: "OpenAI: GPT-4o (2024-11-20)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 2.5, output: 10, cacheRead: 1.25, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o-mini": { id: "openai/gpt-4o-mini", name: "OpenAI: GPT-4o-mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.15, output: 0.6, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o-mini-2024-07-18": { id: "openai/gpt-4o-mini-2024-07-18", name: "OpenAI: GPT-4o-mini (2024-07-18)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.15, output: 0.6, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o-mini:batch": { id: "openai/gpt-4o-mini:batch", name: "OpenAI: GPT-4o-mini (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.075, output: 0.3, cacheRead: 0.0375, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-4o:batch": { id: "openai/gpt-4o:batch", name: "OpenAI: GPT-4o (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 1.25, output: 5, cacheRead: 0.625, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5": { id: "openai/gpt-5", name: "OpenAI: GPT-5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5-codex:batch": { id: "openai/gpt-5-codex:batch", name: "OpenAI: GPT-5 Codex (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.625, output: 5, cacheRead: 0.0625, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5-mini": { id: "openai/gpt-5-mini", name: "OpenAI: GPT-5 Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5-mini:batch": { id: "openai/gpt-5-mini:batch", name: "OpenAI: GPT-5 Mini (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.125, output: 1, cacheRead: 0.0125, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5-nano": { id: "openai/gpt-5-nano", name: "OpenAI: GPT-5 Nano", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.05, output: 0.4, cacheRead: 0.005, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5-nano:batch": { id: "openai/gpt-5-nano:batch", name: "OpenAI: GPT-5 Nano (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.025, output: 0.2, cacheRead: 0.0025, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5-pro": { id: "openai/gpt-5-pro", name: "OpenAI: GPT-5 Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 120, cacheRead: 0, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5-pro:batch": { id: "openai/gpt-5-pro:batch", name: "OpenAI: GPT-5 Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 7.5, output: 60, cacheRead: 0, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5.1": { id: "openai/gpt-5.1", name: "OpenAI: GPT-5.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5.1-codex": { id: "openai/gpt-5.1-codex", name: "OpenAI: GPT-5.1-Codex", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.13, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5.1-codex-max": { id: "openai/gpt-5.1-codex-max", name: "OpenAI: GPT-5.1-Codex-Max", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5.1-codex-mini": { id: "openai/gpt-5.1-codex-mini", name: "OpenAI: GPT-5.1-Codex-Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5.1:batch": { id: "openai/gpt-5.1:batch", name: "OpenAI: GPT-5.1 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.625, output: 5, cacheRead: 0.0625, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-5.2": { id: "openai/gpt-5.2", name: "OpenAI: GPT-5.2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2-chat": { id: "openai/gpt-5.2-chat", name: "OpenAI: GPT-5.2 Chat", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 32000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2-codex": { id: "openai/gpt-5.2-codex", name: "OpenAI: GPT-5.2-Codex", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2-pro": { id: "openai/gpt-5.2-pro", name: "OpenAI: GPT-5.2 Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 21, output: 168, cacheRead: 0, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2-pro:batch": { id: "openai/gpt-5.2-pro:batch", name: "OpenAI: GPT-5.2 Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 10.5, output: 84, cacheRead: 0, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2:batch": { id: "openai/gpt-5.2:batch", name: "OpenAI: GPT-5.2 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.875, output: 7, cacheRead: 0.0875, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.3-codex": { id: "openai/gpt-5.3-codex", name: "OpenAI: GPT-5.3-Codex", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4": { id: "openai/gpt-5.4", name: "OpenAI: GPT-5.4", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 15, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-mini": { id: "openai/gpt-5.4-mini", name: "OpenAI: GPT-5.4 Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.75, output: 4.5, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-mini:batch": { id: "openai/gpt-5.4-mini:batch", name: "OpenAI: GPT-5.4 Mini (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.375, output: 2.25, cacheRead: 0.0375, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-nano": { id: "openai/gpt-5.4-nano", name: "OpenAI: GPT-5.4 Nano", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 1.25, cacheRead: 0.02, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-nano:batch": { id: "openai/gpt-5.4-nano:batch", name: "OpenAI: GPT-5.4 Nano (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.625, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-pro": { id: "openai/gpt-5.4-pro", name: "OpenAI: GPT-5.4 Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 30, output: 180, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-pro:batch": { id: "openai/gpt-5.4-pro:batch", name: "OpenAI: GPT-5.4 Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 90, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4:batch": { id: "openai/gpt-5.4:batch", name: "OpenAI: GPT-5.4 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 7.5, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.5": { id: "openai/gpt-5.5", name: "OpenAI: GPT-5.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.5-pro": { id: "openai/gpt-5.5-pro", name: "OpenAI: GPT-5.5 Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 30, output: 180, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", off: null, minimal: null, low: null } }, "openai/gpt-5.5-pro:batch": { id: "openai/gpt-5.5-pro:batch", name: "OpenAI: GPT-5.5 Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 90, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.5:batch": { id: "openai/gpt-5.5:batch", name: "OpenAI: GPT-5.5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 15, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.6-luna": { id: "openai/gpt-5.6-luna", name: "OpenAI: GPT-5.6 Luna", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 1.2, cacheRead: 0.02, cacheWrite: 0.25 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-luna-pro": { id: "openai/gpt-5.6-luna-pro", name: "OpenAI: GPT-5.6 Luna Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 1.2, cacheRead: 0.02, cacheWrite: 0.25 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-luna-pro:batch": { id: "openai/gpt-5.6-luna-pro:batch", name: "OpenAI: GPT-5.6 Luna Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.6, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-luna:batch": { id: "openai/gpt-5.6-luna:batch", name: "OpenAI: GPT-5.6 Luna (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.6, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-sol": { id: "openai/gpt-5.6-sol", name: "OpenAI: GPT-5.6 Sol", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-sol-pro": { id: "openai/gpt-5.6-sol-pro", name: "OpenAI: GPT-5.6 Sol Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-sol-pro:batch": { id: "openai/gpt-5.6-sol-pro:batch", name: "OpenAI: GPT-5.6 Sol Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 5, cacheRead: 0.1, cacheWrite: 1.25 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-sol:batch": { id: "openai/gpt-5.6-sol:batch", name: "OpenAI: GPT-5.6 Sol (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 5, cacheRead: 0.1, cacheWrite: 1.25 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-terra": { id: "openai/gpt-5.6-terra", name: "OpenAI: GPT-5.6 Terra", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-terra-pro": { id: "openai/gpt-5.6-terra-pro", name: "OpenAI: GPT-5.6 Terra Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-terra-pro:batch": { id: "openai/gpt-5.6-terra-pro:batch", name: "OpenAI: GPT-5.6 Terra Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 6, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5.6-terra:batch": { id: "openai/gpt-5.6-terra:batch", name: "OpenAI: GPT-5.6 Terra (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 6, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh", max: "max" } }, "openai/gpt-5:batch": { id: "openai/gpt-5:batch", name: "OpenAI: GPT-5 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.625, output: 5, cacheRead: 0.0625, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-audio": { id: "openai/gpt-audio", name: "OpenAI: GPT Audio", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 2.5, output: 10, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-audio-mini": { id: "openai/gpt-audio-mini", name: "OpenAI: GPT Audio Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.6, output: 2.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-chat-latest": { id: "openai/gpt-chat-latest", name: "OpenAI: GPT Chat Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-oss-120b": { id: "openai/gpt-oss-120b", name: "OpenAI: gpt-oss-120b", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.037, output: 0.17, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-oss-20b": { id: "openai/gpt-oss-20b", name: "OpenAI: gpt-oss-20b", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.03, output: 0.13, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072, compat: { thinkingFormat: "openrouter" } }, "openai/gpt-oss-safeguard-20b": { id: "openai/gpt-oss-safeguard-20b", name: "OpenAI: gpt-oss-safeguard-20b", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.075, output: 0.3, cacheRead: 0.0375, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 65536, compat: { thinkingFormat: "openrouter" } }, "openai/o1": { id: "openai/o1", name: "OpenAI: o1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 60, cacheRead: 7.5, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o1:batch": { id: "openai/o1:batch", name: "OpenAI: o1 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 7.5, output: 30, cacheRead: 3.75, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3": { id: "openai/o3", name: "OpenAI: o3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 8, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3-mini": { id: "openai/o3-mini", name: "OpenAI: o3 Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.1, output: 4.4, cacheRead: 0.55, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3-mini-high": { id: "openai/o3-mini-high", name: "OpenAI: o3 Mini High", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.1, output: 4.4, cacheRead: 0.55, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3-mini-high:batch": { id: "openai/o3-mini-high:batch", name: "OpenAI: o3 Mini High (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.55, output: 2.2, cacheRead: 0.275, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3-mini:batch": { id: "openai/o3-mini:batch", name: "OpenAI: o3 Mini (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.55, output: 2.2, cacheRead: 0.275, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3-pro": { id: "openai/o3-pro", name: "OpenAI: o3 Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 20, output: 80, cacheRead: 0, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3-pro:batch": { id: "openai/o3-pro:batch", name: "OpenAI: o3 Pro (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 40, cacheRead: 0, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o3:batch": { id: "openai/o3:batch", name: "OpenAI: o3 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 4, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o4-mini": { id: "openai/o4-mini", name: "OpenAI: o4 Mini", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.1, output: 4.4, cacheRead: 0.275, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o4-mini-high": { id: "openai/o4-mini-high", name: "OpenAI: o4 Mini High", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.1, output: 4.4, cacheRead: 0.275, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o4-mini-high:batch": { id: "openai/o4-mini-high:batch", name: "OpenAI: o4 Mini High (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.55, output: 2.2, cacheRead: 0.1375, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openai/o4-mini:batch": { id: "openai/o4-mini:batch", name: "OpenAI: o4 Mini (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.55, output: 2.2, cacheRead: 0.1375, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5, compat: { thinkingFormat: "openrouter" } }, "openrouter/auto": { id: "openrouter/auto", name: "Auto Router", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: -1e6, output: -1e6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "openrouter/auto-beta": { id: "openrouter/auto-beta", name: "Auto Router (Beta)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: -1e6, output: -1e6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "openrouter/free": { id: "openrouter/free", name: "Free Models Router", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "openrouter/fusion": { id: "openrouter/fusion", name: "OpenRouter: Fusion", api: "openai-completions", provider: "openrouter", baseUrl: "https://openrouter.ai/api/v1", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 30000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "poolside/laguna-s-2.1": { id: "poolside/laguna-s-2.1", name: "Poolside: Laguna S 2.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.09, output: 0.18, cacheRead: 0.009, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "poolside/laguna-s-2.1:free": { id: "poolside/laguna-s-2.1:free", name: "Poolside: Laguna S 2.1 (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "poolside/laguna-xs-2.1": { id: "poolside/laguna-xs-2.1", name: "Poolside: Laguna XS 2.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.06, output: 0.12, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "poolside/laguna-xs-2.1:free": { id: "poolside/laguna-xs-2.1:free", name: "Poolside: Laguna XS 2.1 (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen-2.5-72b-instruct": { id: "qwen/qwen-2.5-72b-instruct", name: "Qwen2.5 72B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.36, output: 0.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 32768, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen-2.5-7b-instruct": { id: "qwen/qwen-2.5-7b-instruct", name: "Qwen: Qwen2.5 7B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.1, output: 0.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 32768, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen-plus": { id: "qwen/qwen-plus", name: "Qwen: Qwen-Plus", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.26, output: 0.78, cacheRead: 0.052, cacheWrite: 0.325 }, contextWindow: 1e6, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen-plus-2025-07-28": { id: "qwen/qwen-plus-2025-07-28", name: "Qwen: Qwen Plus 0728", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.26, output: 0.78, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen-plus-2025-07-28:thinking": { id: "qwen/qwen-plus-2025-07-28:thinking", name: "Qwen: Qwen Plus 0728 (thinking)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.26, output: 0.78, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-14b": { id: "qwen/qwen3-14b", name: "Qwen: Qwen3 14B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.12, output: 0.24, cacheRead: 0, cacheWrite: 0 }, contextWindow: 40960, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-235b-a22b": { id: "qwen/qwen3-235b-a22b", name: "Qwen: Qwen3 235B A22B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.455, output: 1.82, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 8192, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-235b-a22b-2507": { id: "qwen/qwen3-235b-a22b-2507", name: "Qwen: Qwen3 235B A22B Instruct 2507", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.09, output: 0.55, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-235b-a22b-thinking-2507": { id: "qwen/qwen3-235b-a22b-thinking-2507", name: "Qwen: Qwen3 235B A22B Thinking 2507", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.23, output: 2.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-30b-a3b": { id: "qwen/qwen3-30b-a3b", name: "Qwen: Qwen3 30B A3B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.13, output: 0.52, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 8192, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-30b-a3b-instruct-2507": { id: "qwen/qwen3-30b-a3b-instruct-2507", name: "Qwen: Qwen3 30B A3B Instruct 2507", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.04815, output: 0.19305, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 32000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-30b-a3b-thinking-2507": { id: "qwen/qwen3-30b-a3b-thinking-2507", name: "Qwen: Qwen3 30B A3B Thinking 2507", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.2, output: 2.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 81920, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-32b": { id: "qwen/qwen3-32b", name: "Qwen: Qwen3 32B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.08, output: 0.28, cacheRead: 0, cacheWrite: 0 }, contextWindow: 40960, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-8b": { id: "qwen/qwen3-8b", name: "Qwen: Qwen3 8B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.117, output: 0.455, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 8192, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-coder": { id: "qwen/qwen3-coder", name: "Qwen: Qwen3 Coder 480B A35B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.3, output: 1, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-coder-30b-a3b-instruct": { id: "qwen/qwen3-coder-30b-a3b-instruct", name: "Qwen: Qwen3 Coder 30B A3B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.07, output: 0.28, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-coder-flash": { id: "qwen/qwen3-coder-flash", name: "Qwen: Qwen3 Coder Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.195, output: 0.975, cacheRead: 0.039, cacheWrite: 0.24375 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-coder-next": { id: "qwen/qwen3-coder-next", name: "Qwen: Qwen3 Coder Next", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.12, output: 0.8, cacheRead: 0.07, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-coder-plus": { id: "qwen/qwen3-coder-plus", name: "Qwen: Qwen3 Coder Plus", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.65, output: 3.25, cacheRead: 0.13, cacheWrite: 0.8125 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-max": { id: "qwen/qwen3-max", name: "Qwen: Qwen3 Max", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.78, output: 3.9, cacheRead: 0.156, cacheWrite: 0.975 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-max-thinking": { id: "qwen/qwen3-max-thinking", name: "Qwen: Qwen3 Max Thinking", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.78, output: 3.9, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-next-80b-a3b-instruct": { id: "qwen/qwen3-next-80b-a3b-instruct", name: "Qwen: Qwen3 Next 80B A3B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.1, output: 1.1, cacheRead: 0.07, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-next-80b-a3b-thinking": { id: "qwen/qwen3-next-80b-a3b-thinking", name: "Qwen: Qwen3 Next 80B A3B Thinking", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.15, output: 1.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-vl-235b-a22b-instruct": { id: "qwen/qwen3-vl-235b-a22b-instruct", name: "Qwen: Qwen3 VL 235B A22B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.21, output: 1.9, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-vl-235b-a22b-thinking": { id: "qwen/qwen3-vl-235b-a22b-thinking", name: "Qwen: Qwen3 VL 235B A22B Thinking", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.4, output: 4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-vl-30b-a3b-instruct": { id: "qwen/qwen3-vl-30b-a3b-instruct", name: "Qwen: Qwen3 VL 30B A3B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.13, output: 0.52, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-vl-30b-a3b-thinking": { id: "qwen/qwen3-vl-30b-a3b-thinking", name: "Qwen: Qwen3 VL 30B A3B Thinking", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 2.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-vl-32b-instruct": { id: "qwen/qwen3-vl-32b-instruct", name: "Qwen: Qwen3 VL 32B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.104, output: 0.416, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-vl-8b-instruct": { id: "qwen/qwen3-vl-8b-instruct", name: "Qwen: Qwen3 VL 8B Instruct", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.117, output: 0.455, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3-vl-8b-thinking": { id: "qwen/qwen3-vl-8b-thinking", name: "Qwen: Qwen3 VL 8B Thinking", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.18, output: 2.1, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-122b-a10b": { id: "qwen/qwen3.5-122b-a10b", name: "Qwen: Qwen3.5-122B-A10B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.26, output: 2.08, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-27b": { id: "qwen/qwen3.5-27b", name: "Qwen: Qwen3.5-27B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.195, output: 1.56, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-35b-a3b": { id: "qwen/qwen3.5-35b-a3b", name: "Qwen: Qwen3.5-35B-A3B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 1.25, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-397b-a17b": { id: "qwen/qwen3.5-397b-a17b", name: "Qwen: Qwen3.5 397B A17B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.39, output: 2.34, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-9b": { id: "qwen/qwen3.5-9b", name: "Qwen: Qwen3.5-9B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-flash-02-23": { id: "qwen/qwen3.5-flash-02-23", name: "Qwen: Qwen3.5-Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.065, output: 0.26, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-plus-02-15": { id: "qwen/qwen3.5-plus-02-15", name: "Qwen: Qwen3.5 Plus 2026-02-15", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.26, output: 1.56, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.5-plus-20260420": { id: "qwen/qwen3.5-plus-20260420", name: "Qwen: Qwen3.5 Plus 2026-04-20", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 1.8, cacheRead: 0, cacheWrite: 0.375 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.6-27b": { id: "qwen/qwen3.6-27b", name: "Qwen: Qwen3.6 27B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.6, output: 3.6, cacheRead: 0.12, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.6-35b-a3b": { id: "qwen/qwen3.6-35b-a3b", name: "Qwen: Qwen3.6 35B A3B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.14, output: 1, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.6-flash": { id: "qwen/qwen3.6-flash", name: "Qwen: Qwen3.6 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.1875, output: 1.125, cacheRead: 0, cacheWrite: 0.234375 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.6-max-preview": { id: "qwen/qwen3.6-max-preview", name: "Qwen: Qwen3.6 Max Preview", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.027, output: 6.162, cacheRead: 0, cacheWrite: 1.28375 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.6-plus": { id: "qwen/qwen3.6-plus", name: "Qwen: Qwen3.6 Plus", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.325, output: 1.95, cacheRead: 0, cacheWrite: 0.40625 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.7-flash": { id: "qwen/qwen3.7-flash", name: "Qwen: Qwen3.7 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.03, output: 0.13, cacheRead: 0.006, cacheWrite: 0.038 }, contextWindow: 1e6, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.7-max": { id: "qwen/qwen3.7-max", name: "Qwen: Qwen3.7 Max", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.475, output: 4.425, cacheRead: 0.295, cacheWrite: 1.84375 }, contextWindow: 1e6, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.7-plus": { id: "qwen/qwen3.7-plus", name: "Qwen: Qwen3.7 Plus", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.32, output: 1.28, cacheRead: 0.064, cacheWrite: 0.4 }, contextWindow: 1e6, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.8-2.4t-a95b": { id: "qwen/qwen3.8-2.4t-a95b", name: "Qwen: Qwen3.8 2.4T A95B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 2, output: 6, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.8-27b": { id: "qwen/qwen3.8-27b", name: "Qwen: Qwen3.8 27B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.4, output: 3, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "qwen/qwen3.8-max": { id: "qwen/qwen3.8-max", name: "Qwen: Qwen3.8 Max", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.25, cacheWrite: 2.5 }, contextWindow: 1e6, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "rekaai/reka-edge": { id: "rekaai/reka-edge", name: "Reka Edge", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.1, cacheRead: 0, cacheWrite: 0 }, contextWindow: 16384, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "relace/relace-search": { id: "relace/relace-search", name: "Relace: Relace Search", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 1, output: 3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "sakana/fugu-ultra": { id: "sakana/fugu-ultra", name: "Sakana: Fugu Ultra", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "sakana/sakana-namazu": { id: "sakana/sakana-namazu", name: "Sakana: Sakana Namazu", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.95, output: 4, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "sao10k/l3.1-euryale-70b": { id: "sao10k/l3.1-euryale-70b", name: "Sao10K: Llama 3.1 Euryale 70B v2.2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.85, output: 0.85, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "stealth/ox-alpha": { id: "stealth/ox-alpha", name: "Ox Alpha", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "stepfun/step-3.5-flash": { id: "stepfun/step-3.5-flash", name: "StepFun: Step 3.5 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.1, output: 0.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "stepfun/step-3.7-flash": { id: "stepfun/step-3.7-flash", name: "StepFun: Step 3.7 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 1.15, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "tencent/hy3": { id: "tencent/hy3", name: "Tencent: Hy3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.132, output: 0.528, cacheRead: 0.033, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "tencent/hy3-preview": { id: "tencent/hy3-preview", name: "Tencent: Hy3 preview", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.18, output: 0.6, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "thedrummer/unslopnemo-12b": { id: "thedrummer/unslopnemo-12b", name: "TheDrummer: UnslopNemo 12B", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: false, input: ["text"], cost: { input: 0.4, output: 0.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1024000, maxTokens: 1024000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "thinkingmachines/inkling": { id: "thinkingmachines/inkling", name: "Thinking Machines: Inkling", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.95, output: 4.05, cacheRead: 0.16, cacheWrite: 0 }, contextWindow: 524288, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "thinkingmachines/inkling-small": { id: "thinkingmachines/inkling-small", name: "Thinking Machines: Inkling Small", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.45, output: 1.2, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 524288, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "thinkingmachines/inkling-small:free": { id: "thinkingmachines/inkling-small:free", name: "Thinking Machines: Inkling Small (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "thinkingmachines/inkling:batch": { id: "thinkingmachines/inkling:batch", name: "Thinking Machines: Inkling (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 4.05, cacheRead: 0.17, cacheWrite: 0 }, contextWindow: 524288, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "thinkingmachines/inkling:free": { id: "thinkingmachines/inkling:free", name: "Thinking Machines: Inkling (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "upstage/solar-pro-3": { id: "upstage/solar-pro-3", name: "Upstage: Solar Pro 3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.15, output: 0.6, cacheRead: 0.015, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "upstage/solar-pro4": { id: "upstage/solar-pro4", name: "Upstage: Solar Pro 4", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.03, output: 0.12, cacheRead: 0.006, cacheWrite: 0 }, contextWindow: 524288, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "x-ai/grok-4.20": { id: "x-ai/grok-4.20", name: "SpaceXAI: Grok 4.20", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "x-ai/grok-4.3": { id: "x-ai/grok-4.3", name: "SpaceXAI: Grok 4.3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "x-ai/grok-4.5": { id: "x-ai/grok-4.5", name: "SpaceXAI: Grok 4.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.3, cacheWrite: 0 }, contextWindow: 500000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "x-ai/grok-4.6": { id: "x-ai/grok-4.6", name: "SpaceXAI: Grok 4.6", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 500000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "x-ai/grok-build-0.1": { id: "x-ai/grok-build-0.1", name: "SpaceXAI: Grok Build 0.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 2, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "xiaomi/mimo-v2.5": { id: "xiaomi/mimo-v2.5", name: "Xiaomi: MiMo-V2.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.14, output: 0.28, cacheRead: 0.0028, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "xiaomi/mimo-v2.5-pro": { id: "xiaomi/mimo-v2.5-pro", name: "Xiaomi: MiMo-V2.5-Pro", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.435, output: 0.87, cacheRead: 0.0036, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-4.5": { id: "z-ai/glm-4.5", name: "Z.ai: GLM 4.5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.2, cacheRead: 0.11, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 98304, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-4.5-air": { id: "z-ai/glm-4.5-air", name: "Z.ai: GLM 4.5 Air", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.13, output: 0.85, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 98304, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-4.5v": { id: "z-ai/glm-4.5v", name: "Z.ai: GLM 4.5V", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.6, output: 1.8, cacheRead: 0.11, cacheWrite: 0 }, contextWindow: 65536, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-4.6": { id: "z-ai/glm-4.6", name: "Z.ai: GLM 4.6", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.5, output: 2, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 202752, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-4.6v": { id: "z-ai/glm-4.6v", name: "Z.ai: GLM 4.6V", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 0.9, cacheRead: 0.055, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-4.7": { id: "z-ai/glm-4.7", name: "Z.ai: GLM 4.7", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.4, output: 1.75, cacheRead: 0.08, cacheWrite: 0 }, contextWindow: 202752, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-4.7-flash": { id: "z-ai/glm-4.7-flash", name: "Z.ai: GLM 4.7 Flash", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.06, output: 0.4, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 202752, maxTokens: 16384, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-5": { id: "z-ai/glm-5", name: "Z.ai: GLM 5", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.6, output: 1.9, cacheRead: 0.119, cacheWrite: 0 }, contextWindow: 198000, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-5-turbo": { id: "z-ai/glm-5-turbo", name: "Z.ai: GLM 5 Turbo", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.2, output: 4, cacheRead: 0.24, cacheWrite: 0 }, contextWindow: 202752, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-5.1": { id: "z-ai/glm-5.1", name: "Z.ai: GLM 5.1", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.966, output: 3.036, cacheRead: 0.1794, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-5.2": { id: "z-ai/glm-5.2", name: "Z.ai: GLM 5.2", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.966, output: 3.036, cacheRead: 0.1932, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" }, thinkingLevelMap: { xhigh: "xhigh" } }, "z-ai/glm-5.2:batch": { id: "z-ai/glm-5.2:batch", name: "Z.ai: GLM 5.2 (batch)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 }, contextWindow: 1048575, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-5.2:free": { id: "z-ai/glm-5.2:free", name: "Z.ai: GLM 5.2 (free)", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-5.3": { id: "z-ai/glm-5.3", name: "Z.ai: GLM 5.3", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "z-ai/glm-5v-turbo": { id: "z-ai/glm-5v-turbo", name: "Z.ai: GLM 5V Turbo", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1.2, output: 4, cacheRead: 0.24, cacheWrite: 0 }, contextWindow: 202752, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "~anthropic/claude-fable-latest": { id: "~anthropic/claude-fable-latest", name: "Anthropic: Claude Fable Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 }, contextWindow: 1e6, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "~anthropic/claude-haiku-latest": { id: "~anthropic/claude-haiku-latest", name: "Anthropic Claude Haiku Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 5, cacheRead: 0.1, cacheWrite: 1.25 }, contextWindow: 200000, maxTokens: 64000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "~anthropic/claude-opus-latest": { id: "~anthropic/claude-opus-latest", name: "Anthropic: Claude Opus Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "~anthropic/claude-sonnet-latest": { id: "~anthropic/claude-sonnet-latest", name: "Anthropic Claude Sonnet Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1e6, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", cacheControlFormat: "anthropic" } }, "~deepseek/deepseek-v4-flash-latest": { id: "~deepseek/deepseek-v4-flash-latest", name: "DeepSeek V4 Flash Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 0.04, output: 0.08, cacheRead: 0.008, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 1048576, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter", requiresReasoningContentOnAssistantMessages: true }, thinkingLevelMap: { minimal: null, low: null, medium: null, high: "high", max: null, xhigh: "xhigh" } }, "~google/gemini-flash-latest": { id: "~google/gemini-flash-latest", name: "Google Gemini Flash Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.375, output: 1.875, cacheRead: 0.0375, cacheWrite: 0.020833 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "~google/gemini-pro-latest": { id: "~google/gemini-pro-latest", name: "Google Gemini Pro Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 0.375 }, contextWindow: 1048576, maxTokens: 65536, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "~moonshotai/kimi-latest": { id: "~moonshotai/kimi-latest", name: "MoonshotAI Kimi Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2.6, output: 13, cacheRead: 0.29, cacheWrite: 0 }, contextWindow: 974842, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "~openai/gpt-latest": { id: "~openai/gpt-latest", name: "OpenAI GPT Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "~openai/gpt-mini-latest": { id: "~openai/gpt-mini-latest", name: "OpenAI GPT Mini Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 0.75, output: 4.5, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "~x-ai/grok-latest": { id: "~x-ai/grok-latest", name: "xAI: Grok Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 500000, maxTokens: 4096, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } }, "~z-ai/glm-latest": { id: "~z-ai/glm-latest", name: "Z.ai: GLM Latest", api: "openai-completions", baseUrl: "https://openrouter.ai/api/v1", provider: "openrouter", reasoning: true, input: ["text"], cost: { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 131072, compat: { supportsDeveloperRole: false, thinkingFormat: "openrouter" } } }
|
|
138190
138929
|
};
|
|
138191
138930
|
|
|
138192
138931
|
// ../ai/dist/providers/openrouter.models.js
|
|
@@ -138226,7 +138965,7 @@ var TOGETHER_MODELS = flattenModelCatalog("together", together_default);
|
|
|
138226
138965
|
|
|
138227
138966
|
// ../ai/dist/providers/data/vercel-ai-gateway.json
|
|
138228
138967
|
var vercel_ai_gateway_default = {
|
|
138229
|
-
"anthropic-messages": { "alibaba/qwen-3-14b": { id: "alibaba/qwen-3-14b", name: "Qwen3-14B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.12, output: 0.24, cacheRead: 0, cacheWrite: 0 }, contextWindow: 40960, maxTokens: 16384 }, "alibaba/qwen-3-235b": { id: "alibaba/qwen-3-235b", name: "Qwen3 235B A22B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.22, output: 0.88, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 16384 }, "alibaba/qwen-3-30b": { id: "alibaba/qwen-3-30b", name: "Qwen3-30B-A3B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.12, output: 0.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 40960, maxTokens: 16384 }, "alibaba/qwen-3-32b": { id: "alibaba/qwen-3-32b", name: "Qwen 3 32B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.16, output: 0.64, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "alibaba/qwen-3.6-max-preview": { id: "alibaba/qwen-3.6-max-preview", name: "Qwen 3.6 Max Preview", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.3, output: 7.8, cacheRead: 0.26, cacheWrite: 1.625 }, contextWindow: 240000, maxTokens: 64000 }, "alibaba/qwen3-235b-a22b-thinking": { id: "alibaba/qwen3-235b-a22b-thinking", name: "Qwen3 VL 235B A22B Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.4, output: 4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768 }, "alibaba/qwen3-coder": { id: "alibaba/qwen3-coder", name: "Qwen3 Coder 480B A35B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 1.5, output: 7.5, cacheRead: 0.3, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536 }, "alibaba/qwen3-coder-30b-a3b": { id: "alibaba/qwen3-coder-30b-a3b", name: "Qwen 3 Coder 30B A3B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.15, output: 0.6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 8192 }, "alibaba/qwen3-coder-next": { id: "alibaba/qwen3-coder-next", name: "Qwen3 Coder Next", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.5, output: 1.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "alibaba/qwen3-coder-plus": { id: "alibaba/qwen3-coder-plus", name: "Qwen3 Coder Plus", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 1, output: 5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65536 }, "alibaba/qwen3-max": { id: "alibaba/qwen3-max", name: "Qwen3 Max", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 1.2, output: 6, cacheRead: 0.24, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768 }, "alibaba/qwen3-max-preview": { id: "alibaba/qwen3-max-preview", name: "Qwen3 Max Preview", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 1.2, output: 6, cacheRead: 0.24, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768 }, "alibaba/qwen3-max-thinking": { id: "alibaba/qwen3-max-thinking", name: "Qwen 3 Max Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.2, output: 6, cacheRead: 0.24, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 65536 }, "alibaba/qwen3-next-80b-a3b-instruct": { id: "alibaba/qwen3-next-80b-a3b-instruct", name: "Qwen3 Next 80B A3B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.15, output: 1.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768 }, "alibaba/qwen3-next-80b-a3b-thinking": { id: "alibaba/qwen3-next-80b-a3b-thinking", name: "Qwen3 Next 80B A3B Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.15, output: 1.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768 }, "alibaba/qwen3-vl-235b-a22b-instruct": { id: "alibaba/qwen3-vl-235b-a22b-instruct", name: "Qwen3 VL 235B A22B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.4, output: 1.6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 129024 }, "alibaba/qwen3-vl-instruct": { id: "alibaba/qwen3-vl-instruct", name: "Qwen3 VL 235B A22B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.4, output: 1.6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 129024 }, "alibaba/qwen3-vl-thinking": { id: "alibaba/qwen3-vl-thinking", name: "Qwen3 VL 235B A22B Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.4, output: 4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768 }, "alibaba/qwen3.5-flash": { id: "alibaba/qwen3.5-flash", name: "Qwen 3.5 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.4, cacheRead: 0.001, cacheWrite: 0.125 }, contextWindow: 1e6, maxTokens: 64000 }, "alibaba/qwen3.5-plus": { id: "alibaba/qwen3.5-plus", name: "Qwen 3.5 Plus", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.4, output: 2.4, cacheRead: 0.04, cacheWrite: 0.5 }, contextWindow: 1e6, maxTokens: 64000 }, "alibaba/qwen3.6-27b": { id: "alibaba/qwen3.6-27b", name: "Qwen 3.6 27B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.6, output: 3.6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "alibaba/qwen3.6-plus": { id: "alibaba/qwen3.6-plus", name: "Qwen 3.6 Plus", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 3, cacheRead: 0.1, cacheWrite: 0.625 }, contextWindow: 1e6, maxTokens: 64000 }, "alibaba/qwen3.7-flash": { id: "alibaba/qwen3.7-flash", name: "Qwen 3.7 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.03, output: 0.13, cacheRead: 0.006, cacheWrite: 0.038 }, contextWindow: 991000, maxTokens: 64000 }, "alibaba/qwen3.7-max": { id: "alibaba/qwen3.7-max", name: "Qwen 3.7 Max", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 2.5, output: 7.5, cacheRead: 0.5, cacheWrite: 3.125 }, contextWindow: 991000, maxTokens: 64000 }, "alibaba/qwen3.7-plus": { id: "alibaba/qwen3.7-plus", name: "Qwen 3.7 Plus", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.4, output: 1.6, cacheRead: 0.08, cacheWrite: 0.5 }, contextWindow: 1e6, maxTokens: 64000 }, "alibaba/qwen3.8-2.4t-a95b": { id: "alibaba/qwen3.8-2.4t-a95b", name: "Qwen3.8 2.4T A95B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072 }, "alibaba/qwen3.8-27b": { id: "alibaba/qwen3.8-27b", name: "Qwen3.8 27B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.55, output: 3.3, cacheRead: 0.11, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 131072 }, "alibaba/qwen3.8-max": { id: "alibaba/qwen3.8-max", name: "Qwen 3.8 Max", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.25, cacheWrite: 2.5 }, contextWindow: 1e6, maxTokens: 128000 }, "amazon/nova-2-lite": { id: "amazon/nova-2-lite", name: "Nova 2 Lite", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 2.5, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 1e6 }, "amazon/nova-lite": { id: "amazon/nova-lite", name: "Nova Lite", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.06, output: 0.24, cacheRead: 0, cacheWrite: 0 }, contextWindow: 300000, maxTokens: 8192 }, "amazon/nova-micro": { id: "amazon/nova-micro", name: "Nova Micro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.035, output: 0.14, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "amazon/nova-pro": { id: "amazon/nova-pro", name: "Nova Pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.8, output: 3.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 300000, maxTokens: 8192 }, "anthropic/claude-3-haiku": { id: "anthropic/claude-3-haiku", name: "Claude 3 Haiku", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.25, output: 1.25, cacheRead: 0.03, cacheWrite: 0.3 }, contextWindow: 200000, maxTokens: 4096 }, "anthropic/claude-fable-5": { id: "anthropic/claude-fable-5", name: "Claude Fable 5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { off: null, xhigh: "xhigh", max: "max" }, compat: { forceAdaptiveThinking: true } }, "anthropic/claude-haiku-4.5": { id: "anthropic/claude-haiku-4.5", name: "Claude Haiku 4.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 5, cacheRead: 0.1, cacheWrite: 1.25 }, contextWindow: 200000, maxTokens: 64000 }, "anthropic/claude-opus-4": { id: "anthropic/claude-opus-4", name: "Claude Opus 4", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 75, cacheRead: 1.5, cacheWrite: 18.75 }, contextWindow: 200000, maxTokens: 8192 }, "anthropic/claude-opus-4.5": { id: "anthropic/claude-opus-4.5", name: "Claude Opus 4.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 200000, maxTokens: 64000 }, "anthropic/claude-opus-4.6": { id: "anthropic/claude-opus-4.6", name: "Claude Opus 4.6", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { max: "max" }, compat: { forceAdaptiveThinking: true } }, "anthropic/claude-opus-4.7": { id: "anthropic/claude-opus-4.7", name: "Claude Opus 4.7", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh", max: "max" }, compat: { forceAdaptiveThinking: true, supportsTemperature: false } }, "anthropic/claude-opus-4.8": { id: "anthropic/claude-opus-4.8", name: "Claude Opus 4.8", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh", max: "max" }, compat: { forceAdaptiveThinking: true, supportsTemperature: false } }, "anthropic/claude-opus-4.8-fast": { id: "anthropic/claude-opus-4.8-fast", name: "Claude Opus 4.8 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh", max: "max" }, compat: { forceAdaptiveThinking: true, supportsTemperature: false } }, "anthropic/claude-opus-5": { id: "anthropic/claude-opus-5", name: "Claude Opus 5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh", max: "max" }, compat: { forceAdaptiveThinking: true, supportsTemperature: false } }, "anthropic/claude-opus-5-fast": { id: "anthropic/claude-opus-5-fast", name: "Claude Opus 5 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh", max: "max" }, compat: { forceAdaptiveThinking: true, supportsTemperature: false } }, "anthropic/claude-sonnet-4": { id: "anthropic/claude-sonnet-4", name: "Claude Sonnet 4", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 }, contextWindow: 1e6, maxTokens: 8192 }, "anthropic/claude-sonnet-4.5": { id: "anthropic/claude-sonnet-4.5", name: "Claude Sonnet 4.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 }, contextWindow: 1e6, maxTokens: 64000 }, "anthropic/claude-sonnet-4.6": { id: "anthropic/claude-sonnet-4.6", name: "Claude Sonnet 4.6", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { max: "max" }, compat: { forceAdaptiveThinking: true } }, "anthropic/claude-sonnet-5": { id: "anthropic/claude-sonnet-5", name: "Claude Sonnet 5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh", max: "max" }, compat: { forceAdaptiveThinking: true } }, "arcee-ai/trinity-large-thinking": { id: "arcee-ai/trinity-large-thinking", name: "Trinity Large Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.25, output: 0.9, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262100, maxTokens: 80000 }, "arcee-ai/trinity-mini": { id: "arcee-ai/trinity-mini", name: "Trinity Mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.045, output: 0.15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072 }, "bytedance/seed-1.6": { id: "bytedance/seed-1.6", name: "Seed 1.6", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 32000 }, "bytedance/seed-1.8": { id: "bytedance/seed-1.8", name: "Bytedance Seed 1.8", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 64000 }, "cohere/command-a": { id: "cohere/command-a", name: "Command A", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 2.5, output: 10, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 8000 }, "deepseek/deepseek-r1": { id: "deepseek/deepseek-r1", name: "DeepSeek-R1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.35, output: 5.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "deepseek/deepseek-v3": { id: "deepseek/deepseek-v3", name: "DeepSeek V3 0324", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.27, output: 1.12, cacheRead: 0.135, cacheWrite: 0 }, contextWindow: 163840, maxTokens: 163840 }, "deepseek/deepseek-v3.1": { id: "deepseek/deepseek-v3.1", name: "DeepSeek V3.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.25, output: 0.95, cacheRead: 0.13, cacheWrite: 0 }, contextWindow: 163840, maxTokens: 128000 }, "deepseek/deepseek-v3.1-terminus": { id: "deepseek/deepseek-v3.1-terminus", name: "DeepSeek V3.1 Terminus", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.27, output: 1, cacheRead: 0.135, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 65536 }, "deepseek/deepseek-v3.2": { id: "deepseek/deepseek-v3.2", name: "DeepSeek V3.2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.28, output: 0.42, cacheRead: 0.028, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8000 }, "deepseek/deepseek-v3.2-thinking": { id: "deepseek/deepseek-v3.2-thinking", name: "DeepSeek V3.2 Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.62, output: 1.85, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8000 }, "deepseek/deepseek-v4-flash": { id: "deepseek/deepseek-v4-flash", name: "DeepSeek V4 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.13, output: 0.26, cacheRead: 0.028, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 384000 }, "deepseek/deepseek-v4-flash-0731": { id: "deepseek/deepseek-v4-flash-0731", name: "DeepSeek V4 Flash 0731", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.076, output: 0.153, cacheRead: 0.014, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 384000 }, "deepseek/deepseek-v4-flash-vision-exp": { id: "deepseek/deepseek-v4-flash-vision-exp", name: "DeepSeek V4 Flash Vision Exp", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.22, output: 0.66, cacheRead: 0.007, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 384000 }, "deepseek/deepseek-v4-pro": { id: "deepseek/deepseek-v4-pro", name: "DeepSeek V4 Pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.74, output: 3.48, cacheRead: 0.14, cacheWrite: 0 }, contextWindow: 1048600, maxTokens: 1048600 }, "deepseek/deepseek-v4-pro-0813": { id: "deepseek/deepseek-v4-pro-0813", name: "DeepSeek V4 Pro 0813", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.32, output: 3.96, cacheRead: 0.132, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 384000 }, "google/gemini-2.5-flash": { id: "google/gemini-2.5-flash", name: "Gemini 2.5 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 2.5, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65536 }, "google/gemini-2.5-flash-lite": { id: "google/gemini-2.5-flash-lite", name: "Gemini 2.5 Flash Lite", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.4, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536 }, "google/gemini-2.5-pro": { id: "google/gemini-2.5-pro", name: "Gemini 2.5 Pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536 }, "google/gemini-3-flash": { id: "google/gemini-3-flash", name: "Gemini 3 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 3, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65000 }, "google/gemini-3.1-flash-lite": { id: "google/gemini-3.1-flash-lite", name: "Gemini 3.1 Flash Lite", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 1.5, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65000 }, "google/gemini-3.1-pro-preview": { id: "google/gemini-3.1-pro-preview", name: "Gemini 3.1 Pro Preview", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 64000 }, "google/gemini-3.5-flash": { id: "google/gemini-3.5-flash", name: "Gemini 3.5 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 9, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 64000 }, "google/gemini-3.5-flash-lite": { id: "google/gemini-3.5-flash-lite", name: "Gemini 3.5 Flash Lite", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 2.5, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65000 }, "google/gemini-3.6-flash": { id: "google/gemini-3.6-flash", name: "Gemini 3.6 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.75, output: 3.75, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 64000 }, "google/gemini-3.7-flash": { id: "google/gemini-3.7-flash", name: "Gemini 3.7 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.75, output: 3.75, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65536 }, "google/gemma-4-26b-a4b-it": { id: "google/gemma-4-26b-a4b-it", name: "Google Gemma 4 26B A4B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.15, output: 0.6, cacheRead: 0.015, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072 }, "google/gemma-4-31b-it": { id: "google/gemma-4-31b-it", name: "Gemma 4 31B IT", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.14, output: 0.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072 }, "inception/mercury-2": { id: "inception/mercury-2", name: "Mercury 2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.25, output: 0.75, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 128000 }, "inception/mercury-coder-small": { id: "inception/mercury-coder-small", name: "Mercury Coder Small Beta", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.25, output: 1, cacheRead: 0, cacheWrite: 0 }, contextWindow: 32000, maxTokens: 16384 }, "inclusionai/ling-3.0-flash": { id: "inclusionai/ling-3.0-flash", name: "Ling 3.0 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.06, output: 0.18, cacheRead: 0.012, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 32000 }, "interfaze/interfaze-beta": { id: "interfaze/interfaze-beta", name: "Interfaze Beta", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 3.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 32000 }, "kwaipilot/kat-coder-air-v2.5": { id: "kwaipilot/kat-coder-air-v2.5", name: "Kat Coder Air V2.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.15, output: 0.6, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 80000 }, "kwaipilot/kat-coder-pro-v1": { id: "kwaipilot/kat-coder-pro-v1", name: "KAT-Coder-Pro V1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 32000 }, "kwaipilot/kat-coder-pro-v2": { id: "kwaipilot/kat-coder-pro-v2", name: "Kat Coder Pro V2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "kwaipilot/kat-coder-pro-v2.5": { id: "kwaipilot/kat-coder-pro-v2.5", name: "Kat Coder Pro V2.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.74, output: 2.96, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 80000 }, "meta/llama-3.1-70b": { id: "meta/llama-3.1-70b", name: "Llama 3.1 70B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.72, output: 0.72, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "meta/llama-3.1-8b": { id: "meta/llama-3.1-8b", name: "Llama 3.1 8B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.22, output: 0.22, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "meta/llama-3.3-70b": { id: "meta/llama-3.3-70b", name: "Llama 3.3 70B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.72, output: 0.72, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "meta/llama-4-maverick": { id: "meta/llama-4-maverick", name: "Llama 4 Maverick 17B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.24, output: 0.97, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "meta/llama-4-scout": { id: "meta/llama-4-scout", name: "Llama 4 Scout 17B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.17, output: 0.66, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "meta/muse-glimmer-30b": { id: "meta/muse-glimmer-30b", name: "Muse Glimmer 30B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.35, output: 1.5, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072 }, "meta/muse-spark-1.1": { id: "meta/muse-spark-1.1", name: "Muse Spark 1.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 4.25, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 1048576 }, "meta/muse-spark-1.2": { id: "meta/muse-spark-1.2", name: "Muse Spark 1.2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 4.25, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 1048576 }, "meta/muse-spark-1.2-contributor": { id: "meta/muse-spark-1.2-contributor", name: "Muse Spark 1.2 Contributor", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.2, cacheRead: 0.002, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 1048576 }, "minimax/minimax-m2": { id: "minimax/minimax-m2", name: "MiniMax M2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0.375 }, contextWindow: 205000, maxTokens: 205000 }, "minimax/minimax-m2.1": { id: "minimax/minimax-m2.1", name: "MiniMax M2.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0.375 }, contextWindow: 204800, maxTokens: 131072 }, "minimax/minimax-m2.1-lightning": { id: "minimax/minimax-m2.1-lightning", name: "MiniMax M2.1 Lightning", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.3, output: 2.4, cacheRead: 0.03, cacheWrite: 0.375 }, contextWindow: 204800, maxTokens: 131072 }, "minimax/minimax-m2.5": { id: "minimax/minimax-m2.5", name: "MiniMax M2.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0.375 }, contextWindow: 204800, maxTokens: 131000 }, "minimax/minimax-m2.5-highspeed": { id: "minimax/minimax-m2.5-highspeed", name: "MiniMax M2.5 High Speed", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.4, cacheRead: 0.03, cacheWrite: 0.375 }, contextWindow: 204800, maxTokens: 131000 }, "minimax/minimax-m2.7": { id: "minimax/minimax-m2.7", name: "Minimax M2.7", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0.375 }, contextWindow: 204800, maxTokens: 131000 }, "minimax/minimax-m2.7-highspeed": { id: "minimax/minimax-m2.7-highspeed", name: "MiniMax M2.7 High Speed", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.4, cacheRead: 0.06, cacheWrite: 0.375 }, contextWindow: 204800, maxTokens: 131100 }, "minimax/minimax-m3": { id: "minimax/minimax-m3", name: "MiniMax M3", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 1e6 }, "mistral/codestral": { id: "mistral/codestral", name: "Mistral Codestral", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.3, output: 0.9, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4000 }, "mistral/devstral-2": { id: "mistral/devstral-2", name: "Devstral 2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.4, output: 2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "mistral/devstral-small-2": { id: "mistral/devstral-small-2", name: "Devstral Small 2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "mistral/magistral-medium": { id: "mistral/magistral-medium", name: "Magistral Medium 2509", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 64000 }, "mistral/magistral-small": { id: "mistral/magistral-small", name: "Magistral Small 2509", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 1.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 64000 }, "mistral/ministral-14b": { id: "mistral/ministral-14b", name: "Ministral 14B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.2, output: 0.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "mistral/ministral-3b": { id: "mistral/ministral-3b", name: "Ministral 3B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.1, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4000 }, "mistral/ministral-8b": { id: "mistral/ministral-8b", name: "Ministral 8B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.15, output: 0.15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4000 }, "mistral/mistral-large-3": { id: "mistral/mistral-large-3", name: "Mistral Large 3", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.5, output: 1.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "mistral/mistral-medium": { id: "mistral/mistral-medium", name: "Mistral Medium 3.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.4, output: 2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 64000 }, "mistral/mistral-medium-3.5": { id: "mistral/mistral-medium-3.5", name: "Mistral Medium Latest", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 7.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "mistral/mistral-nemo": { id: "mistral/mistral-nemo", name: "Mistral Nemo 12B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.15, output: 0.15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 128000 }, "mistral/mistral-small": { id: "mistral/mistral-small", name: "Mistral Small", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 32000, maxTokens: 4000 }, "mistral/pixtral-12b": { id: "mistral/pixtral-12b", name: "Pixtral 12B 2409", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.15, output: 0.15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4000 }, "moonshotai/kimi-k2": { id: "moonshotai/kimi-k2", name: "Kimi K2 Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.57, output: 2.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072 }, "moonshotai/kimi-k2-thinking": { id: "moonshotai/kimi-k2-thinking", name: "Kimi K2 Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.47, output: 2, cacheRead: 0.141, cacheWrite: 0 }, contextWindow: 216144, maxTokens: 216144 }, "moonshotai/kimi-k2.5": { id: "moonshotai/kimi-k2.5", name: "Kimi K2.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.6, output: 3, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 262114, maxTokens: 262114 }, "moonshotai/kimi-k2.6": { id: "moonshotai/kimi-k2.6", name: "Kimi K2.6", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.95, output: 4, cacheRead: 0.16, cacheWrite: 0 }, contextWindow: 262000, maxTokens: 262000 }, "moonshotai/kimi-k2.7-code": { id: "moonshotai/kimi-k2.7-code", name: "Kimi K2.7 Code", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.95, output: 4, cacheRead: 0.19, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 32768 }, "moonshotai/kimi-k2.7-code-highspeed": { id: "moonshotai/kimi-k2.7-code-highspeed", name: "Kimi K2.7 Code High Speed", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.9, output: 8, cacheRead: 0.38, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768 }, "moonshotai/kimi-k3": { id: "moonshotai/kimi-k3", name: "Kimi K3", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 131072 }, "moonshotai/kimi-k3-fast": { id: "moonshotai/kimi-k3-fast", name: "Kimi K3 Fast", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 4.5, output: 22.5, cacheRead: 0.45, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 131072 }, "nvidia/nemotron-3-nano-30b-a3b": { id: "nvidia/nemotron-3-nano-30b-a3b", name: "Nemotron 3 Nano 30B A3B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.05, output: 0.24, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144 }, "nvidia/nemotron-3-super-120b-a12b": { id: "nvidia/nemotron-3-super-120b-a12b", name: "NVIDIA Nemotron 3 Super 120B A12B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.15, output: 0.65, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 32000 }, "nvidia/nemotron-3-ultra-550b-a55b": { id: "nvidia/nemotron-3-ultra-550b-a55b", name: "Nemotron 3 Ultra", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.4, cacheRead: 0.12, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65000 }, "nvidia/nemotron-3.5-lightning": { id: "nvidia/nemotron-3.5-lightning", name: "Nemotron 3.5 Lightning 30B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.05, output: 0.2, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072 }, "nvidia/nemotron-nano-12b-v2-vl": { id: "nvidia/nemotron-nano-12b-v2-vl", name: "Nvidia Nemotron Nano 12B V2 VL", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 0.6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072 }, "nvidia/nemotron-nano-9b-v2": { id: "nvidia/nemotron-nano-9b-v2", name: "Nvidia Nemotron Nano 9B V2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.06, output: 0.23, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072 }, "openai/gpt-3.5-turbo": { id: "openai/gpt-3.5-turbo", name: "GPT-3.5 Turbo", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.5, output: 1.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 16385, maxTokens: 4096 }, "openai/gpt-4-turbo": { id: "openai/gpt-4-turbo", name: "GPT-4 Turbo", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 10, output: 30, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4096 }, "openai/gpt-4.1": { id: "openai/gpt-4.1", name: "GPT-4.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 2, output: 8, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768 }, "openai/gpt-4.1-fast": { id: "openai/gpt-4.1-fast", name: "GPT-4.1 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 3.5, output: 14, cacheRead: 0.875, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768 }, "openai/gpt-4.1-mini": { id: "openai/gpt-4.1-mini", name: "GPT-4.1 mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.4, output: 1.6, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768 }, "openai/gpt-4.1-mini-fast": { id: "openai/gpt-4.1-mini-fast", name: "GPT-4.1 mini (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.7, output: 2.8, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768 }, "openai/gpt-4.1-nano": { id: "openai/gpt-4.1-nano", name: "GPT-4.1 nano", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.4, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768 }, "openai/gpt-4.1-nano-fast": { id: "openai/gpt-4.1-nano-fast", name: "GPT-4.1 nano (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.2, output: 0.8, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768 }, "openai/gpt-4o": { id: "openai/gpt-4o", name: "GPT-4o", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 2.5, output: 10, cacheRead: 1.25, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384 }, "openai/gpt-4o-fast": { id: "openai/gpt-4o-fast", name: "GPT-4o (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 4.25, output: 17, cacheRead: 2.125, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384 }, "openai/gpt-4o-mini": { id: "openai/gpt-4o-mini", name: "GPT-4o mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.15, output: 0.6, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384 }, "openai/gpt-4o-mini-fast": { id: "openai/gpt-4o-mini-fast", name: "GPT-4o mini (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.25, output: 1, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384 }, "openai/gpt-5": { id: "openai/gpt-5", name: "GPT-5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5-codex": { id: "openai/gpt-5-codex", name: "GPT-5-Codex", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.13, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5-fast": { id: "openai/gpt-5-fast", name: "GPT-5 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 20, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5-mini": { id: "openai/gpt-5-mini", name: "GPT-5 mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5-mini-fast": { id: "openai/gpt-5-mini-fast", name: "GPT-5 mini (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.45, output: 3.6, cacheRead: 0.045, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5-nano": { id: "openai/gpt-5-nano", name: "GPT-5 nano", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.05, output: 0.4, cacheRead: 0.005, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5-pro": { id: "openai/gpt-5-pro", name: "GPT-5 pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 120, cacheRead: 0, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 272000 }, "openai/gpt-5.1-codex": { id: "openai/gpt-5.1-codex", name: "GPT-5.1-Codex", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.13, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5.1-codex-max": { id: "openai/gpt-5.1-codex-max", name: "GPT 5.1 Codex Max", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5.1-codex-mini": { id: "openai/gpt-5.1-codex-mini", name: "GPT 5.1 Codex Mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5.1-thinking": { id: "openai/gpt-5.1-thinking", name: "GPT 5.1 Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5.1-thinking-fast": { id: "openai/gpt-5.1-thinking-fast", name: "GPT 5.1 Thinking (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 20, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5.2": { id: "openai/gpt-5.2", name: "GPT 5.2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2-codex": { id: "openai/gpt-5.2-codex", name: "GPT 5.2 Codex", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2-fast": { id: "openai/gpt-5.2-fast", name: "GPT 5.2 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 3.5, output: 28, cacheRead: 0.35, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2-pro": { id: "openai/gpt-5.2-pro", name: "GPT 5.2 ", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 21, output: 168, cacheRead: 0, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.3-codex": { id: "openai/gpt-5.3-codex", name: "GPT 5.3 Codex", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.3-codex-fast": { id: "openai/gpt-5.3-codex-fast", name: "GPT 5.3 Codex (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 3.5, output: 28, cacheRead: 0.35, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4": { id: "openai/gpt-5.4", name: "GPT 5.4", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 15, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-fast": { id: "openai/gpt-5.4-fast", name: "GPT 5.4 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-mini": { id: "openai/gpt-5.4-mini", name: "GPT 5.4 Mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.75, output: 4.5, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-mini-fast": { id: "openai/gpt-5.4-mini-fast", name: "GPT 5.4 Mini (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 9, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-nano": { id: "openai/gpt-5.4-nano", name: "GPT 5.4 Nano", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 1.25, cacheRead: 0.02, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-pro": { id: "openai/gpt-5.4-pro", name: "GPT 5.4 Pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 30, output: 180, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.5": { id: "openai/gpt-5.5", name: "GPT 5.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.5-fast": { id: "openai/gpt-5.5-fast", name: "GPT 5.5 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 12.5, output: 75, cacheRead: 1.25, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.5-pro": { id: "openai/gpt-5.5-pro", name: "GPT 5.5 Pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 30, output: 180, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh", off: null, minimal: null, low: null } }, "openai/gpt-5.6-luna": { id: "openai/gpt-5.6-luna", name: "GPT 5.6 Luna", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 1.2, cacheRead: 0.02, cacheWrite: 0.25 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.6-luna-fast": { id: "openai/gpt-5.6-luna-fast", name: "GPT 5.6 Luna (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.4, output: 2.4, cacheRead: 0.04, cacheWrite: 0.25 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.6-sol": { id: "openai/gpt-5.6-sol", name: "GPT 5.6 Sol", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.6-sol-fast": { id: "openai/gpt-5.6-sol-fast", name: "GPT 5.6 Sol (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 4, output: 20, cacheRead: 0.4, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.6-terra": { id: "openai/gpt-5.6-terra", name: "GPT 5.6 Terra", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.6-terra-fast": { id: "openai/gpt-5.6-terra-fast", name: "GPT 5.6 Terra (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 4, output: 24, cacheRead: 0.4, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-oss-120b": { id: "openai/gpt-oss-120b", name: "GPT OSS 120B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.1, output: 0.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072 }, "openai/gpt-oss-20b": { id: "openai/gpt-oss-20b", name: "GPT OSS 20B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.05, output: 0.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 8192 }, "openai/gpt-oss-safeguard-20b": { id: "openai/gpt-oss-safeguard-20b", name: "GPT OSS Safeguard 20B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.075, output: 0.3, cacheRead: 0.037, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 65536 }, "openai/o1": { id: "openai/o1", name: "o1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 60, cacheRead: 7.5, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "openai/o3": { id: "openai/o3", name: "o3", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 8, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "openai/o3-deep-research": { id: "openai/o3-deep-research", name: "o3-deep-research", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 40, cacheRead: 2.5, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "openai/o3-fast": { id: "openai/o3-fast", name: "o3 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 3.5, output: 14, cacheRead: 0.875, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "openai/o3-mini": { id: "openai/o3-mini", name: "o3-mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.1, output: 4.4, cacheRead: 0.55, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "openai/o3-pro": { id: "openai/o3-pro", name: "o3 Pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 20, output: 80, cacheRead: 0, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "openai/o4-mini": { id: "openai/o4-mini", name: "o4-mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.1, output: 4.4, cacheRead: 0.275, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "openai/o4-mini-fast": { id: "openai/o4-mini-fast", name: "o4-mini (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 8, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "poolside/laguna-s-2.1": { id: "poolside/laguna-s-2.1", name: "Laguna S 2.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.1, output: 0.2, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 131072 }, "poolside/laguna-s-2.1-free": { id: "poolside/laguna-s-2.1-free", name: "Laguna S 2.1 Free", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 32768 }, "sakana/fugu-ultra": { id: "sakana/fugu-ultra", name: "Fugu Ultra", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 1e6 }, "sakana/namazu": { id: "sakana/namazu", name: "Sakana Namazu", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.95, output: 4, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "spacexai/grok-4.1-fast-non-reasoning": { id: "spacexai/grok-4.1-fast-non-reasoning", name: "Grok 4.1 Fast Non-Reasoning", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.2, output: 0.5, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 1e6 }, "spacexai/grok-4.1-fast-reasoning": { id: "spacexai/grok-4.1-fast-reasoning", name: "Grok 4.1 Fast Reasoning", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 0.5, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 1e6 }, "spacexai/grok-4.20-multi-agent": { id: "spacexai/grok-4.20-multi-agent", name: "Grok 4.20 Multi-Agent", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 2000000 }, "spacexai/grok-4.20-multi-agent-beta": { id: "spacexai/grok-4.20-multi-agent-beta", name: "Grok 4.20 Multi Agent Beta", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 2000000 }, "spacexai/grok-4.20-non-reasoning": { id: "spacexai/grok-4.20-non-reasoning", name: "Grok 4.20 Non-Reasoning", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 2000000 }, "spacexai/grok-4.20-non-reasoning-beta": { id: "spacexai/grok-4.20-non-reasoning-beta", name: "Grok 4.20 Beta Non-Reasoning", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 2000000 }, "spacexai/grok-4.20-reasoning": { id: "spacexai/grok-4.20-reasoning", name: "Grok 4.20 Reasoning", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 2000000 }, "spacexai/grok-4.20-reasoning-beta": { id: "spacexai/grok-4.20-reasoning-beta", name: "Grok 4.20 Beta Reasoning", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 2000000 }, "spacexai/grok-4.3": { id: "spacexai/grok-4.3", name: "Grok 4.3", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 1e6 }, "spacexai/grok-4.5": { id: "spacexai/grok-4.5", name: "Grok 4.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.3, cacheWrite: 0 }, contextWindow: 500000, maxTokens: 500000 }, "spacexai/grok-4.6": { id: "spacexai/grok-4.6", name: "Grok 4.6", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 500000, maxTokens: 500000 }, "spacexai/grok-build-0.1": { id: "spacexai/grok-build-0.1", name: "Grok Build 0.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 2, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "stepfun/step-3.5-flash": { id: "stepfun/step-3.5-flash", name: "StepFun 3.5 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.09, output: 0.3, cacheRead: 0.02, cacheWrite: 0 }, contextWindow: 262114, maxTokens: 262114 }, "stepfun/step-3.7-flash": { id: "stepfun/step-3.7-flash", name: "Step 3.7 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 1.15, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "tencent/hy3": { id: "tencent/hy3", name: "Hy3", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.132, output: 0.528, cacheRead: 0.033, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 128000 }, "thinkingmachines/inkling": { id: "thinkingmachines/inkling", name: "Inkling", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 4.05, cacheRead: 0.17, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "thinkingmachines/inkling-small": { id: "thinkingmachines/inkling-small", name: "Inkling Small", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 1.2, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 1e6 }, "xiaomi/mimo-v2.5": { id: "xiaomi/mimo-v2.5", name: "MiMo M2.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.14, output: 0.28, cacheRead: 0.0028, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 131100 }, "xiaomi/mimo-v2.5-pro": { id: "xiaomi/mimo-v2.5-pro", name: "MiMo V2.5 Pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.435, output: 0.87, cacheRead: 0.0036, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 131000 }, "zai/glm-4.5": { id: "zai/glm-4.5", name: "GLM 4.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.2, cacheRead: 0.11, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 96000 }, "zai/glm-4.5-air": { id: "zai/glm-4.5-air", name: "GLM 4.5 Air", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.2, output: 1.1, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 96000 }, "zai/glm-4.5v": { id: "zai/glm-4.5v", name: "GLM 4.5V", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.6, output: 1.8, cacheRead: 0.11, cacheWrite: 0 }, contextWindow: 66000, maxTokens: 16000 }, "zai/glm-4.6": { id: "zai/glm-4.6", name: "GLM 4.6", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.2, cacheRead: 0.11, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 96000 }, "zai/glm-4.7": { id: "zai/glm-4.7", name: "GLM 4.7", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.2, cacheRead: 0.12, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 120000 }, "zai/glm-4.7-flash": { id: "zai/glm-4.7-flash", name: "GLM 4.7 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.07, output: 0.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 131000 }, "zai/glm-4.7-flashx": { id: "zai/glm-4.7-flashx", name: "GLM 4.7 FlashX", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.06, output: 0.4, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 128000 }, "zai/glm-5": { id: "zai/glm-5", name: "GLM 5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1, output: 3.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 202800, maxTokens: 131100 }, "zai/glm-5-turbo": { id: "zai/glm-5-turbo", name: "GLM 5 Turbo", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.2, output: 4, cacheRead: 0.24, cacheWrite: 0 }, contextWindow: 202800, maxTokens: 131100 }, "zai/glm-5.1": { id: "zai/glm-5.1", name: "GLM 5.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 }, contextWindow: 202800, maxTokens: 64000 }, "zai/glm-5.2": { id: "zai/glm-5.2", name: "GLM 5.2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.8, output: 2.55, cacheRead: 0.16, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 128000 }, "zai/glm-5.2-fast": { id: "zai/glm-5.2-fast", name: "GLM 5.2 Fast", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 2.1, output: 6.6, cacheRead: 0.21, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 128000 }, "zai/glm-5.3": { id: "zai/glm-5.3", name: "GLM 5.3", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 12800 }, "zai/glm-5v-turbo": { id: "zai/glm-5v-turbo", name: "GLM 5V Turbo", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.2, output: 4, cacheRead: 0.24, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 128000 } }
|
|
138968
|
+
"anthropic-messages": { "alibaba/qwen-3-14b": { id: "alibaba/qwen-3-14b", name: "Qwen3-14B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.12, output: 0.24, cacheRead: 0, cacheWrite: 0 }, contextWindow: 40960, maxTokens: 16384 }, "alibaba/qwen-3-235b": { id: "alibaba/qwen-3-235b", name: "Qwen3 235B A22B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.22, output: 0.88, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 16384 }, "alibaba/qwen-3-30b": { id: "alibaba/qwen-3-30b", name: "Qwen3-30B-A3B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.12, output: 0.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 40960, maxTokens: 16384 }, "alibaba/qwen-3-32b": { id: "alibaba/qwen-3-32b", name: "Qwen 3 32B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.16, output: 0.64, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "alibaba/qwen-3.6-max-preview": { id: "alibaba/qwen-3.6-max-preview", name: "Qwen 3.6 Max Preview", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.3, output: 7.8, cacheRead: 0.26, cacheWrite: 1.625 }, contextWindow: 240000, maxTokens: 64000 }, "alibaba/qwen3-235b-a22b-thinking": { id: "alibaba/qwen3-235b-a22b-thinking", name: "Qwen3 VL 235B A22B Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.4, output: 4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768 }, "alibaba/qwen3-coder": { id: "alibaba/qwen3-coder", name: "Qwen3 Coder 480B A35B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 1.5, output: 7.5, cacheRead: 0.3, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 65536 }, "alibaba/qwen3-coder-30b-a3b": { id: "alibaba/qwen3-coder-30b-a3b", name: "Qwen 3 Coder 30B A3B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.15, output: 0.6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 8192 }, "alibaba/qwen3-coder-next": { id: "alibaba/qwen3-coder-next", name: "Qwen3 Coder Next", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.5, output: 1.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "alibaba/qwen3-coder-plus": { id: "alibaba/qwen3-coder-plus", name: "Qwen3 Coder Plus", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 1, output: 5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65536 }, "alibaba/qwen3-max": { id: "alibaba/qwen3-max", name: "Qwen3 Max", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 1.2, output: 6, cacheRead: 0.24, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768 }, "alibaba/qwen3-max-preview": { id: "alibaba/qwen3-max-preview", name: "Qwen3 Max Preview", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 1.2, output: 6, cacheRead: 0.24, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768 }, "alibaba/qwen3-max-thinking": { id: "alibaba/qwen3-max-thinking", name: "Qwen 3 Max Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.2, output: 6, cacheRead: 0.24, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 65536 }, "alibaba/qwen3-next-80b-a3b-instruct": { id: "alibaba/qwen3-next-80b-a3b-instruct", name: "Qwen3 Next 80B A3B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.15, output: 1.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768 }, "alibaba/qwen3-next-80b-a3b-thinking": { id: "alibaba/qwen3-next-80b-a3b-thinking", name: "Qwen3 Next 80B A3B Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.15, output: 1.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768 }, "alibaba/qwen3-vl-235b-a22b-instruct": { id: "alibaba/qwen3-vl-235b-a22b-instruct", name: "Qwen3 VL 235B A22B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.4, output: 1.6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 129024 }, "alibaba/qwen3-vl-instruct": { id: "alibaba/qwen3-vl-instruct", name: "Qwen3 VL 235B A22B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.4, output: 1.6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 129024 }, "alibaba/qwen3-vl-thinking": { id: "alibaba/qwen3-vl-thinking", name: "Qwen3 VL 235B A22B Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.4, output: 4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 32768 }, "alibaba/qwen3.5-flash": { id: "alibaba/qwen3.5-flash", name: "Qwen 3.5 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.4, cacheRead: 0.001, cacheWrite: 0.125 }, contextWindow: 1e6, maxTokens: 64000 }, "alibaba/qwen3.5-plus": { id: "alibaba/qwen3.5-plus", name: "Qwen 3.5 Plus", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.4, output: 2.4, cacheRead: 0.04, cacheWrite: 0.5 }, contextWindow: 1e6, maxTokens: 64000 }, "alibaba/qwen3.6-27b": { id: "alibaba/qwen3.6-27b", name: "Qwen 3.6 27B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.6, output: 3.6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "alibaba/qwen3.6-plus": { id: "alibaba/qwen3.6-plus", name: "Qwen 3.6 Plus", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 3, cacheRead: 0.1, cacheWrite: 0.625 }, contextWindow: 1e6, maxTokens: 64000 }, "alibaba/qwen3.7-flash": { id: "alibaba/qwen3.7-flash", name: "Qwen 3.7 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.03, output: 0.13, cacheRead: 0.006, cacheWrite: 0.038 }, contextWindow: 991000, maxTokens: 64000 }, "alibaba/qwen3.7-max": { id: "alibaba/qwen3.7-max", name: "Qwen 3.7 Max", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 2.5, output: 7.5, cacheRead: 0.5, cacheWrite: 3.125 }, contextWindow: 991000, maxTokens: 64000 }, "alibaba/qwen3.7-plus": { id: "alibaba/qwen3.7-plus", name: "Qwen 3.7 Plus", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.4, output: 1.6, cacheRead: 0.08, cacheWrite: 0.5 }, contextWindow: 1e6, maxTokens: 64000 }, "alibaba/qwen3.8-2.4t-a95b": { id: "alibaba/qwen3.8-2.4t-a95b", name: "Qwen3.8 2.4T A95B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072 }, "alibaba/qwen3.8-27b": { id: "alibaba/qwen3.8-27b", name: "Qwen3.8 27B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.55, output: 3.3, cacheRead: 0.11, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 131072 }, "alibaba/qwen3.8-max": { id: "alibaba/qwen3.8-max", name: "Qwen 3.8 Max", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.25, cacheWrite: 2.5 }, contextWindow: 1e6, maxTokens: 128000 }, "amazon/nova-2-lite": { id: "amazon/nova-2-lite", name: "Nova 2 Lite", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 2.5, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 1e6 }, "amazon/nova-lite": { id: "amazon/nova-lite", name: "Nova Lite", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.06, output: 0.24, cacheRead: 0, cacheWrite: 0 }, contextWindow: 300000, maxTokens: 8192 }, "amazon/nova-micro": { id: "amazon/nova-micro", name: "Nova Micro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.035, output: 0.14, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "amazon/nova-pro": { id: "amazon/nova-pro", name: "Nova Pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.8, output: 3.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 300000, maxTokens: 8192 }, "anthropic/claude-3-haiku": { id: "anthropic/claude-3-haiku", name: "Claude 3 Haiku", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.25, output: 1.25, cacheRead: 0.03, cacheWrite: 0.3 }, contextWindow: 200000, maxTokens: 4096 }, "anthropic/claude-fable-5": { id: "anthropic/claude-fable-5", name: "Claude Fable 5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { off: null, xhigh: "xhigh", max: "max" }, compat: { forceAdaptiveThinking: true } }, "anthropic/claude-haiku-4.5": { id: "anthropic/claude-haiku-4.5", name: "Claude Haiku 4.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 5, cacheRead: 0.1, cacheWrite: 1.25 }, contextWindow: 200000, maxTokens: 64000 }, "anthropic/claude-opus-4": { id: "anthropic/claude-opus-4", name: "Claude Opus 4", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 75, cacheRead: 1.5, cacheWrite: 18.75 }, contextWindow: 200000, maxTokens: 8192 }, "anthropic/claude-opus-4.5": { id: "anthropic/claude-opus-4.5", name: "Claude Opus 4.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 200000, maxTokens: 64000 }, "anthropic/claude-opus-4.6": { id: "anthropic/claude-opus-4.6", name: "Claude Opus 4.6", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { max: "max" }, compat: { forceAdaptiveThinking: true } }, "anthropic/claude-opus-4.7": { id: "anthropic/claude-opus-4.7", name: "Claude Opus 4.7", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh", max: "max" }, compat: { forceAdaptiveThinking: true, supportsTemperature: false } }, "anthropic/claude-opus-4.8": { id: "anthropic/claude-opus-4.8", name: "Claude Opus 4.8", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh", max: "max" }, compat: { forceAdaptiveThinking: true, supportsTemperature: false } }, "anthropic/claude-opus-4.8-fast": { id: "anthropic/claude-opus-4.8-fast", name: "Claude Opus 4.8 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh", max: "max" }, compat: { forceAdaptiveThinking: true, supportsTemperature: false } }, "anthropic/claude-opus-5": { id: "anthropic/claude-opus-5", name: "Claude Opus 5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh", max: "max" }, compat: { forceAdaptiveThinking: true, supportsTemperature: false } }, "anthropic/claude-opus-5-fast": { id: "anthropic/claude-opus-5-fast", name: "Claude Opus 5 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh", max: "max" }, compat: { forceAdaptiveThinking: true, supportsTemperature: false } }, "anthropic/claude-sonnet-4": { id: "anthropic/claude-sonnet-4", name: "Claude Sonnet 4", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 }, contextWindow: 1e6, maxTokens: 8192 }, "anthropic/claude-sonnet-4.5": { id: "anthropic/claude-sonnet-4.5", name: "Claude Sonnet 4.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 }, contextWindow: 1e6, maxTokens: 64000 }, "anthropic/claude-sonnet-4.6": { id: "anthropic/claude-sonnet-4.6", name: "Claude Sonnet 4.6", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { max: "max" }, compat: { forceAdaptiveThinking: true } }, "anthropic/claude-sonnet-5": { id: "anthropic/claude-sonnet-5", name: "Claude Sonnet 5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh", max: "max" }, compat: { forceAdaptiveThinking: true } }, "arcee-ai/trinity-large-thinking": { id: "arcee-ai/trinity-large-thinking", name: "Trinity Large Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.25, output: 0.9, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262100, maxTokens: 80000 }, "arcee-ai/trinity-mini": { id: "arcee-ai/trinity-mini", name: "Trinity Mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.045, output: 0.15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072 }, "bytedance/seed-1.6": { id: "bytedance/seed-1.6", name: "Seed 1.6", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 32000 }, "bytedance/seed-1.8": { id: "bytedance/seed-1.8", name: "Bytedance Seed 1.8", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 64000 }, "cohere/command-a": { id: "cohere/command-a", name: "Command A", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 2.5, output: 10, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 8000 }, "deepseek/deepseek-r1": { id: "deepseek/deepseek-r1", name: "DeepSeek-R1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.35, output: 5.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "deepseek/deepseek-v3": { id: "deepseek/deepseek-v3", name: "DeepSeek V3 0324", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.27, output: 1.12, cacheRead: 0.135, cacheWrite: 0 }, contextWindow: 163840, maxTokens: 163840 }, "deepseek/deepseek-v3.1": { id: "deepseek/deepseek-v3.1", name: "DeepSeek V3.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.25, output: 0.95, cacheRead: 0.13, cacheWrite: 0 }, contextWindow: 163840, maxTokens: 128000 }, "deepseek/deepseek-v3.1-terminus": { id: "deepseek/deepseek-v3.1-terminus", name: "DeepSeek V3.1 Terminus", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.27, output: 1, cacheRead: 0.135, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 65536 }, "deepseek/deepseek-v3.2": { id: "deepseek/deepseek-v3.2", name: "DeepSeek V3.2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.28, output: 0.42, cacheRead: 0.028, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8000 }, "deepseek/deepseek-v3.2-thinking": { id: "deepseek/deepseek-v3.2-thinking", name: "DeepSeek V3.2 Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.62, output: 1.85, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8000 }, "deepseek/deepseek-v4-flash": { id: "deepseek/deepseek-v4-flash", name: "DeepSeek V4 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.13, output: 0.26, cacheRead: 0.028, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 384000 }, "deepseek/deepseek-v4-flash-0731": { id: "deepseek/deepseek-v4-flash-0731", name: "DeepSeek V4 Flash 0731", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.076, output: 0.153, cacheRead: 0.014, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 384000 }, "deepseek/deepseek-v4-flash-vision-exp": { id: "deepseek/deepseek-v4-flash-vision-exp", name: "DeepSeek V4 Flash Vision Exp", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.22, output: 0.66, cacheRead: 0.007, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 384000 }, "deepseek/deepseek-v4-pro": { id: "deepseek/deepseek-v4-pro", name: "DeepSeek V4 Pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.74, output: 3.48, cacheRead: 0.14, cacheWrite: 0 }, contextWindow: 1048600, maxTokens: 1048600 }, "deepseek/deepseek-v4-pro-0813": { id: "deepseek/deepseek-v4-pro-0813", name: "DeepSeek V4 Pro 0813", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.32, output: 3.96, cacheRead: 0.132, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 384000 }, "google/gemini-2.5-flash": { id: "google/gemini-2.5-flash", name: "Gemini 2.5 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 2.5, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65536 }, "google/gemini-2.5-flash-lite": { id: "google/gemini-2.5-flash-lite", name: "Gemini 2.5 Flash Lite", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.4, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536 }, "google/gemini-2.5-pro": { id: "google/gemini-2.5-pro", name: "Gemini 2.5 Pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 65536 }, "google/gemini-3-flash": { id: "google/gemini-3-flash", name: "Gemini 3 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 3, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65000 }, "google/gemini-3.1-flash-lite": { id: "google/gemini-3.1-flash-lite", name: "Gemini 3.1 Flash Lite", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 1.5, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65000 }, "google/gemini-3.1-pro-preview": { id: "google/gemini-3.1-pro-preview", name: "Gemini 3.1 Pro Preview", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 64000 }, "google/gemini-3.5-flash": { id: "google/gemini-3.5-flash", name: "Gemini 3.5 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 9, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 64000 }, "google/gemini-3.5-flash-lite": { id: "google/gemini-3.5-flash-lite", name: "Gemini 3.5 Flash Lite", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 2.5, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65000 }, "google/gemini-3.6-flash": { id: "google/gemini-3.6-flash", name: "Gemini 3.6 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.75, output: 3.75, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 64000 }, "google/gemini-3.7-flash": { id: "google/gemini-3.7-flash", name: "Gemini 3.7 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.75, output: 3.75, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65536 }, "google/gemma-4-26b-a4b-it": { id: "google/gemma-4-26b-a4b-it", name: "Google Gemma 4 26B A4B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.15, output: 0.6, cacheRead: 0.015, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072 }, "google/gemma-4-31b-it": { id: "google/gemma-4-31b-it", name: "Gemma 4 31B IT", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.14, output: 0.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 131072 }, "inception/mercury-2": { id: "inception/mercury-2", name: "Mercury 2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.25, output: 0.75, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 128000 }, "inception/mercury-coder-small": { id: "inception/mercury-coder-small", name: "Mercury Coder Small Beta", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.25, output: 1, cacheRead: 0, cacheWrite: 0 }, contextWindow: 32000, maxTokens: 16384 }, "inclusionai/ling-3.0-flash": { id: "inclusionai/ling-3.0-flash", name: "Ling 3.0 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.06, output: 0.18, cacheRead: 0.012, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 32000 }, "interfaze/interfaze-beta": { id: "interfaze/interfaze-beta", name: "Interfaze Beta", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 3.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 32000 }, "kwaipilot/kat-coder-air-v2.5": { id: "kwaipilot/kat-coder-air-v2.5", name: "Kat Coder Air V2.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.15, output: 0.6, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 80000 }, "kwaipilot/kat-coder-pro-v1": { id: "kwaipilot/kat-coder-pro-v1", name: "KAT-Coder-Pro V1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 32000 }, "kwaipilot/kat-coder-pro-v2": { id: "kwaipilot/kat-coder-pro-v2", name: "Kat Coder Pro V2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "kwaipilot/kat-coder-pro-v2.5": { id: "kwaipilot/kat-coder-pro-v2.5", name: "Kat Coder Pro V2.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.74, output: 2.96, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 80000 }, "meta/llama-3.1-70b": { id: "meta/llama-3.1-70b", name: "Llama 3.1 70B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.72, output: 0.72, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "meta/llama-3.1-8b": { id: "meta/llama-3.1-8b", name: "Llama 3.1 8B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.22, output: 0.22, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "meta/llama-3.3-70b": { id: "meta/llama-3.3-70b", name: "Llama 3.3 70B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.72, output: 0.72, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "meta/llama-4-maverick": { id: "meta/llama-4-maverick", name: "Llama 4 Maverick 17B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.24, output: 0.97, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "meta/llama-4-scout": { id: "meta/llama-4-scout", name: "Llama 4 Scout 17B Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.17, output: 0.66, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 }, "meta/muse-glimmer-30b": { id: "meta/muse-glimmer-30b", name: "Muse Glimmer 30B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.35, output: 1.5, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072 }, "meta/muse-spark-1.1": { id: "meta/muse-spark-1.1", name: "Muse Spark 1.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 4.25, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 1048576 }, "meta/muse-spark-1.2": { id: "meta/muse-spark-1.2", name: "Muse Spark 1.2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 4.25, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 1048576 }, "meta/muse-spark-1.2-contributor": { id: "meta/muse-spark-1.2-contributor", name: "Muse Spark 1.2 Contributor", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.1, output: 0.2, cacheRead: 0.002, cacheWrite: 0 }, contextWindow: 1048576, maxTokens: 1048576 }, "minimax/minimax-m2": { id: "minimax/minimax-m2", name: "MiniMax M2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0.375 }, contextWindow: 205000, maxTokens: 205000 }, "minimax/minimax-m2.1": { id: "minimax/minimax-m2.1", name: "MiniMax M2.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0.375 }, contextWindow: 204800, maxTokens: 131072 }, "minimax/minimax-m2.1-lightning": { id: "minimax/minimax-m2.1-lightning", name: "MiniMax M2.1 Lightning", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.3, output: 2.4, cacheRead: 0.03, cacheWrite: 0.375 }, contextWindow: 204800, maxTokens: 131072 }, "minimax/minimax-m2.5": { id: "minimax/minimax-m2.5", name: "MiniMax M2.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0.375 }, contextWindow: 204800, maxTokens: 131000 }, "minimax/minimax-m2.5-highspeed": { id: "minimax/minimax-m2.5-highspeed", name: "MiniMax M2.5 High Speed", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.4, cacheRead: 0.03, cacheWrite: 0.375 }, contextWindow: 204800, maxTokens: 131000 }, "minimax/minimax-m2.7": { id: "minimax/minimax-m2.7", name: "Minimax M2.7", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0.375 }, contextWindow: 204800, maxTokens: 131000 }, "minimax/minimax-m2.7-highspeed": { id: "minimax/minimax-m2.7-highspeed", name: "MiniMax M2.7 High Speed", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.4, cacheRead: 0.06, cacheWrite: 0.375 }, contextWindow: 204800, maxTokens: 131100 }, "minimax/minimax-m3": { id: "minimax/minimax-m3", name: "MiniMax M3", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 1e6 }, "mistral/codestral": { id: "mistral/codestral", name: "Mistral Codestral", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.3, output: 0.9, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4000 }, "mistral/devstral-2": { id: "mistral/devstral-2", name: "Devstral 2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.4, output: 2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "mistral/devstral-small-2": { id: "mistral/devstral-small-2", name: "Devstral Small 2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "mistral/magistral-medium": { id: "mistral/magistral-medium", name: "Magistral Medium 2509", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 64000 }, "mistral/magistral-small": { id: "mistral/magistral-small", name: "Magistral Small 2509", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 1.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 64000 }, "mistral/ministral-14b": { id: "mistral/ministral-14b", name: "Ministral 14B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.2, output: 0.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "mistral/ministral-3b": { id: "mistral/ministral-3b", name: "Ministral 3B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.1, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4000 }, "mistral/ministral-8b": { id: "mistral/ministral-8b", name: "Ministral 8B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.15, output: 0.15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4000 }, "mistral/mistral-large-3": { id: "mistral/mistral-large-3", name: "Mistral Large 3", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.5, output: 1.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "mistral/mistral-medium": { id: "mistral/mistral-medium", name: "Mistral Medium 3.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.4, output: 2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 64000 }, "mistral/mistral-medium-3.5": { id: "mistral/mistral-medium-3.5", name: "Mistral Medium Latest", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 7.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "mistral/mistral-nemo": { id: "mistral/mistral-nemo", name: "Mistral Nemo 12B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.15, output: 0.15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 128000 }, "mistral/mistral-small": { id: "mistral/mistral-small", name: "Mistral Small", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 32000, maxTokens: 4000 }, "mistral/pixtral-12b": { id: "mistral/pixtral-12b", name: "Pixtral 12B 2409", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.15, output: 0.15, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4000 }, "moonshotai/kimi-k2": { id: "moonshotai/kimi-k2", name: "Kimi K2 Instruct", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.57, output: 2.3, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072 }, "moonshotai/kimi-k2-thinking": { id: "moonshotai/kimi-k2-thinking", name: "Kimi K2 Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.47, output: 2, cacheRead: 0.141, cacheWrite: 0 }, contextWindow: 216144, maxTokens: 216144 }, "moonshotai/kimi-k2.5": { id: "moonshotai/kimi-k2.5", name: "Kimi K2.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.6, output: 3, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 262114, maxTokens: 262114 }, "moonshotai/kimi-k2.6": { id: "moonshotai/kimi-k2.6", name: "Kimi K2.6", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.95, output: 4, cacheRead: 0.16, cacheWrite: 0 }, contextWindow: 262000, maxTokens: 262000 }, "moonshotai/kimi-k2.7-code": { id: "moonshotai/kimi-k2.7-code", name: "Kimi K2.7 Code", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.95, output: 4, cacheRead: 0.19, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 32768 }, "moonshotai/kimi-k2.7-code-highspeed": { id: "moonshotai/kimi-k2.7-code-highspeed", name: "Kimi K2.7 Code High Speed", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.9, output: 8, cacheRead: 0.38, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 32768 }, "moonshotai/kimi-k3": { id: "moonshotai/kimi-k3", name: "Kimi K3", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 131072 }, "moonshotai/kimi-k3-fast": { id: "moonshotai/kimi-k3-fast", name: "Kimi K3 Fast", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 4.5, output: 22.5, cacheRead: 0.45, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 131072 }, "nvidia/nemotron-3-nano-30b-a3b": { id: "nvidia/nemotron-3-nano-30b-a3b", name: "Nemotron 3 Nano 30B A3B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.05, output: 0.24, cacheRead: 0, cacheWrite: 0 }, contextWindow: 262144, maxTokens: 262144 }, "nvidia/nemotron-3-super-120b-a12b": { id: "nvidia/nemotron-3-super-120b-a12b", name: "NVIDIA Nemotron 3 Super 120B A12B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.15, output: 0.65, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 32000 }, "nvidia/nemotron-3-ultra-550b-a55b": { id: "nvidia/nemotron-3-ultra-550b-a55b", name: "Nemotron 3 Ultra", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.4, cacheRead: 0.12, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 65000 }, "nvidia/nemotron-3.5-lightning": { id: "nvidia/nemotron-3.5-lightning", name: "Nemotron 3.5 Lightning 30B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 32768 }, "nvidia/nemotron-3.5-lightning-free": { id: "nvidia/nemotron-3.5-lightning-free", name: "Nemotron 3.5 Lightning 30B (Free)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 32768 }, "nvidia/nemotron-nano-12b-v2-vl": { id: "nvidia/nemotron-nano-12b-v2-vl", name: "Nvidia Nemotron Nano 12B V2 VL", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 0.6, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072 }, "nvidia/nemotron-nano-9b-v2": { id: "nvidia/nemotron-nano-9b-v2", name: "Nvidia Nemotron Nano 9B V2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.06, output: 0.23, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072 }, "openai/gpt-3.5-turbo": { id: "openai/gpt-3.5-turbo", name: "GPT-3.5 Turbo", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text"], cost: { input: 0.5, output: 1.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 16385, maxTokens: 4096 }, "openai/gpt-4-turbo": { id: "openai/gpt-4-turbo", name: "GPT-4 Turbo", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 10, output: 30, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 4096 }, "openai/gpt-4.1": { id: "openai/gpt-4.1", name: "GPT-4.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 2, output: 8, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768 }, "openai/gpt-4.1-fast": { id: "openai/gpt-4.1-fast", name: "GPT-4.1 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 3.5, output: 14, cacheRead: 0.875, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768 }, "openai/gpt-4.1-mini": { id: "openai/gpt-4.1-mini", name: "GPT-4.1 mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.4, output: 1.6, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768 }, "openai/gpt-4.1-mini-fast": { id: "openai/gpt-4.1-mini-fast", name: "GPT-4.1 mini (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.7, output: 2.8, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768 }, "openai/gpt-4.1-nano": { id: "openai/gpt-4.1-nano", name: "GPT-4.1 nano", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.1, output: 0.4, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768 }, "openai/gpt-4.1-nano-fast": { id: "openai/gpt-4.1-nano-fast", name: "GPT-4.1 nano (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.2, output: 0.8, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 1047576, maxTokens: 32768 }, "openai/gpt-4o": { id: "openai/gpt-4o", name: "GPT-4o", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 2.5, output: 10, cacheRead: 1.25, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384 }, "openai/gpt-4o-fast": { id: "openai/gpt-4o-fast", name: "GPT-4o (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 4.25, output: 17, cacheRead: 2.125, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384 }, "openai/gpt-4o-mini": { id: "openai/gpt-4o-mini", name: "GPT-4o mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.15, output: 0.6, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384 }, "openai/gpt-4o-mini-fast": { id: "openai/gpt-4o-mini-fast", name: "GPT-4o mini (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.25, output: 1, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 16384 }, "openai/gpt-5": { id: "openai/gpt-5", name: "GPT-5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5-codex": { id: "openai/gpt-5-codex", name: "GPT-5-Codex", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.13, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5-fast": { id: "openai/gpt-5-fast", name: "GPT-5 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 20, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5-mini": { id: "openai/gpt-5-mini", name: "GPT-5 mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0.025, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5-mini-fast": { id: "openai/gpt-5-mini-fast", name: "GPT-5 mini (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.45, output: 3.6, cacheRead: 0.045, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5-nano": { id: "openai/gpt-5-nano", name: "GPT-5 nano", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.05, output: 0.4, cacheRead: 0.005, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5-pro": { id: "openai/gpt-5-pro", name: "GPT-5 pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 120, cacheRead: 0, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 272000 }, "openai/gpt-5.1-codex": { id: "openai/gpt-5.1-codex", name: "GPT-5.1-Codex", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.13, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5.1-codex-max": { id: "openai/gpt-5.1-codex-max", name: "GPT 5.1 Codex Max", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5.1-codex-mini": { id: "openai/gpt-5.1-codex-mini", name: "GPT 5.1 Codex Mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.25, output: 2, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5.1-thinking": { id: "openai/gpt-5.1-thinking", name: "GPT 5.1 Thinking", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 10, cacheRead: 0.125, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5.1-thinking-fast": { id: "openai/gpt-5.1-thinking-fast", name: "GPT 5.1 Thinking (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 20, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000 }, "openai/gpt-5.2": { id: "openai/gpt-5.2", name: "GPT 5.2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2-codex": { id: "openai/gpt-5.2-codex", name: "GPT 5.2 Codex", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2-fast": { id: "openai/gpt-5.2-fast", name: "GPT 5.2 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 3.5, output: 28, cacheRead: 0.35, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.2-pro": { id: "openai/gpt-5.2-pro", name: "GPT 5.2 ", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 21, output: 168, cacheRead: 0, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.3-codex": { id: "openai/gpt-5.3-codex", name: "GPT 5.3 Codex", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.3-codex-fast": { id: "openai/gpt-5.3-codex-fast", name: "GPT 5.3 Codex (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 3.5, output: 28, cacheRead: 0.35, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4": { id: "openai/gpt-5.4", name: "GPT 5.4", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2.5, output: 15, cacheRead: 0.25, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-fast": { id: "openai/gpt-5.4-fast", name: "GPT 5.4 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-mini": { id: "openai/gpt-5.4-mini", name: "GPT 5.4 Mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.75, output: 4.5, cacheRead: 0.075, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-mini-fast": { id: "openai/gpt-5.4-mini-fast", name: "GPT 5.4 Mini (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.5, output: 9, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-nano": { id: "openai/gpt-5.4-nano", name: "GPT 5.4 Nano", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 1.25, cacheRead: 0.02, cacheWrite: 0 }, contextWindow: 400000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.4-pro": { id: "openai/gpt-5.4-pro", name: "GPT 5.4 Pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 30, output: 180, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.5": { id: "openai/gpt-5.5", name: "GPT 5.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.5-fast": { id: "openai/gpt-5.5-fast", name: "GPT 5.5 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 12.5, output: 75, cacheRead: 1.25, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.5-pro": { id: "openai/gpt-5.5-pro", name: "GPT 5.5 Pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 30, output: 180, cacheRead: 0, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh", off: null, minimal: null, low: null } }, "openai/gpt-5.6-luna": { id: "openai/gpt-5.6-luna", name: "GPT 5.6 Luna", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 1.2, cacheRead: 0.02, cacheWrite: 0.25 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.6-luna-fast": { id: "openai/gpt-5.6-luna-fast", name: "GPT 5.6 Luna (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.4, output: 2.4, cacheRead: 0.04, cacheWrite: 0.25 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.6-sol": { id: "openai/gpt-5.6-sol", name: "GPT 5.6 Sol", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 10, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.6-sol-fast": { id: "openai/gpt-5.6-sol-fast", name: "GPT 5.6 Sol (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 4, output: 20, cacheRead: 0.4, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.6-terra": { id: "openai/gpt-5.6-terra", name: "GPT 5.6 Terra", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 12, cacheRead: 0.2, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-5.6-terra-fast": { id: "openai/gpt-5.6-terra-fast", name: "GPT 5.6 Terra (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 4, output: 24, cacheRead: 0.4, cacheWrite: 2.5 }, contextWindow: 1050000, maxTokens: 128000, thinkingLevelMap: { xhigh: "xhigh" } }, "openai/gpt-oss-120b": { id: "openai/gpt-oss-120b", name: "GPT OSS 120B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.1, output: 0.5, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 131072 }, "openai/gpt-oss-20b": { id: "openai/gpt-oss-20b", name: "GPT OSS 20B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.05, output: 0.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 8192 }, "openai/gpt-oss-safeguard-20b": { id: "openai/gpt-oss-safeguard-20b", name: "GPT OSS Safeguard 20B", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.075, output: 0.3, cacheRead: 0.037, cacheWrite: 0 }, contextWindow: 131072, maxTokens: 65536 }, "openai/o1": { id: "openai/o1", name: "o1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 15, output: 60, cacheRead: 7.5, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "openai/o3": { id: "openai/o3", name: "o3", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 8, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "openai/o3-deep-research": { id: "openai/o3-deep-research", name: "o3-deep-research", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 10, output: 40, cacheRead: 2.5, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "openai/o3-fast": { id: "openai/o3-fast", name: "o3 (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 3.5, output: 14, cacheRead: 0.875, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "openai/o3-mini": { id: "openai/o3-mini", name: "o3-mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.1, output: 4.4, cacheRead: 0.55, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "openai/o3-pro": { id: "openai/o3-pro", name: "o3 Pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 20, output: 80, cacheRead: 0, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "openai/o4-mini": { id: "openai/o4-mini", name: "o4-mini", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.1, output: 4.4, cacheRead: 0.275, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "openai/o4-mini-fast": { id: "openai/o4-mini-fast", name: "o4-mini (Fast)", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 8, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 1e5 }, "poolside/laguna-s-2.1": { id: "poolside/laguna-s-2.1", name: "Laguna S 2.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.1, output: 0.2, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 131072 }, "poolside/laguna-s-2.1-free": { id: "poolside/laguna-s-2.1-free", name: "Laguna S 2.1 Free", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 32768 }, "sakana/fugu-ultra": { id: "sakana/fugu-ultra", name: "Fugu Ultra", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 1e6 }, "sakana/namazu": { id: "sakana/namazu", name: "Sakana Namazu", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.95, output: 4, cacheRead: 0.15, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "spacexai/grok-4.1-fast-non-reasoning": { id: "spacexai/grok-4.1-fast-non-reasoning", name: "Grok 4.1 Fast Non-Reasoning", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 0.2, output: 0.5, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 1e6 }, "spacexai/grok-4.1-fast-reasoning": { id: "spacexai/grok-4.1-fast-reasoning", name: "Grok 4.1 Fast Reasoning", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 0.5, cacheRead: 0.05, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 1e6 }, "spacexai/grok-4.20-multi-agent": { id: "spacexai/grok-4.20-multi-agent", name: "Grok 4.20 Multi-Agent", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 2000000 }, "spacexai/grok-4.20-multi-agent-beta": { id: "spacexai/grok-4.20-multi-agent-beta", name: "Grok 4.20 Multi Agent Beta", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 2000000 }, "spacexai/grok-4.20-non-reasoning": { id: "spacexai/grok-4.20-non-reasoning", name: "Grok 4.20 Non-Reasoning", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 2000000 }, "spacexai/grok-4.20-non-reasoning-beta": { id: "spacexai/grok-4.20-non-reasoning-beta", name: "Grok 4.20 Beta Non-Reasoning", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: false, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 2000000 }, "spacexai/grok-4.20-reasoning": { id: "spacexai/grok-4.20-reasoning", name: "Grok 4.20 Reasoning", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 2000000 }, "spacexai/grok-4.20-reasoning-beta": { id: "spacexai/grok-4.20-reasoning-beta", name: "Grok 4.20 Beta Reasoning", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 2000000 }, "spacexai/grok-4.3": { id: "spacexai/grok-4.3", name: "Grok 4.3", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 1e6 }, "spacexai/grok-4.5": { id: "spacexai/grok-4.5", name: "Grok 4.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.3, cacheWrite: 0 }, contextWindow: 500000, maxTokens: 500000 }, "spacexai/grok-4.6": { id: "spacexai/grok-4.6", name: "Grok 4.6", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 2, output: 6, cacheRead: 0.5, cacheWrite: 0 }, contextWindow: 500000, maxTokens: 500000 }, "spacexai/grok-build-0.1": { id: "spacexai/grok-build-0.1", name: "Grok Build 0.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 2, cacheRead: 0.2, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "stepfun/step-3.5-flash": { id: "stepfun/step-3.5-flash", name: "StepFun 3.5 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.09, output: 0.3, cacheRead: 0.02, cacheWrite: 0 }, contextWindow: 262114, maxTokens: 262114 }, "stepfun/step-3.7-flash": { id: "stepfun/step-3.7-flash", name: "Step 3.7 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.2, output: 1.15, cacheRead: 0.04, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "tencent/hy3": { id: "tencent/hy3", name: "Hy3", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.132, output: 0.528, cacheRead: 0.033, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 128000 }, "thinkingmachines/inkling": { id: "thinkingmachines/inkling", name: "Inkling", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1, output: 4.05, cacheRead: 0.17, cacheWrite: 0 }, contextWindow: 256000, maxTokens: 256000 }, "thinkingmachines/inkling-small": { id: "thinkingmachines/inkling-small", name: "Inkling Small", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.5, output: 1.2, cacheRead: 0.1, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 1e6 }, "xiaomi/mimo-v2.5": { id: "xiaomi/mimo-v2.5", name: "MiMo M2.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.14, output: 0.28, cacheRead: 0.0028, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 131100 }, "xiaomi/mimo-v2.5-pro": { id: "xiaomi/mimo-v2.5-pro", name: "MiMo V2.5 Pro", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.435, output: 0.87, cacheRead: 0.0036, cacheWrite: 0 }, contextWindow: 1050000, maxTokens: 131000 }, "zai/glm-4.5": { id: "zai/glm-4.5", name: "GLM 4.5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.2, cacheRead: 0.11, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 96000 }, "zai/glm-4.5-air": { id: "zai/glm-4.5-air", name: "GLM 4.5 Air", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.2, output: 1.1, cacheRead: 0.03, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 96000 }, "zai/glm-4.5v": { id: "zai/glm-4.5v", name: "GLM 4.5V", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 0.6, output: 1.8, cacheRead: 0.11, cacheWrite: 0 }, contextWindow: 66000, maxTokens: 16000 }, "zai/glm-4.6": { id: "zai/glm-4.6", name: "GLM 4.6", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.2, cacheRead: 0.11, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 96000 }, "zai/glm-4.7": { id: "zai/glm-4.7", name: "GLM 4.7", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.6, output: 2.2, cacheRead: 0.12, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 120000 }, "zai/glm-4.7-flash": { id: "zai/glm-4.7-flash", name: "GLM 4.7 Flash", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.07, output: 0.4, cacheRead: 0, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 131000 }, "zai/glm-4.7-flashx": { id: "zai/glm-4.7-flashx", name: "GLM 4.7 FlashX", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.06, output: 0.4, cacheRead: 0.01, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 128000 }, "zai/glm-5": { id: "zai/glm-5", name: "GLM 5", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1, output: 3.2, cacheRead: 0, cacheWrite: 0 }, contextWindow: 202800, maxTokens: 131100 }, "zai/glm-5-turbo": { id: "zai/glm-5-turbo", name: "GLM 5 Turbo", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.2, output: 4, cacheRead: 0.24, cacheWrite: 0 }, contextWindow: 202800, maxTokens: 131100 }, "zai/glm-5.1": { id: "zai/glm-5.1", name: "GLM 5.1", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 }, contextWindow: 202800, maxTokens: 64000 }, "zai/glm-5.2": { id: "zai/glm-5.2", name: "GLM 5.2", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 0.8, output: 2.55, cacheRead: 0.16, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 128000 }, "zai/glm-5.2-fast": { id: "zai/glm-5.2-fast", name: "GLM 5.2 Fast", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 2.1, output: 6.6, cacheRead: 0.21, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 128000 }, "zai/glm-5.3": { id: "zai/glm-5.3", name: "GLM 5.3", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text"], cost: { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 }, contextWindow: 1e6, maxTokens: 12800 }, "zai/glm-5v-turbo": { id: "zai/glm-5v-turbo", name: "GLM 5V Turbo", api: "anthropic-messages", baseUrl: "https://ai-gateway.vercel.sh", provider: "vercel-ai-gateway", reasoning: true, input: ["text", "image"], cost: { input: 1.2, output: 4, cacheRead: 0.24, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 128000 } }
|
|
138230
138969
|
};
|
|
138231
138970
|
|
|
138232
138971
|
// ../ai/dist/providers/vercel-ai-gateway.models.js
|
|
@@ -139748,6 +140487,8 @@ function renderStageToolContent(result) {
|
|
|
139748
140487
|
function renderWorkflowToolContent(result, args) {
|
|
139749
140488
|
if (args.format === "json")
|
|
139750
140489
|
return stringifyWorkflowToolResult(result);
|
|
140490
|
+
if ("code" in result && result.code === "WORKFLOW_TIMEOUT")
|
|
140491
|
+
return stringifyWorkflowToolResult(result);
|
|
139751
140492
|
switch (result.action) {
|
|
139752
140493
|
case "transcript":
|
|
139753
140494
|
return renderTranscriptToolContent(result);
|
|
@@ -140836,7 +141577,7 @@ function durableInspectionError(action, runId, message) {
|
|
|
140836
141577
|
};
|
|
140837
141578
|
}
|
|
140838
141579
|
function makeExecuteWorkflowTool(runtime, reloadWorkflowResources, ensureWorkflowResourcesLoaded = () => {}, sendDeps = {}) {
|
|
140839
|
-
return async function executeWorkflowTool(args, ctx) {
|
|
141580
|
+
return async function executeWorkflowTool(args, ctx, signal, onRunAccepted) {
|
|
140840
141581
|
const action = args.action ?? "run";
|
|
140841
141582
|
const runId = args.runId ?? "";
|
|
140842
141583
|
if (isWorkflowStageToolContext(ctx)) {
|
|
@@ -140850,10 +141591,13 @@ function makeExecuteWorkflowTool(runtime, reloadWorkflowResources, ensureWorkflo
|
|
|
140850
141591
|
}
|
|
140851
141592
|
const policy = workflowPolicyFromContext(ctx);
|
|
140852
141593
|
const getRuntime = () => typeof runtime === "function" ? runtime(ctx) : runtime;
|
|
141594
|
+
const awaitRequest = (operation) => raceWorkflowRequestAbort(operation, signal);
|
|
140853
141595
|
const ensureWorkflowResourcesVisible = async () => {
|
|
140854
141596
|
try {
|
|
140855
|
-
await ensureWorkflowResourcesLoaded();
|
|
141597
|
+
await awaitRequest(Promise.resolve(ensureWorkflowResourcesLoaded()));
|
|
140856
141598
|
} catch (error3) {
|
|
141599
|
+
if (signal?.aborted === true)
|
|
141600
|
+
throw signal.reason ?? error3;
|
|
140857
141601
|
ctx.ui?.notify?.(formatWorkflowResourceLoadWarning(error3), "warning");
|
|
140858
141602
|
}
|
|
140859
141603
|
};
|
|
@@ -140876,11 +141620,11 @@ function makeExecuteWorkflowTool(runtime, reloadWorkflowResources, ensureWorkflo
|
|
|
140876
141620
|
case "list":
|
|
140877
141621
|
case "inputs": {
|
|
140878
141622
|
await ensureWorkflowResourcesVisible();
|
|
140879
|
-
return getRuntime().dispatch(args, { policy });
|
|
141623
|
+
return awaitRequest(getRuntime().dispatch(args, { policy, signal }));
|
|
140880
141624
|
}
|
|
140881
141625
|
case "run": {
|
|
140882
141626
|
await ensureWorkflowResourcesVisible();
|
|
140883
|
-
return getRuntime().dispatch(args, { policy, origin: "agent" });
|
|
141627
|
+
return awaitRequest(getRuntime().dispatch(args, { policy, origin: "agent", signal, onRunAccepted }));
|
|
140884
141628
|
}
|
|
140885
141629
|
case "status": {
|
|
140886
141630
|
const target = args.runId;
|
|
@@ -140890,7 +141634,7 @@ function makeExecuteWorkflowTool(runtime, reloadWorkflowResources, ensureWorkflo
|
|
|
140890
141634
|
return { action: "statusDetail", runId: target, error: resolved.message };
|
|
140891
141635
|
}
|
|
140892
141636
|
if (resolved.kind === "not_found") {
|
|
140893
|
-
const durable = await getRuntime().inspectDurableWorkflow(target);
|
|
141637
|
+
const durable = await awaitRequest(getRuntime().inspectDurableWorkflow(target));
|
|
140894
141638
|
return durable.kind === "found" ? { action: "statusDetail", runId: target, detail: durable.detail } : { action: "statusDetail", runId: target, error: durable.message };
|
|
140895
141639
|
}
|
|
140896
141640
|
const result2 = inspectRun(resolved.runId);
|
|
@@ -140909,7 +141653,7 @@ function makeExecuteWorkflowTool(runtime, reloadWorkflowResources, ensureWorkflo
|
|
|
140909
141653
|
case "stages":
|
|
140910
141654
|
case "stage":
|
|
140911
141655
|
case "transcript": {
|
|
140912
|
-
const resolved = await resolveDurableInspectionSource(args, getRuntime());
|
|
141656
|
+
const resolved = await awaitRequest(resolveDurableInspectionSource(args, getRuntime()));
|
|
140913
141657
|
if (resolved.kind === "error")
|
|
140914
141658
|
return durableInspectionError(action, args.runId ?? "", resolved.message);
|
|
140915
141659
|
const source = resolved.kind === "durable" ? resolved.source : undefined;
|
|
@@ -140920,17 +141664,17 @@ function makeExecuteWorkflowTool(runtime, reloadWorkflowResources, ensureWorkflo
|
|
|
140920
141664
|
return workflowTranscriptResult(args, source);
|
|
140921
141665
|
}
|
|
140922
141666
|
case "send":
|
|
140923
|
-
return workflowSendAction(args, sendDeps);
|
|
141667
|
+
return awaitRequest(workflowSendAction(args, sendDeps));
|
|
140924
141668
|
case "pause":
|
|
140925
|
-
return workflowPauseAction(args);
|
|
141669
|
+
return awaitRequest(workflowPauseAction(args));
|
|
140926
141670
|
case "reload":
|
|
140927
|
-
return workflowReloadAction(args, { reloadWorkflowResources });
|
|
141671
|
+
return awaitRequest(workflowReloadAction(args, { reloadWorkflowResources }));
|
|
140928
141672
|
case "quit":
|
|
140929
|
-
return workflowQuitAction(args);
|
|
141673
|
+
return awaitRequest(workflowQuitAction(args));
|
|
140930
141674
|
case "interrupt":
|
|
140931
|
-
return workflowInterruptAction(args);
|
|
141675
|
+
return awaitRequest(workflowInterruptAction(args));
|
|
140932
141676
|
case "resume":
|
|
140933
|
-
return workflowResumeAction(args, { getRuntime, policy, ensureWorkflowResourcesLoaded });
|
|
141677
|
+
return awaitRequest(workflowResumeAction(args, { getRuntime, policy, ensureWorkflowResourcesLoaded }));
|
|
140934
141678
|
default: {
|
|
140935
141679
|
const _exhaustive = action;
|
|
140936
141680
|
throw new Error(`Workflow extension: unknown action "${_exhaustive}"`);
|
|
@@ -141062,9 +141806,12 @@ function transcriptNoticeText(result) {
|
|
|
141062
141806
|
function renderResult(result, opts) {
|
|
141063
141807
|
const partial = opts?.isPartial === true;
|
|
141064
141808
|
const themed = opts?.plain !== true;
|
|
141065
|
-
if (result === null ||
|
|
141809
|
+
if (result === null || result === undefined || typeof result.action !== "string") {
|
|
141066
141810
|
return partial ? "" : renderNotice("WORKFLOW", "no result", opts, themed);
|
|
141067
141811
|
}
|
|
141812
|
+
if ("code" in result && result.code === "WORKFLOW_TIMEOUT") {
|
|
141813
|
+
return renderNotice("WORKFLOW TIMEOUT", result.error, opts, themed);
|
|
141814
|
+
}
|
|
141068
141815
|
switch (result.action) {
|
|
141069
141816
|
case "list": {
|
|
141070
141817
|
const r2 = result;
|
|
@@ -141386,19 +142133,66 @@ var WorkflowParametersSchema = Type25.Object({
|
|
|
141386
142133
|
}, { additionalProperties: false });
|
|
141387
142134
|
|
|
141388
142135
|
// dist/builtin/workflows/src/extension/workflow-tool-registration.ts
|
|
141389
|
-
|
|
142136
|
+
var WORKFLOW_TOOL_REQUEST_TIMEOUT_MS = 30000;
|
|
142137
|
+
var MUTATING_WORKFLOW_ACTIONS = new Set([
|
|
142138
|
+
"reload",
|
|
142139
|
+
"run",
|
|
142140
|
+
"send",
|
|
142141
|
+
"pause",
|
|
142142
|
+
"resume",
|
|
142143
|
+
"interrupt",
|
|
142144
|
+
"quit"
|
|
142145
|
+
]);
|
|
142146
|
+
function workflowToolTimeoutResult(args, timeoutMs, runId) {
|
|
142147
|
+
const action = args.action ?? "run";
|
|
142148
|
+
const prefix = `Workflow ${action} request timed out after ${timeoutMs}ms.`;
|
|
142149
|
+
return {
|
|
142150
|
+
action,
|
|
142151
|
+
status: "failed",
|
|
142152
|
+
code: "WORKFLOW_TIMEOUT",
|
|
142153
|
+
timeoutMs,
|
|
142154
|
+
...runId === undefined ? {} : { runId },
|
|
142155
|
+
error: MUTATING_WORKFLOW_ACTIONS.has(action) ? `${prefix} The outcome is unknown. Inspect workflow status before retrying.` : prefix
|
|
142156
|
+
};
|
|
142157
|
+
}
|
|
142158
|
+
async function executeWithWorkflowToolDeadline(executeWorkflowTool, params, ctx, callerSignal, timeoutMs) {
|
|
142159
|
+
callerSignal?.throwIfAborted();
|
|
142160
|
+
const deadlineController = new AbortController;
|
|
142161
|
+
const operationSignal2 = callerSignal === undefined ? deadlineController.signal : AbortSignal.any([callerSignal, deadlineController.signal]);
|
|
142162
|
+
let timer;
|
|
142163
|
+
let acceptedRunId;
|
|
142164
|
+
const timeout = new Promise((resolve14) => {
|
|
142165
|
+
timer = setTimeout(() => {
|
|
142166
|
+
const result = workflowToolTimeoutResult(params, timeoutMs, acceptedRunId);
|
|
142167
|
+
resolve14(result);
|
|
142168
|
+
deadlineController.abort(new Error(result.error));
|
|
142169
|
+
}, timeoutMs);
|
|
142170
|
+
});
|
|
142171
|
+
try {
|
|
142172
|
+
return await raceWorkflowRequestAbort(Promise.race([
|
|
142173
|
+
executeWorkflowTool(params, ctx, operationSignal2, (runId) => {
|
|
142174
|
+
acceptedRunId = runId;
|
|
142175
|
+
}),
|
|
142176
|
+
timeout
|
|
142177
|
+
]), callerSignal);
|
|
142178
|
+
} finally {
|
|
142179
|
+
if (timer !== undefined)
|
|
142180
|
+
clearTimeout(timer);
|
|
142181
|
+
}
|
|
142182
|
+
}
|
|
142183
|
+
function registerWorkflowTool(pi, executeWorkflowTool, runWithLifecycleSuppressedForPolicy, options = {}) {
|
|
141390
142184
|
if (typeof pi.registerTool !== "function")
|
|
141391
142185
|
return;
|
|
141392
|
-
|
|
142186
|
+
const tool = {
|
|
141393
142187
|
name: "workflow",
|
|
141394
142188
|
label: "workflow",
|
|
141395
142189
|
description: WORKFLOW_TOOL_DESCRIPTION,
|
|
141396
142190
|
parameters: WorkflowParametersSchema,
|
|
141397
142191
|
promptGuidelines: DEFAULT_PROMPT_GUIDANCE,
|
|
141398
142192
|
renderShell: "self",
|
|
141399
|
-
execute: async (_toolCallId, params,
|
|
142193
|
+
execute: async (_toolCallId, params, signal, _onUpdate, ctx) => {
|
|
141400
142194
|
const policy = workflowPolicyFromContext(ctx);
|
|
141401
|
-
const details = (
|
|
142195
|
+
const details = await executeWithWorkflowToolDeadline((actionParams, actionContext, operationSignal2, onRunAccepted) => (actionParams.action ?? "run") === "run" ? runWithLifecycleSuppressedForPolicy(policy, () => executeWorkflowTool(actionParams, actionContext, operationSignal2, onRunAccepted)) : executeWorkflowTool(actionParams, actionContext, operationSignal2, onRunAccepted), params, ctx, signal, options.requestTimeoutMs ?? WORKFLOW_TOOL_REQUEST_TIMEOUT_MS);
|
|
141402
142196
|
return {
|
|
141403
142197
|
content: [{ type: "text", text: renderWorkflowToolContent(details, params) }],
|
|
141404
142198
|
details
|
|
@@ -141414,7 +142208,9 @@ function registerWorkflowTool(pi, executeWorkflowTool, runWithLifecycleSuppresse
|
|
|
141414
142208
|
runInputs: context.args?.inputs
|
|
141415
142209
|
}));
|
|
141416
142210
|
}
|
|
141417
|
-
}
|
|
142211
|
+
};
|
|
142212
|
+
pi.registerTool(tool);
|
|
142213
|
+
return tool;
|
|
141418
142214
|
}
|
|
141419
142215
|
|
|
141420
142216
|
// dist/builtin/workflows/src/extension/extension-factory.ts
|
|
@@ -141464,8 +142260,8 @@ function factory(pi) {
|
|
|
141464
142260
|
const storeWidgetRef = { current: null };
|
|
141465
142261
|
const intercomControlRef = { current: null };
|
|
141466
142262
|
const executeWorkflowTool = makeExecuteWorkflowTool((ctx) => runtimeState.runtimeForContext(ctx), runtimeState.reloadWorkflowResources, runtimeState.ensureWorkflowResourcesLoaded, { resolvePostMortemDeps: (runId) => postMortemDepsForRun(runId, postMortemResolverDeps) });
|
|
141467
|
-
const executeWorkflowToolWithAutoAttach = async (args, ctx) => {
|
|
141468
|
-
const result = await executeWorkflowTool(args, ctx);
|
|
142263
|
+
const executeWorkflowToolWithAutoAttach = async (args, ctx, signal, onRunAccepted) => {
|
|
142264
|
+
const result = await executeWorkflowTool(args, ctx, signal, onRunAccepted);
|
|
141469
142265
|
if (workflowPolicyFromContext(ctx).mode === "interactive" && typeof args.workflow === "string" && result.action === "run" && result.status === "running" && result.runId.length > 0 && runtimeState.runtimeProxy.registry.get(args.workflow)?.autoAttach === true) {
|
|
141470
142266
|
overlay.open(result.runId, overlaySurfaceFromContext(ctx));
|
|
141471
142267
|
}
|