Skip to content

Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.

codex: titles, descriptions, predictions and memories follow the session's model (cybercaius)

yetonee0b39f7784c3
diff --git a/docs/subsystems/gateway-routing.md b/docs/subsystems/gateway-routing.md
index 04c9c9555..f51858d38 100644
--- a/docs/subsystems/gateway-routing.md
+++ b/docs/subsystems/gateway-routing.md
@@ -55,12 +55,19 @@ and no invented maximum length. Title Off mode does not disable descriptions.
The Codex app asks for titles, descriptions and one-line thread summaries
(`thread_summary`, after each message) on a model of its own (`gpt-6-luna`),
-whatever the conversation is on. With one of magpie's models picked beside
-Codex's ChatGPT sign-in, an unset setting sends these to the model picked
-(`codexSideTo`, from `agent.CodexSideModel`: Codex's config `model`, when it
-is magpie's and magpie is not Codex's provider), so a conversation on a
+whatever the conversation is on, and composer predictions
+(`composer_predictions`) on the thread's model. An unset setting ("Same as
+the session" in the picker) sends these on the session's model when it is
+one of magpie's (`codexSideTo` with `Server.codexSessionOf`): the model the
+conversation's own turns last went on (`codexLeads`), else, before any turn
+has come through magpie, `agent.CodexSideModel` (Codex's config `model`, when
+it is magpie's and magpie is not Codex's provider). So a conversation on a
third-party model spends none of the ChatGPT account's allowance (atom_Ray on
-X). On Codex's own model they still go to ChatGPT. Summaries use
+X), whether the model was picked in Codex's config or in the app (cybercaius
+on Discord, `TestCodexAppSideTurnsFollowTheSession`). A session on Codex's
+own model sends them to ChatGPT as Codex sent them, whatever the config says
+(`TestCodexAppSideTurnsStayWithAnOwnModelSession`); so does a session model
+magpie can't serve now (turned off, gone, held from the caller's key). Summaries use
`{"summary": ...}`, with any other string the schema requires
(`compactSummary`) filled and cut to its length (`summaryJSON`).
@@ -100,7 +107,7 @@ recorded as a prediction failure (`noPrediction`).
- A model the user disabled (#1867) gets a 403 for every caller (`idOff`), before anything is sent; see [Disabled models](#disabled-models).
- Sealed tasks (#619) are checked here. A Codex subagent's task its lead's `spawn_agent` sealed goes only to a ChatGPT account, or back to the Responses provider that answered the lead (`leadProvider`, a relay of the ChatGPT backend such as Sub2API, #1109), relayed as it came even when web search is offered. A lead's turn carrying its subagent's sealed reply (`send_message`) goes back to the Responses provider that answered the lead's own conversation (`leadProvider` of the request's `conversationID`, #1237); otherwise it is refused before anyone is asked (`sealedReader`, `sealedTaskError`). A sealed message (`Message Type: MESSAGE`, not a task) that nobody asked can open is left out instead, an `input_text` note naming its sender in its place (`withoutSealedMessages`, #1613): a lead on a chat provider whose subagent is on one of Codex's own models goes on, as the subagent's final result still reaches it as text. Only a sealed task (`NEW_TASK`, or an item with neither header) is refused. Who answered is first what affinity remembers; when affinity has let it go (a day since, a restart past the 512 conversations `affinity.json` keeps, or the lead's last reply broken off, `unanswered`), the usage log's answers to the lead's thread and the request's own conversation in the last 30 days count too (`loggedAnswers`, #1367), and `leadFirst` reads the lead's key or account from them. A refused or failed call and a title answer nothing, and Codex's own sign-in is told of as the ChatGPT backend. The refusal names who sealed the task when it is known, and says how to go on with it. It also says what is sealed (`sealedTaskItself`, #1855): the task itself, `spawn_agent`'s `message`, which the backend returns sealed (`encrypted_function_args`) and Codex hands the subagent as it came, so `fork_turns="none"`, which only leaves the lead's turns out, doesn't help; nothing in it can be left out for the subagent to go on.
- A model set for Codex's subagents (`settings.CodexSubagentModel`, the Agents page's Codex "subagent model", willz on Discord) is put on a Codex subagent's request (`x-openai-subagent` read as `kind:collab_spawn`) before this check, whatever model its lead's `spawn_agent` asked for (`codexSubagentPick` in [`codex_subagent.go`](../../internal/gateway/codex_subagent.go)): in `codexBackend` for one of Codex's own bare models, which then goes through `serveAgent`, and in `serve` for any other. Any model magpie serves can be set (`provider.SetCodexSubagentModel`, #1633): a task handed as text (a lead magpie served on a chat provider, or multi-agent V1) is read by any model. A request carrying a task the ChatGPT backend sealed (`sealedTaskIn`: a sealed agent message that isn't a `MESSAGE`, which `withoutSealedMessages` leaves out) is put only on a ChatGPT account's model; set to another, the subagent stays on the model asked for, which the sealed gate below handles as with nothing set. When magpie doesn't serve the model set now, or a gateway key held to some models may not use it, the subagent goes on the model asked for too. The route trace keeps both models and the reason it stayed (`Route.Subagent`), and the Routing page's `kindWhy` says it. The lead's turns, titles and every other kind are never moved.
- - With no model set for them, in magpie or in Codex's config (`[agents] default_subagent_model`, `[memories] extract_model`/`consolidation_model`, read by `agent.CodexSideSet`; a config it can't read counts as set), a Codex subagent or memory call on one of Codex's own bare models, made in a conversation whose own turns go on one of magpie's models, follows that model instead of going to the ChatGPT sign-in (`codexFollowTo` in [`codex_follow.go`](../../internal/gateway/codex_follow.go), cybercaius on Discord). The model is the parent thread's last own turn (`x-codex-parent-thread-id` or the turn metadata's parent), else its own thread's, else the last one by the gateway key (`codexLeads`, at most 512 threads). A sealed task, a model magpie can't resolve now or one a gateway key may not use leaves the call as it came; a subagent's trace keeps both models in `Route.Subagent`. Codex's auto-review follows the session only when `settings.CodexAutoReview` is `session` (`settings.CodexAutoReviewSession`): `codexcat` then has each of magpie's entries name itself as `auto_review_model_override`, and Codex's own entries keep OpenAI's, since codex-auto-review is free on a ChatGPT sign-in (#1593).
+ - With no model set for them, in magpie or in Codex's config (`[agents] default_subagent_model`, `[memories] extract_model`/`consolidation_model`, read by `agent.CodexSideSet`; a config it can't read counts as set), a Codex subagent or memory call on one of Codex's own bare models, made in a conversation whose own turns go on one of magpie's models, follows that model instead of going to the ChatGPT sign-in (`codexFollowTo` in [`codex_follow.go`](../../internal/gateway/codex_follow.go), cybercaius on Discord). The model is the parent thread's last own turn (`x-codex-parent-thread-id` or the turn metadata's parent), else its own thread's, else the last one by the gateway key (`codexLeads`, at most 512 threads), else, before any turn has come through magpie (Codex consolidates its memories as it starts), Codex's config `model` when it is one of magpie's (`codexSessionOf`, `TestCodexMemoriesBeforeAnyTurnFollowTheConfig`). A sealed task, a model magpie can't resolve now or one a gateway key may not use leaves the call as it came; a subagent's trace keeps both models in `Route.Subagent`. Codex's auto-review follows the session only when `settings.CodexAutoReview` is `session` (`settings.CodexAutoReviewSession`): `codexcat` then has each of magpie's entries name itself as `auto_review_model_override`, and Codex's own entries keep OpenAI's, since codex-auto-review is free on a ChatGPT sign-in (#1593).
- A model set for Claude Desktop's subagents (`settings.DesktopSubagentModel`, the Agents page's Claude Desktop "subagent model") is put on a subagent's turn in Desktop's Code tab or Cowork after `desktopTurn`, the tiers and the groups, whatever model its lead or its tier asked for (`desktopSubagentPick` in [`desktop_subagent.go`](../../internal/gateway/desktop_subagent.go)). Desktop runs its Claude Code with `CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST=1`, under which Claude Code ignores the `CLAUDE_CODE_SUBAGENT_MODEL` magpie writes into its settings (see [agent wiring](agent-wiring.md)). A subagent's request is one with `x-claude-code-agent-id` (`subagentOf`) from `claude-desktop`, and only one that offers tools is its turn: Claude Code's tool-less helper calls inside a subagent, on the haiku tier's model, stay where they are, and so do the lead's turns, terminal Claude Code's and every other agent's. The model set must be served by its exact id (`provider.DesktopSubagentUnserved`: `Resolve` takes any model name under a provider that is on), enabled, and allowed to a gateway key held to some models (`groupAllowed` for a group); otherwise the subagent goes on the model asked for and the route trace says why (`Route.Subagent`, said on the Routing page by `subagentWhy`, its `Kind` staying empty). `Route.Model` and the ledger's `Requested` keep the model the subagent asked for. `count_tokens` counts on the model set the same way (`countTokens`). The setting is read on each request, so a change needs no restart of Desktop, and a provider renamed since it was set is read by its new id (`RenamedRef`). A Desktop on another computer that reaches magpie with a named gateway key is read as Claude Code (`agentOf`), so none of Desktop's routing, this included, applies to it. A subagent's turn, moved or not, is never kept as the session's model in `claude-desktop.model` (`desktopTurn`'s `bySubagent`): a subagent on the opus tier's model took the session's place until the lead's next turn, and Desktop's titles asked for meanwhile went to it.
- Desktop's subagent effort (`settings.DesktopSubagentEffort`, `desktopSubagentEffort` in [`desktop_subagent.go`](../../internal/gateway/desktop_subagent.go)) applies to the same subagent tool turns, independently of model replacement. Empty leaves requests unchanged. Set, it takes the place of a request model's effort suffix before the existing attempt-level effort fitting: a member fixed at an effort wins, then this pick fitted within group/model levels, then the turn's or request's effort. `withFixedEffort` can enable reasoning when it was disabled, or disable it with `none` on a model that supports that level; a reasonless model is still sent no reasoning fields. `countTokens` applies the pick after restoring any unmasked body. `Route.Effort` keeps the incoming effort, `Route.SubagentEffort` the configured pick, and each try and usage record the level actually sent; the Routing story explains the configured pick even when no model was replaced. A nonempty model pick already classifies the turn, so the effort check reuses it; empty effort costs only a held-settings read. The next request takes a changed or cleared effort without a Desktop restart.
- Every Claude Code subagent's turn, Desktop's or a terminal's, moved or not, keeps its `x-claude-code-agent-id` in `Route.SubagentID` (`subagentTurnOf` in [`desktop_subagent.go`](../../internal/gateway/desktop_subagent.go)): a request with the id that offers tools and names no kind, the turn the two settings above take. Claude Code 2.1.295 sends the id from any agent context but the main one; its `x-claude-code-request-class` and `x-claude-code-agent-type` hints go only to a first-party base URL or with `CLAUDE_CODE_GATEWAY_HINT_HEADERS`, so magpie doesn't get them. A Desktop pick or effort that found the turn is trusted, so the body isn't decoded again, and a request without the id isn't decoded at all. The Routing page tags it as Codex's subagents are (`tagKind` in [`routing.js`](../../internal/gui/assets/routing.js)): in the request list, the story, the replay and the tray panel, with the reason `kindWhy` gives Codex's. `Kind` stays empty, so its purpose stays unmarked in the Purpose filter, as in the ledger and on the Usage page. The ledger's `Subagent` keeps the same id, and also marks a subagent's tool-less helper calls, which aren't tagged. A route recorded before this has no id and no tag.
diff --git a/internal/gateway/codex_backend.go b/internal/gateway/codex_backend.go
index 195d2f9c8..fd5806437 100644
--- a/internal/gateway/codex_backend.go
+++ b/internal/gateway/codex_backend.go
@@ -109,19 +109,20 @@ func (s *Server) codexBackend(w http.ResponseWriter, r *http.Request) {
// still on Codex's own model, through its sign-in, when it says
// nothing of them
if rest == "/responses" {
- if to := codexTitlesTo(r.Header, body, false); to != "" {
+ session := func() string { return s.codexSessionOf(r, body) }
+ if to := codexTitlesTo(r.Header, body, false, session); to != "" {
s.codexTitle(w, r, body, to)
return
}
- if to := codexDescriptionsTo(r.Header, body, false); to != "" {
+ if to := codexDescriptionsTo(r.Header, body, false, session); to != "" {
s.codexDescription(w, r, body, to)
return
}
- if to := codexSummariesTo(r.Header, body, false); to != "" {
+ if to := codexSummariesTo(r.Header, body, false, session); to != "" {
s.codexSummary(w, r, body, to)
return
}
- if to := codexPredictionsTo(r.Header, body, false); to != "" {
+ if to := codexPredictionsTo(r.Header, body, false, session); to != "" {
s.codexPrediction(w, r, body, to)
return
}
diff --git a/internal/gateway/codex_follow.go b/internal/gateway/codex_follow.go
index 8043f6568..fddce35af 100644
--- a/internal/gateway/codex_follow.go
+++ b/internal/gateway/codex_follow.go
@@ -20,7 +20,8 @@ import (
// account rather than where the user had routed Codex (cybercaius on
// Discord). With nothing set for them, a subagent and the memories follow
// the session: they go on the model the conversation's own turns go on,
-// when that is one of magpie's. The auto-review follows it when set to
+// when that is one of magpie's (codexSessionOf), as the app's titles,
+// descriptions, summaries and composer predictions do (codexSideTo). The auto-review follows it when set to
// (settings.CodexAutoReviewSession, which codexcat writes into each of
// magpie's entries); left to Codex it stays on codex-auto-review, which a
// ChatGPT sign-in runs free (#1593).
@@ -118,8 +119,34 @@ func (s *Server) codexFollowTo(r *http.Request, agent, kind, asked string, body
default:
return ""
}
+ to := s.codexSessionOf(r, body)
+ if to == "" || to == asked {
+ return ""
+ }
+ // the user's own pick in Codex's config is kept; read last, as it
+ // reads the config
+ if CodexSideSet == nil || CodexSideSet(which) {
+ return ""
+ }
+ return to
+}
+
+// codexSessionOf is the model of magpie's a Codex side call with nothing
+// set for it follows: the one its conversation's own turns go on
+// (codexLeads), else, before any turn of Codex's has come through magpie
+// (Codex consolidates its memories as it starts), the model Codex's config
+// is set to when it is one of magpie's (CodexSideModel). cybercaius on
+// Discord: with the model picked in the Codex app, not its config, the
+// memories went to ChatGPT, and so did the titles, descriptions and
+// composer predictions, which followed the config alone. "" when the
+// conversation is on one of Codex's own models, or magpie can't serve its
+// model now (turned off, gone, or one the caller's key is held from).
+func (s *Server) codexSessionOf(r *http.Request, body []byte) string {
to := s.codexLeads.of(r, body)
- if !strings.Contains(to, "/") || to == asked {
+ if to == "" && CodexSideModel != nil {
+ to = CodexSideModel()
+ }
+ if !strings.Contains(to, "/") {
return ""
}
if _, off := idOff(to); off {
@@ -129,11 +156,6 @@ func (s *Server) codexFollowTo(r *http.Request, agent, kind, asked string, body
if !ok {
return ""
}
- // the user's own pick in Codex's config is kept; read last, as it
- // reads the config
- if CodexSideSet == nil || CodexSideSet(which) {
- return ""
- }
if who, held := keyHolds(r); held && !modelAllowed(who, p, model) {
return ""
}
diff --git a/internal/gateway/codex_follow_test.go b/internal/gateway/codex_follow_test.go
index c74d658e1..3f99c568f 100644
--- a/internal/gateway/codex_follow_test.go
+++ b/internal/gateway/codex_follow_test.go
@@ -1,6 +1,10 @@
package gateway
-import "testing"
+import (
+ "net/http/httptest"
+ "strings"
+ "testing"
+)
// codexFollowSetup is Codex signed in to ChatGPT, its conversation put on
// a relay's model (third/gpt-6-astra) through magpie, and Codex's config
@@ -99,3 +103,81 @@ func TestCodexSideCallsStayOnChatGPT(t *testing.T) {
t.Fatalf("the relay got %d requests", len(reqs))
}
}
+
+// codexAppSide is one of the Codex app's hidden side turns of a thread
+// (source: thread_title, thread_description, composer_predictions), asked
+// on one of Codex's own models as the app asks for them.
+func codexAppSide(t *testing.T, s *Server, source, session string) {
+ t.Helper()
+ body := `{"model":"gpt-6-luna","stream":true,"input":[` + leadAsk + `]}`
+ req := httptest.NewRequest("POST", CodexPath+"/responses", strings.NewReader(body))
+ req.Header.Set("Authorization", "Bearer chatgpt-token")
+ req.Header.Set("chatgpt-account-id", "acct-1")
+ req.Header.Set("session_id", session)
+ req.Header.Set("x-codex-turn-metadata", `{"thread_source":"`+source+`"}`)
+ s.Handler().ServeHTTP(httptest.NewRecorder(), req)
+}
+
+// cybercaius on Discord: with the conversation put on one of magpie's
+// models in the Codex app, and nothing in Codex's config, the app's thread
+// titles, descriptions and composer predictions still went to ChatGPT on
+// its own models. They follow the session now, as the subagents do.
+func TestCodexAppSideTurnsFollowTheSession(t *testing.T) {
+ up, relay, s := codexFollowSetup(t, false)
+ was := CodexSideModel
+ CodexSideModel = func() string { return "" }
+ t.Cleanup(func() { CodexSideModel = was })
+ for _, src := range []string{"composer_predictions", "thread_title", "thread_description"} {
+ codexAppSide(t, s, src, "lead-1")
+ if got := up.asked(); len(got) != 0 {
+ t.Fatalf("%s: ChatGPT was asked for %v", src, got)
+ }
+ reqs := relay.requests()
+ if m := modelOf([]byte(reqs[len(reqs)-1])); len(reqs) < 2 || m != "gpt-6-astra" {
+ t.Fatalf("%s: the relay got %d requests, the last on %q", src, len(reqs), m)
+ }
+ }
+ if reqs := relay.requests(); len(reqs) != 4 {
+ t.Fatalf("the relay got %d requests", len(reqs))
+ }
+}
+
+// A conversation on Codex's own model keeps its side turns on ChatGPT,
+// even with one of magpie's models in Codex's config: they follow the
+// session, not the config.
+func TestCodexAppSideTurnsStayWithAnOwnModelSession(t *testing.T) {
+ up := codexSubagentSetup(t)
+ relay := relayOn(t, "third")
+ was := CodexSideModel
+ CodexSideModel = func() string { return "third/gpt-6-astra" }
+ t.Cleanup(func() { CodexSideModel = was })
+ s := New()
+ codexSide(t, s, "", leadAsk)
+ codexAppSide(t, s, "thread_title", "worker-1")
+ if got := up.asked(); len(got) != 2 || got[1] != "gpt-6-luna" {
+ t.Fatalf("ChatGPT was asked for %v", got)
+ }
+ if reqs := relay.requests(); len(reqs) != 0 {
+ t.Fatalf("the relay got %d requests", len(reqs))
+ }
+}
+
+// Codex consolidates its memories as it starts, before any turn of its
+// has come through magpie: with one of magpie's models in its config,
+// they go on that model, not to ChatGPT.
+func TestCodexMemoriesBeforeAnyTurnFollowTheConfig(t *testing.T) {
+ up := codexSubagentSetup(t)
+ relay := relayOn(t, "third")
+ wasSet, wasModel := CodexSideSet, CodexSideModel
+ CodexSideSet = func(string) bool { return false }
+ CodexSideModel = func() string { return "third/gpt-6-astra" }
+ t.Cleanup(func() { CodexSideSet, CodexSideModel = wasSet, wasModel })
+ s := New()
+ codexSide(t, s, "memgen", leadAsk)
+ if got := up.asked(); len(got) != 0 {
+ t.Fatalf("ChatGPT was asked for %v", got)
+ }
+ if reqs := relay.requests(); len(reqs) != 1 || modelOf([]byte(reqs[0])) != "gpt-6-astra" {
+ t.Fatalf("the relay got %v", reqs)
+ }
+}
diff --git a/internal/gateway/codex_titles.go b/internal/gateway/codex_titles.go
index b092112a0..eb08cbb14 100644
--- a/internal/gateway/codex_titles.go
+++ b/internal/gateway/codex_titles.go
@@ -27,14 +27,14 @@ import (
// a title on one of magpie's models goes through codexTitle whoever picked
// it (#743: Codex as magpie's provider had none at all, the model's plain
// answer turned down).
-func codexTitlesTo(h http.Header, body []byte, ours bool) string {
+func codexTitlesTo(h http.Header, body []byte, ours bool, session func() string) string {
if !isTitleKind(requestCallKind(h, requestSessionMetadata(h, body))) {
return ""
}
if to := settings.Load().CodexTitles; to != "" {
return to
}
- return codexSideTo(body, ours)
+ return codexSideTo(body, ours, session)
}
// CodexSideModel is the model this machine's Codex is set to when it is
@@ -51,14 +51,15 @@ var CodexSideModel func() string
// models picked beside the ChatGPT sign-in every one of them went to
// ChatGPT and spent its allowance, and failed with it once it was used up
// (atom_Ray on X: an hour on a third-party model took 2% of the 5-hour
-// window). Those go to the model picked, as the conversation's turns do.
-func codexSideTo(body []byte, ours bool) string {
+// window). Those go on the session's model (session: Server.codexSessionOf),
+// as the conversation's turns do; on Codex's own, as Codex sent them.
+func codexSideTo(body []byte, ours bool, session func() string) string {
m := modelOf(body)
if m != "" && (ours || strings.Contains(m, "/")) {
return m
}
- if !ours && CodexSideModel != nil {
- return CodexSideModel()
+ if !ours && session != nil {
+ return session()
}
return ""
}
@@ -67,7 +68,7 @@ func codexSideTo(body []byte, ours bool) string {
// description goes. "" leaves the request as Codex sent it; a model's id
// writes it. A description is not a title: Codex asks for {"description"}
// alone, which the title wrapper cannot answer.
-func codexDescriptionsTo(h http.Header, body []byte, ours bool) string {
+func codexDescriptionsTo(h http.Header, body []byte, ours bool, session func() string) string {
if !isDescriptionKind(requestCallKind(h, requestSessionMetadata(h, body))) {
return ""
}
@@ -76,7 +77,7 @@ func codexDescriptionsTo(h http.Header, body []byte, ours bool) string {
}
// Codex on a magpie model gets no schema upstream (#743), so an empty
// setting still wraps the model it asked for, as titles do.
- return codexSideTo(body, ours)
+ return codexSideTo(body, ours, session)
}
// codexSummariesTo is where the Codex app's request for a thread's
@@ -84,11 +85,11 @@ func codexDescriptionsTo(h http.Header, body []byte, ours bool) string {
// of a thread): the model codexSideTo names, its answer handed back as the
// {"summary": …} the request's schema asks for; "" leaves it as Codex sent
// it.
-func codexSummariesTo(h http.Header, body []byte, ours bool) string {
+func codexSummariesTo(h http.Header, body []byte, ours bool, session func() string) string {
if !isSummaryKind(requestCallKind(h, requestSessionMetadata(h, body))) {
return ""
}
- return codexSideTo(body, ours)
+ return codexSideTo(body, ours, session)
}
// codexPredictionsTo is where the Codex app's request to predict the
@@ -97,19 +98,19 @@ func codexSummariesTo(h http.Header, body []byte, ours bool) string {
// thread's own model, so a long thread on an expensive model pays for
// every prediction. "" leaves the request as Codex sent it; "off", or a
// model's id that writes it: settings.CodexPredictions, else the model
-// Codex asked for when it is one of magpie's, whose plain answer is
-// wrapped as titles' and descriptions' are.
-func codexPredictionsTo(h http.Header, body []byte, ours bool) string {
+// Codex asked for when it is one of magpie's, else the session's
+// (codexSideTo), whose plain answer is wrapped as titles' and
+// descriptions' are.
+func codexPredictionsTo(h http.Header, body []byte, ours bool, session func() string) string {
if !isPredictionKind(requestCallKind(h, requestSessionMetadata(h, body))) {
return ""
}
if to := settings.Load().CodexPredictions; to != "" {
return to
}
- if m := modelOf(body); m != "" && (ours || strings.Contains(m, "/")) {
- return m
- }
- return ""
+ // the app asks on the thread's model, but one of Codex's own when the
+ // thread is new to it: the session's, as titles' (codexSideTo)
+ return codexSideTo(body, ours, session)
}
// titleCheckKey holds, in a request's context, what serve asks of the
diff --git a/internal/gateway/gateway.go b/internal/gateway/gateway.go
index 0208afcf2..976a21fcb 100644
--- a/internal/gateway/gateway.go
+++ b/internal/gateway/gateway.go
@@ -1540,19 +1540,19 @@ func (s *Server) handle(from provider.Protocol) http.HandlerFunc {
// Codex with magpie as its provider asks for a thread's title
// here (#743)
if from == provider.Responses {
- if to := codexTitlesTo(r.Header, body, true); to != "" {
+ if to := codexTitlesTo(r.Header, body, true, nil); to != "" {
s.codexTitle(w, r, body, to)
return
}
- if to := codexDescriptionsTo(r.Header, body, true); to != "" {
+ if to := codexDescriptionsTo(r.Header, body, true, nil); to != "" {
s.codexDescription(w, r, body, to)
return
}
- if to := codexSummariesTo(r.Header, body, true); to != "" {
+ if to := codexSummariesTo(r.Header, body, true, nil); to != "" {
s.codexSummary(w, r, body, to)
return
}
- if to := codexPredictionsTo(r.Header, body, true); to != "" {
+ if to := codexPredictionsTo(r.Header, body, true, nil); to != "" {
s.codexPrediction(w, r, body, to)
return
}
diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.js
index 0eb1c2ecd..26b098215 100644
--- a/internal/gui/assets/app.js
+++ b/internal/gui/assets/app.js
@@ -19595,11 +19595,11 @@ function renderSettings() {
// alone as Settings › General does (#2120); Open at login's says where
// the Mac lists it: a launch agent, under App Background Activity
for (const [row, en] of [
- ["#codexTitlesRow", "Names each thread in a hidden request of its own; at Codex’s own, it goes as Codex sends it, through its ChatGPT sign-in"],
- ["#codexDescriptionsRow", "Writes each thread’s short description in a hidden request of its own; at Codex’s own, it goes as Codex sends it, through its ChatGPT sign-in"],
- ["#codexPredictionsRow", "Guesses your next message for the composer, reading the whole conversation again each time; at Codex’s own, it goes on the thread’s model through its ChatGPT sign-in"],
+ ["#codexTitlesRow", "Names each thread in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own"],
+ ["#codexDescriptionsRow", "Writes each thread’s short description in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own"],
+ ["#codexPredictionsRow", "Guesses your next message for the composer, reading the whole conversation again each time; same as the session, it goes on the session’s model"],
["#codexAutoReviewRow", "Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort"],
- ["#codexMemoriesRow", "Writes Codex’s memories of past threads, in the background; Codex’s own: gpt-5.6-terra, with gpt-5.6-luna summing up each thread"],
+ ["#codexMemoriesRow", "Writes Codex’s memories of past threads, in the background; same as the session, on the session’s model, or on gpt-5.6-terra and gpt-5.6-luna when that is one of Codex’s own"],
["#loginRow", document.body.classList.contains("mac")
? "Opens in the menu bar with no window. System Settings › General › Login Items lists it under App Background Activity, not Open at Login"
: "Opens in the tray with no window"],
@@ -21121,9 +21121,9 @@ function renderCodexDescriptions(s) {
b.type = "button";
b.setAttribute("aria-label", t("Codex thread descriptions"));
if (v) b.append(icon(models.find((x) => x.id === v)?.icon || "generic"), el("span", "", named(v)));
- else b.append(icon("openai"), el("span", "", t("Codex’s own (ChatGPT)")));
+ else b.append(icon("generic"), el("span", "", t(SAME_SESSION)));
b.onclick = (ev) => openPicker({ id: "", name: "", fields: [] }, { key: "codexDescriptions", label: "model", value: v, options: [
- { value: "", label: t("Codex’s own (ChatGPT)"), note: t("as Codex sends them"), icon: "openai", reset: true },
+ { value: "", label: t(SAME_SESSION), note: t("as Codex sends them when the session is on Codex’s own model"), icon: "generic", reset: true },
...models.map(modelOpt)],
onPick: (id) => {
if (id === v) return;
@@ -21147,9 +21147,9 @@ function renderCodexPredictions(s) {
b.setAttribute("aria-label", t("Codex composer predictions"));
if (v === "off") b.append(el("span", "", t("Off")));
else if (v) b.append(icon(models.find((x) => x.id === v)?.icon || "generic"), el("span", "", named(v)));
- else b.append(icon("openai"), el("span", "", t("Codex’s own (ChatGPT)")));
+ else b.append(icon("generic"), el("span", "", t(SAME_SESSION)));
b.onclick = (ev) => openPicker({ id: "", name: "", fields: [] }, { key: "codexPredictions", label: "model", value: v, options: [
- { value: "", label: t("Codex’s own (ChatGPT)"), note: t("as Codex sends them"), icon: "openai", reset: true },
+ { value: "", label: t(SAME_SESSION), note: t("as Codex sends them when the session is on Codex’s own model"), icon: "generic", reset: true },
{ value: "off", label: t("Off"), note: t("no prediction, nothing sent"), reset: true },
...models.map(modelOpt)],
onPick: (id) => {
@@ -21175,9 +21175,9 @@ function renderCodexTitles(s) {
b.setAttribute("aria-label", t("Codex thread titles"));
if (v === "off") b.append(el("span", "", t("Off")));
else if (v) b.append(icon(models.find((x) => x.id === v)?.icon || "generic"), el("span", "", named(v)));
- else b.append(icon("openai"), el("span", "", t("Codex’s own (ChatGPT)")));
+ else b.append(icon("generic"), el("span", "", t(SAME_SESSION)));
b.onclick = (ev) => openPicker({ id: "", name: "", fields: [] }, { key: "codexTitles", label: "model", value: v, options: [
- { value: "", label: t("Codex’s own (ChatGPT)"), note: t("as Codex sends them"), icon: "openai", reset: true },
+ { value: "", label: t(SAME_SESSION), note: t("as Codex sends them when the session is on Codex’s own model"), icon: "generic", reset: true },
{ value: "off", label: t("Off"), note: t("no title, nothing sent"), reset: true },
...models.map(modelOpt)],
onPick: (id) => {
@@ -21232,7 +21232,7 @@ function renderCodexMemories() {
b.type = "button";
b.setAttribute("aria-label", t("Codex memories model"));
if (f.value) b.append(icon(opt?.icon || "generic"), el("span", "", opt?.label || f.value));
- else b.append(icon("openai"), el("span", "", t("Codex’s own pick")));
+ else b.append(icon("generic"), el("span", "", t(SAME_SESSION)));
b.onclick = (ev) => openPicker(a, f, b, ev);
$("#codexMemoriesPick").replaceChildren(b);
}
diff --git a/internal/gui/assets/i18n.js b/internal/gui/assets/i18n.js
index 3c6c34faf..3809bd9ce 100644
--- a/internal/gui/assets/i18n.js
+++ b/internal/gui/assets/i18n.js
@@ -859,11 +859,11 @@ const I18N = {
"Now on: no agents on this computer": "当前开启:本机没有 Agent",
"Now off: agents found on this computer": "当前关闭:本机找到了 Agent",
"A closed window frees about 100 MB after a minute; the gateway and tasks keep running, only the page reloads": "窗口关闭一分钟后释放约 100 MB;网关和后台任务照常运行,只重新加载页面",
- "Names each thread in a hidden request of its own; at Codex’s own, it goes as Codex sends it, through its ChatGPT sign-in": "为每个会话起标题,是 Codex 单独发出的隐藏请求;选 Codex 自带时按 Codex 原样发送,经它的 ChatGPT 登录",
- "Writes each thread’s short description in a hidden request of its own; at Codex’s own, it goes as Codex sends it, through its ChatGPT sign-in": "为每个会话写简短描述,是 Codex 单独发出的隐藏请求;选 Codex 自带时按 Codex 原样发送,经它的 ChatGPT 登录",
- "Guesses your next message for the composer, reading the whole conversation again each time; at Codex’s own, it goes on the thread’s model through its ChatGPT sign-in": "为输入框猜测你的下一条消息,每次都把整段对话重读一遍;选 Codex 自带时用该会话的模型,经它的 ChatGPT 登录",
+ "Names each thread in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "为每个会话起标题,是 Codex 单独发出的隐藏请求;跟随当前会话时用会话的模型,会话在 Codex 自带模型上时按 Codex 原样发送",
+ "Writes each thread’s short description in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "为每个会话写简短描述,是 Codex 单独发出的隐藏请求;跟随当前会话时用会话的模型,会话在 Codex 自带模型上时按 Codex 原样发送",
+ "Guesses your next message for the composer, reading the whole conversation again each time; same as the session, it goes on the session’s model": "为输入框猜测你的下一条消息,每次都把整段对话重读一遍;跟随当前会话时用会话的模型",
"Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort": "Codex 的审批设为自动审批时,代你决定是否批准;由 Codex 决定时用 codex-auto-review,没有则用当前对话的模型(低推理)",
- "Writes Codex’s memories of past threads, in the background; Codex’s own: gpt-5.6-terra, with gpt-5.6-luna summing up each thread": "在后台把过去的会话整理成 Codex 的记忆;Codex 自带的:整理用 gpt-5.6-terra,总结对话用 gpt-5.6-luna",
+ "Writes Codex’s memories of past threads, in the background; same as the session, on the session’s model, or on gpt-5.6-terra and gpt-5.6-luna when that is one of Codex’s own": "在后台把过去的会话整理成 Codex 的记忆;跟随当前会话时用会话的模型,会话在 Codex 自带模型上时用 gpt-5.6-terra 和 gpt-5.6-luna",
"Switched off in System Settings’ Login Items, so magpie won’t open at login": "已在系统设置的登录项里关闭,登录时不会打开 magpie",
"Open Login Items": "打开登录项",
"Opens in the menu bar with no window. System Settings › General › Login Items lists it under App Background Activity, not Open at Login": "登录后在菜单栏打开,不弹出窗口。系统设置 › 通用 › 登录项 里,它列在「App后台活动」下,而不是「登录时打开」",
@@ -1057,8 +1057,7 @@ const I18N = {
"Codex composer predictions": "Codex 输入框预测",
"no prediction, nothing sent": "不生成预测,不发出请求",
"Prediction": "预测",
- "Codex’s own (ChatGPT)": "Codex 自带(ChatGPT)",
- "as Codex sends them": "按 Codex 原样发送",
+ "as Codex sends them when the session is on Codex’s own model": "会话在 Codex 自带模型上时按 Codex 原样发送",
"Codex auto-review model": "Codex 自动审批模型",
"Codex’s own pick": "由 Codex 决定",
"as Codex picks it": "按 Codex 默认选择",
@@ -4834,11 +4833,11 @@ const I18N = {
"Now on: no agents on this computer": "目前開啟:本機沒有 Agent",
"Now off: agents found on this computer": "目前關閉:本機找到了 Agent",
"A closed window frees about 100 MB after a minute; the gateway and tasks keep running, only the page reloads": "視窗關閉一分鐘後釋放約 100 MB;閘道與背景作業照常執行,只重新載入頁面",
- "Names each thread in a hidden request of its own; at Codex’s own, it goes as Codex sends it, through its ChatGPT sign-in": "為每個會話起標題,是 Codex 單獨發出的隱藏請求;選 Codex 自帶時按 Codex 原樣發送,經它的 ChatGPT 登入",
- "Writes each thread’s short description in a hidden request of its own; at Codex’s own, it goes as Codex sends it, through its ChatGPT sign-in": "為每個會話寫簡短描述,是 Codex 單獨發出的隱藏請求;選 Codex 自帶時按 Codex 原樣發送,經它的 ChatGPT 登入",
- "Guesses your next message for the composer, reading the whole conversation again each time; at Codex’s own, it goes on the thread’s model through its ChatGPT sign-in": "為輸入框猜測你的下一則訊息,每次都把整段對話重讀一遍;選 Codex 自帶時用該會話的模型,經它的 ChatGPT 登入",
+ "Names each thread in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "為每個會話起標題,是 Codex 單獨發出的隱藏請求;跟隨目前工作階段時用工作階段的模型,工作階段在 Codex 自帶模型上時按 Codex 原樣傳送",
+ "Writes each thread’s short description in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "為每個會話寫簡短描述,是 Codex 單獨發出的隱藏請求;跟隨目前工作階段時用工作階段的模型,工作階段在 Codex 自帶模型上時按 Codex 原樣傳送",
+ "Guesses your next message for the composer, reading the whole conversation again each time; same as the session, it goes on the session’s model": "為輸入框猜測你的下一則訊息,每次都把整段對話重讀一遍;跟隨目前工作階段時用工作階段的模型",
"Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort": "Codex 的審批設為自動審批時,代你決定是否批准;由 Codex 決定時用 codex-auto-review,沒有則用目前對話的模型(低推理)",
- "Writes Codex’s memories of past threads, in the background; Codex’s own: gpt-5.6-terra, with gpt-5.6-luna summing up each thread": "在背景把過去的會話整理成 Codex 的記憶;Codex 自帶的:整理用 gpt-5.6-terra,總結對話用 gpt-5.6-luna",
+ "Writes Codex’s memories of past threads, in the background; same as the session, on the session’s model, or on gpt-5.6-terra and gpt-5.6-luna when that is one of Codex’s own": "在背景把過去的會話整理成 Codex 的記憶;跟隨目前工作階段時用工作階段的模型,工作階段在 Codex 自帶模型上時用 gpt-5.6-terra 和 gpt-5.6-luna",
"Switched off in System Settings’ Login Items, so magpie won’t open at login": "已在系統設定的登入項目裡關閉,登入時不會開啟 magpie",
"Open Login Items": "打開登入項目",
"Opens in the menu bar with no window. System Settings › General › Login Items lists it under App Background Activity, not Open at Login": "登入後在選單列開啟,不彈出視窗。系統設定 › 一般 › 登入項目 裡,它列在「App背景活動」下,而不是「在登入時打開」",
@@ -5028,8 +5027,7 @@ const I18N = {
"Codex and Claude Code compact at 272K (non-Claude [1m] too) or the size typed; full window: slower, costlier": "Codex 和 Claude Code 在 272K(非 Claude 的 [1m] 模型也是)或這裡填的大小時壓縮;完整視窗每輪更慢更貴",
"Compact at {n}": "{n} 時壓縮",
"Codex thread titles": "Codex 會話標題",
- "Codex’s own (ChatGPT)": "Codex 自帶(ChatGPT)",
- "as Codex sends them": "按 Codex 原樣傳送",
+ "as Codex sends them when the session is on Codex’s own model": "工作階段在 Codex 自帶模型上時按 Codex 原樣傳送",
"Codex auto-review model": "Codex 自動審批模型",
"Codex’s own pick": "由 Codex 決定",
"as Codex picks it": "按 Codex 預設選擇",
@@ -8781,11 +8779,11 @@ const I18N = {
"Now on: no agents on this computer": "現在オン:このコンピューターにエージェントがありません",
"Now off: agents found on this computer": "現在オフ:このコンピューターにエージェントがあります",
"A closed window frees about 100 MB after a minute; the gateway and tasks keep running, only the page reloads": "閉じたウィンドウは 1 分後に約 100 MB を解放。ゲートウェイと処理は動き続け、ページだけ読み込み直します",
- "Names each thread in a hidden request of its own; at Codex’s own, it goes as Codex sends it, through its ChatGPT sign-in": "各スレッドに題名を付ける、Codex 独自の隠れたリクエスト。Codex 自身なら Codex が送るとおり、その ChatGPT サインインで送られます",
- "Writes each thread’s short description in a hidden request of its own; at Codex’s own, it goes as Codex sends it, through its ChatGPT sign-in": "各スレッドの短い説明を書く、Codex 独自の隠れたリクエスト。Codex 自身なら Codex が送るとおり、その ChatGPT サインインで送られます",
- "Guesses your next message for the composer, reading the whole conversation again each time; at Codex’s own, it goes on the thread’s model through its ChatGPT sign-in": "入力欄に次のメッセージを予測し、そのたびに会話全体を読み直します。Codex 自身ならスレッドのモデルで、その ChatGPT サインインで送られます",
+ "Names each thread in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "各スレッドに題名を付ける、Codex 独自の隠れたリクエスト。セッションと同じなら、セッションのモデルで送られ、それが Codex 自身のモデルなら Codex が送るとおりに送られます",
+ "Writes each thread’s short description in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "各スレッドの短い説明を書く、Codex 独自の隠れたリクエスト。セッションと同じなら、セッションのモデルで送られ、それが Codex 自身のモデルなら Codex が送るとおりに送られます",
+ "Guesses your next message for the composer, reading the whole conversation again each time; same as the session, it goes on the session’s model": "入力欄に次のメッセージを予測し、そのたびに会話全体を読み直します。セッションと同じなら、セッションのモデルで送られます",
"Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort": "Codex の承認が自動レビューのとき、あなたの代わりに承認を判断します。Codex に任せると codex-auto-review、なければ会話のモデル(低い推論)",
- "Writes Codex’s memories of past threads, in the background; Codex’s own: gpt-5.6-terra, with gpt-5.6-luna summing up each thread": "過去のスレッドを Codex のメモリにバックグラウンドでまとめます。Codex の初期設定:整理は gpt-5.6-terra、スレッドの要約は gpt-5.6-luna",
+ "Writes Codex’s memories of past threads, in the background; same as the session, on the session’s model, or on gpt-5.6-terra and gpt-5.6-luna when that is one of Codex’s own": "過去のスレッドを Codex のメモリにバックグラウンドでまとめます。セッションと同じなら、セッションのモデルで、それが Codex 自身のモデルなら gpt-5.6-terra と gpt-5.6-luna で",
"Switched off in System Settings’ Login Items, so magpie won’t open at login": "システム設定のログイン項目でオフになっているため、ログイン時に magpie は開きません",
"Open Login Items": "ログイン項目を開く",
"Opens in the menu bar with no window. System Settings › General › Login Items lists it under App Background Activity, not Open at Login": "ログイン後、ウィンドウなしでメニューバーに開きます。システム設定 › 一般 › ログイン項目では「ログイン時に開く」ではなく「アプリのバックグラウンドでのアクティビティ」に表示されます",
@@ -8969,8 +8967,7 @@ const I18N = {
"Codex composer predictions": "Codex の入力予測",
"no prediction, nothing sent": "予測なし、送信なし",
"Prediction": "予測",
- "Codex’s own (ChatGPT)": "Codex 自身(ChatGPT)",
- "as Codex sends them": "Codex が送るまま",
+ "as Codex sends them when the session is on Codex’s own model": "セッションが Codex 自身のモデルなら Codex が送るまま",
"Codex auto-review model": "Codex 自動レビューのモデル",
"Codex’s own pick": "Codex に任せる",
"as Codex picks it": "Codex の既定どおり",
@@ -12742,11 +12739,11 @@ const I18N = {
"Now on: no agents on this computer": "Jetzt an: keine Agenten auf diesem Computer",
"Now off: agents found on this computer": "Jetzt aus: Agenten auf diesem Computer gefunden",
"A closed window frees about 100 MB after a minute; the gateway and tasks keep running, only the page reloads": "Ein geschlossenes Fenster gibt nach einer Minute etwa 100 MB frei; Gateway und Aufgaben laufen weiter",
- "Names each thread in a hidden request of its own; at Codex’s own, it goes as Codex sends it, through its ChatGPT sign-in": "Benennt jeden Thread in einer eigenen versteckten Anfrage; bei „Eigene von Codex“ geht sie, wie Codex sie sendet, über seine ChatGPT-Anmeldung",
- "Writes each thread’s short description in a hidden request of its own; at Codex’s own, it goes as Codex sends it, through its ChatGPT sign-in": "Schreibt die Kurzbeschreibung jedes Threads in einer eigenen versteckten Anfrage; bei „Eigene von Codex“ geht sie, wie Codex sie sendet, über seine ChatGPT-Anmeldung",
- "Guesses your next message for the composer, reading the whole conversation again each time; at Codex’s own, it goes on the thread’s model through its ChatGPT sign-in": "Errät Ihre nächste Nachricht fürs Eingabefeld und liest dafür jedes Mal das ganze Gespräch neu; bei „Eigene von Codex“ mit dem Modell des Threads über seine ChatGPT-Anmeldung",
+ "Names each thread in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "Benennt jeden Thread in einer eigenen versteckten Anfrage; bei „Wie die Sitzung“ geht sie auf das Modell der Sitzung, wie Codex sie sendet, wenn es ein eigenes von Codex ist",
+ "Writes each thread’s short description in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "Schreibt die Kurzbeschreibung jedes Threads in einer eigenen versteckten Anfrage; bei „Wie die Sitzung“ geht sie auf das Modell der Sitzung, wie Codex sie sendet, wenn es ein eigenes von Codex ist",
+ "Guesses your next message for the composer, reading the whole conversation again each time; same as the session, it goes on the session’s model": "Errät Ihre nächste Nachricht fürs Eingabefeld und liest dafür jedes Mal das ganze Gespräch neu; bei „Wie die Sitzung“ mit dem Modell der Sitzung",
"Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort": "Entscheidet eine Freigabe an Ihrer Stelle, wenn Codex’ Freigaben auf Auto-Review stehen; „Wie Codex es wählt“ ist codex-auto-review, sonst das Modell des Gesprächs mit wenig Reasoning",
- "Writes Codex’s memories of past threads, in the background; Codex’s own: gpt-5.6-terra, with gpt-5.6-luna summing up each thread": "Schreibt im Hintergrund Codex’ Erinnerungen an frühere Threads; Codex’ eigenes: gpt-5.6-terra, Threads zusammengefasst mit gpt-5.6-luna",
+ "Writes Codex’s memories of past threads, in the background; same as the session, on the session’s model, or on gpt-5.6-terra and gpt-5.6-luna when that is one of Codex’s own": "Schreibt im Hintergrund Codex’ Erinnerungen an frühere Threads; bei „Wie die Sitzung“ mit dem Modell der Sitzung, mit gpt-5.6-terra und gpt-5.6-luna, wenn es ein eigenes von Codex ist",
"Switched off in System Settings’ Login Items, so magpie won’t open at login": "In den Systemeinstellungen unter „Anmeldeobjekte“ ausgeschaltet, daher öffnet sich magpie bei der Anmeldung nicht",
"Open Login Items": "Anmeldeobjekte öffnen",
"Opens in the menu bar with no window. System Settings › General › Login Items lists it under App Background Activity, not Open at Login": "Öffnet sich in der Menüleiste, ohne Fenster. Systemeinstellungen › Allgemein › Anmeldeobjekte führt es unter „App-Hintergrundaktivitäten“, nicht unter „Bei der Anmeldung öffnen“",
@@ -12940,8 +12937,7 @@ const I18N = {
"Codex composer predictions": "Codex-Eingabevorhersagen",
"no prediction, nothing sent": "keine Vorhersage, nichts gesendet",
"Prediction": "Vorhersage",
- "Codex’s own (ChatGPT)": "Eigene von Codex (ChatGPT)",
- "as Codex sends them": "wie Codex sie sendet",
+ "as Codex sends them when the session is on Codex’s own model": "wie Codex sie sendet, wenn die Sitzung auf einem eigenen Modell von Codex ist",
"Codex auto-review model": "Modell für Codex’ Auto-Review",
"Codex’s own pick": "Wie Codex es wählt",
"as Codex picks it": "Codex’ Standard",
diff --git a/internal/gui/tests/codex-descriptions.test.cjs b/internal/gui/tests/codex-descriptions.test.cjs
index f255a0642..b97abf307 100644
--- a/internal/gui/tests/codex-descriptions.test.cjs
+++ b/internal/gui/tests/codex-descriptions.test.cjs
@@ -1,7 +1,7 @@
// Run with Node's test runner and Playwright on the module path; see README.md.
// Codex's "Codex thread descriptions" (#1198, congee949): Codex's
// thread_description requests go where this says, apart from the titles'
-// setting. By default Codex's own (ChatGPT); the app's menu (no native
+// setting. By default the session's model (cybercaius); the app's menu (no native
// select) offers magpie's models; a pick posts settings/codex-descriptions
// on its own, the titles' setting untouched, its button shows the choice
// under a name with no line of its own (as the titles' row, 1ooogle on X),
@@ -69,8 +69,8 @@ function server(lang, posted) {
}
const want = {
- en: { name: "Codex thread descriptions", own: "Codex’s own (ChatGPT)" },
- zh: { name: "Codex 会话描述", own: "Codex 自带(ChatGPT)" },
+ en: { name: "Codex thread descriptions", own: "Same as the session" },
+ zh: { name: "Codex 会话描述", own: "跟随当前会话" },
};
const view = (page) => page.locator("#view-agents").evaluate((v) => v.scrollTop);
@@ -99,7 +99,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await pick.waitFor();
assert.equal(await page.locator("#codexDescriptionsRow select").count(), 0, "no native select");
assert.equal((await row.locator(".name").textContent()).trim(), want[lang].name);
- assert.equal((await pick.textContent()).trim(), want[lang].own, "Codex's own by default");
+ assert.equal((await pick.textContent()).trim(), want[lang].own, "the session's by default (cybercaius)");
assert.equal(await row.locator(".sub").count(), 0, "the row says its name alone, its button the choice (1ooogle on X)");
// the chip's icon is the chip's size, not the row's 18–22px (duanckham on X)
assert.deepEqual(await pick.locator(".ic").evaluate((e) => [e.offsetWidth, e.offsetHeight]), [14, 14]);
@@ -110,7 +110,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
const before = await view(page);
assert(before > 0, "the agents list must scroll to the row");
- // the app's menu: Codex's own and magpie's models
+ // the app's menu: the session's and magpie's models
await pick.click();
await page.locator("#pop:not([hidden]) #list li").first().waitFor();
const items = (await page.locator("#list li:not(.group)").allTextContents()).join("|");
@@ -129,7 +129,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.equal(await view(page), before, "picking a model scrolled the page");
assert.equal(await row.locator(".sub").count(), 0);
- // and back to Codex's own
+ // and back to the session's
await pick.click();
await page.locator("#pop:not([hidden]) #list li").first().waitFor();
await page.locator("#list li:not(.group)").filter({ hasText: want[lang].own }).first().click();
diff --git a/internal/gui/tests/codex-memories-settings.test.cjs b/internal/gui/tests/codex-memories-settings.test.cjs
index 313333d6c..992e9a0e9 100644
--- a/internal/gui/tests/codex-memories-settings.test.cjs
+++ b/internal/gui/tests/codex-memories-settings.test.cjs
@@ -4,8 +4,8 @@
// subagent squares, and wasn't found), in its settings on its opened row
// (Settings had them till the owner, 10-20). The row sits under "Codex auto-review
// model" with its name alone (1ooogle on X); unset it is
-// Codex's own pick. It opens the app's model picker (no native select), and
-// a pick posts Codex's memories field, and Default puts Codex's own back.
+// the same as the session (cybercaius). It opens the app's model picker (no native select), and
+// a pick posts Codex's memories field, and Default puts the session's back.
// The card has no square for it beside the row, the same setting twice (the
// owner, 10-25). No Codex with the field: no row, and Claude Code's settings
// haven't it. No click
@@ -74,10 +74,10 @@ function server(lang, sets, codex) {
// the words as i18n.js has them
const W = {
- en: { name: "Codex memories model", own: "Codex’s own pick", def: "Default" },
- zh: { name: "Codex 记忆整理模型", own: "由 Codex 决定", def: "默认" },
- ja: { name: "Codex メモリ整理のモデル", own: null, def: null },
- de: { name: "Codex-Modell für Erinnerungen", own: null, def: null },
+ en: { name: "Codex memories model", own: "Same as the session", def: "Default" },
+ zh: { name: "Codex 记忆整理模型", own: "跟随当前会话", def: "默认" },
+ ja: { name: "Codex メモリ整理のモデル", own: "セッションと同じ", def: null },
+ de: { name: "Codex-Modell für Erinnerungen", own: "Wie die Sitzung", def: null },
};
const view = (page) => page.locator("#view-agents").evaluate((v) => v.scrollTop);
@@ -110,7 +110,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.equal(await page.evaluate(() => document.querySelector("#codexAutoReviewRow").nextElementSibling?.id), "codexMemoriesRow");
assert.equal(await row.locator("select").count(), 0, "no native select");
assert.equal((await row.locator(".name").textContent()).trim(), w.name);
- if (w.own) assert.equal((await pick.textContent()).trim(), w.own, "Codex's own pick by default");
+ if (w.own) assert.equal((await pick.textContent()).trim(), w.own, "the session's by default (cybercaius)");
assert.equal(await row.locator(".sub").count(), 0, "the row says its name alone, its button the choice (1ooogle on X)");
// the title, its line and the button fit the row
const fit = await row.evaluate((r) => {
@@ -153,7 +153,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
for (let i = 0; i < 100 && sets.length < 2; i++) await page.waitForTimeout(50);
assert.deepEqual(sets.at(-1), { agent: "codex", field: "memories", value: "" });
- // and the row shows Codex's own again
+ // and the row shows the session's again
if (w.own) await page.locator("#codexMemoriesPick button", { hasText: w.own }).waitFor();
assert.equal(await row.locator(".sub").count(), 0);
assert.deepEqual(errors, []);
diff --git a/internal/gui/tests/codex-predictions.test.cjs b/internal/gui/tests/codex-predictions.test.cjs
index 6d1d73c7d..70cfc33c9 100644
--- a/internal/gui/tests/codex-predictions.test.cjs
+++ b/internal/gui/tests/codex-predictions.test.cjs
@@ -1,8 +1,8 @@
// Run with Node's test runner and Playwright on the module path; see README.md.
// Codex's "Codex composer predictions" (#1970, pluo): the Codex app's
// guess at the user's next message, a hidden turn that reads the whole
-// conversation again, goes where this says. By default Codex's own
-// (ChatGPT); Off answers it with no prediction; the app's menu (no native
+// conversation again, goes where this says. By default the
+// session's model (cybercaius); Off answers it with no prediction; the app's menu (no native
// select) offers magpie's models; a pick posts settings/codex-predictions
// on its own, the titles' and descriptions' settings untouched, its button
// shows the choice under a name with no line of its own (as its siblings,
@@ -71,11 +71,11 @@ function server(lang, posted) {
}
const want = {
- en: { name: "Codex composer predictions", own: "Codex’s own (ChatGPT)", off: "Off" },
- zh: { name: "Codex 输入框预测", own: "Codex 自带(ChatGPT)", off: "关闭" },
- "zh-TW": { name: "Codex 輸入框預測", own: "Codex 自帶(ChatGPT)", off: "關閉" },
- ja: { name: "Codex の入力予測", own: "Codex 自身(ChatGPT)", off: "オフ" },
- de: { name: "Codex-Eingabevorhersagen", own: "Eigene von Codex (ChatGPT)", off: "Aus" },
+ en: { name: "Codex composer predictions", own: "Same as the session", off: "Off" },
+ zh: { name: "Codex 输入框预测", own: "跟随当前会话", off: "关闭" },
+ "zh-TW": { name: "Codex 輸入框預測", own: "跟隨目前工作階段", off: "關閉" },
+ ja: { name: "Codex の入力予測", own: "セッションと同じ", off: "オフ" },
+ de: { name: "Codex-Eingabevorhersagen", own: "Wie die Sitzung", off: "Aus" },
};
const view = (page) => page.locator("#view-agents").evaluate((v) => v.scrollTop);
@@ -106,7 +106,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await pick.waitFor();
assert.equal(await row.locator("select").count(), 0, "no native select");
assert.equal((await row.locator(".name").textContent()).trim(), want[lang].name);
- assert.equal((await pick.textContent()).trim(), want[lang].own, "Codex's own by default");
+ assert.equal((await pick.textContent()).trim(), want[lang].own, "the session's by default (cybercaius)");
assert.equal(await row.locator(".sub").count(), 0, "the row says its name alone, its button the choice (1ooogle on X)");
assert.deepEqual(await pick.locator(".ic").evaluate((e) => [e.offsetWidth, e.offsetHeight]), [14, 14]);
// the chip stays inside its row, the row inside the window
@@ -130,7 +130,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await page.locator("#list li:not(.group)").filter({ hasText: s }).first().click();
};
- // the app's menu: Codex's own, Off and magpie's models
+ // the app's menu: the session's, Off and magpie's models
await pick.click();
await page.locator("#pop:not([hidden]) #list li").first().waitFor();
const items = (await page.locator("#list li:not(.group)").allTextContents()).join("|");
@@ -153,7 +153,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.equal(await view(page), before, "picking a model scrolled the page");
assert.equal(await row.locator(".sub").count(), 0);
- // and back to Codex's own
+ // and back to the session's
await pickItem(want[lang].own);
await shows(want[lang].own);
assert.deepEqual(posted.at(-1), ["codex-predictions", { model: "" }]);
diff --git a/internal/gui/tests/codex-titles.test.cjs b/internal/gui/tests/codex-titles.test.cjs
index b6896d06c..9b0476186 100644
--- a/internal/gui/tests/codex-titles.test.cjs
+++ b/internal/gui/tests/codex-titles.test.cjs
@@ -1,7 +1,7 @@
// Run with Node's test runner and Playwright on the module path; see README.md.
// Codex's "Codex thread titles" (#705, DuGuaiYA: Codex's thread_title
// requests go through its own ChatGPT sign-in even on magpie's models): by
-// default Codex's own (ChatGPT); the app's menu (no native select) offers
+// default the session's model (cybercaius); the app's menu (no native select) offers
// Off and magpie's models; a pick posts settings/codex-titles on its own,
// its button shows the choice under a name with no line of its own
// (1ooogle on X), and no click scrolls the Agents page, where Codex's row holds it.
@@ -68,8 +68,8 @@ function server(lang, posted) {
}
const want = {
- en: { name: "Codex thread titles", own: "Codex’s own (ChatGPT)", off: "Off" },
- zh: { name: "Codex 会话标题", own: "Codex 自带(ChatGPT)", off: "关闭" },
+ en: { name: "Codex thread titles", own: "Same as the session", off: "Off" },
+ zh: { name: "Codex 会话标题", own: "跟随当前会话", off: "关闭" },
};
const view = (page) => page.locator("#view-agents").evaluate((v) => v.scrollTop);
@@ -98,7 +98,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await pick.waitFor();
assert.equal(await page.locator("#codexTitlesRow select").count(), 0, "no native select");
assert.equal((await row.locator(".name").textContent()).trim(), want[lang].name);
- assert.equal((await pick.textContent()).trim(), want[lang].own, "Codex's own by default");
+ assert.equal((await pick.textContent()).trim(), want[lang].own, "the session's by default (cybercaius)");
assert.equal(await row.locator(".sub").count(), 0, "the row says its name alone, its button the choice (1ooogle on X)");
// the chip's icon is the chip's size, not the row's 18–22px (duanckham on X)
assert.deepEqual(await pick.locator(".ic").evaluate((e) => [e.offsetWidth, e.offsetHeight]), [14, 14]);
@@ -109,7 +109,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
const before = await view(page);
assert(before > 0, "the agents list must scroll to the row");
- // the app's menu: Codex's own, Off and magpie's models
+ // the app's menu: the session's, Off and magpie's models
await pick.click();
await page.locator("#pop:not([hidden]) #list li").first().waitFor();
const items = (await page.locator("#list li:not(.group)").allTextContents()).join("|");
@@ -129,7 +129,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.deepEqual(posted.at(-1), ["codex-titles", { model: "deepseek/deepseek-v4-flash" }]);
assert.equal(await row.locator(".sub").count(), 0);
- // and back to Codex's own
+ // and back to the session's
await pick.click();
await page.locator("#pop:not([hidden]) #list li").first().waitFor();
await page.locator("#list li:not(.group)").filter({ hasText: want[lang].own }).first().click();