ac4af582301a4e8a29245dbba767eba31334ddf9
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6c7cedece8 |
gateway: the first Codex title after magpie starts waits for the turn, not the config's model
Codex signed in to ChatGPT, its config's model one provider's (B/qwen3.7),
the conversation put on another provider's (A/dsf4.1) in the Codex app:
the first new conversation's title was written by B. The app asks for a
title on a temporary thread with no link to the conversation, sent as
the first message is, so it can reach magpie before that conversation's
first turn. codexLeads.sideOf waits for that turn when the key's last
turn is old, but when the key had no turn at all (nothing through magpie
since it started) it returned at once with nothing, and servedSession
fell back to CodexSideModel, the config's model. Now such a call waits
the same way (codexSideWait, 5s, or its cancellation) and takes the
turn's model; the config's model only when no turn comes. A memory call
before any turn (Codex consolidating as it starts, no turn on the way)
still takes the config's model at once. A model set for titles in
magpie's settings (settings.CodexTitles) still wins, as before.
TestCodexFirstTitleFollowsThePickNotTheConfig: fresh server, config on
third/, the title sent, then the conversation's turn on fourth/. Red on
the old codex_follow.go ("the config's model got 1 requests, the title
among them"), green on the new. TestCodexSideTurnsOnThePickedModel sends
side turns with no turn ever: it sets codexSideWait to 0 so it doesn't
wait 5s on each.
Run (mote, at this commit's tree):
go build ./..., go vet ./..., GOOS=linux go vet -tags nogui ./...,
GOOS=windows go vet ./...: clean. gofmt -l: clean.
go test -count=1 -run Codex ./internal/gateway/: ok (172s).
Full suite (go test -tags nogui -timeout 45m ./..., through the suite
lock) was still queued/running at push; any red it shows gets an issue.
After a rebase onto
|
||
|
|
0d2a101160 |
gateway: the Codex app's titles, descriptions and summaries go to the magpie model picked, not ChatGPT (atom_Ray on X)
atom_Ray on X: with a third-party model picked in the Codex app through
magpie, an hour of use still took 2% of the ChatGPT account's 5-hour
window, and at 0% left it could not be used at all.
The cause is the app's hidden side turns. ChatGPT.app 26.1013.40934 asks
for a thread's title, description and one-line summary
(ThreadMetadataGenerationService.generateTitle/generateDescription/
generateSummary in .vite/build/main-CLu1A25j.js; R0/z0/B0 via H0 and Jq
in src-DsLVGakC.js) on ephemeralGenerationModel, gpt-6-luna by default,
whatever model the conversation is on. A summary is asked after each
user and assistant message (bAu in app-initial). With magpie's model
beside the ChatGPT sign-in (openai_base_url), these reach
/backend-api/codex as gpt-6-luna. codexTitlesTo and codexDescriptionsTo
left an unset setting on the model Codex asked for, and thread_summary
had no route at all, so all three went to ChatGPT on the user's sign-in.
Now, with Codex's config model one of magpie's and magpie not Codex's
provider (agent.CodexSideModel, through gateway.CodexSideModel),
codexSideTo sends titles, descriptions and summaries on the Codex
backend path to that model. On Codex's own model nothing changes, and a
model the Titles or Descriptions setting names still wins. Summaries get
the same wrapper as descriptions (codexShaped): the plain answer is
handed back as the {"summary": ...} the schema asks for, with
compactSummary filled and cut to its maxLength (summaryJSON). This also
covers a summary on magpie's own API, where a Chat model's plain answer
was dropped by the app. No prompt, instructions or base_instructions are
changed: the request is sent to another model as Codex wrote it.
Run (this change on origin/main
|