Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.
provider: Ark's plan models see images as the plans' docs say, not as /models says (XYenon)
yetoneabd94e0b1574
diff --git a/internal/gateway/vision_ark_plan_test.go b/internal/gateway/vision_ark_plan_test.goindex 9ae16f7ef..dfefd00cc 100644--- a/internal/gateway/vision_ark_plan_test.go+++ b/internal/gateway/vision_ark_plan_test.go@@ -13,16 +13,16 @@ import (// models.dev's resellers disagree on doubao-seed-2.1-pro, so magpie took// it for text-only and had another model describe every image before Ark// was asked. Ark's own list says it sees: its image goes to it as sent, and-// the describer isn't asked. A plan model Ark's list says is text-only-// (glm-5.3-flash) still has its image described.+// the describer isn't asked. A plan model that is text-only+// (deepseek-v4-pro) still has its image described.func TestArkPlanModelThatSeesIsSentTheImage(t *testing.T) {s, u := eyed(t)up := strings.TrimSuffix(mustFind(t, "probe").Chat, "/v1")if err := provider.Save(provider.Provider{ID: "volcengine", Name: "Volcengine Ark", Preset: "volcengine", Chat: up + "/api/coding/v3", Key: "ark-k",- Models: []string{"doubao-seed-2.1-pro", "glm-5.3-flash"}}); err != nil {+ Models: []string{"doubao-seed-2.1-pro", "glm-5.3-flash", "deepseek-v4-pro"}}); err != nil {t.Fatal(err)}- for _, model := range []string{"doubao-seed-2.1-pro", "glm-5.3-flash"} {+ for _, model := range []string{"doubao-seed-2.1-pro", "glm-5.3-flash", "deepseek-v4-pro"} {body := `{"model":"volcengine/` + model + `","input":[{"role":"user","content":[{"type":"input_text","text":"read"},{"type":"input_image","image_url":"data:image/png;base64,aGVsbG8="}]}]}`rec := httptest.NewRecorder()s.Handler().ServeHTTP(rec, httptest.NewRequest("POST", "/v1/responses", strings.NewReader(body)))@@ -33,10 +33,14 @@ func TestArkPlanModelThatSeesIsSentTheImage(t *testing.T) {if got := u.sent("doubao-seed-2.1-pro"); len(got) != 1 || !strings.Contains(got[0], "aGVsbG8=") || strings.Contains(got[0], "HELLO") {t.Fatalf("doubao-seed-2.1-pro, which Ark says sees, was sent %v", got)}- if got := u.sent("glm-5.3-flash"); len(got) != 1 || strings.Contains(got[0], "aGVsbG8=") || !strings.Contains(got[0], "HELLO") {- t.Fatalf("glm-5.3-flash, which Ark says is text-only, was sent %v", got)+ // XYenon: the plan docs say glm-5.3-flash takes images.+ if got := u.sent("glm-5.3-flash"); len(got) != 1 || !strings.Contains(got[0], "aGVsbG8=") || strings.Contains(got[0], "HELLO") {+ t.Fatalf("glm-5.3-flash, which Ark's docs say sees, was sent %v", got)+ }+ if got := u.sent("deepseek-v4-pro"); len(got) != 1 || strings.Contains(got[0], "aGVsbG8=") || !strings.Contains(got[0], "HELLO") {+ t.Fatalf("deepseek-v4-pro, which is text-only, was sent %v", got)}if n := len(u.sent("eye")); n != 1 {- t.Fatalf("the describer was asked %d times, want once (for glm-5.3-flash alone)", n)+ t.Fatalf("the describer was asked %d times, want once (for deepseek-v4-pro alone)", n)}}diff --git a/internal/provider/presets.go b/internal/provider/presets.goindex 719c46e4b..e41c207fb 100644--- a/internal/provider/presets.go+++ b/internal/provider/presets.go@@ -133,17 +133,24 @@ var arkPlanModels = []string{"ark-code-latest", "doubao-seed-evolving", "doubao-"doubao-seed-2.0-mini", "minimax-m3", "glm-5.3", "glm-5.3-flash", "deepseek-v4.1-flash", "deepseek-v4.1-flash-economy", "deepseek-v4-flash", "deepseek-v4-pro","kimi-k2.8-preview", "kimi-k3", "kimi-k3.1-pro"}-// arkPlanImages are which of arkPlanModels take images, as Ark's own-// /api/coding/v3/models says of the dated model each one is (its-// input_modalities, 10-29): models.dev's resellers disagree on-// doubao-seed-2.1-pro and say nothing of 2.1-lite, so magpie took them for-// text-only and had every image of theirs described by another model-// first, a minute or more before the first token (tongzhenbao on X). The-// ones Ark's list doesn't name (ark-code-latest, glm-5.3, kimi-k3,-// kimi-k2.8-preview, minimax-m3) are left to models.dev.+// arkPlanImages are which of arkPlanModels take images, as Ark's plan+// docs say (Coding Plan 套餐概览 docs/82379/1925114, Agent Plan 2366394,+// read 10-29), never the plans' /models: its input_modalities aren't the+// plans' models (#1216), and 10c85e1fe took them from it and marked+// glm-5.3-flash and deepseek-v4.1-flash(-economy) text-only, so their+// images went to another model to be described (XYenon). The docs say+// glm-5.3-flash "为原生多模态模型,支持图片输入", deepseek-v4.1-flash "原生+// 具备多模态视觉理解能力", -economy "支持多模态输入", kimi-k3 "原生支持视觉+// 理解", kimi-k2.8-preview "支持文本和图片输入" and minimax-m3 "支持多模态+// 视觉理解". The Doubao Seed models and kimi-k3.1-pro aren't described+// either way there and keep what tongzhenbao's fix gave them (they see);+// deepseek-v4-flash and -pro are DeepSeek's text-only V4, which V4.1 Flash+// added vision to. ark-code-latest and glm-5.3 are left to models.dev.var arkPlanImages = map[string]bool{+ "glm-5.3-flash": true, "deepseek-v4.1-flash": true, "deepseek-v4.1-flash-economy": true,+ "kimi-k3": true, "kimi-k2.8-preview": true, "minimax-m3": true,"doubao-seed-evolving": true, "doubao-seed-2.1-pro": true, "doubao-seed-2.1-lite": true, "doubao-seed-2.0-mini": true, "kimi-k3.1-pro": true,- "glm-5.3-flash": false, "deepseek-v4.1-flash": false, "deepseek-v4.1-flash-economy": false, "deepseek-v4-flash": false, "deepseek-v4-pro": false,+ "deepseek-v4-flash": false, "deepseek-v4-pro": false,}// alibabaPlanModels are the text models of Alibaba's Token Plan, the samediff --git a/internal/provider/volcengine_test.go b/internal/provider/volcengine_test.goindex 361a593d7..cca0915b2 100644--- a/internal/provider/volcengine_test.go+++ b/internal/provider/volcengine_test.go@@ -223,3 +223,27 @@ func TestArkPlanImagesAreThePlans(t *testing.T) {}}}++// XYenon: Ark's plan docs say glm-5.3-flash, deepseek-v4.1-flash,+// -economy and kimi-k3 take images, so each is sent the image itself, not+// marked text-only from the plans' /models (#1216: not the plans' list).+func TestArkPlanModelsSeeAsTheDocsSay(t *testing.T) {+ p, err := FromPreset("volcengine")+ if err != nil {+ t.Fatal(err)+ }+ ms := map[string]catalog.Model{}+ for _, m := range p.planModels(nil) {+ ms[m.ID] = m+ }+ for _, id := range []string{"glm-5.3-flash", "deepseek-v4.1-flash", "deepseek-v4.1-flash-economy", "kimi-k3", "kimi-k2.8-preview", "minimax-m3"} {+ m, ok := ms[id]+ if !ok {+ t.Errorf("%s isn't a plan model", id)+ continue+ }+ if m.ImageInput == nil || !*m.ImageInput || !m.Images {+ t.Errorf("%s: the docs say it takes images, marked %v (%v)", id, m.Images, m.ImageInput)+ }+ }+}