What changed: when Claude Code's settings.json points at the gateway,
readClaudeSettings swaps in what routing stashed. It took the endpoint,
token and main model but left the claude.env.<VAR> keys behind — the
tier models (ANTHROPIC_DEFAULT_*_MODEL), ANTHROPIC_SMALL_FAST_MODEL and
CLAUDE_CODE_SUBAGENT_MODEL that routing set aside with them
(internal/agent/claude.go, "back with it when magpie steps out"). The
import entry then offered only the main model where stepping out would
have restored six more. The claude.env.* keys now come back with the
three, as Disconnect would put them.
Run: go test -tags nogui -run
'TestClaudeImportWhileRoutedTakesTheStashedEnv|TestClaudeConfigDirImport|TestImport'
./internal/provider/ green; the new test red on the parent (models
[claude-sonnet-5] miss claude-sonnet-5-x); gofmt -l clean; go vet and
build green on darwin (nogui), linux (nogui) and windows. Not run: the
GUI suite; trayimage cgo and ld warnings on darwin are known noise.
Generated-by: GLM-5.3-Flash (ZCode)