ac4af582301a4e8a29245dbba767eba31334ddf9
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
206efc90c8 |
gateway: a Codex side call with no setting still goes on Codex's sign-in (#4590 review)
e99e75dab took every side call on one of Codex's own models (title, description, summary, prediction) off Codex's ChatGPT sign-in. With no setting naming a model, codexTitlesTo and its siblings hand back the bare model Codex asked for, which magpie serves nothing for: a user signed in to ChatGPT whose titles worked through the sign-in got "magpie knows no model \"gpt-6.1-sol\"" 404 for every title, description, summary and prediction. A thread's summary has no setting at all, so it always went that way. Now only a side call whose setting names where it goes (CodexTitles, CodexDescriptions, CodexPredictions: a model or "off") stays off the sign-in (codexSideSet); without one it goes on the sign-in as before. Run (mote, at this tree, -tags nogui): - TestCodexSideCallOnOwnModelUnsetGoesOnSignIn (new: signed in, no setting, each of the four kinds): red on e99e75dab, the 404 above for all four; green now. - go test -run 'TestCodexSideCallOnOwnModel|TestCodexOwnModelOnMagpieThread| TestCodexTitlesSetting|TestCodexTitleOnMagpieProvider| TestCodexDescriptionsSetting|TestCodexDescriptionFallbackOnMagpie| TestCodexPrediction|TestCodexSummar' ./internal/gateway: ok - broken by hand: codexSideSet always false turns gua's TestCodexSideCallOnOwnModelNotPutOnSignIn red (the reporter's 404); always true turns the new test red. |
||
|
|
50e8da4c34 |
gateway: Codex side calls on its own models stay with magpie, not its sign-in (#4590)
shruru: with magpie as Codex's model provider, picking any model in the Codex titles setting never took: the thread's title stayed the first message's truncation, and a request for gpt-5.6-luna, Codex's own title model, to /v1/responses was answered 404 "is one of Codex's own models... open ~/.codex/auth.json: no such file or directory". A thread started while magpie was Codex's provider sends to magpie's /v1 (model_providers.magpie's base_url is magpie's /v1), and since |
||
|
|
4586307de5 |
gateway: Codex's own model on a thread started on magpie goes on Codex's sign-in, not a 404
iuengei on Discord: after turning Codex's routing off and restarting,
Codex's official models answered "unexpected status 404 Not Found: magpie
knows no model \"gpt-6.1-sol\"", in ChatGPT and Always ChatGPT modes too.
A Codex thread keeps the provider it was started on (the
[model_providers.magpie] table stays for that reason). A thread started
while magpie was Codex's provider (magpie API, or the takeover of a
used-up account) goes on sending to /v1 after Disconnect or a switch back
to ChatGPT. An official model picked in it reaches serve as a bare
"gpt-6.1-sol"; with no ChatGPT account in magpie serving it (the Codex
sign-in removed from Providers, or subscription accounts off) it was
answered 404. /backend-api/codex relays such a model on Codex's own
sign-in; /v1 never did.
Now handle (Responses) puts such a request on the ChatGPT backend's route
(codexBackend) signed with Codex's own ChatGPT sign-in as Codex keeps it
(provider.CodexSignInAsKept, never renewed by magpie), magpie's key and
x-openai-actor-authorization left behind (codexOwnOffMagpie). Only for: a
bare model no provider, group or stand-in serves, not disabled or
switched off; one of Codex's own (its models cache, magpie's entries left
out) or OpenAI's in the catalog; from Codex on this computer (local); no
gateway key held to models or accounts. When the sign-in can't be had
(subscription accounts off, signed out, expired) the 404 says the thread
was started on magpie, why the sign-in can't be used, and to start a new
thread. Codex's identity and prompts are untouched.
Tests (internal/gateway/codex_own_v1_test.go): the reporter's case, a
sandbox HOME with Codex signed in, gpt-6.1-sol in its models cache, the
sign-in removed from magpie's Providers, Codex's request to /v1/responses
with magpie's key: was 404 "magpie knows no model \"gpt-6.1-sol\"", now
200 from a stand-in ChatGPT backend that got Codex's token and account
id, not magpie's key or header. Not sent: from another computer, a key
held to fake/*, a model that isn't OpenAI's (still 404). With accounts
off, a 404 that says why.
Run (on mote, at this commit's tree rebased on
|