Commit Graph
1 Commits
Author SHA1 Message Date
yetone 0fb4ff17ba agent: Snow CLI's thinking level is set from the Agents page, from the levels magpie's model has (#1457)
zRain (#1457) asked for thinking.effort, responsesReasoning and
responsesVerbosity. magpie's profile asks the gateway on Chat
Completions (requestMethod "chat"), and on that protocol Snow 0.9.2
reads chatThinking only (api/chat.ts: enabled sends reasoning_effort;
unset or disabled sends thinking {type: "disabled"}). thinking.effort is
the Anthropic method's, responsesReasoning and responsesVerbosity the
Responses method's, so none of them would change a request of magpie's
profile, and they aren't written.

A "thinking" field, as Pi's and dsh's, writes chatThinking {enabled:
true, reasoning_effort: <level>} the way Snow's own settings screen does
(ui/pages/configScreen/useConfigState.ts), on magpie's profile only, and
copies it to config.json. Its levels are the catalog's for the model
picked through magpie, after a default that says Snow takes off then;
a model that lists none offers none. Clearing it deletes chatThinking.
A chatThinking the user had on the profile magpie's was made from comes
along and is shown as theirs; it is only changed when picked here.
Enabled with no level reads as "on". On a profile of the user's own the
field is empty, offers nothing and refuses a pick.

Tests: TestSnowThinking, with a user profile in Snow's own format
carrying chatThinking: shown as theirs, levels offered, a pick written
and mirrored, kept through Sync, none offered for a model without
levels, cleared to Snow's default, the user's profile untouched. Writing
a fixed level instead of the pick fails it ("chatThinking: map[enabled:
true reasoning_effort:high]"). TestSnow* and TestSync* pass under a temp
HOME with pinned caches.

GUI: snow-fields.test.cjs (Chromium and WebKit, en/zh/zh-TW/ja/de,
window at 1240 and 720, tray panel at 440): on magpie's profile the row
draws the small and thinking pills, the thinking default reads "default
(off)" in each language and no pill runs past the row; on a profile of
the user's own neither is drawn. With the small key taken out of app.js
none() it fails 5 cases. The agent field, layout, effort and subagent
GUI tests pass beside it (156 tests), and go test ./... passes under a
temp HOME.

Real Snow CLI 0.9.2 (sandbox HOME made by Snow itself): with magpie's
profile written by this code (model relay/glm-4.6, small relay/glm-4.5v,
thinking high) and its baseUrl pointed at a fake server, `snow --ask`
sent its turn as relay/glm-4.6 with max_tokens 131072 and
reasoning_effort high, and its light request as relay/glm-4.5v.
2026-10-10 18:20:56 +08:00