Commit Graph
4 Commits
Author SHA1 Message Date
yetone a10ad0ec8e routing: a Codex memory call put on its conversation's model says why (#5413)
The Routing page read every Codex memory move as codex-turn: "asked for
{model} ..., which magpie doesn't serve". The #4765 branch of
codexMemoryStandIn moves a bare Codex default that magpie does serve
(a provider has a model by the same name) when Codex's config names no
memory model, so that sentence was wrong for it. That branch now
records codex-follow, said as "{agent} asked for {model}, one of its
own default models, for its memories, and its config names no model
for them; magpie served it on {to}, the model of its conversation.",
in en, zh, zh-TW, ja and de. Models magpie doesn't serve stay
codex-turn.

Run (mote): go test ./internal/gateway -run
'TestCodexMemory|TestCodexSide|TestCodexMemories|TestCodex.*Follow'
-count=1: ok. node --test routing-moved-why (chromium + webkit, every
language, 1100 and 420px), i18n-keys, i18n-en-no-cjk: 27 of 28; the red
is i18n-keys "a plugin's words are its own", red the same at
origin/main 73324357e (#5327, #5426, and #5482 filed for its library
entry).
Broken by hand: not separately; TestCodexMemoryOnACollidingBareName-
FollowsTheSession now checks the move's why.
Not tried: the real app's Routing page.

Reported-by: MariaMatrix (GitHub)
2026-11-06 15:17:30 +08:00
yetone 73324357ed gateway: a Codex memory call on a provider/model id keeps it (#5413)
Codex's memories.extract_model and consolidation_model, set to
remote-magpie/sub2api/gpt-6.1-terra on the user's computer, reached the
Remote magpie as sub2api/gpt-6.1-terra, which it serves. The branch of
codexMemoryStandIn added for #4765 (a bare Codex default that a
provider happens to serve under the same name) moved any memory call
that resolves onto the conversation's model unless CodexSideSet saw
[memories] set, and the remote has no Codex config to read
(GetTOMLTable's absent file reads as "nothing set"). So the user's pick
went to sub2api/gpt-6.1-sol, recorded as codex-turn.

A "provider/model" id is never one of Codex's defaults, which are bare,
so it is the user's pick and goes as it came, as codexFollowTo (the
ChatGPT backend's path) already does. The same holds locally for a
Codex on a profile or a CODEX_HOME of its own, whose config magpie
doesn't read. A bare name that resolves still follows the conversation
when the config here names no memory model (#4765 unchanged).

Run (mote): go test ./internal/gateway -run
'TestCodexMemory|TestCodexSide|TestCodexMemories' -count=1: ok.
Broken by hand: with the "/" check taken out,
TestCodexMemoryOnAQualifiedModelKeepsIt fails with
"memory_consolidation moved to "third/gpt-6-astra" (codex-turn)", the
reporter's move.
Not tried: a real Local -> Remote magpie pair with Sub2API; a bare
memory model named in the config of a Codex on another computer still
can't be seen by the remote.

Reported-by: MariaMatrix (GitHub)
Reported-by: mahiro233 (Discord)
2026-11-06 15:09:18 +08:00
ggbdpq 6de04a26e2 gateway: a Codex memory call on its own bare name follows the session when a provider serves a model under that name too (#4765)
raphael-y7: with magpie as Codex's model provider, the conversation on
orbis/gpt-6.1-sol, Codex's memory consolidation — its own background
request on its own default consolidation model, asked by its bare name
gpt-5.6-terra — went to workbuddy-ai, the only provider of magpie's with
a model under that name, and the account it landed on refused it: 400
"model [gpt-5.6-terra] is not allowed for user type
[personal_free_user]", three tries, 8.5s, and the memory was never
written. The bare name resolved, so codexMemoryStandIn (#742) left the
call where it stood; a model of Codex's own asked by its bare name is
not a pick of whichever provider has one under that name.

Now a memory call whose bare name resolves still follows the
conversation's model, as it does on the ChatGPT backend's path
(codexFollowTo), when Codex's config names no model for its memories:
codexMemoryStandIn asks codexMemorySession first and only falls through
to the name's own resolution when there is none to follow. What keeps
going as the name resolves: any other call, a model Codex's config
names (the user's own pick, a full id or a bare name), a config magpie
can't read, and a conversation magpie has no model of (on Codex's own,
or nothing answered yet).

What this doesn't change: the three tries on a capability refusal, and
the model catalog's exposure of a model an account can't serve — the
reporter's other two suggestions, both a bigger cut; the auto-review's
codex-auto-review and the app's title, description and summary calls,
whose as-Codex-sent default is deliberate (codexTitlesTo, codexSideTo;
shruru counts a provider serving a luna-named model picking titles up
as a feature, #4590).

TestCodexMemoryOnACollidingBareNameFollowsTheSession: a provider with a
model under gpt-5.6-terra, the conversation on another provider's — the
memory call followed the conversation and the named provider got
nothing (red before: it got the memory); the config's pick and a plain
turn on the name still go to it. Run (darwin arm64, -tags nogui):

- go test -tags nogui -run 'TestCodexMemoryOnACollidingBareNameFollowsTheSession|TestCodexMemoryCallsGoWhereItsTurnsGo|TestCodexMemoryStandInFollowsTheSwitch|TestCodexMemoriesFollowTheSession|TestCodexSideCallsKeepTheConfigsModel|TestCodexSideCallsBeforeTheFirstTurnFollowTheSwitch|TestCodexOwnModelOnMagpieThreadGoesOnSignIn' ./internal/gateway: ok (the new test was red before the fix, with the report's routing)

Generated-by: GLM-5.3-Flash (ZCode)
2026-11-01 22:44:23 +08:00
yetone 987ce3d1b0 codex: a memory call on a model of Codex's own goes where Codex's turns go, rather than a 404 (#742, congee949) — Codex writes and consolidates its memories on models of its own by their bare names (memories.extract_model and consolidation_model, gpt-5.6-luna and gpt-5.6-terra by default) whatever it is set to, so with magpie as its provider every memory_consolidation call was turned away as "magpie knows no model" before it was routed (28 in a week in the report, from Codex on two other computers with their own gateway keys, where the stand-in read from this computer's ~/.codex/config.toml can't reach). A Codex memory call (memory_consolidation, memgen, memory) on a model magpie can't resolve now goes to the model the same Codex (the agent and the gateway key it came with) last had a turn of its own answered on here, else the last such turn in the ledger a week back (so after a restart too), and is routed and recorded as the memory call it is. Any other call on an unknown model, and a memory call from a Codex with no turn answered, is turned away as before. Base instructions are untouched. TestCodexMemoryCallsGoWhereItsTurnsGo (terra and luna after a turn, after a restart from the ledger, unknown turn and review still 404) fails on the old code. go vet, builds (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. 2026-10-05 00:25:10 +08:00