A routing group is listed to Claude Desktop by its mythos-magpie-<n>,
never as the Claude model its first member is (claudeLooking), so the
Code tab's Claude Code doesn't know it by that id. A pick's
inferenceModels entry got behavesAs only when the pick wasn't a Claude
model (claudeModel), which a group led by one is: the entry had no
behavesAs, and Claude Code ran the tier with its generic prompt and
defaults (seen with auto/claude-sonnet-5-5 picked for haiku).
desktopRunsAs decides by the id the entry is listed by: nothing where
Claude Code knows a Claude model by that id (magpie-<n>.anthropic.<model>
or the model's own id), the Claude model the entry is where it is listed
by mythos-magpie-<n> or anthropic/magpie-<n>, else the tier's newest
Claude model, as before. DesktopBehavesAs follows, so Claude Code's
modelSettings tell the group its own window (claudeBudget.behaves).
Ported from mdwsk88's desktop-tier-shared-pick (eb802f763), reviewed line
by line, unchanged.
Run on mote (go1.26.8), at this commit and the next together:
- TestDesktopGroupPickRunsAsItsModel ok; with desktopRunsAs's mythos/alias
branch taken out by hand it is red ("the group, shown as
mythos-magpie-4305132155, runs as <nil>; want claude-sonnet-5-5"), as is
the next commit's own-id subtest.
- go test -run 'Desktop|Claude|Alias|Tier' ./internal/gateway
./internal/agent: ok. go vet darwin, linux (-tags nogui), windows on
both packages, go build ./...: ok. gofmt -l: nothing.
Reported-by: dawei (Discord)
Co-authored-by: mdwsk88 <11055210+mdwsk88@users.noreply.github.com>