Commit Graph
6 Commits
Author SHA1 Message Date
yetone abd94e0b15 provider: Ark's plan models see images as the plans' docs say, not as /models says (XYenon)
XYenon on Discord (10-29): 10c85e1fe marked glm-5.3-flash,
deepseek-v4.1-flash and deepseek-v4.1-flash-economy text-only and left
kimi-k3 unmarked, so their images were described by another model
instead of sent to them. 10c85e1fe took arkPlanImages from the plans'
/api/coding/v3/models input_modalities, which #1216 (XYenon) showed
isn't the plans' list. Nothing read it at run time; the values were
copied into presets.go.

arkPlanImages now follows Ark's plan docs (Coding Plan 套餐概览
docs/82379/1925114 and Agent Plan 2366394, read 10-29):
- glm-5.3-flash "为原生多模态模型,支持图片输入", deepseek-v4.1-flash
  "原生具备多模态视觉理解能力", -economy "支持多模态输入": now true (were false).
- kimi-k3 "原生支持视觉理解", kimi-k2.8-preview "支持文本和图片输入",
  minimax-m3 "支持多模态视觉理解" (Coding Plan page): now true (were
  left to models.dev).
- The Doubao Seed models and kimi-k3.1-pro: the docs don't say either
  way; they keep true from 10c85e1fe (tongzhenbao's fix).
- deepseek-v4-flash and -pro stay false (DeepSeek's text-only V4; the
  docs give them no image input). ark-code-latest and glm-5.3 are left
  to models.dev as before.
Volcengine only: the map is read only by the two Ark plan regions.

Tests:
- TestArkPlanModelsSeeAsTheDocsSay (new): the six models the docs call
  image-taking are marked so by planModels.
- TestArkPlanModelThatSeesIsSentTheImage: glm-5.3-flash now gets the
  image itself; the text-only one described is deepseek-v4-pro.

Broken by hand: with presets.go at origin/main (10c85e1fe's map), both
are red: the new test names all six models, and glm-5.3-flash was sent
the describer's text.

Run on mote at this tree (base 172e65c80): gofmt -l clean; go vet
./internal/provider ./internal/gateway on darwin, linux (-tags nogui)
and windows ok; go test -count=1 -timeout 45m ./internal/provider
./internal/gateway ./internal/catalog: all ok (provider 98.6s, gateway 524.7s, catalog 0.7s).

Rebased onto d9431dd2e (ZCode mover min, GUI files): go test -count=1
./internal/provider ok again there (96.4s).

Not tried: a real image request to a Coding or Agent Plan model (no
Volcengine account here).
2026-10-29 22:40:31 +08:00
yetone 10c85e1fe9 provider: Ark's plan models that see images are sent them, not their descriptions (tongzhenbao on X)
tongzhenbao on X (10-29): an image sent to a Volcengine model took 100+ s
to the first token. Ark's Coding and Agent Plans list no models
(/models is empty for them), so their models come from arkPlanModels
with no word on images, and the gateway judged them by models.dev
(catalog.SeesImages). That says no for doubao-seed-2.1-pro (resellers
tie), doubao-seed-2.1-lite and ark-code-latest, so blindTo held them
blind and every image was first described by the vision model
(visionTimeout 3 min, up to 4 at once) before the model was asked at
all. Not a regression of today: SeesImages answers the same at
479de8900 (10-26), and describing for an unknown model dates from
6cab11673 (10-03).

Region.Images now says which plan models take images, as Ark's own
/api/coding/v3/models says (input_modalities, read 10-29):
doubao-seed-evolving, doubao-seed-2.1-pro, -2.1-lite, -2.0-mini and
kimi-k3.1-pro do; glm-5.3-flash and the deepseek-v4 models don't.
planModels sets ImageInput/Images for those. ark-code-latest,
glm-5.3, kimi-k3, kimi-k2.8-preview and minimax-m3 aren't in that list
and are judged as before.

Timings (mote, M5 Pro, BenchmarkImageRequest, 8 images, 20.2 MB per
request, fake upstream): magpie's own work is 133-288 ms a request
(responses-to-chat 228 ms, chat-to-chat 182, messages-to-chat 133,
responses-to-responses 288), unchanged here; it was never the 100 s.
The describer step, one vision call per image before the model is
asked, is gone for a plan model that sees.

Tests:
- TestArkPlanImagesAreThePlans: every listed id is a plan model and
  planModels marks images exactly as the list says, nil for the rest.
- TestArkPlanModelThatSeesIsSentTheImage: doubao-seed-2.1-pro on the
  plan gets the image itself and glm-5.3-flash the description, the
  describer asked once.

Run at 06074b6c0 (origin/main has moved by 00e0fd11b since, GUI files
only): gofmt -l internal cmd clean; go vet ./internal/provider
./internal/gateway on darwin, linux and windows ok; go test -count=1
-timeout 45m ./internal/provider (85.7s) ./internal/gateway (468.6s)
./internal/catalog ok, all on mote.

Broken by hand: with the Images map unread in planModels,
TestArkPlanModelThatSeesIsSentTheImage is red (doubao-seed-2.1-pro
was sent the description) and TestArkPlanImagesAreThePlans red.

Not tried: a real Coding or Agent Plan key (none here), so the 100 s
itself wasn't reproduced; the pay-as-you-go Ark key lists its own
models and isn't on this path.
2026-10-29 21:10:37 +08:00
yetone 4d9058a98a provider: Volcengine Ark's Coding and Agent Plans list kimi-k3.1-pro and deepseek-v4.1-flash-economy, not doubao-seed-2.1-turbo or kimi-k2.7-code (xyenon)
xyenon (Discord #feedback) reported that Ark's Coding Plan and Agent
Plan model lists changed. The plans' /models doesn't give the plan's
models, so magpie keeps them in presets.go. Each claim was checked
against Volcengine's docs, read through the docs API on 10-29: Coding
Plan 套餐概览 (82379/1925114, updated 10-28), 快速开始 (1928261,
10-24), Agent Plan 套餐概览 (2366394, 10-28), the model release
notes (1159178) and the discount page (coding-plan-personal-model-discount).

- kimi-k3.1-pro and deepseek-v4.1-flash-economy: in both plans'
  tables and the quick start's model names. Added to both.
- doubao-seedream-5.0-flash: in the Agent Plan's table as an image
  model, spelled so (beside doubao-seedream-5-0-pro). Added to its
  drawers.
- doubao-seed-2.1-turbo: in neither plan's table nor the quick start.
  Removed from both.
- kimi-k2.7-code: marked 即将下线 in both tables and gone from the
  quick start's model names; reported offline on 10-28. Removed.
- minimax-m3: marked 即将下线 the same way, reported closed to new
  users and offline on 11-02. Kept until then, since accounts that
  had it are still served it; a comment says so. The docs give
  neither offline date.

Both plans list the same text models, so they share one slice
(arkPlanModels), as Alibaba's do. A user who picked a removed model
keeps the pick: Exposed keeps picks the list doesn't have, and the
plans have no fetched list for dropGonePicks to act on. No other
place lists these plans' models (grepped the ids across the repo,
site/ included).

Run at 34b2dd9b7 (rebased origin/main), via wsl-run:
gofmt -l clean; go vet ./internal/provider; go test ./internal/provider
ok (237s); go test ./internal/gateway -run 'Volc|Draw|Embed|Video|Plan'
ok; go test -tags nogui ./internal/gui -run 'Volc|KeyPlan|Plan' ok.
Broken by hand: TestVolcenginePlanModelsAsDocumented against the old
presets.go is red on every claim (missing kimi-k3.1-pro, economy and
seedream flash, turbo and kimi-k2.7-code listed).
Rebased on 8701eb35e (no internal/provider or catalog change since
34b2dd9b7): go vet ./internal/provider and go test ./internal/provider
ok (212s) again at that head (the commit on 8701eb35e).
Not tried: a real Coding or Agent Plan key (we have none), so
doubao-seedream-5.0-flash's dotted id is the docs' word only.
2026-10-29 15:39:43 +08:00
XYenon b66481a953 provider, gateway: Volcengine plans expose their own models by kind (#1265) 2026-10-08 18:15:54 +08:00
XYenonandAmp d1bbc5b65b provider: Volcengine plans use their preset models instead of /models (xyenon) (#1216)
Coding Plan's /models returns Ark's general catalog, while Agent Plan's
returns 404. Skip their model-list requests and ignore old fetched lists,
including their protocol and key restrictions. Pay-as-you-go and an
explicit list URL still fetch normally; saved model choices stay intact.

Both plan endpoints were checked with real keys. TestVolcengineModelLists
fails without the no-list behavior and passes with it. Vet (gtk3) and
Linux GUI/CLI and Windows builds pass under a temporary HOME. The full
nogui suite passes except TestCodexArchivedSameSizeRewriteInvalidatesDiscovery
in sessions, also reproduced separately with -race -count=20.

Amp-Thread-ID: https://ampcode.com/threads/T-01a11791-db8b-7229-ade8-5e3600b835fc

Co-authored-by: Amp <amp@ampcode.com>
2026-10-08 05:37:56 +08:00
yetone 4150dfc079 provider: Volcengine Ark (火山方舟) is a preset, its Coding Plan, Agent Plan and pay-as-you-go (tcdw: 提供一个选项能够取消自动给 LLM 提供商地址补全 /v1/ 的默认行为) — volcengine, a first-party vendor with a Plan picker: Coding Plan (default) at https://ark.cn-beijing.volces.com/api/coding/v3 for chat completions and Responses and /api/coding for messages (套餐概览 docs/82379/1925114, 快速开始 1928261; its Codex page 2556056 sets wire_api "responses"); Agent Plan, which tcdw is on, at /api/plan/v3 (chat completions and Responses, its Hermes Agent page 2373743) and /api/plan (其他工具 2373746, Claude Code 2373740), with a key of its own; pay-as-you-go at /api/v3 (兼容 OpenAI SDK 1330626, 创建 Response 1569618), which both plans' pages warn bills apart from the plan — no Anthropic endpoint is documented for it. Its models (ark-code-latest, whichever the console picked, then doubao-seed-evolving, doubao-seed-2.1-pro/-lite, doubao-seed-2.0-mini, minimax-m3, glm-5.3, glm-5.3-flash, deepseek-v4.1-flash, deepseek-v4-flash, deepseek-v4-pro, kimi-k2.7-code, kimi-k2.8-preview, kimi-k3, lowercase as the quick-start page gives them) are shown until a list is fetched; no models.dev catalog is tied to it, as its volcengine one has pay-as-you-go's dated ids and volcengine-coding-plan misses the Agent Plan's. Key from ark.volcengine.com/region:cn-beijing/apikey. Their versioned paths go out as written (previous commit). Icon is lobehub's volcengine-color, as the others are; the import page offers its three plans 2026-09-29 01:19:06 +08:00