diff --git a/packages/commandcode/README.md b/packages/commandcode/README.md index 2977a13..0293ccc 100644 --- a/packages/commandcode/README.md +++ b/packages/commandcode/README.md @@ -61,17 +61,13 @@ the account's own: - **Every plan but Go**: the Provider API's `/models` list. Each model's `supported_endpoints` picks the API it speaks. -- **Go**: the CLI's table, since there is no list to ask for: - - GPT-6 Luna - - GPT-5.6 Luna - - DeepSeek V4 Pro - - DeepSeek V4 Flash - - Kimi K3 - - GLM-5.3 - - MiniMax M3 - - Qwen 3.8 Max - - Qwen 3.8 Flash - - MiMo V2.6 Pro +- **Go**: the same `/models` list, asked without the key (it answers + without one, and Go's key has no Provider API), less the models the + CLI's table (command-code 1.73.0) refuses Go: the premium ones (Claude, + GPT-6 Sol, GPT-5.6 Terra, …) and those it blocks for Go (GPT-5.6 Sol, + Claude Sonnet 5.5, Grok 4.6 and 4.7, …). That is 56 models as of + 2026-10-01. When the list can't be had, the CLI's own Go table (57 + models) stands in. The Go models carry their reasoning levels, and a requested level is fitted to the nearest one the model has. diff --git a/packages/commandcode/index.mjs b/packages/commandcode/index.mjs index 3b9c05b..9585ba3 100644 --- a/packages/commandcode/index.mjs +++ b/packages/commandcode/index.mjs @@ -47,20 +47,90 @@ const MODELS = [ ] // The models the Go plan is let use, as the CLI's own table has it -// (1.72.2); Command Code has no list to ask for them. +// (1.73.0): every model its picker shows (less the hidden) but the +// "premium" ones and those it blocks for Go (GO_REFUSED). They stand in +// until Command Code's list is fetched (goModels), or when it can't be, +// and give that list the reasoning levels and pictures it doesn't say — +// magpie's cmdGoModels. const EFF5 = ["low", "medium", "high", "xhigh", "max"] const GO_MODELS = [ { id: "gpt-6-luna", name: "GPT-6 Luna", context: 1_050_000, images: true, efforts: EFF5 }, { id: "gpt-5.6-luna", name: "GPT-5.6 Luna", context: 1_050_000, images: true, efforts: EFF5 }, { id: "deepseek/deepseek-v4-pro", name: "DeepSeek V4 Pro", context: 1_000_000, efforts: ["high", "max"] }, { id: "deepseek/deepseek-v4-flash", name: "DeepSeek V4 Flash", context: 1_000_000, efforts: ["high", "max"] }, + { id: "deepseek/deepseek-v4-flash-vision-exp", name: "DeepSeek V4 Flash Vision (exp)", context: 1_000_000, images: true, efforts: ["high", "max"] }, + { id: "deepseek/deepseek-v4-flash-fast", name: "DeepSeek V4 Flash Fast", context: 1_000_000, efforts: ["low", "high", "max"] }, + { id: "deepseek/deepseek-v4.1-flash", name: "DeepSeek V4.1 Flash", context: 1_000_000, images: true, efforts: ["low", "high", "max"] }, + { id: "deepseek/deepseek-v4.1-flash-fast", name: "DeepSeek V4.1 Flash Fast", context: 1_000_000, images: true, efforts: ["low", "high", "max"] }, { id: "moonshotai/Kimi-K3", name: "Kimi K3", context: 1_000_000, images: true, efforts: ["low", "high", "max"] }, + { id: "moonshotai/Kimi-K2.7-Code", name: "Kimi K2.7 Code", context: 256_000, images: true }, + { id: "moonshotai/Kimi-K2.7-Code-Highspeed", name: "Kimi K2.7 Code HighSpeed", context: 262_000, images: true }, + { id: "moonshotai/Kimi-K2.6", name: "Kimi K2.6", context: 256_000, images: true }, + { id: "moonshotai/Kimi-K2.5", name: "Kimi K2.5", context: 256_000, images: true }, + { id: "z-ai/glm-5.3-flash", name: "GLM-5.3 Flash", context: 1_048_576, images: true, efforts: ["low", "high", "max"] }, + { id: "z-ai/glm-5.3-flashx", name: "GLM-5.3 FlashX", context: 1_000_000, images: true, efforts: ["low", "high", "max"] }, { id: "zai-org/GLM-5.3", name: "GLM-5.3", context: 1_000_000, efforts: ["low", "high", "max"] }, - { id: "MiniMaxAI/MiniMax-M3", name: "MiniMax M3", context: 1_000_000 }, - { id: "Qwen/Qwen3.8-Max", name: "Qwen 3.8 Max", context: 1_000_000, images: true, efforts: ["low", "medium", "xhigh"] }, - { id: "Qwen/Qwen3.8-Flash", name: "Qwen 3.8 Flash", context: 1_000_000 }, + { id: "zai-org/GLM-5.2", name: "GLM-5.2", context: 1_000_000, efforts: ["high", "max"] }, + { id: "zai-org/GLM-5.2-Fast", name: "GLM-5.2 Fast", context: 1_000_000 }, + { id: "zai-org/GLM-5.1", name: "GLM-5.1", context: 200_000 }, + { id: "zai-org/GLM-5", name: "GLM-5", context: 200_000 }, + { id: "MiniMaxAI/MiniMax-M3", name: "MiniMax M3", context: 1_000_000, images: true, efforts: ["low", "medium", "high"] }, + { id: "MiniMaxAI/MiniMax-M2.7", name: "MiniMax M2.7", context: 200_000 }, + { id: "MiniMaxAI/MiniMax-M2.5", name: "MiniMax M2.5", context: 200_000 }, { id: "xiaomi/mimo-v2.6-pro", name: "MiMo V2.6 Pro", context: 1_048_576, images: true }, + { id: "xiaomi/mimo-v2.6-flash", name: "MiMo V2.6 Flash", context: 1_048_576, images: true }, + { id: "xiaomi/mimo-v2.5-pro", name: "MiMo V2.5 Pro", context: 1_000_000 }, + { id: "xiaomi/mimo-v2.5", name: "MiMo V2.5", context: 1_000_000, images: true }, + { id: "Qwen/Qwen3.8-Omni-Flash", name: "Qwen 3.8 Omni Flash", context: 1_000_000, images: true, efforts: ["low", "medium", "xhigh"] }, + { id: "Qwen/Qwen3.8-Max-0902", name: "Qwen 3.8 Max 0902", context: 1_000_000, images: true, efforts: ["low", "medium", "xhigh"] }, + { id: "Qwen/Qwen3.8-Max", name: "Qwen 3.8 Max", context: 1_000_000, images: true, efforts: ["low", "medium", "xhigh"] }, + { id: "Qwen/Qwen3.8-27B", name: "Qwen 3.8 27B", context: 262_144, images: true, efforts: ["low", "medium", "xhigh"] }, + { id: "Qwen/Qwen3.8-Flash", name: "Qwen 3.8 Flash", context: 1_000_000, images: true, efforts: ["low", "medium", "xhigh"] }, + { id: "Qwen/Qwen3.7-Max", name: "Qwen 3.7 Max", context: 1_000_000 }, + { id: "Qwen/Qwen3.7-Plus", name: "Qwen 3.7 Plus", context: 1_000_000, images: true }, + { id: "Qwen/Qwen3.7-Flash", name: "Qwen 3.7 Flash", context: 1_000_000, images: true }, + { id: "Qwen/Qwen3.6-Max-Preview", name: "Qwen 3.6 Max Preview", context: 200_000 }, + { id: "Qwen/Qwen3.6-Plus", name: "Qwen 3.6 Plus", context: 200_000, images: true }, + { id: "meituan/LongCat-2.0", name: "LongCat 2.0", context: 1_048_576 }, + { id: "stepfun/Step-5-Preview", name: "Step 5 Preview", context: 1_000_000, images: true, efforts: ["low", "medium", "high"] }, + { id: "stepfun/Step-3.7-Flash", name: "Step 3.7 Flash", context: 256_000, images: true }, + { id: "stepfun/Step-3.5-Flash", name: "Step 3.5 Flash", context: 262_144 }, + { id: "tencent/hy3-paid", name: "Tencent Hy3", context: 262_144 }, + { id: "tencent/hy4-preview", name: "Tencent Hy4 Preview", context: 1_048_576, efforts: ["low", "medium", "high"] }, + { id: "google/gemini-3.6-flash", name: "Gemini 3.6 Flash", context: 1_000_000, images: true, efforts: ["low", "medium", "high"] }, + { id: "google/gemini-3.5-flash-lite", name: "Gemini 3.5 Flash Lite", context: 1_000_000, images: true, efforts: ["low", "medium", "high"] }, + { id: "nvidia/nemotron-3-ultra-550b-a55b", name: "Nemotron 3 Ultra", context: 1_000_000 }, + { id: "thinkingmachines/inkling", name: "Inkling", context: 256_000, images: true }, + { id: "thinkingmachines/inkling-small", name: "Inkling Small", context: 1_000_000, images: true }, + { id: "stealth/space-bunny-alpha", name: "Space Bunny Alpha", context: 1_000_000, images: true, efforts: ["low", "medium", "high"] }, + { id: "stealth/pixel-canary", name: "Pixel Canary", context: 262_144, images: true, efforts: ["low", "medium", "xhigh"] }, + { id: "poolside/laguna-s-2.1-free", name: "Laguna S 2.1", context: 256_000 }, + { id: "inclusionai/ling-3.0-flash-free", name: "Ling 3.0 Flash", context: 256_000 }, + { id: "inclusionai/ling-3.0-flash-sante:free", name: "Ling 3.0 Flash Sante", context: 262_144 }, + { id: "inclusionai/ling-3.1-flash:free", name: "Ling 3.1 Flash", context: 262_144, efforts: ["low", "medium", "high"] }, + { id: "meta/muse-spark-1.2-contributor", name: "Muse Spark 1.2 Contributor", context: 1_048_576, images: true, efforts: ["low", "medium", "high", "xhigh"] }, + { id: "meta/muse-spark-1.3-contributor", name: "Muse Spark 1.3 Contributor", context: 1_048_576, images: true, efforts: ["low", "medium", "high", "xhigh"] }, + { id: "xai/grok-4.5", name: "Grok 4.5", context: 500_000, images: true, efforts: ["low", "medium", "high"] }, ] + +// The models of Command Code's list the Go plan is refused, as the CLI's +// table has it (1.73.0): its "premium" ones, and those "individual-go" +// blocks — magpie's cmdGoRefused. A model the table doesn't name the CLI +// lets any plan pick; one the plan hasn't after all is refused with +// MODEL_NOT_IN_PLAN. +const GO_REFUSED = new Set([ + // premium + "claude-sonnet-5", "claude-sonnet-4-6", "claude-fable-5-1", "claude-fable-5", + "claude-opus-5-5", "claude-opus-5", "claude-opus-4-8", "claude-opus-4-7", + "claude-haiku-4-5-20251001", "gpt-6-astra", "gpt-6.1-sol", "gpt-6-sol", + "gpt-5.6-terra", "gpt-5.5", "gpt-5.4", "gpt-5.3-codex", "gpt-5.4-mini", + "google/gemini-3.5-flash", "google/gemini-3.1-flash-lite", "sakana/fugu-ultra", + "meta/muse-spark-1.1", + // blocked for Go + "claude-sonnet-5-5", "gpt-5.6-sol", "xai/grok-4.6", "xai/grok-4.7", + "meta/muse-spark-1.2", "meta/muse-spark-1.3", "xiaomi/mimo-v2.6-pro-ultraspeed", + "google/gemini-3.7-flash", "google/gemini-3.8-flash", +]) const GO_EFFORTS = Object.fromEntries(GO_MODELS.map((m) => [m.id, m.efforts ?? []])) const isClaude = (id) => /^claude-/i.test(id) || id.startsWith("anthropic/") @@ -139,6 +209,87 @@ async function liveModels(key) { return out } +// goModels is the Go plan's list, as magpie's cmdGoFetch has it: the +// Provider API's list, which answers without a key (Go's key has no +// Provider API) and is asked without it, less what Go is refused; each +// model takes its name when the list gives none, its reasoning levels and, +// when the list doesn't say, its pictures and window from GO_MODELS +// (catalog.Decorate). Every Go model is asked on chat completions, which +// the fetch sends on to /alpha/generate. +async function goModels() { + const url = BASE + "/models" + const res = await fetch(url, { headers: { Accept: "application/json", "User-Agent": "magpie" }, signal: AbortSignal.timeout(8_000) }) + const text = await res.text() + // catalog.FetchURL's errors + if (res.status !== 200) { + const status = `${res.status} ${statusText(res.status)}`.trimEnd() + const msg = listError(text) + throw new Error(msg ? `${url}: ${status} (${msg})` : `${url}: ${status}`) + } + let body + try { + body = JSON.parse(text) + if (body === null || typeof body !== "object" || Array.isArray(body)) throw 0 + } catch { + throw new Error(`${url}: not a model list`) + } + let rows = Array.isArray(body.data) ? body.data : [] + if (!rows.length) rows = Array.isArray(body.models) ? body.models : [] + const known = Object.fromEntries(GO_MODELS.map((m) => [m.id, m])) + const listed = [] + for (const r of rows) { + const id = (typeof r?.id === "string" && r.id) || (typeof r?.name === "string" && r.name) || "" + // a model that draws, or isn't for text (embeddings, speech), is + // left out, as catalog.Chat and fetchOne leave it + if (!id || drawsID(id) || !textID(id)) continue + const input = Array.isArray(r.modalities?.input) ? r.modalities.input.includes("image") : undefined + const ctx = typeof r.context_length === "number" && r.context_length > 0 ? Math.trunc(r.context_length) : 0 + let m = { id, name: (typeof r.display_name === "string" && r.display_name) || id, context: ctx, images: input, npm: CHAT } + let k = known[id] + const i = id.lastIndexOf("/") + if (!k && i >= 0) k = known[id.slice(i + 1)] + if (k) { + m = { + ...m, + name: m.name === id ? k.name : m.name, + efforts: k.efforts, + images: input === undefined ? k.images : input, + context: m.context || k.context, + } + } + listed.push(m) + } + if (!listed.length) throw new Error(`${url}: no models listed`) + const out = listed.filter((m) => !GO_REFUSED.has(m.id)) + if (!out.length) throw new Error("Command Code listed no models for the Go plan") + return out +} + +// drawsID and textID are catalog.DrawsID and catalog.textModel on an id. +const drawsID = (id) => + ["image", "imagen", "imagine", "dall-e", "flux", "seedream", "cogview", "stable-diffusion", "sdxl", "wanx", "kolors", "hidream"].some((w) => id.toLowerCase().includes(w)) +const textID = (id) => + !["embed", "-tts", "image", "audio", "-live", "robotics", "computer-use", "deep-research", "transcribe", "realtime", "moderation", "whisper", "dall-e", "sora"].some((w) => id.includes(w)) + +// listError is a model list's error reply's message ({"error":{"message"}}, +// {"error":"…"}, {"message"}), cut at 160 characters, as catalog's +// errorMessage reads it. +function listError(text) { + let v + try { + v = JSON.parse(text) + } catch { + return "" + } + if (v === null || typeof v !== "object" || Array.isArray(v)) return "" + let msg = typeof v.message === "string" ? v.message : "" + if (typeof v.error?.message === "string" && v.error.message) msg = v.error.message + else if (typeof v.error === "string" && v.error) msg = v.error + msg = msg.trim() + const r = [...msg] + return r.length > 160 ? r.slice(0, 160).join("") + "…" : msg +} + // ---- the account -------------------------------------------------------------- async function accountJSON(path, key, timeout = 15_000) { @@ -886,7 +1037,7 @@ async function generate(key, chat, signal) { // ---- the plugin --------------------------------------------------------------- -export const _internal = { subsSeen, waits, liveKey, failure } +export const _internal = { subsSeen, waits, liveKey, failure, goModels, GO_MODELS, GO_REFUSED } export async function CommandCodePlugin({ client } = {}) { return { @@ -960,14 +1111,21 @@ export async function CommandCodePlugin({ client } = {}) { } }, // the plan's list: the Provider API's, with what each model is served - // on; Go's key has no Provider API, and its list is the CLI's + // on; Go's key has no Provider API: its list is the same one, asked + // without it, less what Go is refused, and the CLI's table when that + // can't be had provider: { id: ID, async models(provider, { auth } = {}) { if (auth?.type !== "api" || !auth.key) return provider.models const key = await liveKey(auth) - if ((await planNow(key, auth.metadata?.plan)) === "Go") - return Object.fromEntries(GO_MODELS.map((m) => [m.id, runtimeModel(m)])) + if ((await planNow(key, auth.metadata?.plan)) === "Go") { + let ms = GO_MODELS + try { + ms = await goModels() + } catch {} + return Object.fromEntries(ms.map((m) => [m.id, runtimeModel({ ...m, npm: CHAT })])) + } try { return Object.fromEntries((await liveModels(key)).map((m) => [m.id, runtimeModel(m)])) } catch { diff --git a/packages/commandcode/models.test.mjs b/packages/commandcode/models.test.mjs new file mode 100644 index 0000000..10ceb34 --- /dev/null +++ b/packages/commandcode/models.test.mjs @@ -0,0 +1,81 @@ +// A Go account lists every model Command Code lets Go use, not ten, as +// magpie's built-in does (internal/provider/commandcode_plan.go, cmdGoFetch; +// commandcode_go_models_test.go, TestCommandCodeGoModels): the Provider +// API's list, asked without the key, less the models Go is refused; the +// CLI's table when the list can't be had. testdata/models.json is that list +// as api.commandcode.ai answered it (2026-10-01, 86 models), the built-in +// test's testdata/commandcode_models.json. +import { afterEach, expect, test } from "bun:test" +import { readFileSync } from "node:fs" +import { join } from "node:path" +import { CommandCodePlugin, _internal } from "./index.mjs" + +const real = globalThis.fetch +afterEach(() => { + globalThis.fetch = real + _internal.subsSeen.clear() +}) + +const list = readFileSync(join(import.meta.dir, "testdata", "models.json"), "utf8") +const go = { type: "api", key: "go-key", metadata: { plan: "Go" } } + +// models asks the provider.models hook for a Go account's list, the list +// answered with reply (a body, or a status) +async function models(reply) { + const asked = [] + globalThis.fetch = async (url, init = {}) => { + const path = new URL(String(url)).pathname + const h = new Headers(init.headers) + if (path === "/alpha/billing/subscriptions") return Response.json({ success: true, data: { planId: "individual-go-monthly", status: "active" } }) + if (path === "/provider/v1/models") { + asked.push({ auth: h.get("Authorization"), key: h.get("x-api-key") }) + return typeof reply === "number" ? new Response("", { status: reply }) : new Response(reply, { status: 200 }) + } + return new Response("", { status: 404 }) + } + const hooks = await CommandCodePlugin() + const ms = await hooks.provider.models({ models: {} }, { auth: go }) + return { ms, asked } +} + +test("Go lists Command Code's models less those Go is refused, asked without the key", async () => { + const { ms, asked } = await models(list) + expect(asked).toEqual([{ auth: null, key: null }]) + const got = Object.keys(ms) + expect(got.length).toBe(56) + for (const id of ["gpt-6-luna", "deepseek/deepseek-v4.1-flash", "moonshotai/Kimi-K2.6", "zai-org/GLM-5.2", "Qwen/Qwen3.7-Max", "stepfun/Step-5-Preview", "tencent/hy4-preview", "google/gemini-3.6-flash", "xai/grok-4.5"]) + expect(got).toContain(id) + for (const id of ["claude-opus-5-5", "claude-sonnet-5-5", "gpt-6-sol", "gpt-5.6-sol", "xai/grok-4.7", "google/gemini-3.8-flash", "xiaomi/mimo-v2.6-pro-ultraspeed"]) + expect(got).not.toContain(id) + // the list's order, and the table's names, reasoning levels and pictures + expect(got[0]).toBe("gpt-6-luna") + const k3 = ms["moonshotai/Kimi-K3"] + expect(k3.name).toBe("Kimi K3") + expect(Object.keys(k3.variants)).toEqual(["low", "high", "max"]) + expect(k3.capabilities.attachment).toBe(true) + expect(k3.limit.context).toBe(1_000_000) + // every Go model on chat completions, which the fetch sends to /alpha/generate + expect(new Set(Object.values(ms).map((m) => m.api.npm))).toEqual(new Set(["@ai-sdk/openai-compatible"])) +}) + +test("the CLI's table stands in when the list can't be had, and offers nothing Go is refused", async () => { + expect(_internal.GO_MODELS.length).toBe(57) + for (const m of _internal.GO_MODELS) expect(_internal.GO_REFUSED.has(m.id)).toBe(false) + for (const reply of [500, "not json", JSON.stringify({ data: [] }), JSON.stringify({ data: [{ id: "claude-opus-5-5" }, { id: "gpt-6-sol" }] })]) { + const { ms } = await models(reply) + expect(Object.keys(ms)).toEqual(_internal.GO_MODELS.map((m) => m.id)) + } +}) + +test("the list's failures read as the built-in's", async () => { + const url = "https://api.commandcode.ai/provider/v1/models" + const fail = async (res) => { + globalThis.fetch = async () => res + return (await _internal.goModels().then(() => null, (e) => e)).message + } + expect(await fail(new Response('{"error":{"message":"down"}}', { status: 503 }))).toBe(`${url}: 503 Service Unavailable (down)`) + expect(await fail(new Response("", { status: 500 }))).toBe(`${url}: 500 Internal Server Error`) + expect(await fail(new Response("", { status: 200 }))).toBe(`${url}: not a model list`) + expect(await fail(Response.json({ data: [] }))).toBe(`${url}: no models listed`) + expect(await fail(Response.json({ data: [{ id: "claude-opus-5-5" }, { id: "gpt-6-sol" }] }))).toBe("Command Code listed no models for the Go plan") +}) diff --git a/packages/commandcode/package.json b/packages/commandcode/package.json index df157ea..40ff52b 100644 --- a/packages/commandcode/package.json +++ b/packages/commandcode/package.json @@ -1,6 +1,6 @@ { "name": "@magpie-community/opencode-commandcode-auth", - "version": "0.1.5", + "version": "0.1.6", "description": "Command Code plans (Pro, GOAT, Max, Ultra, Go, Teams) in OpenCode and magpie", "type": "module", "main": "./index.mjs", diff --git a/packages/commandcode/testdata/models.json b/packages/commandcode/testdata/models.json new file mode 100644 index 0000000..c1fc782 --- /dev/null +++ b/packages/commandcode/testdata/models.json @@ -0,0 +1 @@ +{"object":"list","data":[{"id":"claude-sonnet-5-5","object":"model","created":1790806002,"owned_by":"command-code","name":"Claude Sonnet 5.5","context_length":1000000,"supported_endpoints":["/messages"]},{"id":"claude-sonnet-5","object":"model","created":1790806002,"owned_by":"command-code","name":"Claude Sonnet 5","context_length":1000000,"supported_endpoints":["/messages"]},{"id":"claude-sonnet-4-6","object":"model","created":1790806002,"owned_by":"command-code","name":"Claude Sonnet 4.6","context_length":1000000,"supported_endpoints":["/messages"]},{"id":"claude-fable-5-1","object":"model","created":1790806002,"owned_by":"command-code","name":"Claude Fable 5.1","context_length":1000000,"supported_endpoints":["/messages"]},{"id":"claude-fable-5","object":"model","created":1790806002,"owned_by":"command-code","name":"Claude Fable 5","context_length":1000000,"supported_endpoints":["/messages"]},{"id":"claude-opus-5-5","object":"model","created":1790806002,"owned_by":"command-code","name":"Claude Opus 5.5","context_length":1000000,"supported_endpoints":["/messages"]},{"id":"claude-opus-5","object":"model","created":1790806002,"owned_by":"command-code","name":"Claude Opus 5","context_length":1000000,"supported_endpoints":["/messages"]},{"id":"claude-opus-4-8","object":"model","created":1790806002,"owned_by":"command-code","name":"Claude Opus 4.8","context_length":1000000,"supported_endpoints":["/messages"]},{"id":"claude-opus-4-7","object":"model","created":1790806002,"owned_by":"command-code","name":"Claude Opus 4.7","context_length":1000000,"supported_endpoints":["/messages"]},{"id":"claude-haiku-4-5-20251001","object":"model","created":1790806002,"owned_by":"command-code","name":"Claude Haiku 4.5","context_length":200000,"supported_endpoints":["/messages"]},{"id":"gpt-6-astra","object":"model","created":1790806002,"owned_by":"command-code","name":"GPT-6 Astra","context_length":1050000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"gpt-6.1-sol","object":"model","created":1790806002,"owned_by":"command-code","name":"GPT-6.1 Sol","context_length":1050000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"gpt-6-sol","object":"model","created":1790806002,"owned_by":"command-code","name":"GPT-6 Sol","context_length":1050000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"gpt-6-luna","object":"model","created":1790806002,"owned_by":"command-code","name":"GPT-6 Luna","context_length":1050000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"gpt-5.6-sol","object":"model","created":1790806002,"owned_by":"command-code","name":"GPT-5.6 Sol","context_length":1050000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"gpt-5.6-terra","object":"model","created":1790806002,"owned_by":"command-code","name":"GPT-5.6 Terra","context_length":1050000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"gpt-5.6-luna","object":"model","created":1790806002,"owned_by":"command-code","name":"GPT-5.6 Luna","context_length":1050000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"gpt-5.5","object":"model","created":1790806002,"owned_by":"command-code","name":"GPT-5.5","context_length":400000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"gpt-5.4","object":"model","created":1790806002,"owned_by":"command-code","name":"GPT-5.4","context_length":400000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"gpt-5.3-codex","object":"model","created":1790806002,"owned_by":"command-code","name":"GPT-5.3 Codex","context_length":400000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"gpt-5.4-mini","object":"model","created":1790806002,"owned_by":"command-code","name":"GPT-5.4 Mini","context_length":400000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"deepseek/deepseek-v4-pro","object":"model","created":1790806002,"owned_by":"command-code","name":"DeepSeek V4 Pro (latest)","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"deepseek/deepseek-v4-flash","object":"model","created":1790806002,"owned_by":"command-code","name":"DeepSeek V4 Flash (latest)","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"deepseek/deepseek-v4-flash-vision-exp","object":"model","created":1790806002,"owned_by":"command-code","name":"DeepSeek V4 Flash Vision (exp)","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"deepseek/deepseek-v4-flash-fast","object":"model","created":1790806002,"owned_by":"command-code","name":"DeepSeek V4 Flash Fast","context_length":1000000,"supported_endpoints":["/chat/completions"]},{"id":"deepseek/deepseek-v4.1-flash","object":"model","created":1790806002,"owned_by":"command-code","name":"DeepSeek V4.1 Flash","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"deepseek/deepseek-v4.1-flash-fast","object":"model","created":1790806002,"owned_by":"command-code","name":"DeepSeek V4.1 Flash Fast","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"moonshotai/Kimi-K3","object":"model","created":1790806002,"owned_by":"command-code","name":"Kimi K3","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"moonshotai/Kimi-K2.7-Code","object":"model","created":1790806002,"owned_by":"command-code","name":"Kimi K2.7 Code","context_length":256000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"moonshotai/Kimi-K2.7-Code-Highspeed","object":"model","created":1790806002,"owned_by":"command-code","name":"Kimi K2.7 Code HighSpeed","context_length":262000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"moonshotai/Kimi-K2.6","object":"model","created":1790806002,"owned_by":"command-code","name":"Kimi K2.6","context_length":256000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"moonshotai/Kimi-K2.5","object":"model","created":1790806002,"owned_by":"command-code","name":"Kimi K2.5","context_length":256000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"z-ai/glm-5.3-flash","object":"model","created":1790806002,"owned_by":"command-code","name":"GLM-5.3 Flash","context_length":1048576,"supported_endpoints":["/chat/completions","/responses"]},{"id":"z-ai/glm-5.3-flashx","object":"model","created":1790806002,"owned_by":"command-code","name":"GLM-5.3 FlashX","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"zai-org/GLM-5.3","object":"model","created":1790806002,"owned_by":"command-code","name":"GLM-5.3","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"zai-org/GLM-5.2","object":"model","created":1790806002,"owned_by":"command-code","name":"GLM-5.2","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"zai-org/GLM-5.2-Fast","object":"model","created":1790806002,"owned_by":"command-code","name":"GLM-5.2 Fast","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"zai-org/GLM-5.1","object":"model","created":1790806002,"owned_by":"command-code","name":"GLM-5.1","context_length":200000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"zai-org/GLM-5","object":"model","created":1790806002,"owned_by":"command-code","name":"GLM-5","context_length":200000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"MiniMaxAI/MiniMax-M3","object":"model","created":1790806002,"owned_by":"command-code","name":"MiniMax M3","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"MiniMaxAI/MiniMax-M2.7","object":"model","created":1790806002,"owned_by":"command-code","name":"MiniMax M2.7","context_length":200000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"MiniMaxAI/MiniMax-M2.5","object":"model","created":1790806002,"owned_by":"command-code","name":"MiniMax M2.5","context_length":200000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"xiaomi/mimo-v2.6-pro","object":"model","created":1790806002,"owned_by":"command-code","name":"MiMo V2.6 Pro","context_length":1048576,"supported_endpoints":["/chat/completions","/responses"]},{"id":"xiaomi/mimo-v2.6-pro-ultraspeed","object":"model","created":1790806002,"owned_by":"command-code","name":"MiMo V2.6 Pro UltraSpeed","context_length":1048576,"supported_endpoints":["/chat/completions","/responses"]},{"id":"xiaomi/mimo-v2.6-flash","object":"model","created":1790806002,"owned_by":"command-code","name":"MiMo V2.6 Flash","context_length":1048576,"supported_endpoints":["/chat/completions","/responses"]},{"id":"xiaomi/mimo-v2.5-pro","object":"model","created":1790806002,"owned_by":"command-code","name":"MiMo V2.5 Pro","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"xiaomi/mimo-v2.5","object":"model","created":1790806002,"owned_by":"command-code","name":"MiMo V2.5","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"Qwen/Qwen3.8-Omni-Flash","object":"model","created":1790806002,"owned_by":"command-code","name":"Qwen 3.8 Omni Flash","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"Qwen/Qwen3.8-Max-0902","object":"model","created":1790806002,"owned_by":"command-code","name":"Qwen 3.8 Max 0902","context_length":1000000,"supported_endpoints":["/chat/completions"]},{"id":"Qwen/Qwen3.8-Max","object":"model","created":1790806002,"owned_by":"command-code","name":"Qwen 3.8 Max","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"Qwen/Qwen3.8-27B","object":"model","created":1790806002,"owned_by":"command-code","name":"Qwen 3.8 27B","context_length":262144,"supported_endpoints":["/chat/completions","/responses"]},{"id":"Qwen/Qwen3.8-Flash","object":"model","created":1790806002,"owned_by":"command-code","name":"Qwen 3.8 Flash","context_length":1000000,"supported_endpoints":["/chat/completions"]},{"id":"Qwen/Qwen3.7-Max","object":"model","created":1790806002,"owned_by":"command-code","name":"Qwen 3.7 Max","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"Qwen/Qwen3.7-Plus","object":"model","created":1790806002,"owned_by":"command-code","name":"Qwen 3.7 Plus","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"Qwen/Qwen3.7-Flash","object":"model","created":1790806002,"owned_by":"command-code","name":"Qwen 3.7 Flash","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"Qwen/Qwen3.6-Max-Preview","object":"model","created":1790806002,"owned_by":"command-code","name":"Qwen 3.6 Max Preview","context_length":200000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"Qwen/Qwen3.6-Plus","object":"model","created":1790806002,"owned_by":"command-code","name":"Qwen 3.6 Plus","context_length":200000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"meituan/LongCat-2.0","object":"model","created":1790806002,"owned_by":"command-code","name":"LongCat 2.0","context_length":1048576,"supported_endpoints":["/chat/completions"]},{"id":"stepfun/Step-5-Preview","object":"model","created":1790806002,"owned_by":"command-code","name":"Step 5 Preview","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"stepfun/Step-3.7-Flash","object":"model","created":1790806002,"owned_by":"command-code","name":"Step 3.7 Flash","context_length":256000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"stepfun/Step-3.5-Flash","object":"model","created":1790806002,"owned_by":"command-code","name":"Step 3.5 Flash","context_length":262144,"supported_endpoints":["/chat/completions","/responses"]},{"id":"tencent/hy3-paid","object":"model","created":1790806002,"owned_by":"command-code","name":"Tencent Hy3","context_length":262144,"supported_endpoints":["/chat/completions","/responses"]},{"id":"tencent/hy4-preview","object":"model","created":1790806002,"owned_by":"command-code","name":"Tencent Hy4 Preview","context_length":1048576,"supported_endpoints":["/chat/completions"]},{"id":"google/gemini-3.8-flash","object":"model","created":1790806002,"owned_by":"command-code","name":"Gemini 3.8 Flash","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"google/gemini-3.7-flash","object":"model","created":1790806002,"owned_by":"command-code","name":"Gemini 3.7 Flash","context_length":1048576,"supported_endpoints":["/chat/completions"]},{"id":"google/gemini-3.6-flash","object":"model","created":1790806002,"owned_by":"command-code","name":"Gemini 3.6 Flash","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"google/gemini-3.5-flash","object":"model","created":1790806002,"owned_by":"command-code","name":"Gemini 3.5 Flash","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"google/gemini-3.5-flash-lite","object":"model","created":1790806002,"owned_by":"command-code","name":"Gemini 3.5 Flash Lite","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"google/gemini-3.1-flash-lite","object":"model","created":1790806002,"owned_by":"command-code","name":"Gemini 3.1 Flash Lite","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"sakana/fugu-ultra","object":"model","created":1790806002,"owned_by":"command-code","name":"Fugu Ultra","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"nvidia/nemotron-3-ultra-550b-a55b","object":"model","created":1790806002,"owned_by":"command-code","name":"Nemotron 3 Ultra","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"thinkingmachines/inkling","object":"model","created":1790806002,"owned_by":"command-code","name":"Inkling","context_length":256000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"thinkingmachines/inkling-small","object":"model","created":1790806002,"owned_by":"command-code","name":"Inkling Small","context_length":1000000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"stealth/space-bunny-alpha","object":"model","created":1790806002,"owned_by":"command-code","name":"Space Bunny Alpha","context_length":1000000,"supported_endpoints":["/chat/completions"]},{"id":"stealth/pixel-canary","object":"model","created":1790806002,"owned_by":"command-code","name":"Pixel Canary","context_length":262144,"supported_endpoints":["/chat/completions","/responses"]},{"id":"poolside/laguna-s-2.1-free","object":"model","created":1790806002,"owned_by":"command-code","name":"Laguna S 2.1","context_length":256000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"inclusionai/ling-3.0-flash-sante:free","object":"model","created":1790806002,"owned_by":"command-code","name":"Ling 3.0 Flash Sante","context_length":262144,"supported_endpoints":["/chat/completions"]},{"id":"inclusionai/ling-3.1-flash:free","object":"model","created":1790806002,"owned_by":"command-code","name":"Ling 3.1 Flash","context_length":262144,"supported_endpoints":["/chat/completions"]},{"id":"meta/muse-spark-1.1","object":"model","created":1790806002,"owned_by":"command-code","name":"Muse Spark 1.1","context_length":1048576,"supported_endpoints":["/chat/completions","/responses"]},{"id":"meta/muse-spark-1.2","object":"model","created":1790806002,"owned_by":"command-code","name":"Muse Spark 1.2","context_length":1048576,"supported_endpoints":["/chat/completions","/responses"]},{"id":"meta/muse-spark-1.2-contributor","object":"model","created":1790806002,"owned_by":"command-code","name":"Muse Spark 1.2 Contributor","context_length":1048576,"supported_endpoints":["/chat/completions","/responses"]},{"id":"meta/muse-spark-1.3","object":"model","created":1790806002,"owned_by":"command-code","name":"Muse Spark 1.3","context_length":1048576,"supported_endpoints":["/chat/completions","/responses"]},{"id":"meta/muse-spark-1.3-contributor","object":"model","created":1790806002,"owned_by":"command-code","name":"Muse Spark 1.3 Contributor","context_length":1048576,"supported_endpoints":["/chat/completions","/responses"]},{"id":"xai/grok-4.5","object":"model","created":1790806002,"owned_by":"command-code","name":"Grok 4.5","context_length":500000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"xai/grok-4.6","object":"model","created":1790806002,"owned_by":"command-code","name":"Grok 4.6","context_length":500000,"supported_endpoints":["/chat/completions","/responses"]},{"id":"xai/grok-4.7","object":"model","created":1790806002,"owned_by":"command-code","name":"Grok 4.7","context_length":500000,"supported_endpoints":["/chat/completions","/responses"]}]}