Files
magpie/docs
yetone ec3dad75ae provider, gateway, gui, cli: Claude's accounts can be kept to Claude Code's own sign-in, magpie serving nothing on them (myduso)
myduso on Discord asked for an exclusive mode on Claude's subscription:
switch the credentials locally and proxy no traffic, since Claude Code
is used on its own and the SDK run magpie's bridge makes spends more of
the allowance than the interactive client.

The switch-only setting Codex has (#1907) now also takes claude. On it,
Provider.KeptToAgent is true and On() false, so the gateway, catalog,
groups, fallbacks, search, draw and embeddings serve nothing on the
Claude accounts, and a request naming them is refused 404 saying they
are kept to Claude Code's own sign-in and how to undo it (switchedOff).
Switching Claude Code's sign-in when an account is used up, and reading
usage, go on: both are gated by leftAlone on the raw Off, which this
doesn't set. Groups magpie found keep their Claude members
(heldOffEntries). Nothing is sent as Claude Code: magpie only writes and
restores Claude Code's own credentials as it already did.

GUI: the tick under Claude's accounts, shown with one account too, drawn
by the block Codex's tick had (one block now, its strings picked by
agent). app.js stays under its budget with no raise (1,311,711 of
1,311,735). CLI: magpie accounts switch-only <codex|claude> [on|off].
Docs: reference.md, subsystems/providers-accounts.md.

Run on mote at this tree on 06950fbbb; then rebased on aeacc6358 (two
app.js comments shorter) and go test -run TestCoreScriptBudget ./internal/gui
run again at the pushed head: ok.
- gofmt -l internal: clean. GOOS=linux go vet -tags nogui ./internal/...
  and GOOS=windows go vet ./internal/...: ok.
- go test -tags nogui -count=1 -timeout 45m ./internal/provider
  ./internal/gateway ./internal/cli ./internal/gui: all ok.
- node --test (Chromium + WebKit, every language the file covers):
  claude-switch-only (new), switch-only, keep-login, i18n-keys, gui-ja,
  gui-de, gui-zh-tw: 85 of 93 in one run beside other sessions' full GUI
  suites (load 23-73); the 8 reds (claude-switch-only chromium en/zh,
  gui-de and gui-ja in both engines) were not captured, and those files
  then passed alone twice (35 of 35 each run).
- Earlier, at ecbd694a2 (on ddf31ca30): internal/agent ok; add-sheet,
  api-key-usage pass; account-models and account-proxy 40/40 alone after
  8 browserType.launch timeouts at load 40-70 from other sessions.

Broken by hand, watched red:
- On() without the KeptToAgent term: TestClaudeSwitchOnlyServesNothing-
  AndStillSwitches and TestClaudeKeptToClaudeCodeServesNothing fail (the
  gateway ran Claude Code through the bridge, 200).
- SetSwitchOnly refusing claude: both fail.
- app.js without the claude branch: claude-switch-only 16/16 red in
  Chromium, switch-only (Codex) 16/16 green.

Not tried: real Claude accounts or a real Claude Code (the switch itself
is the existing path, tested with a fake claude in a sandbox HOME); the
whole GUI suite (only the files that open Claude's or a provider's
editor, plus the i18n ones); Linux and Windows test runs (vet only).
2026-10-29 04:15:56 +08:00
..