Volcengine Ark's plans lock the sampling parameters of the Kimi models
they serve: any request carrying temperature != 1 is refused 400
"Volcengine Ark: `temperature` only 1 is allowed for this model"
(#4495, kimi-k3.1-pro / kimi-k3 / kimi-k2.8-preview at
ark.cn-beijing.volces.com/api/coding/v3), before any token is read —
clients that send their own defaults (Claude Code, Copilot) fail every
call, and a routing group spends its failover window on each try.
kimiLockedSampling already drops temperature and top_p for the locked
models on Moonshot's own endpoints (#1197), but its isKimi guard knows
only Moonshot's hosts and presets, so the same models behind an Ark
host went through with the fields. The refusal names the model ("for
this model"), not the path, and the preset's Agent Plan and pay-as-you-
go regions list the same kimi-kX.Y models, so the guard now also takes
isArk — the ark.<region>.volces.com check the draw and video code
already uses, which covers the preset's plans and a provider added by
hand — and kimiLockedSamplingModel keeps deciding per model, as it
already does for kimi-k2.5 and later, kimi-for-coding* and k3*. Ark's
other models (doubao, glm, deepseek, minimax) are untouched, as is
everyone not served by Moonshot or Ark.
Run: TestKimiLockedSampling in internal/gateway grew four cases (the
coding plan's chat and anthropic routes, an Ark model the server
doesn't lock, a provider added by hand on an Ark host): the three drop
cases fail on the unmodified code and pass with it, the keep case
passes throughout. go test -tags nogui ./internal/gateway ok (499s);
gofmt clean; go vet -tags nogui on darwin, linux and windows clean;
go build -tags nogui ./... on darwin, linux and windows ok.
Generated-by: GLM-5.3-Flash (ZCode)
Reviewed and run by yetone at the batch head over cac655c14 (this commit,
the four others from ggbdpq's #4495/#4548/#4512/#3260 patches and the
#4548 follow-up), on mote:
- gofmt -l clean; go vet ./... for darwin, linux (-tags nogui), windows;
go build ./... for darwin and windows.
- go test -tags nogui -count=1 -timeout 45m ./...: every package ok but
internal/gui, with two filed reds: TestSettingsSaveKeepsWhatItDoesNotSend
(#4514), red alone at origin/main cac655c14 too, and TestColdTurnsTaken
(#4510), red only in the full run. Rebased afterwards onto e94fb18b8,
a usage-page change that touches none of these files.
- Windows (xiaomi-gpu): go test -run 'TestVSCode|TestClaudePicker'
./internal/agent ok. TestCopilotFolderFromAnIDEPluginIsNotTheCLI is red
there at cac655c14 too (#1827).
- Broken by hand: guard back to !isKimi(p, to) -> three TestKimiLockedSampling subtests red (volcengine coding plan, its anthropic endpoint, a hand-added Ark host). Not tried: a real Volcengine Ark Kimi request.