cybercaius on Discord, after v0.1.2033: in Claude Desktop's Code tab he
chose a DeepSeek model and turned Cowork off, yet the connection check
Desktop sends as it starts did not go to DeepSeek. He asked whether it
follows Cowork's default model.
Cause: Desktop names the check's model itself, by name: the shortest
listed id with haiku in it, else sonnet, else opus (YT/lWt in its
app.asar 2.7032, read again from the installed app). Since ee6f8866f
magpie sent it to desktopDefault, the first model listed to Desktop
(its default for a new session), not to the model chosen in the menu.
So it went to whatever was first on the Agents page, another provider.
Desktop keeps each model menu's choice in its userData:
Claude-3p/local-agent-mode-sessions/<account>/<org>/
cowork_account_settings.json, "__model_selector_state":
{"code":{"model":…},"cowork":{…},"chat":{…}} (wLt, zLt, J1t in the same
app.asar; the file exists on the Windows box's 3p Desktop, holding only
__created_at as no menu was changed there). desktopChosen reads the
newest such file and the check now goes to a chosen model magpie still
serves: the one the last session ran on (desktopPicked) first, then
Code, Cowork, Chat. A choice magpie no longer serves, no file, or one
not parsed leaves it to desktopDefault as before, so the days-old
session model ee6f8866f kept it from is not used on its own. Nothing
is written; it is read only for the check (start and Test connection).
Run (mote, at this tree):
- go test -tags nogui ./internal/gateway/ -run
'TestClaudeDesktopProbe|TestDesktopProbe': ok, with the new
TestClaudeDesktopProbeToChosenModel (no choice; Code on DeepSeek;
"[1m]"; Code before Cowork; the last session's menu first; an unserved
choice; a half-written file)
- go test -tags nogui -timeout 45m ./internal/gateway/: ok (526s), at
9f25de56c; after the rebase onto af1d9c456 (13 gateway files changed
there), -run 'Desktop|Probe|Title': ok
- go vet ./internal/gateway/ for darwin, GOOS=linux -tags nogui and
GOOS=windows: ok; gofmt -l: clean
Broken by hand: desktopChosen returning "" (the old routing), the new
test is red: "Code tab on DeepSeek: the check went elsewhere
(…"model":"claude-haiku-5-5")".
Not tried: a real Claude Desktop choosing a model in its menu and
starting against magpie; that the 3p menu writes the file is read from
its code, not seen. alwaysStartWithDefaultModel (an admin setting that
makes Desktop ignore the menu's choice) is not read.
Docs: docs/subsystems/gateway-routing.md's check paragraph.