Files
magpie/docs
yetone d1c485f7e9 agent: a model at max without xhigh tells Claude Code it has xhigh, so Ultracode shows on GLM, DeepSeek and Kimi in Claude Desktop
leesunrise2364 on Discord: Claude Desktop on magpie has no Ultracode effort,
which cc-switch had, and Ultracode is what turns on dynamic workflows.

Desktop 2.7032.0 shows Ultracode only when the model's effort options
include xhigh and Claude Code takes it. magpie lists a model with known
levels to Desktop as mythos-magpie-<n>, whose options include xhigh, and
tells Claude Code what each model can do in CLAUDE_CODE_MODEL_CAPABILITIES.
That value said only the levels magpie knows the model has. GLM-5.3
(low/high/max), DeepSeek V4 (high/max), Kimi K3 and the like reach max
without xhigh, so they were written as "effort,max_effort", and Claude Code
refuses Ultracode there: "Ultracode isn't available on <model>". cc-switch
names its models as real Claude ids, which Claude Code already knows have
xhigh.

A model Claude Code doesn't know whose levels reach max now also gets
xhigh_effort. The gateway already runs xhigh at max for such a model
(fitEffort: a tie goes up), so no level the model doesn't take is sent.
Claude models Claude Code knows are unchanged: Opus and Sonnet 4.6 still
get no xhigh, as Claude Code's own table has it. Models that top out at
high, or have no known levels, are unchanged too.

Tests: TestClaudeModelCapabilities gets v/glm (low/high/max) and v/top
(high/max), both now "effort,xhigh_effort,max_effort", while
v/claude-opus-4-6 stays "effort,max_effort". TestClaudeCapabilitiesSync's
w/b (low/max) now has xhigh_effort. TestFitEffort covers xhigh to
[high,max] going out as max. With the change turned off by hand, both
agent tests go red on exactly those values.

Run:
- Real Claude Code 2.1.299 in a sandbox HOME, gateway mode
  (CLAUDE_CODE_USE_GATEWAY=1), `-p '/effort ultracode'`, with the value
  magpie's own code wrote for v/glm-5.3 at low/high/max
  ("v/glm-5.3=effort,xhigh_effort,max_effort") printed "Ultracode on (this
  session only): dynamic workflows on every task". The old value
  "effort,max_effort" printed "Ultracode isn't available on v/glm-5.3".
  The same pair was run for Desktop's id mythos-magpie-7, with the same
  two results.
- gofmt -l is clean. go vet passes for darwin, GOOS=linux -tags nogui and
  GOOS=windows.
- go test ./internal/agent passes when run alone (1110s at load ~250),
  and so do the caps and fitEffort tests.
- The full go test ./... ran twice at load average ~300.
  - The first run hit internal/provider's 10m timeout (#2051).
  - The second run (-timeout 30m) had these reds:
    - internal/agent and internal/gateway passed 30m as whole packages;
    - TestAgentGoneInTheRetryPause/last_one_left (#2175's sibling);
    - TestMainWindowCorners was killed at its deadline (#1936).
  - None of these is in code this commit touches.

Not tried: a live Claude Desktop. The packaged app won't start on a
sandbox user-data dir, and the live Desktop config is not to be touched.
So Desktop's effort menu showing Ultracode was not seen. It rests on
Desktop's renderer code (the Ultracode gate needs xhigh among the options
and the claude_code_workflows capability) and on the Claude Code probe
above.
2026-10-14 20:51:01 +08:00
..