yikelizi9438 (Windows, the Codex app): models wouldn't load, "This chat
uses custom, but your current provider is openai. Switch to custom to
continue", and "Model unavailable" in the composer. "custom" is CC
Switch's provider id; magpie never names one so. Before #4347
(e02bc8c49, v0.1.2652) a magpie model picked beside the ChatGPT sign-in
took the user's model_provider down, kept in stash codex.provider for
the Disconnect, leaving Codex on OpenAI by openai_base_url. Codex 0.166
resumes a thread only on the provider it is on now
(modelProviderMismatch), so every thread started on custom was refused.
#4347 stopped new configs reaching that state, and d6e3a36ff moves such
threads only when magpie is Codex's provider, so a config already left
so stayed broken after the update.
Now Sync's bringBeside: with Codex on OpenAI routed by the base URL, no
top-level model_provider, and a provider of the user's in the stash
(not openai, magpie, cc-switch-official or a CC Switch OpenAI mirror,
none a profile names), that provider's threads move to openai as
bringOver moves them onto magpie: in place at OpenAI's length, the last
30 days rewritten with a copy kept otherwise. The ids moved are kept
(codex.brought). The Disconnect, which puts the provider back, returns
exactly those (sessions.MoveCodexThreadIDs, only ones still on openai);
OpenAI's own threads stay. If magpie becomes Codex's provider instead,
they go on to magpie (followBeside), where bringBack returns them at the
Disconnect. A reset forgets the record (Codex stays on OpenAI).
Run: TestCodexBesideBringsTakenProvidersThreads red on origin/main
f280b12e5 ("thread ... on \"custom\", want \"openai\""), green here
(mote-run). Broken by hand: with Unwire's giveBeside("") commented out
the test goes red at the Disconnect ("on \"openai\", want \"custom\"").
mote-run: gofmt -l clean; GOOS=windows and GOOS=linux go vet -tags nogui
of internal/agent and internal/sessions; go test -tags nogui
./internal/agent/ ./internal/sessions/ ./internal/gui/ ok (agent 282s, sessions 31s, gui 95s).
win-run (xiaomi-gpu): TestCodexBeside|TestCodexThreads|
TestMoveRecentCodexThreads|TestMovePackedCodexThreads ok.
Not tried: a real Windows Codex app with the reporter's config (their
magpie version and config.toml are unknown; if CC Switch itself switched
them to its official card, the stash has no provider and nothing moves:
the Sessions page's "Move to openai" does it by hand). The followBeside
path has no test of its own.