Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.
codex: magpie as Codex's provider keeps the Codex app's ChatGPT account while it has room, so its Work chats and projects stay
yetone72ca3d593bd5
diff --git a/docs/subsystems/agent-wiring.md b/docs/subsystems/agent-wiring.mdindex f06a49ff4..9ae9be5ab 100644--- a/docs/subsystems/agent-wiring.md+++ b/docs/subsystems/agent-wiring.md@@ -115,7 +115,7 @@ something else shows up as drift.- `unreachable` never sets anything: the config is right, and the page's pill only says what has to listen. The exception is an address a WSL distro reached Windows at before (`distro.Was`, kept in `wsl.json`) while it reaches Windows at another now: the pill offers that one, and `Reapply` moves the config there (`Agent.move`, Codex's `codexMoveGateway`). An address no distro was seen at is the user's own and is never moved. An unknown answer (no probe yet) and a gateway down on loopback too are not drift. Tests stub `reachProbe` in `TestMain`. A WSL twin's address on a WSL network is asked from inside the running distro (`reachFrom`, `wslReach`: curl, wget or bash's /dev/tcp), never from Windows, where the gateway's own listener answers whatever the firewall keeps out. A distro that can't connect is told the firewall rule that lets it in (`wslFirewallCommand`). A stopped distro is never run to be asked, and one with nothing to ask with is not drift.- `proxied` (Muma102kMichael on X: every project and every new chat 502 after magpie took Codex over) is this machine's Codex sending its requests for the gateway through a proxy that doesn't pass them on, while the gateway answers here ([`codex_proxy.go`](../../internal/agent/codex_proxy.go)). Codex's reqwest takes `HTTP_PROXY`, else the system's proxy for `http://` (macOS' HTTP entry alone, never its HTTPS or SOCKS one; Windows' `ProxyServer` only when it is one address for every protocol), else `ALL_PROXY`, and lets only an exact IP or a CIDR in `NO_PROXY` (on Windows, with no `NO_PROXY`, the bypass list with `*.` taken out) keep 127.0.0.1 off it: `127.*` and `localhost` don't, and macOS' exceptions aren't read. With `[features] respect_system_proxy` it asks the system alone, matching its list itself, wildcards and `<local>` included, and goes direct when no proxy is set there; a macOS SOCKS entry alone it can't use, and takes `HTTP_PROXY`/`ALL_PROXY` then (codex-rs `outbound_proxy`; tried with codex-cli 0.162.1). Its reqwest has no SOCKS, so a `socks5://` proxy is spoken to as an HTTP one, and the probe does the same. The environment is Codex's: the login shell's `*_PROXY` (`proc.LoginEnv`, which a terminal's Codex and the ChatGPT app's both have; only exported ones, as the probe asks a child `/bin/sh` for them, so fish's unexported universal `http_proxy` doesn't count, #2627) over magpie's own, which a magpie opened from the Dock lacks (liu_dyj on X: a `NO_PROXY=127.0.0.1` in the profile, or a macOS proxy with no HTTP entry, warned while Codex went direct). `codexProxyFor` works out that proxy the same way, and a `GET /` through it must come back as magpie's (`proxyProbe`), tried as `reachable` is. Its pill says how to fix it, as `unreachable`'s does, naming the proxy and the variable it was read from, `http_proxy` or `HTTP_PROXY` as it is (`Addr`, `Detail`), through `netproxy.Redact`, without its user and password (#1886), while the probe goes through it whole, and the dialog has Disconnect from magpie. Account failover, which magpie writes uninvited, waits for that probe (`codexProxyOK`) and isn't written while the proxy doesn't pass Codex on, and one it wrote goes again. Tests stub the env, the system proxy and `proxyProbe` in `TestMain`.- Listing never starts a stopped WSL distro. A stopped distro's agent shows what was last seen there (`asleep`, `wsl.json`); setting one of its fields writes its files, which starts the distro.-- Codex's sign-in (`login`) is ChatGPT (`""`, the default), Always ChatGPT (`chatgpt`) or magpie API (`api`). With ChatGPT, magpie's models join Codex's own beside the sign-in (`openai_base_url`), and while the Codex app holds the ChatGPT account Codex is signed in to (`codexUsedUp`, `provider.CodexUsedUp`: OpenAI no longer allows the account and it has no credits left, a workspace still within its overage excepted), magpie is made Codex's provider (`codex.out`): the Codex app sends nothing at all on an account it holds, a magpie model's turn included (#540), and as a provider of its own magpie is past that. A window at 100% with credits left doesn't count, and Codex stays signed in. Sync puts it back beside the sign-in once the account has room. Always ChatGPT never does that: Codex stays in its ChatGPT state, and the Codex app may send nothing till the account has room, while Codex CLI's turns still reach magpie by the base URL, and its routing and other accounts serve them. With magpie API, Codex's `getAuthStatus` returns no token (its provider has no `requires_openai_auth`), so its Chrome control turns away; the option's note says to pick ChatGPT to keep it (#1824). The same holds while magpie is Codex's provider for `codex.out`, so the Agents row opened over that takeover names browser use among what is off and offers Keep on ChatGPT right there (`keepChatGPT`, posting `login` = `chatgpt`); picked on one of Codex's own models taken over (`codex/<model>`), `set` puts Codex back on its sign-in at once, `model_provider` and `model_catalog_json` gone, where it had left magpie the provider (eddie.zhan on Discord, `TestCodexOwnModelOutThenKeptOnChatGPT`). While magpie is Codex's provider (magpie API, or `codex.out`), `Joined` reports false although the `codex.joined` mark stays for Sync's way back: the Agents row said Codex's own models stay in `/model` beside magpie's, the ChatGPT state the Codex app blocks sending in, and the app only leaves that state once it is restarted (#2267, `TestCodexProviderIsNotJoined`). A Codex that reaches the gateway from another machine (a WSL distro under NAT, or `MAGPIE_ADDR` pinned beyond loopback, `onAnotherMachine(at.gw())`) is wired as one with no ChatGPT sign-in (`chatGPT()` is false there): never joined or beside, since beside its sign-in it would send its ChatGPT token to `/backend-api/codex`, and from there the gateway takes a named key alone, so every request was a 401 (#2145, `TestCodexBeyondLoopbackNotJoined`). magpie is its provider and it sends `gwKey()`, the LAN sharing key; one of its own models picked goes straight to OpenAI on its sign-in.+- Codex's sign-in (`login`) is ChatGPT (`""`, the default), Always ChatGPT (`chatgpt`) or magpie API (`api`). With ChatGPT, magpie's models join Codex's own beside the sign-in (`openai_base_url`), and while the Codex app holds the ChatGPT account Codex is signed in to (`codexUsedUp`, `provider.CodexUsedUp`: OpenAI no longer allows the account and it has no credits left, a workspace still within its overage excepted), magpie is made Codex's provider (`codex.out`): the Codex app sends nothing at all on an account it holds, a magpie model's turn included (#540), and as a provider of its own magpie is past that. A window at 100% with credits left doesn't count, and Codex stays signed in. Sync puts it back beside the sign-in once the account has room. Always ChatGPT never does that: Codex stays in its ChatGPT state, and the Codex app may send nothing till the account has room, while Codex CLI's turns still reach magpie by the base URL, and its routing and other accounts serve them. Codex's app-server answers `account/read` and `getAuthStatus` with no account and no token for a provider without `requires_openai_auth`, and the Codex app then switches to an identity of no account: its ChatGPT mode's chats and projects ("Work") are gone, with its Chrome control (#1824) and cloud tasks, while magpie's models still answer (Qyburn3 on X). So `[model_providers.magpie]` says `requires_openai_auth = true` while Codex has a ChatGPT sign-in with room (`openaiAuth`: `codexChatGPTKnown` and not `codexUsedUp`), magpie API included; Codex still sends magpie's key (`experimental_bearer_token`) and no ChatGPT-Account-ID, with the same tools (tried with ChatGPT.app 26.1021 and its codex 0.164.0-alpha.11 against a capturing server). Not for an API key alone (Codex drops its image tool for a provider requiring OpenAI auth, `uses_openai_actor_authorization`), no sign-in (the app would ask for one), or a sign-in the Codex app holds: the app would read its rate limit again and grey Send for magpie's models too, which `codex.out` exists to get past. Sync writes the key in or takes it out as the sign-in or the allowance changes, an older magpie's table included (`authStale`), and the key is part of the app-server's route (`codexAppRoute`), so the Codex app is restarted onto its account (`TestCodexMagpieProviderKeepsChatGPTAccount`, `TestCodexAppRouteFollowsOpenAIAuth`). While magpie is Codex's provider for `codex.out` the app has no account till the reset, so the Agents row opened over that takeover names browser use among what is off and offers Keep on ChatGPT right there (`keepChatGPT`, posting `login` = `chatgpt`); picked on one of Codex's own models taken over (`codex/<model>`), `set` puts Codex back on its sign-in at once, `model_provider` and `model_catalog_json` gone, where it had left magpie the provider (eddie.zhan on Discord, `TestCodexOwnModelOutThenKeptOnChatGPT`). While magpie is Codex's provider (magpie API, or `codex.out`), `Joined` reports false although the `codex.joined` mark stays for Sync's way back: the Agents row said Codex's own models stay in `/model` beside magpie's, the ChatGPT state the Codex app blocks sending in, and the app only leaves that state once it is restarted (#2267, `TestCodexProviderIsNotJoined`). A Codex that reaches the gateway from another machine (a WSL distro under NAT, or `MAGPIE_ADDR` pinned beyond loopback, `onAnotherMachine(at.gw())`) is wired as one with no ChatGPT sign-in (`chatGPT()` is false there): never joined or beside, since beside its sign-in it would send its ChatGPT token to `/backend-api/codex`, and from there the gateway takes a named key alone, so every request was a 401 (#2145, `TestCodexBeyondLoopbackNotJoined`). magpie is its provider and it sends `gwKey()`, the LAN sharing key; one of its own models picked goes straight to OpenAI on its sign-in.- Whether Codex is signed in to ChatGPT is read from its auth.json or keychain item (`codexChatGPTKnown`, `provider.CodexSignInKnown`). Codex rewrites auth.json in place when it refreshes its tokens (codex-rs `FileAuthStorage::save` opens it with truncate), so a read in that moment finds it empty or cut off, and a keychain read can fail for a moment. Such a read is unknown, and Codex is taken to be as magpie last wired it (joined, beside, or `codex.out`); only a sign-in that isn't there (no auth.json, no item) or holds no ChatGPT token is "not signed in". Taking an unknown read for "not signed in" made Sync or a pick move Codex from beside its sign-in to magpie as its provider, with no `codex.out` to bring it back, and the Codex app showed "magpie" for its account and magpie's catalog for its models, on and off (lucy on Discord, v0.1.1394; `TestCodexHalfWrittenAuthKeepsSignIn`, `TestCodexHalfWrittenAuthKeepsOut`, `TestCodexSignInKnown`).- Codex signed in to ChatGPT and not connected still gets `openai_base_url` while more of its ChatGPT accounts are on in magpie (`failover`, stash `codex.failover`; with a CC Switch mirror as its provider, the mirror's `base_url` and `codex.mirror_failover`), so a turn its own account has no allowance for goes on to the next — never for a Codex that reaches the gateway from another machine, where that path takes a named key alone and the failed-over turn came back a 401 (#2145, `TestCodexFailoverBeyondLoopbackNotWritten`); Sync takes one it wrote before off again. That Codex is `FailingOver`: not `Wired`, yet its requests go through magpie. The Agents row says so and what turns it off (`FailoverSaid` in the CLI and TUI, `failover` in `/api/state`, a button to Providers › Codex in the GUI), and the gateway hands it only its own models from `/backend-api/codex/models` (`CodexOwnOnly`, set on `gateway.CodexOwnOnly` by main; its ETag carries `provider.CodexOwnListTag`, and Sync ages a `models_cache.json` without it). A connected WSL Codex shares the gateway path, so while one is connected every Codex gets magpie's models (#1385). A base URL the user wrote by hand (#856) isn't failover's and stays a plain not-connected row. A Codex the user disconnected gets no failover till they connect it again. The app serving the gateway takes failover out as it quits (`EndFailover`, `EndCodexFailover` in `OnShutdown`), so a Codex left on its own goes straight to OpenAI rather than retrying a gateway that's gone (Leon920717 on X); the next start's Sync writes it again. Codex's app-server read the old base URL as it started and keeps it, and `KeepCodexDaemonCurrent` ends with magpie, so `EndCodexFailover` restarts it there when no codex session is on it (`codexDaemonCheck`); with one on it, it stays on the gone gateway until the user restarts it (thisisvainxx on X: "several restarts"). Every restart magpie makes runs `codex app-server daemon restart` as its own responsible process on macOS (`proc.CombinedOutputOwn`, a disclaimed `posix_spawn`): the daemon works in the folder of each codex attached to it, and as magpie's child the first codex in ~/Desktop had macOS ask for the Desktop folder in magpie's name (reformed9448 on Discord; `TestRestartedCodexDaemonIsNotMagpies`). A magpie built without cgo (the CLI) still restarts it as its own child. A connected Codex keeps magpie as it quits: its model is one of magpie's, and Disconnect is what puts its own config back. A magpie that ends without quitting (killed, a crash, `magpie serve`) leaves failover in place.- A Codex thread keeps the provider it was started on. While a magpie model is on, CC Switch's provider tables go through magpie too (`takeTables`), and get their own base URL back when Codex steps off magpie (`giveTables`, stash `codex.tables`). CC Switch's OpenAI mirror (a table of another id, `name = "OpenAI"`, `requires_openai_auth`, no `base_url`) isn't reached by `openai_base_url`, which takes only the built-in provider to magpie: a thread started on it and reopened went straight to ChatGPT, which refused the magpie model picked in it, and magpie never saw the request (#1796). While Codex goes to magpie by the base URL, `takeMirrors` gives each such mirror magpie's ChatGPT backend as its `base_url` (stash `codex.mirrors`), and `giveMirrors` takes it off again; a mirror a profile names, or one whose `base_url` was changed since, stays as it is. Moving the threads onto another provider is the Sessions page's Move (#887).diff --git a/internal/agent/agents.go b/internal/agent/agents.goindex 7cba1f772..d16716920 100644--- a/internal/agent/agents.go+++ b/internal/agent/agents.go@@ -76,6 +76,10 @@ func codexAppRoute() (route string, out, known bool) {}t, _ := edit.GetTOMLTable(a.Path, "model_providers."+magpieID)b.WriteString("magpie.base_url=" + t["base_url"] + "\n")+ // and whether it requires OpenAI auth, which decides whether the app+ // has its ChatGPT account at all (openaiAuth in codex.go): read as the+ // app-server starts, like the rest+ b.WriteString("magpie.requires_openai_auth=" + t["requires_openai_auth"] + "\n")// and the list in that catalog, which the app-server also reads only// as it starts: a provider or group renamed, or a model added, left// the app on the names and models it started with (lucis0116 on X)diff --git a/internal/agent/codex.go b/internal/agent/codex.goindex 4f101d5ec..e0c32b86e 100644--- a/internal/agent/codex.go+++ b/internal/agent/codex.go@@ -49,9 +49,11 @@ import (// OpenAI with that key (#322). So it is too for a ChatGPT account the// Codex app holds, out of its allowance with no credits to go on with// (provider.CodexUsedUp), which it won't send anything for, whoever serves-// the model, and when the user asks for it (the sign-in field's api): the-// Codex app is then in its API state rather than signed in to ChatGPT, its-// durable threads and remote control gone with it. A window at 100% alone+// the model, and when the user asks for it (the sign-in field's api): under+// the takeover (codex.out) the Codex app is then in its API state rather+// than signed in to ChatGPT, its chats, projects and remote control gone+// with it till the reset; for api, with room, it keeps its account+// (requires_openai_auth, openaiAuth). A window at 100% alone// is not that: credits carry the account on, the app keeps sending, and// Codex stays signed in beside magpie's models. The base URL is set then// too: a thread started on the built-in provider is opened on it again, and@@ -568,6 +570,33 @@ func codexIn(at place) *Agent {}return tok}+ // openaiAuth: whether magpie's provider table says+ // requires_openai_auth, and whether that is known. Without it Codex's+ // app-server answers account/read and getAuthStatus with no account and+ // no token for a provider that is magpie, and the Codex app (ChatGPT.app+ // 26.1021) switches to an identity of no account: its ChatGPT mode's+ // chats and projects ("Work") are gone, as are Chrome control and cloud+ // tasks, while magpie's models still answer (Qyburn3 on X). With it the+ // app keeps the account, and Codex still sends magpie's key+ // (experimental_bearer_token) to magpie, no ChatGPT-Account-ID, its+ // tools the same (image_gen kept): tried with ChatGPT.app 26.1021 and+ // its codex 0.164.0-alpha.11 against a capturing server.+ //+ // Only for a ChatGPT sign-in with room. One the Codex app holds (used+ // up, codexUsedUp) would have the app read its rate limit again and+ // grey Send for magpie's models too, which is what codex.out exists to+ // get past (#540, c54478904). An API key alone has no account to keep,+ // and Codex drops its image tool for a provider requiring OpenAI auth+ // (uses_openai_actor_authorization); no sign-in at all would have the+ // app ask for one. A sign-in read that says nothing leaves the table+ // as it is.+ openaiAuth := func() (want, known bool) {+ signedIn, known := codexChatGPTKnown(dir)+ if !known {+ return false, false+ }+ return signedIn && !codexUsedUp(), true+ }putProvider := func() error {kvs := []edit.KV{{Path: "name", Value: "magpie"},@@ -593,11 +622,33 @@ func codexIn(at place) *Agent {if caps := codexProviderCaps(path); caps != nil {kvs = append(kvs, edit.KV{Path: "capabilities", Value: caps})}+ want, known := openaiAuth()+ if want {+ kvs = append(kvs, edit.KV{Path: "requires_openai_auth", Value: true})+ }if err := edit.SetTOMLTable(path, "model_providers."+magpieID, kvs...); err != nil {return err}+ if t, _ := edit.GetTOMLTable(path, "model_providers."+magpieID); !want && known && t["requires_openai_auth"] != "" {+ if err := edit.DelTOMLKey(path, "model_providers."+magpieID, "requires_openai_auth"); err != nil {+ return err+ }+ }return asyncCompaction(true)}+ // authStale: the magpie table says requires_openai_auth otherwise+ // than openaiAuth wants, for Sync to write it again+ authStale := func() bool {+ want, known := openaiAuth()+ if !known {+ return false+ }+ t, err := edit.GetTOMLTable(path, "model_providers."+magpieID)+ if err != nil || t == nil {+ return false+ }+ return (t["requires_openai_auth"] == "true") != want+ }hasProvider := func() bool {t, err := edit.GetTOMLTable(path, "model_providers."+magpieID)return err == nil && t != nil@@ -1517,6 +1568,14 @@ func codexIn(at place) *Agent {return err}}+ // the sign-in came or went, or the account ran out or has+ // room again: requires_openai_auth follows (openaiAuth), on a+ // table an older magpie wrote too+ if authStale() {+ if err := putProvider(); err != nil {+ return err+ }+ }if err := failover(); err != nil {return err}@@ -1871,10 +1930,12 @@ func codexIn(at place) *Agent {// sign-in (openai_base_url), magpie its provider only while// the Codex app holds the account (""); beside it always,// held or not (chatgpt); or with magpie as its provider,- // the Codex app in its API state. Codex's getAuthStatus has- // no token for a provider without requires_openai_auth, so- // its Chrome control needs ChatGPT; the api note says so- // (#1824). Kept in the stash, where set("") leaves it.+ // the Codex app keeping its ChatGPT account while it has+ // room (requires_openai_auth, openaiAuth): Codex's+ // getAuthStatus has no token for a provider without it, and+ // the app lost its chats, projects and Chrome control+ // (#1824, Qyburn3 on X). Kept in the stash, where set("")+ // leaves it.Key: "login", Label: "sign-in", Quiet: true,Get: func() string { return stashLoad()[at.key("codex.login")] },Set: func(v string) error {@@ -1901,7 +1962,7 @@ func codexIn(at place) *Agent {return []Option{{Value: "", Label: "ChatGPT", Note: "magpie's models join Codex's own; Codex stays signed in to ChatGPT, and while the Codex app blocks its account (out of allowance, no credits left) magpie is Codex's provider, so the app still sends"},{Value: "chatgpt", Label: "Always ChatGPT", Note: "as ChatGPT, and kept so while the Codex app blocks its account: magpie never becomes Codex's provider. The Codex app may then send nothing till the account has room; Codex CLI goes on through magpie"},- {Value: "api", Label: "magpie API", Note: "magpie is Codex's provider; the Codex app is in its API state, with magpie's models only. Codex's Chrome control needs the ChatGPT sign-in, so pick ChatGPT to keep it"},+ {Value: "api", Label: "magpie API", Note: "magpie is Codex's provider, with magpie's models only; the Codex app keeps its ChatGPT account (its chats, projects and Chrome control) while the account has room"},}},},diff --git a/internal/agent/codex_app_route_test.go b/internal/agent/codex_app_route_test.goindex 2b219ff20..3231d62c7 100644--- a/internal/agent/codex_app_route_test.go+++ b/internal/agent/codex_app_route_test.go@@ -47,3 +47,26 @@ func TestCodexAppRouteFollowsConnectAndDisconnect(t *testing.T) {t.Fatalf("disconnect left the route as it was: %q\n%s", r, read())}}++// requires_openai_auth on magpie's table decides whether the Codex app+// has its ChatGPT account at all (openaiAuth), and the app-server reads it+// as it starts: the route changes with it, so the app is restarted onto+// its account when Sync writes it (Qyburn3 on X).+func TestCodexAppRouteFollowsOpenAIAuth(t *testing.T) {+ home, read := codexHome(t, `{"tokens":{"access_token":"x","id_token":"x.e30.x"}}`, "")+ cx := codex(home)+ if err := cx.Field("login").Set("api"); err != nil {+ t.Fatal(err)+ }+ if err := cx.Fields[0].Set("fake/m1"); err != nil {+ t.Fatal(err)+ }+ with, _, _ := codexAppRoute()+ codexUsedUp = func() bool { return true }+ if err := cx.Sync(); err != nil {+ t.Fatal(err)+ }+ if without, _, _ := codexAppRoute(); without == with {+ t.Fatalf("requires_openai_auth taken out left the route as it was:\n%s", read())+ }+}diff --git a/internal/agent/codex_image_tool_test.go b/internal/agent/codex_image_tool_test.goindex 1fa45f766..61665ad98 100644--- a/internal/agent/codex_image_tool_test.go+++ b/internal/agent/codex_image_tool_test.go@@ -27,7 +27,9 @@ func TestCodexMagpieProviderCarriesActorAuthorization(t *testing.T) {t.Fatalf("magpie provider table carries no actor-authorization header:\n%s", cfg)}// uses_openai_actor_authorization() also requires !requires_openai_auth:- // the header beside that key would turn the flag off again.+ // the header beside that key would turn the flag off again. A ChatGPT+ // sign-in gets the key (openaiAuth) and keeps the image tool on its+ // account; an API key, as here, has no account to keep.if strings.Contains(cfg, "requires_openai_auth") {t.Fatalf("magpie provider table requires OpenAI auth, hiding the actor header:\n%s", cfg)}diff --git a/internal/agent/codex_openai_auth_test.go b/internal/agent/codex_openai_auth_test.gonew file mode 100644index 000000000..5d3502ed4--- /dev/null+++ b/internal/agent/codex_openai_auth_test.go@@ -0,0 +1,139 @@+package agent++import (+ "strings"+ "testing"+)++// Qyburn3 on X: with magpie as Codex's provider for a Codex signed in to+// ChatGPT, the Codex app (ChatGPT.app 26.1021) lost its ChatGPT account:+// app-server's account/read and getAuthStatus answer no account and no+// token for a provider without requires_openai_auth, and the app's+// ChatGPT mode showed no chats or projects ("Work" sessions gone) while+// magpie's models still answered. The table says requires_openai_auth+// while that sign-in has room, and not for one the Codex app holds (Send+// would grey again, #540), an API key (its image tool), or no sign-in (a+// login screen). Sync brings a table an older magpie wrote up to date,+// both ways.+func TestCodexMagpieProviderKeepsChatGPTAccount(t *testing.T) {+ // the table as an older magpie wrote it, bytes from a live config.toml+ const older = "model = \"fake/m1\"\nmodel_provider = \"magpie\"\nmodel_catalog_json = \"magpie-models.json\"\n\n" ++ "[model_providers.magpie]\nname = \"magpie\"\nbase_url = \"http://127.0.0.1:3425/v1\"\nwire_api = \"responses\"\n" ++ "experimental_bearer_token = \"magpie\"\nhttp_headers = { \"x-openai-actor-authorization\" = \"magpie\" }\n"+ flag := func(t *testing.T, cfg string) string {+ t.Helper()+ i := strings.Index(cfg, "[model_providers.magpie]")+ if i < 0 {+ t.Fatalf("no magpie provider table:\n%s", cfg)+ }+ rest := cfg[i+1:]+ if j := strings.Index(rest, "\n["); j >= 0 {+ rest = rest[:j]+ }+ for _, l := range strings.Split(rest, "\n") {+ if k, v, ok := strings.Cut(l, "="); ok && strings.TrimSpace(k) == "requires_openai_auth" {+ return strings.TrimSpace(v)+ }+ }+ return ""+ }++ t.Run("ChatGPT, magpie API", func(t *testing.T) {+ home, read := codexHome(t, `{"tokens":{"access_token":"x","id_token":"x.e30.x"}}`, "")+ cx := codex(home)+ if err := cx.Field("login").Set("api"); err != nil {+ t.Fatal(err)+ }+ if err := cx.Fields[0].Set("fake/m1"); err != nil {+ t.Fatal(err)+ }+ cfg := read()+ if !strings.Contains(cfg, `model_provider = "magpie"`) || flag(t, cfg) != "true" {+ t.Fatalf("magpie its provider beside a ChatGPT sign-in with room: requires_openai_auth wanted:\n%s", cfg)+ }+ if !strings.Contains(cfg, `"x-openai-actor-authorization" = "magpie"`) || !strings.Contains(cfg, "experimental_bearer_token") {+ t.Fatalf("magpie's key and actor header kept:\n%s", cfg)+ }+ // the account runs out: the takeover's way, no account in the app+ codexUsedUp = func() bool { return true }+ if err := cx.Sync(); err != nil {+ t.Fatal(err)+ }+ if cfg := read(); flag(t, cfg) != "" {+ t.Fatalf("used up: no requires_openai_auth, or Send greys (#540):\n%s", cfg)+ }+ codexUsedUp = func() bool { return false }+ if err := cx.Sync(); err != nil {+ t.Fatal(err)+ }+ if cfg := read(); flag(t, cfg) != "true" {+ t.Fatalf("room again: requires_openai_auth back:\n%s", cfg)+ }+ if c := cx.Check(); c != "" {+ t.Fatal(c)+ }+ })++ t.Run("ChatGPT, taken over", func(t *testing.T) {+ home, read := codexHome(t, `{"tokens":{"access_token":"x","id_token":"x.e30.x"}}`, "")+ cx := codex(home)+ codexUsedUp = func() bool { return true }+ if err := cx.Fields[0].Set("fake/m1"); err != nil {+ t.Fatal(err)+ }+ if cfg := read(); !strings.Contains(cfg, `model_provider = "magpie"`) || flag(t, cfg) != "" {+ t.Fatalf("codex.out: magpie its provider with no requires_openai_auth:\n%s", cfg)+ }+ // the reset: back beside the sign-in, the table kept for the+ // threads started on magpie, now keeping the account too+ codexUsedUp = func() bool { return false }+ if err := cx.Sync(); err != nil {+ t.Fatal(err)+ }+ if cfg := read(); strings.Contains(cfg, "model_provider =") || flag(t, cfg) != "true" {+ t.Fatalf("after the reset:\n%s", cfg)+ }+ })++ t.Run("older table synced", func(t *testing.T) {+ home, read := codexHome(t, `{"tokens":{"access_token":"x","id_token":"x.e30.x"}}`, older)+ cx := codex(home)+ if err := cx.Field("login").Set("api"); err != nil {+ t.Fatal(err)+ }+ if err := cx.Sync(); err != nil {+ t.Fatal(err)+ }+ if cfg := read(); flag(t, cfg) != "true" {+ t.Fatalf("an older magpie's table, synced: requires_openai_auth wanted:\n%s", cfg)+ }+ })++ for _, c := range []struct{ name, auth string }{+ {"API key", `{"OPENAI_API_KEY":"sk-relay"}`},+ {"no sign-in", ""},+ } {+ t.Run(c.name, func(t *testing.T) {+ home, read := codexHome(t, c.auth, "")+ cx := codex(home)+ if err := cx.Fields[0].Set("fake/m1"); err != nil {+ t.Fatal(err)+ }+ if cfg := read(); !strings.Contains(cfg, `model_provider = "magpie"`) || flag(t, cfg) != "" {+ t.Fatalf("no ChatGPT account: no requires_openai_auth:\n%s", cfg)+ }+ })+ // one written while signed in, the sign-in gone since+ t.Run(c.name+" after ChatGPT", func(t *testing.T) {+ withFlag := strings.Replace(older, "wire_api = \"responses\"\n", "wire_api = \"responses\"\nrequires_openai_auth = true\n", 1)+ home, read := codexHome(t, c.auth, withFlag)+ cx := codex(home)+ if err := cx.Sync(); err != nil {+ t.Fatal(err)+ }+ if cfg := read(); flag(t, cfg) != "" {+ t.Fatalf("signed out: requires_openai_auth goes:\n%s", cfg)+ }+ })+ }+}diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.jsindex 596ecae2d..1e54f1528 100644--- a/internal/gui/assets/app.js+++ b/internal/gui/assets/app.js@@ -1909,7 +1909,7 @@ function appOutSaid(a) {let s = o.user? t("{user}'s ChatGPT allowance is used up, so magpie serves {agent}'s turns until it resets.", { user: o.user, agent: a.name }): t("{agent}'s ChatGPT allowance is used up, so magpie serves its turns until it resets.", { agent: a.name });- s += " " + t("Till then the {agent} app's ChatGPT side is off: browser use (its Chrome control), cloud tasks, its usage meter and Log out. It all comes back on its own at the reset.", { agent: a.name });+ s += " " + t("Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its usage meter and Log out. It all comes back on its own at the reset.", { agent: a.name });if (o.stuck) s += " " + t("magpie couldn't restart the {agent} app's app-server: quit the app and open it again to send.", { agent: a.name });return s + " " + t("Keep on ChatGPT (its sign-in's Always ChatGPT) leaves {agent} on its ChatGPT account instead: it shows its own limit message till the reset, and magpie no longer takes it over.", { agent: a.name });}diff --git a/internal/gui/assets/i18n.js b/internal/gui/assets/i18n.jsindex 9895488db..9563428a1 100644--- a/internal/gui/assets/i18n.js+++ b/internal/gui/assets/i18n.js@@ -756,7 +756,7 @@ const I18N = {"magpie's models join Codex's own; Codex stays signed in to ChatGPT, and while the Codex app blocks its account (out of allowance, no credits left) magpie is Codex's provider, so the app still sends": "默认。Codex 保持 ChatGPT 登录,magpie 的模型与 Codex 自带模型并列;当 Codex 应用拦下该账号(额度用尽且没有剩余积分)时,magpie 临时作为 Codex 的供应商,让 Codex 应用仍能发送","Always ChatGPT": "始终 ChatGPT","as ChatGPT, and kept so while the Codex app blocks its account: magpie never becomes Codex's provider. The Codex app may then send nothing till the account has room; Codex CLI goes on through magpie": "同 ChatGPT,且 Codex 应用拦下该账号时也不切换:magpie 不会成为 Codex 的供应商。此时 Codex 应用可能无法发送,直到账号恢复额度;Codex CLI 仍通过 magpie 继续",- "magpie is Codex's provider; the Codex app is in its API state, with magpie's models only. Codex's Chrome control needs the ChatGPT sign-in, so pick ChatGPT to keep it": "magpie 作为 Codex 的供应商,Codex 应用显示为 API 登录状态,只列出 magpie 的模型。Codex 的 Chrome 控制需要 ChatGPT 登录,要保留它请选 ChatGPT",+ "magpie is Codex's provider, with magpie's models only; the Codex app keeps its ChatGPT account (its chats, projects and Chrome control) while the account has room": "magpie 作为 Codex 的供应商,只列出 magpie 的模型;ChatGPT 账号还有额度时,Codex 应用仍保留该账号(聊天、项目和 Chrome 控制)","magpie's key": "magpie 的密钥","Claude Code sends magpie its key and is signed out of claude.ai while it runs through magpie: claude.ai's plan limits in /usage, its connectors, voice and /teleport are off": "Claude Code 向 magpie 发送 magpie 的密钥,经 magpie 运行期间处于 claude.ai 未登录状态:/usage 里的套餐限额、claude.ai 连接器、语音和 /teleport 都不可用","Claude Code keeps its claude.ai sign-in (/login), so those work; it sends that sign-in to magpie, which never passes it on. Remote Control and ultrareview stay off: Claude Code has them only on Anthropic's own address": "Claude Code 保留 claude.ai 登录(/login),上述功能可用;它把这份登录凭据发给 magpie,magpie 不会转交给任何地方。Remote Control 和 ultrareview 仍不可用:Claude Code 只在 Anthropic 官方地址上提供它们",@@ -1849,7 +1849,7 @@ const I18N = {"On magpie until the reset · ChatGPT allowance used up": "由 magpie 接管至额度重置 · ChatGPT 额度已用完","{user}'s ChatGPT allowance is used up, so magpie serves {agent}'s turns until it resets.": "{user} 的 ChatGPT 额度已用完,重置前由 magpie 接管 {agent} 的对话。","{agent}'s ChatGPT allowance is used up, so magpie serves its turns until it resets.": "{agent} 的 ChatGPT 额度已用完,重置前由 magpie 接管它的对话。",- "Till then the {agent} app's ChatGPT side is off: browser use (its Chrome control), cloud tasks, its usage meter and Log out. It all comes back on its own at the reset.": "在此之前,{agent} 应用的 ChatGPT 功能暂时关闭:浏览器操作(Chrome 控制)、云端任务、用量显示和退出登录。额度重置后会自动全部恢复。",+ "Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its usage meter and Log out. It all comes back on its own at the reset.": "在此之前,{agent} 应用的 ChatGPT 功能暂时关闭:ChatGPT 聊天和项目、浏览器操作(Chrome 控制)、云端任务、用量显示和退出登录。额度重置后会自动全部恢复。","Keep on ChatGPT (its sign-in's Always ChatGPT) leaves {agent} on its ChatGPT account instead: it shows its own limit message till the reset, and magpie no longer takes it over.": "点「保持 ChatGPT」(即登录方式里的「始终 ChatGPT」)可让 {agent} 留在它的 ChatGPT 账号上:额度重置前它会显示自己的额度用尽提示,magpie 不再接管。","Keep on ChatGPT": "保持 ChatGPT","magpie couldn't restart the {agent} app's app-server: quit the app and open it again to send.": "magpie 无法重启 {agent} 应用的 app-server:退出应用并重新打开即可发送。",@@ -4812,7 +4812,7 @@ const I18N = {"magpie's models join Codex's own; Codex stays signed in to ChatGPT, and while the Codex app blocks its account (out of allowance, no credits left) magpie is Codex's provider, so the app still sends": "預設。Codex 保持 ChatGPT 登入,magpie 的模型與 Codex 自帶模型並列;當 Codex 應用攔下該帳號(額度用盡且沒有剩餘積分)時,magpie 臨時作為 Codex 的供應商,讓 Codex 應用仍能傳送","Always ChatGPT": "始終 ChatGPT","as ChatGPT, and kept so while the Codex app blocks its account: magpie never becomes Codex's provider. The Codex app may then send nothing till the account has room; Codex CLI goes on through magpie": "同 ChatGPT,且 Codex 應用攔下該帳號時也不切換:magpie 不會成為 Codex 的供應商。此時 Codex 應用可能無法傳送,直到帳號恢復額度;Codex CLI 仍透過 magpie 繼續",- "magpie is Codex's provider; the Codex app is in its API state, with magpie's models only. Codex's Chrome control needs the ChatGPT sign-in, so pick ChatGPT to keep it": "magpie 作為 Codex 的供應商,Codex 應用顯示為 API 登入狀態,只列出 magpie 的模型。Codex 的 Chrome 控制需要 ChatGPT 登入,要保留它請選 ChatGPT",+ "magpie is Codex's provider, with magpie's models only; the Codex app keeps its ChatGPT account (its chats, projects and Chrome control) while the account has room": "magpie 作為 Codex 的供應商,只列出 magpie 的模型;ChatGPT 帳號還有額度時,Codex 應用仍保留該帳號(聊天、專案和 Chrome 控制)","same as model": "同主模型","same as model ({model})": "同主模型({model})","a Claude model of the tier, else the chat's model": "該檔位的 Claude 模型,沒有則用對話的模型",@@ -5891,7 +5891,7 @@ const I18N = {"On magpie until the reset · ChatGPT allowance used up": "由 magpie 接管至額度重設 · ChatGPT 額度已用完","{user}'s ChatGPT allowance is used up, so magpie serves {agent}'s turns until it resets.": "{user} 的 ChatGPT 額度已用完,重設前由 magpie 接管 {agent} 的對話。","{agent}'s ChatGPT allowance is used up, so magpie serves its turns until it resets.": "{agent} 的 ChatGPT 額度已用完,重設前由 magpie 接管它的對話。",- "Till then the {agent} app's ChatGPT side is off: browser use (its Chrome control), cloud tasks, its usage meter and Log out. It all comes back on its own at the reset.": "在此之前,{agent} 應用的 ChatGPT 功能暫時關閉:瀏覽器操作(Chrome 控制)、雲端任務、用量顯示和登出。額度重設後會自動全部恢復。",+ "Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its usage meter and Log out. It all comes back on its own at the reset.": "在此之前,{agent} 應用的 ChatGPT 功能暫時關閉:ChatGPT 聊天和專案、瀏覽器操作(Chrome 控制)、雲端任務、用量顯示和登出。額度重設後會自動全部恢復。","Keep on ChatGPT (its sign-in's Always ChatGPT) leaves {agent} on its ChatGPT account instead: it shows its own limit message till the reset, and magpie no longer takes it over.": "點「保持 ChatGPT」(即登入方式裡的「始終 ChatGPT」)可讓 {agent} 留在它的 ChatGPT 帳號上:額度重設前它會顯示自己的額度用盡提示,magpie 不再接管。","Keep on ChatGPT": "保持 ChatGPT","magpie couldn't restart the {agent} app's app-server: quit the app and open it again to send.": "magpie 無法重新啟動 {agent} 應用的 app-server:結束應用並重新開啟即可傳送。",@@ -8834,7 +8834,7 @@ const I18N = {"magpie's models join Codex's own; Codex stays signed in to ChatGPT, and while the Codex app blocks its account (out of allowance, no credits left) magpie is Codex's provider, so the app still sends": "magpie のモデルが Codex 独自のモデルに加わります。Codex は ChatGPT にサインインしたままで、Codex アプリがアカウントを止めている間(使用量を使い切り、クレジットも残っていないとき)は magpie が Codex のプロバイダーになり、Codex アプリは送信を続けられます","Always ChatGPT": "常に ChatGPT","as ChatGPT, and kept so while the Codex app blocks its account: magpie never becomes Codex's provider. The Codex app may then send nothing till the account has room; Codex CLI goes on through magpie": "ChatGPT と同じで、Codex アプリがアカウントを止めても切り替えません。magpie が Codex のプロバイダーになることはありません。その間 Codex アプリはアカウントに余裕が戻るまで送信できないことがあります。Codex CLI は magpie 経由で続行します",- "magpie is Codex's provider; the Codex app is in its API state, with magpie's models only. Codex's Chrome control needs the ChatGPT sign-in, so pick ChatGPT to keep it": "magpie が Codex のプロバイダになります。Codex アプリは API 状態になり、magpie のモデルのみが表示されます。Codex の Chrome 操作には ChatGPT のサインインが必要なため、残すには ChatGPT を選んでください",+ "magpie is Codex's provider, with magpie's models only; the Codex app keeps its ChatGPT account (its chats, projects and Chrome control) while the account has room": "magpie が Codex のプロバイダになり、magpie のモデルのみが表示されます。ChatGPT アカウントに残りがある間、Codex アプリはそのアカウント(チャット、プロジェクト、Chrome の操作)を保ちます","magpie's key": "magpie のキー","Claude Code sends magpie its key and is signed out of claude.ai while it runs through magpie: claude.ai's plan limits in /usage, its connectors, voice and /teleport are off": "Claude Code は magpie のキーを送り、magpie 経由で動く間は claude.ai からサインアウトした状態になります。/usage のプラン上限、claude.ai のコネクタ、音声入力、/teleport は使えません","Claude Code keeps its claude.ai sign-in (/login), so those work; it sends that sign-in to magpie, which never passes it on. Remote Control and ultrareview stay off: Claude Code has them only on Anthropic's own address": "Claude Code は claude.ai のサインイン(/login)を保つので、これらが使えます。そのサインインは magpie に送られますが、magpie がほかへ渡すことはありません。Remote Control と ultrareview は引き続き使えません。Claude Code は Anthropic 自身のアドレスでしか提供しません",@@ -9910,7 +9910,7 @@ const I18N = {"On magpie until the reset · ChatGPT allowance used up": "リセットまで magpie が処理 · ChatGPT の利用枠を使い切りました","{user}'s ChatGPT allowance is used up, so magpie serves {agent}'s turns until it resets.": "{user} の ChatGPT の利用枠を使い切ったため、リセットまで magpie が {agent} のターンを処理します。","{agent}'s ChatGPT allowance is used up, so magpie serves its turns until it resets.": "{agent} の ChatGPT の利用枠を使い切ったため、リセットまで magpie がそのターンを処理します。",- "Till then the {agent} app's ChatGPT side is off: browser use (its Chrome control), cloud tasks, its usage meter and Log out. It all comes back on its own at the reset.": "それまで {agent} アプリの ChatGPT 機能(ブラウザ操作(Chrome の操作)、クラウドタスク、使用量の表示、ログアウト)はオフになります。リセット時にすべて自動で戻ります。",+ "Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its usage meter and Log out. It all comes back on its own at the reset.": "それまで {agent} アプリの ChatGPT 機能(ChatGPT のチャットとプロジェクト、ブラウザ操作(Chrome の操作)、クラウドタスク、使用量の表示、ログアウト)はオフになります。リセット時にすべて自動で戻ります。","Keep on ChatGPT (its sign-in's Always ChatGPT) leaves {agent} on its ChatGPT account instead: it shows its own limit message till the reset, and magpie no longer takes it over.": "「ChatGPT のまま」(サインインの「常に ChatGPT」)を選ぶと {agent} は ChatGPT アカウントのままになります。リセットまではそのアプリ自身の上限メッセージが表示され、magpie は引き継ぎません。","Keep on ChatGPT": "ChatGPT のまま","magpie couldn't restart the {agent} app's app-server: quit the app and open it again to send.": "magpie は {agent} アプリの app-server を再起動できませんでした。送信するには、アプリを終了して開き直してください。",@@ -12873,7 +12873,7 @@ const I18N = {"magpie's models join Codex's own; Codex stays signed in to ChatGPT, and while the Codex app blocks its account (out of allowance, no credits left) magpie is Codex's provider, so the app still sends": "magpie-Modelle kommen zu den eigenen von Codex hinzu; Codex bleibt bei ChatGPT angemeldet, und solange die Codex-App das Konto blockiert (Kontingent aufgebraucht, keine Credits mehr), ist magpie der Anbieter von Codex, damit die Codex-App weiter senden kann","Always ChatGPT": "Immer ChatGPT","as ChatGPT, and kept so while the Codex app blocks its account: magpie never becomes Codex's provider. The Codex app may then send nothing till the account has room; Codex CLI goes on through magpie": "Wie ChatGPT, auch wenn die Codex-App das Konto blockiert: magpie wird nie der Anbieter von Codex. Die Codex-App sendet dann womöglich nichts, bis das Konto wieder Kontingent hat; Codex CLI läuft über magpie weiter",- "magpie is Codex's provider; the Codex app is in its API state, with magpie's models only. Codex's Chrome control needs the ChatGPT sign-in, so pick ChatGPT to keep it": "magpie ist der Anbieter von Codex; die Codex-App ist im API-Modus, nur mit magpie-Modellen. Codex' Chrome-Steuerung braucht die ChatGPT-Anmeldung, wählen Sie dafür ChatGPT",+ "magpie is Codex's provider, with magpie's models only; the Codex app keeps its ChatGPT account (its chats, projects and Chrome control) while the account has room": "magpie ist der Anbieter von Codex, nur mit magpie-Modellen; solange das ChatGPT-Konto Kontingent hat, behält die Codex-App es (Chats, Projekte und Chrome-Steuerung)","magpie's key": "magpie-Schlüssel","Claude Code sends magpie its key and is signed out of claude.ai while it runs through magpie: claude.ai's plan limits in /usage, its connectors, voice and /teleport are off": "Claude Code sendet magpie dessen Schlüssel und ist bei claude.ai abgemeldet, solange es über magpie läuft: Planlimits in /usage, claude.ai-Connectors, Sprachmodus und /teleport sind aus","Claude Code keeps its claude.ai sign-in (/login), so those work; it sends that sign-in to magpie, which never passes it on. Remote Control and ultrareview stay off: Claude Code has them only on Anthropic's own address": "Claude Code bleibt bei claude.ai angemeldet (/login), damit das alles funktioniert; diese Anmeldung geht an magpie, das sie nie weitergibt. Remote Control und ultrareview bleiben aus: Claude Code bietet sie nur unter Anthropics eigener Adresse",@@ -13959,7 +13959,7 @@ const I18N = {"On magpie until the reset · ChatGPT allowance used up": "Über magpie bis zum Zurücksetzen · ChatGPT-Kontingent aufgebraucht","{user}'s ChatGPT allowance is used up, so magpie serves {agent}'s turns until it resets.": "Das ChatGPT-Kontingent von {user} ist aufgebraucht, daher bedient magpie die Anfragen von {agent}, bis es zurückgesetzt wird.","{agent}'s ChatGPT allowance is used up, so magpie serves its turns until it resets.": "Das ChatGPT-Kontingent von {agent} ist aufgebraucht, daher bedient magpie seine Anfragen, bis es zurückgesetzt wird.",- "Till then the {agent} app's ChatGPT side is off: browser use (its Chrome control), cloud tasks, its usage meter and Log out. It all comes back on its own at the reset.": "Bis dahin ist die ChatGPT-Seite der {agent}-App aus: Browser-Nutzung (ihre Chrome-Steuerung), Cloud-Aufgaben, ihre Nutzungsanzeige und Abmelden. Beim Zurücksetzen kommt alles von selbst wieder.",+ "Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its usage meter and Log out. It all comes back on its own at the reset.": "Bis dahin ist die ChatGPT-Seite der {agent}-App aus: ihre ChatGPT-Chats und -Projekte, Browser-Nutzung (ihre Chrome-Steuerung), Cloud-Aufgaben, ihre Nutzungsanzeige und Abmelden. Beim Zurücksetzen kommt alles von selbst wieder.","Keep on ChatGPT (its sign-in's Always ChatGPT) leaves {agent} on its ChatGPT account instead: it shows its own limit message till the reset, and magpie no longer takes it over.": "„Bei ChatGPT bleiben“ (bei der Anmeldung „Immer ChatGPT“) lässt {agent} stattdessen bei seinem ChatGPT-Konto: Bis zum Zurücksetzen zeigt es seine eigene Limit-Meldung, und magpie übernimmt nicht mehr.","Keep on ChatGPT": "Bei ChatGPT bleiben","magpie couldn't restart the {agent} app's app-server: quit the app and open it again to send.": "magpie konnte den App-Server der {agent}-App nicht neu starten: beende die App und öffne sie wieder, um zu senden.",diff --git a/internal/gui/tests/codex-signin-always.test.cjs b/internal/gui/tests/codex-signin-always.test.cjsindex a82fd62ae..4d3033ec4 100644--- a/internal/gui/tests/codex-signin-always.test.cjs+++ b/internal/gui/tests/codex-signin-always.test.cjs@@ -3,7 +3,8 @@// magpie is Codex's provider while the Codex app blocks the ChatGPT account// (out of allowance, no credits left), so the app still sends; Always// ChatGPT, which never does that and says what it costs; and magpie API,-// which says Codex's Chrome control needs the ChatGPT sign-in (#1824).+// which says the Codex app keeps its ChatGPT account, Chrome control+// included, while it has room (#1824, Qyburn3 on X).// The square opens the app's picker with each way's sentence whole, in// the page's language; Always ChatGPT is posted as "chatgpt" and lights the// square, ChatGPT posts "" again. A click scrolls nothing. At 1100px and@@ -21,7 +22,7 @@ const models = [{ value: "gpt-5.5", label: "GPT-5.5", ref: "openai/gpt-5.5" }];const ways = [{ value: "", label: "ChatGPT", note: "magpie's models join Codex's own; Codex stays signed in to ChatGPT, and while the Codex app blocks its account (out of allowance, no credits left) magpie is Codex's provider, so the app still sends" },{ value: "chatgpt", label: "Always ChatGPT", note: "as ChatGPT, and kept so while the Codex app blocks its account: magpie never becomes Codex's provider. The Codex app may then send nothing till the account has room; Codex CLI goes on through magpie" },- { value: "api", label: "magpie API", note: "magpie is Codex's provider; the Codex app is in its API state, with magpie's models only. Codex's Chrome control needs the ChatGPT sign-in, so pick ChatGPT to keep it" },+ { value: "api", label: "magpie API", note: "magpie is Codex's provider, with magpie's models only; the Codex app keeps its ChatGPT account (its chats, projects and Chrome control) while the account has room" },];const fresh = () => ({agents: [{@@ -85,7 +86,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",await page.locator(codex).waitFor();const words = await page.evaluate(([ways, lang]) => ways.map((w) => lang === "en" ? [w.label, w.note] : [I18N[lang][w.label] || w.label, I18N[lang][w.note]]), [ways, lang]);assert(words.every(([, n]) => n), `every sentence has its ${lang}`);- assert.match(words[2][1], /Chrome.*ChatGPT/, `magpie API says Chrome control needs ChatGPT in ${lang}`);+ assert.match(words[2][1], /ChatGPT.*Chrome/, `magpie API says the app keeps its ChatGPT account, Chrome control too, in ${lang}`);assert.equal(words[1][0] === "Always ChatGPT", lang === "en", `"Always ChatGPT" has its ${lang}`);await page.locator(`${codex} .ag-link`).click();await page.locator(`${codex} .ag-exp`).waitFor();