From b00387f9db50ba665f2cae12716aba82b98e8c7a Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 1 Oct 2026 06:14:55 +0800 Subject: [PATCH] =?UTF-8?q?provider:=20a=20Command=20Code=20Go=20account?= =?UTF-8?q?=20lists=20the=20models=20Command=20Code=20has=20for=20Go,=20no?= =?UTF-8?q?t=20ten=20(01huadalang=20on=20Discord:=20command=20=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E7=99=BB=E5=BD=95=E5=8F=AA=E6=9C=89=E5=8D=81=E4=B8=AA?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=EF=BC=8C=E6=AD=A3=E7=A1=AE=E7=9A=84=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E6=98=AF=E5=87=A0=E5=8D=81=E4=B8=AA)=20=E2=80=94=20fo?= =?UTF-8?q?r=20Go,=20magpie=20never=20asked=20for=20a=20list=20and=20showe?= =?UTF-8?q?d=20a=20table=20of=2010,=20on=20the=20word=20that=20Command=20C?= =?UTF-8?q?ode=20has=20none;=20its=20Provider=20API's=20list=20answers=20w?= =?UTF-8?q?ithout=20a=20key=20(86=20models),=20and=20its=20CLI=20(1.73.0)?= =?UTF-8?q?=20offers=20Go=20every=20model=20its=20picker=20shows=20but=20t?= =?UTF-8?q?he=20premium=20ones=20and=20those=20it=20blocks=20for=20Go.=20A?= =?UTF-8?q?=20Go=20account=20now=20fetches=20that=20list=20without=20its?= =?UTF-8?q?=20key,=20less=20the=2030=20refused,=20and=20saves=20it=20(56?= =?UTF-8?q?=20today);=20the=20table,=20the=20CLI's=20whole=20Go=20set=20(5?= =?UTF-8?q?7),=20stands=20in=20until=20then=20or=20when=20the=20fetch=20fa?= =?UTF-8?q?ils.=20Requests=20still=20go=20to=20/alpha/generate.=20TestComm?= =?UTF-8?q?andCodeGoModels=20fails=20without=20the=20change=20(10=20models?= =?UTF-8?q?).=20go=20vet,=20go=20build=20-tags=20nogui=20(darwin,=20GOOS?= =?UTF-8?q?=3Dlinux),=20GOOS=3Dwindows=20go=20build,=20go=20test=20-tags?= =?UTF-8?q?=20nogui=20./internal/provider=20pass.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../provider/commandcode_go_models_test.go | 102 ++++++++++++++++ internal/provider/commandcode_go_test.go | 8 +- internal/provider/commandcode_plan.go | 114 ++++++++++++++++-- .../provider/testdata/commandcode_models.json | 1 + 4 files changed, 210 insertions(+), 15 deletions(-) create mode 100644 internal/provider/commandcode_go_models_test.go create mode 100644 internal/provider/testdata/commandcode_models.json diff --git a/internal/provider/commandcode_go_models_test.go b/internal/provider/commandcode_go_models_test.go new file mode 100644 index 000000000..bb02c07a7 --- /dev/null +++ b/internal/provider/commandcode_go_models_test.go @@ -0,0 +1,102 @@ +package provider + +import ( + "context" + "net/http" + "net/http/httptest" + "os" + "path/filepath" + "slices" + "testing" +) + +// A Command Code account on the Go plan lists every model Command Code +// lets Go use, not ten (01huadalang on Discord: "command 账号登录只有十个 +// 模型,正确的应该是几十个"): its list is the Provider API's, asked without +// the key, less the models Go is refused; the CLI's own table stands in +// before it is fetched. testdata/commandcode_models.json is that list as +// api.commandcode.ai answered it (2026-10-01, 86 models). +func TestCommandCodeGoModels(t *testing.T) { + home := signIn(t) + writeFile(t, filepath.Join(home, ".commandcode", "auth.json"), map[string]any{"apiKey": "go-key", "userName": "gouser"}) + list, err := os.ReadFile(filepath.Join("testdata", "commandcode_models.json")) + if err != nil { + t.Fatal(err) + } + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case "/provider/v1/models": + if r.Header.Get("Authorization") != "" || r.Header.Get("x-api-key") != "" { + t.Error("the list was asked with the Go key") + } + _, _ = w.Write(list) + case "/alpha/billing/subscriptions": + _, _ = w.Write([]byte(`{"success":true,"data":{"planId":"individual-go-monthly","status":"active"}}`)) + default: + w.WriteHeader(404) + } + })) + defer srv.Close() + oldAPI := cmdAPI + cmdAPI = srv.URL + defer func() { cmdAPI = oldAPI }() + cmdPlansSeen.Lock() + cmdPlansSeen.m = map[string]cmdSeen{} + cmdPlansSeen.Unlock() + + p, found := find(All(), CommandCodePlanID) + if !found { + t.Fatal("no Command Code account") + } + // before a fetch, once the plan is read: the CLI's table, far more + // than ten + if _, _, ok := CommandCodeGenerate(context.Background(), p); !ok { + t.Fatal("not on Go") + } + p, _ = find(All(), CommandCodePlanID) + before := p.Available() + if len(before) != len(cmdGoModels) || len(before) < 40 { + t.Fatalf("before a fetch: %d models", len(before)) + } + for _, m := range cmdGoModels { + if cmdGoRefused[m.ID] { + t.Errorf("the table offers %s, which Go is refused", m.ID) + } + } + + ms, err := p.Fetch(context.Background()) + if err != nil { + t.Fatal(err) + } + var got []string + for _, m := range ms { + got = append(got, m.ID) + } + if len(got) != 56 { + t.Fatalf("Go lists %d models: %v", len(got), got) + } + for _, id := range []string{"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"} { + if !slices.Contains(got, id) { + t.Errorf("%s missing from %v", id, got) + } + } + for _, id := range []string{"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"} { + if slices.Contains(got, id) { + t.Errorf("%s, which Go is refused, is listed", id) + } + } + // kept, and shown with the table's reasoning levels and pictures + p, _ = find(All(), CommandCodePlanID) + after := p.Available() + if len(after) != 56 { + t.Fatalf("after a fetch: %d models", len(after)) + } + if e := p.Efforts("moonshotai/Kimi-K3"); !slices.Equal(e, []string{"low", "high", "max"}) { + t.Errorf("Kimi K3 efforts: %v", e) + } + for _, m := range after { + if m.ID == "moonshotai/Kimi-K3" && !m.Images { + t.Error("Kimi K3 takes no pictures") + } + } +} diff --git a/internal/provider/commandcode_go_test.go b/internal/provider/commandcode_go_test.go index 3ef665a6d..57b91e9b6 100644 --- a/internal/provider/commandcode_go_test.go +++ b/internal/provider/commandcode_go_test.go @@ -24,9 +24,11 @@ func TestCommandCodeGoPlan(t *testing.T) { key := strings.TrimPrefix(r.Header.Get("Authorization"), "Bearer ") ok := func(v any) { _ = json.NewEncoder(w).Encode(v) } switch { - case r.URL.Path == "/provider/v1/models": - t.Errorf("the Provider API asked for %q's models", key) + case r.URL.Path == "/provider/v1/models" && r.Header.Get("Authorization") != "": + t.Errorf("the Provider API asked for %q's models with its key", key) w.WriteHeader(403) + case r.URL.Path == "/provider/v1/models": + ok(map[string]any{"data": []map[string]any{{"id": "gpt-6-luna"}, {"id": "claude-opus-5-5"}, {"id": "moonshotai/Kimi-K3"}}}) case r.URL.Path != "/alpha/billing/subscriptions": w.WriteHeader(404) case key == "go-key": @@ -59,7 +61,7 @@ func TestCommandCodeGoPlan(t *testing.T) { t.Fatalf("go: %v %q %q", ok, api, key) } ms, err := p.Account.fetch(ctx) - if err != nil || len(ms) != len(cmdGoModels) || ms[0].ID != "gpt-6-luna" { + if err != nil || len(ms) != 2 || ms[0].ID != "gpt-6-luna" || ms[1].ID != "moonshotai/Kimi-K3" { t.Fatalf("go models: %v %+v", err, ms) } if got := p.Account.models(); len(got) != len(cmdGoModels) { diff --git a/internal/provider/commandcode_plan.go b/internal/provider/commandcode_plan.go index 99906a8c4..61420ab06 100644 --- a/internal/provider/commandcode_plan.go +++ b/internal/provider/commandcode_plan.go @@ -62,24 +62,113 @@ var cmdModels = []catalog.Model{ } // cmdGoModels are the models the Go plan is let use, as the CLI's own -// table has it (1.72.2): the "opensource" ones, less those it blocks for -// Go (gpt-5.6-sol, claude-sonnet-5-5, grok-4.6 and the like) — -// -// "individual-go":{allowedCategories:[zr],blockedModels:Qr=[…]} -// -// Command Code has no list to ask for them: a model the plan hasn't is -// refused with MODEL_NOT_IN_PLAN. +// table has it (1.73.0): every model its picker shows (wD, less the +// hidden) but the "premium" ones and those it blocks for Go +// (cmdGoRefused). They stand in until Command Code's list is fetched +// (cmdGoFetch), and give that list the reasoning levels and pictures it +// doesn't say. var cmdGoModels = []catalog.Model{ {ID: "gpt-6-luna", Name: "GPT-6 Luna", Context: 1_050_000, Images: true, Efforts: []string{"low", "medium", "high", "xhigh", "max"}}, {ID: "gpt-5.6-luna", Name: "GPT-5.6 Luna", Context: 1_050_000, Images: true, Efforts: []string{"low", "medium", "high", "xhigh", "max"}}, {ID: "deepseek/deepseek-v4-pro", Name: "DeepSeek V4 Pro", Context: 1_000_000, Efforts: []string{"high", "max"}}, {ID: "deepseek/deepseek-v4-flash", Name: "DeepSeek V4 Flash", Context: 1_000_000, Efforts: []string{"high", "max"}}, + {ID: "deepseek/deepseek-v4-flash-vision-exp", Name: "DeepSeek V4 Flash Vision (exp)", Context: 1_000_000, Images: true, Efforts: []string{"high", "max"}}, + {ID: "deepseek/deepseek-v4-flash-fast", Name: "DeepSeek V4 Flash Fast", Context: 1_000_000, Efforts: []string{"low", "high", "max"}}, + {ID: "deepseek/deepseek-v4.1-flash", Name: "DeepSeek V4.1 Flash", Context: 1_000_000, Images: true, Efforts: []string{"low", "high", "max"}}, + {ID: "deepseek/deepseek-v4.1-flash-fast", Name: "DeepSeek V4.1 Flash Fast", Context: 1_000_000, Images: true, Efforts: []string{"low", "high", "max"}}, {ID: "moonshotai/Kimi-K3", Name: "Kimi K3", Context: 1_000_000, Images: true, Efforts: []string{"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: []string{"low", "high", "max"}}, + {ID: "z-ai/glm-5.3-flashx", Name: "GLM-5.3 FlashX", Context: 1_000_000, Images: true, Efforts: []string{"low", "high", "max"}}, {ID: "zai-org/GLM-5.3", Name: "GLM-5.3", Context: 1_000_000, Efforts: []string{"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: []string{"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: []string{"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: []string{"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: []string{"low", "medium", "xhigh"}}, + {ID: "Qwen/Qwen3.8-Max-0902", Name: "Qwen 3.8 Max 0902", Context: 1_000_000, Images: true, Efforts: []string{"low", "medium", "xhigh"}}, + {ID: "Qwen/Qwen3.8-Max", Name: "Qwen 3.8 Max", Context: 1_000_000, Images: true, Efforts: []string{"low", "medium", "xhigh"}}, + {ID: "Qwen/Qwen3.8-27B", Name: "Qwen 3.8 27B", Context: 262_144, Images: true, Efforts: []string{"low", "medium", "xhigh"}}, + {ID: "Qwen/Qwen3.8-Flash", Name: "Qwen 3.8 Flash", Context: 1_000_000, Images: true, Efforts: []string{"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: []string{"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: []string{"low", "medium", "high"}}, + {ID: "google/gemini-3.6-flash", Name: "Gemini 3.6 Flash", Context: 1_000_000, Images: true, Efforts: []string{"low", "medium", "high"}}, + {ID: "google/gemini-3.5-flash-lite", Name: "Gemini 3.5 Flash Lite", Context: 1_000_000, Images: true, Efforts: []string{"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: []string{"low", "medium", "high"}}, + {ID: "stealth/pixel-canary", Name: "Pixel Canary", Context: 262_144, Images: true, Efforts: []string{"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: []string{"low", "medium", "high"}}, + {ID: "meta/muse-spark-1.2-contributor", Name: "Muse Spark 1.2 Contributor", Context: 1_048_576, Images: true, Efforts: []string{"low", "medium", "high", "xhigh"}}, + {ID: "meta/muse-spark-1.3-contributor", Name: "Muse Spark 1.3 Contributor", Context: 1_048_576, Images: true, Efforts: []string{"low", "medium", "high", "xhigh"}}, + {ID: "xai/grok-4.5", Name: "Grok 4.5", Context: 500_000, Images: true, Efforts: []string{"low", "medium", "high"}}, +} + +// cmdGoRefused are 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 — +// +// "individual-go":{allowedCategories:[qo],blockedModels:Xo=[…]} +// +// 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. +var cmdGoRefused = map[string]bool{ + // premium + "claude-sonnet-5": true, "claude-sonnet-4-6": true, "claude-fable-5-1": true, "claude-fable-5": true, + "claude-opus-5-5": true, "claude-opus-5": true, "claude-opus-4-8": true, "claude-opus-4-7": true, + "claude-haiku-4-5-20251001": true, "gpt-6-astra": true, "gpt-6.1-sol": true, "gpt-6-sol": true, + "gpt-5.6-terra": true, "gpt-5.5": true, "gpt-5.4": true, "gpt-5.3-codex": true, "gpt-5.4-mini": true, + "google/gemini-3.5-flash": true, "google/gemini-3.1-flash-lite": true, "sakana/fugu-ultra": true, + "meta/muse-spark-1.1": true, + // blocked for Go + "claude-sonnet-5-5": true, "gpt-5.6-sol": true, "xai/grok-4.6": true, "xai/grok-4.7": true, + "meta/muse-spark-1.2": true, "meta/muse-spark-1.3": true, "xiaomi/mimo-v2.6-pro-ultraspeed": true, + "google/gemini-3.7-flash": true, "google/gemini-3.8-flash": true, +} + +// cmdGoFetch is the Go plan's models: Command Code's list, less what Go +// is refused. The list is the Provider API's, which answers without a key +// (Go's has no Provider API), and takes its reasoning levels and pictures +// from cmdGoModels. +func cmdGoFetch(ctx context.Context) ([]catalog.Model, error) { + base := cmdAPI + "/provider/v1" + ms, err := catalog.FetchURL(ctx, base+"/models", "", false, nil) + if err != nil { + return nil, err + } + var out []catalog.Model + for _, m := range catalog.Decorate(catalog.Chat(ms), cmdGoModels) { + if !cmdGoRefused[m.ID] { + out = append(out, m) + } + } + if len(out) == 0 { + return nil, errors.New("Command Code listed no models for the Go plan") + } + return out, catalog.SaveLive(CommandCodePlanID, base, out) } // cmdAuth is an account's key, as auth.json and the sign-in name it. @@ -206,10 +295,11 @@ func cmdProvider(who, plan string, a cmdAuth) Provider { } // the plan's list is the Provider API's, with what each model is // served on; it is asked as a keyed provider's is. Go's key has no - // Provider API: its list is the CLI's. + // Provider API: its list is the same one, asked without it, less what + // Go is refused. acct.fetch = func(ctx context.Context) ([]catalog.Model, error) { if cmdPlanNow(ctx, a, plan) == "Go" { - return cmdGoModels, nil + return cmdGoFetch(ctx) } keyed := p keyed.Account, keyed.Key = nil, a.APIKey diff --git a/internal/provider/testdata/commandcode_models.json b/internal/provider/testdata/commandcode_models.json new file mode 100644 index 000000000..c1fc78231 --- /dev/null +++ b/internal/provider/testdata/commandcode_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"]}]}