Files
magpie/docs
yetone 2a8a9aecfa provider: signing out of ChatGPT and Devin's CLI checks go through the account's own proxy, as its sign-in does (#1663, demystify0137)
What changed: two siblings of 3a53d06d9 still left through the global
proxy, so an account's sign-out or its CLI checks came from a different
exit than its sign-in and requests.

- chatgpt_api.go forgetSIWCLogin: the refresh-token revoke (discovery and
  revocation endpoint) goes through ViaLogin for that account, read
  before the account is forgotten.
- devin_accounts.go devinCommand: `devin auth status` and `devin models
  list` run with the proxy ctx names (a sign-in's), else the account's own
  (devinProxy: the logins.json entry for that home, the CLI's own for "",
  ProxyOfLogin; the subscription's for a home not kept yet), via
  netproxy.EnvWith, where it was netproxy.Env (global).
- devin.go: askDevinStatusAt/askDevinIdentityAt/addDevinLogin take the
  sign-in's ctx, so the probe naming a just-signed-in account uses the
  proxy the sign-in goes through. askDevinIdentity had no caller left and
  is removed.
- docs/subsystems/providers-accounts.md says so.

What was run:
- go test -tags nogui ./... (sandbox HOME) ok; gofmt -l clean; GOOS=linux
  and GOOS=windows go vet -tags nogui on the touched packages.
- New TestChatGPTSignOutGoesThroughItsProxy and
  TestDevinCLIGoesThroughItsProxy (internal/provider/signin_proxy_test.go).
  Red by hand: the revoke with context.Background() (it dials
  openai.invalid directly); devinCommand without devinProxy (models and
  status run with no proxy); askDevinStatusAt ignoring the sign-in's ctx
  (the new account's probe runs with the subscription's proxy, not the
  picked one).

Not tried: a real ChatGPT or Devin account through a real proxy.
Left out on purpose: a `--proxy` flag for `magpie accounts add`, and the
installer's downloads (global proxy).
2026-10-12 03:07:11 +08:00
..