MOMO asked on Discord, "外置模型能不能提供思考深度选项": the model that
describes images (Image recognition, analyze_image) and the searcher's
model (e.g. Antigravity's Gemini 3 Flash) had no reasoning level of
their own to pick.
Settings › Models now has a chip beside each of those two pickers. It
opens the app's menu (openProtoMenu, no native select) and offers
Default plus only the levels that model has (Efforts, weakest first;
none shown when the model's levels aren't known, or the row is Off).
The pick is saved as settings.visionEffort / searcherEffort, one of
catalog.EffortRank or empty, and is checked on save. prefsKeep carries
both, so saving another setting keeps them.
Default keeps what magpie did before. Image recognition is still asked
at the least level the model has (classifyEffort), and the searcher
still gets no level. A picked level is fitted to the model's levels at
call time (fitEffort), and only these two calls carry it
(side_effort.go):
- askVisionWith sends reasoning_effort. The image cache key includes
the level, so changing the level reads the image again.
- searchBody puts thinking (disabled for none, else enabled with
budgetOf's budget) and output_config.effort (except for pre-adaptive
Claude) on the searcher's Anthropic body. The gateway's translation
turns that into each vendor's own form: adaptive or between_tools
for new Claude, reasoning.effort for Responses, and thinkingLevel
for Gemini 3 on Code Assist / Antigravity.
- A picked level raises max_tokens by its budget (replyRoom), so the
thinking doesn't eat the reply.
- ownSearch and Kimi's search service are sent no level. A fallback
searcher is sent the level fitted to its own model.
docs/subsystems/gateway-routing.md: new "How hard a side model thinks".
Tests:
- TestVisionEffortPicked and TestVisionEffortOnAnthropic check the
vision body.
- TestSearcherEffortPicked checks the searcher body on new Claude, old
Claude and Responses.
- TestSearcherEffortOnGemini checks the searcher body through
buildCodeAssist for antigravity.
- TestSideEffortChecked covers settings validation.
- side-effort.test.cjs covers the chips: levels shown, a pick saved,
Default clears it, toggle and Escape, no scroll, fit in the row and
the menu inside the window. It runs in Chromium and WebKit at 1100
and 420, in en/zh/zh-TW/ja/de.
Run:
- go test -tags nogui ./internal/gateway/ (full, -timeout 30m) on
origin/main 3a9d73c5c + this change: everything passes except
TestRateLimitIsWaitedOut "an hour away" (1.9s against its 1s bound,
load ~190). That test passes on freshly fetched origin/main 41972b25f
alone (-count=10) and in 8 parallel -cpu 1 copies. Filed as #1971.
- go test -tags nogui ./internal/settings/ ./internal/gui/: ok.
- Broken by hand, each goes red:
- searchBody dropping the effort fails TestSearcherEffortPicked and
TestSearcherEffortOnGemini;
- askVisionWith back to classifyEffort fails TestVisionEffortPicked
and TestVisionEffortOnAnthropic;
- the settings check removed fails TestSideEffortChecked;
- prefsKeep without the two fields fails side-effort.test.cjs.
- GUI:
- side-effort.test.cjs: 10/10.
- searcher-pick, images-*, vision-mcp, settings-search/sections/
general, routing-vision-why and i18n-keys: 123/123.
- 67 more Settings files: 778 pass. text-size "zh, dark ... 150%"
failed in WebKit under parallel load; it passes 11/11 alone and is
#1866.
- gofmt -l is clean. go vet passes for darwin, plus GOOS=linux and
GOOS=windows with -tags nogui, on gateway, settings and gui. go build
passes.
- Not tried against a real Antigravity or other real account: the
request shapes are checked against fakes and the gateway's own
translators.