codex: "Same as the lead" holds every subagent to the lead's model (cleverpigo on X)
cleverpigo (Windows, Codex App 26.1027.6604.0) had Codex's lead on WorkBuddy's DeepSeek-V4.1-Flash, the subagent model on what the GUI called "Same as the lead", and the Routing page still showed a subagent on gpt-5.6-sol through Codex's own sign-in. Cause: that setting, unset, never held a subagent to anything. Since67c8f562c(mengxiao) a subagent keeps the model its lead names in spawn_agent (codexFollowTo leaves subagents alone; codexSubagentPick returns nil with nothing set), and Codex lists its own models first under spawn_agent's model overrides, so the DeepSeek lead named gpt-5.6-sol. Codex's side calls use luna, terra or codex-auto-review, not sol, so it was the subagent, not a side call. Now: - "lead" (settings.CodexSubagentLead / provider.CodexSubagentLead) is a value of CodexSubagentModel: every Codex subagent goes on the model the lead's own turns last went on (codexLeads.lookup), whatever it names. The trace says so (SubagentPick.Lead) and Routing tells it as "the model its lead is on". - A lead on one of Codex's own models is followed on the ChatGPT backend route only; in serve such a lead leaves the request as asked. With no lead turn seen, a subagent goes as asked. - The GUI's picker offers "Lead's pick" (unset, mengxiao's case, as before) and "Same as the lead" (the new value); the texts say which one holds the subagents. en, zh, zh-TW, ja and de. - No prompt text sent to a vendor changes. Users who had it unset stay on Lead's pick; the label now says what it does, and they pick Same as the lead to hold their subagents. Docs: agent-wiring.md (subagent model field), gateway-routing.md (CodexSubagentModel paragraph). Ran, on mote through mote-run at this tree (base origin/main50265256b): - go test -tags nogui ./internal/gateway (whole package, -timeout 45m): ok - go test -tags nogui ./internal/provider ./internal/settings ./internal/settingsapi: ok; -run Codex ./internal/agent ./internal/gui: ok; -run Budget ./internal/gui (TestCoreScriptBudget): ok - go vet ./..., GOOS=windows go vet ./..., GOOS=linux go vet -tags nogui ./... (and -tags nogui darwin/windows): clean; gofmt -l: nothing - node --test, both engines: codex-subagent-model (now picks Same as the lead and back, sheet row, Routing story of a lead-moved subagent, five languages), codex-subagents-lead, i18n-keys, routing-request-model, routing-sealed-task: pass. routing-story-shrinks is red in WebKit (4 subtests, "held while under way"), the same alone at origin/main50265256b: #3954. Broken by hand (in mote's copy only): - lead lookup turned off in codexSubagentPick: both new tests red (TestCodexSubagentFollowsTheLeadWhenSet: "ChatGPT was asked for [gpt-5.6-sol]", the reporter's case). - codexBackend's gate back to bare models only: TestCodexSubagentFollowsALeadOnCodexsOwnModel red. - On the old code the tests don't build (no "lead" value), and SetCodexSubagentModel refused "lead". Not tried: a real Codex App/CLI with a DeepSeek lead spawning a subagent, and nothing on Windows (the change has no OS-specific path). The whole GUI suite wasn't run: mote had two other sessions' full GUI suites going.
This commit is contained in:
@@ -125,7 +125,7 @@ something else shows up as drift.
|
||||
- Claude Code 2.1.296 reads a Claude model whose version has a dot (`relay/claude-opus-4.6-us`) as Claude Opus 4: a retired warning, budget thinking, 32000 output tokens, no effort. With dashes (`relay/claude-opus-4-6-us`) it knows the model (misteer_ti. on Discord). So every model magpie writes into its settings (`model`, the tier envs, `ANTHROPIC_SMALL_FAST_MODEL`, `CLAUDE_CODE_SUBAGENT_MODEL`, `CLAUDE_CODE_AUTO_MODE_MODEL`, `modelPicker`), T3 Code's Claude slugs and Claude Desktop's Code-tab ids (`claudeLooking`) spell a dotted Claude version with dashes (`provider.ClaudeSpelled`), only when that spelling stands for one served id. A Claude model listed to Desktop with reasoning levels is given as `magpie-<n>.anthropic.<model>`, its dotted version dashed as well (`claudeModel`: Copilot's `claude-opus-5.5` is `…anthropic.claude-opus-5-5`, which Claude Code knows; it was `mythos-magpie-<n>`, an unknown model, and Haiku 4.5 got an effort Copilot refuses, #1819); a request for it is served by `<n>` alone (`aliased`), so that spelling needn't be unique. Mythos counts as Claude here too: Claude Code matches `claude-mythos-5-1` by substring, so `claude-mythos-5.1` would read as Mythos 5. Every read of those keys takes it back (`provider.ClaudeRead`: `claudeIn`'s `env`, `claudeMain`, `claudeStandInAt`), so magpie's fields, applied state and Drift keep the dotted id. The user's own values are stashed and given back as written. Values an older magpie wrote dotted are rewritten on the next Sync. Other vendors' ids are never respelled ([`claudedash.go`](../../internal/provider/claudedash.go)).
|
||||
- Codex's "subagents" field is `[agents] default_subagent_model`: only the model a subagent starts on when its lead names none in `spawn_agent` (codex-rs `core/src/agent/child_config.rs`). Unset, it isn't "same as model": the lead may still name another, so the GUI calls it the lead's pick, else the model (`leadPicks` in app.js), and its title points at the "subagent model" field.
|
||||
- Claude Code's "subagents" field is `env.CLAUDE_CODE_SUBAGENT_MODEL`. Unset, magpie writes nothing there (`writeTiers`, `setSubagent`), and Claude Code picks: the Agent tool call's model, then the subagent's own frontmatter model, then the variable, then the lead's model (Claude Code 2.1.306; the built-in Explore inherits, capped at opus). So the GUI calls unset "Claude Code's own pick" (`claudePicks` in app.js), not "same as model" (KorenKrita on Discord). Its effort is written only with a model: unset, a saved subagent effort is kept (`claude.subagent_effort` in the stash) and not applied, since writing the main model at that effort into the variable would pin every subagent to the main model (KorenKrita on Discord). A model picked later takes it. A value an older magpie wrote that way (the main model at an effort, not own) is moved into the stash and taken out of the env by `writeTiers` and Sync (`subagentFollowing`, `TestClaudeSubagentEffortNeedsAModel`). The window draws that effort at the right of the Subagents row like a tier's, disabled at Default while the model is unset (`effortBtn` in `connectPanel`, `claude-subagent-effort-row.test.cjs`); the tray panel keeps its own square.
|
||||
- Codex's "subagent model" field writes nothing to Codex's config: its lead names each subagent's model in `spawn_agent`, which `[agents]` can't overrule. It is magpie's setting (`settings.CodexSubagentModel`, [`codex_subagent.go`](../../internal/provider/codex_subagent.go)), and the gateway moves the subagent's request onto it (see [gateway routing](gateway-routing.md)). Its options are every model and routing group Codex's own lists show (`CatalogFor("codex")`, so a model taken out of them or not picked is left out here too), ChatGPT accounts' first (#1633: a lead on a chat provider wants its subagents there too). A task a ChatGPT-backed lead sealed opens only on a ChatGPT account, so the gateway keeps such a subagent on its own model when the one set is another provider's. Its setter takes any `provider/model` or `group/<id>`, also one magpie doesn't serve now, so a profile or backup put back on another computer still applies (`ApplyFields` stops at the first failed Set), and refuses one of Codex's own bare names.
|
||||
- Codex's "subagent model" field writes nothing to Codex's config: its lead names each subagent's model in `spawn_agent`, which `[agents]` can't overrule. It is magpie's setting (`settings.CodexSubagentModel`, [`codex_subagent.go`](../../internal/provider/codex_subagent.go)), and the gateway moves the subagent's request onto it (see [gateway routing](gateway-routing.md)). Its options are every model and routing group Codex's own lists show (`CatalogFor("codex")`, so a model taken out of them or not picked is left out here too), ChatGPT accounts' first (#1633: a lead on a chat provider wants its subagents there too). A task a ChatGPT-backed lead sealed opens only on a ChatGPT account, so the gateway keeps such a subagent on its own model when the one set is another provider's. Its setter takes any `provider/model` or `group/<id>`, also one magpie doesn't serve now, so a profile or backup put back on another computer still applies (`ApplyFields` stops at the first failed Set), and refuses one of Codex's own bare names. Unset, the GUI says "Lead's pick": the lead may name one of Codex's own models, which goes through Codex's ChatGPT sign-in. "Same as the lead" is the value `lead` (`provider.CodexSubagentLead`): every subagent on the model the lead's own turns go on, whatever it names (cleverpigo on X: a lead on WorkBuddy's DeepSeek named `gpt-5.6-sol`, the first of Codex's own models `spawn_agent` lists, under what then read "Same as the lead").
|
||||
- Claude Desktop's "subagent model" field (`subagent_model`, `desktopSubagentField` in [`claudedesktop.go`](../../internal/agent/claudedesktop.go)) writes nothing to Desktop's config: Desktop runs its Code tab's Claude Code with `CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST=1`, under which Claude Code ignores `CLAUDE_CODE_SUBAGENT_MODEL`, `CLAUDE_CODE_SUBAGENT_MODEL_FORCE` and the tier variables in its settings files' `env` ("Ignoring … this session's provider routing is managed by the host", Claude Code 2.1.295), and the env Desktop builds for the Code tab has no key for it (Desktop 2.31226). It is magpie's setting (`settings.DesktopSubagentModel`, [`desktop_subagent.go`](../../internal/provider/desktop_subagent.go)), and the gateway moves each subagent's turn onto it (see [gateway routing](gateway-routing.md)). It is labelled as Codex's, so the Agents page gives it the same square. Its options are magpie's models and groups as Desktop's list shows them (`viaMagpie("claude-desktop")`), while Desktop is on magpie, as for the tiers. A Desktop alias picked is kept by its catalog id (`DesktopCatalogID`). Like Codex's, its setter takes any `provider/model` or `group/<id>`, also one magpie doesn't serve now, so a profile or backup still applies, and refuses a bare name. It is `Live`: the gateway reads it on each request.
|
||||
- Claude Desktop's tiers also write magpie's profile's `inferenceModels` (`desktopSyncModels` in [`claudedesktop_models.go`](../../internal/agent/claudedesktop_models.go)), the list `gateway.DesktopInferenceModels` gives (see [gateway routing](gateway-routing.md)): on a tier's `Set`, as Desktop comes on magpie, and on the agent's `Sync`, so a provider saved or removed reaches it through `SyncCatalog`. Desktop 4.4212 reads no `/v1/models` while such a list has no bare tier word as a name (`adminListObviatesDiscovery` in its app.asar) and names an entry by its `labelOverride`, else its catalog's name, else the id, so every entry carries the `display_name` `/v1/models` gives its row as `labelOverride`; without it every `mythos-magpie-<number>` read as that id once a tier was picked (chengming0v0 on Discord, `TestDesktopInferenceModelsNamed`), and a catalog-named Claude model reads as that name too ("Opus 5.5 · <provider>") while the list is written. It is written through temp-and-rename and only when it changed, and taken away when no tier is picked. The list is magpie's only while its hash is one magpie recorded (`desktopModelsMark` in the stash, the next hash recorded before each write); any other list, the user's own or one carried from their own gateway profile, is never written over or taken away. A pick that runs as a Claude model (`behavesAs`) is told its own window in Claude Code's `modelSettings` (`claudeBudget.behaves`), since Claude Code would otherwise run it at that Claude model's. Desktop reads the list as it starts. Not tried against a real Desktop 4.29 or later; a Desktop below 2 (no mythos word) is given the mythos ids `/v1/models` gives 2 and up. `TestClaudeDesktopModelsList`.
|
||||
- Claude Desktop's "subagent effort" (`desktopSubagentEffortField`, `settings.DesktopSubagentEffort`) is also Quiet and Live. Default keeps the effort the request asks for, including disabled thinking; it never selects a new default. A picked level works independently of the subagent model: no model pick, the same model and an unavailable model pick all still take the effort. While wired, the field offers the selected model's levels, or the standard levels when its model is inherited or unavailable; a model marked reasonless offers none. The stored pick survives model changes. A disconnected preference can be saved or cleared without connecting Desktop or showing restart advice, so profile restoration and Disconnect can restore a value saved before connecting; reconnect returns to the last live pick. `subEffortTitle` gives Desktop the Claude Code default explanation; Codex's default meaning is unchanged. The gateway fits each attempt to its actual model and preserves fixed group-member efforts (see [gateway routing](gateway-routing.md)).
|
||||
|
||||
@@ -154,7 +154,7 @@ recorded as a prediction failure (`noPrediction`).
|
||||
- A gateway key held to some models (`keyHolds`, #882) gets a 403 for any other model. A routing group passes only through `groupAllowed`, which every route asks (the model lists' `entryAllowed`, `serve`, `countHeld`, embeddings, images, videos, decision groups, a subagent's and masking's route): a group of the user's own only when the key names it, whatever its members (kautism on Discord), a found group (`foundGroup`), or any group for a key that names accounts and no model (`Identity.AccountModels`), when the key may use every member; a bare name that is both a group of the user's the key may not use and a model it may use is that model for the key (`keyGroupFor`; `TestGatewayKeyGivenAModelIsNotGivenItsGroup`). A decision model is one: `serveSystemOne` and the decision list another magpie asks for (`DecidersHeader`) hold the key to it, while a group the key names asks its own decider in `askJev` with no key check (`TestGatewayKeyHeldToAGroupKeepsItsDecider`); the key editor offers the decision models (`GET /api/caller-keys/models`, `decides`, `TestCallerKeyModelsOfferDeciders`, `gateway-key-deciders.test.cjs`).
|
||||
- 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.
|
||||
- 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. Set to `lead` (`provider.CodexSubagentLead`, "Same as the lead"), the model is the one the lead's own turns last went on (`codexLeads.lookup`: the parent thread's, else the session's, else the gateway key's last turn), with `SubagentPick.Lead`; `codexBackend` then picks for any model asked, a magpie model too, and a lead on one of Codex's own models takes the subagent to the ChatGPT sign-in on it (in `serve` such a lead leaves the request as asked). With no lead turn seen, the request goes as asked. The lead's turns, titles and every other kind are never moved.
|
||||
- With no model set for them in Codex's config (`[memories] extract_model`/`consolidation_model`, read by `agent.CodexSideSet`; a config it can't read counts as set), a Codex 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 (`servedSession`, `TestCodexMemoriesBeforeAnyTurnFollowTheConfig`). A memory call is read after the turn it was started with (`codexMemorySession`, above). A model magpie can't resolve now or one a gateway key may not use leaves the call as it came. A subagent never follows: Codex starts a spawn that names no model on its lead's (codex-rs `child_config.rs`), so a bare model in a subagent's request under a lead on magpie's was named (spawn_agent's `model`, `[agents] default_subagent_model` or a role's config), and with no model set for Codex's subagents in magpie it goes on that model (`TestCodexSubagentKeepsTheModelItWasNamed`, mengxiao on Discord); only `settings.CodexSubagentModel` moves it (`codexSubagentPick`). 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 paid ChatGPT sign-in (#1593). On a Free plan it isn't (cybercaius measured it on Discord), so with the setting unset and Codex's live sign-in on the `free` plan (`codexcat.AutoReviewModel`, the plan from `provider.CodexSignInPlan`), it counts as `session` (`TestCodexAutoReviewOnAFreePlan`).
|
||||
- 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.
|
||||
|
||||
@@ -1926,7 +1926,10 @@ func codexIn(at place) *Agent {
|
||||
// and nobody could tell them apart (the owner). So a pick
|
||||
// here, Default too, takes away [agents]
|
||||
// default_subagent_model, and Default is then the lead's
|
||||
// model or the one it names, as it says
|
||||
// model or the one it names, as it says. "lead"
|
||||
// (provider.CodexSubagentLead, the GUI's Same as the lead)
|
||||
// puts every subagent on the lead's own model, whatever it
|
||||
// names (cleverpigo on X)
|
||||
Key: "subagent_model", Label: "subagent model", Quiet: true,
|
||||
Get: provider.CodexSubagentModel,
|
||||
Set: func(v string) error {
|
||||
|
||||
@@ -155,9 +155,11 @@ func (s *Server) codexBackend(w http.ResponseWriter, r *http.Request) {
|
||||
// it stays on the model it was named (codexFollowTo). A
|
||||
// memory call with nothing set for it goes on the model its
|
||||
// conversation is on when that is one of magpie's, not on
|
||||
// the ChatGPT sign-in (codexFollowTo)
|
||||
if !strings.Contains(model, "/") {
|
||||
pick := codexSubagentPick(r, agentOf(r), kind, model, body)
|
||||
// the ChatGPT sign-in (codexFollowTo). Set to the lead's model,
|
||||
// a subagent asking for any model goes on the lead's, one of
|
||||
// Codex's own through its sign-in too (codexSubagentPick)
|
||||
if !strings.Contains(model, "/") || provider.CodexSubagentModel() == provider.CodexSubagentLead {
|
||||
pick := s.codexSubagentPick(r, agentOf(r), kind, model, body, true)
|
||||
if to := s.codexFollowTo(r, agentOf(r), kind, model, body); to != "" {
|
||||
body, model = withModel(body, to), to
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package gateway
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/yetone/magpie/internal/provider"
|
||||
"github.com/yetone/magpie/internal/usage"
|
||||
@@ -12,11 +13,13 @@ import (
|
||||
// its agent's subagents, in place of the one its lead asked for: Codex's
|
||||
// (provider.CodexSubagentModel, willz on Discord) or Claude Desktop's
|
||||
// (provider.DesktopSubagentModel). Kept says why it went on the model
|
||||
// asked for instead, "" when it was put on To.
|
||||
// asked for instead, "" when it was put on To. Lead says To is the model
|
||||
// the lead's own turns go on (provider.CodexSubagentLead).
|
||||
type SubagentPick struct {
|
||||
Asked string `json:"asked"`
|
||||
To string `json:"to"`
|
||||
Kept string `json:"kept,omitempty"`
|
||||
Lead bool `json:"lead,omitempty"`
|
||||
}
|
||||
|
||||
// Moved says the request went on To.
|
||||
@@ -49,17 +52,38 @@ func subagentPickOf(r *http.Request) *SubagentPick {
|
||||
// no model set, so setting one is never worse than leaving it unset. A
|
||||
// relay that sealed the lead's task (#1109) is reached that way too: the
|
||||
// lead names it.
|
||||
func codexSubagentPick(r *http.Request, agent, kind, asked string, body []byte) *SubagentPick {
|
||||
//
|
||||
// Set to the lead's model (provider.CodexSubagentLead), the subagent goes
|
||||
// on the model its lead's own turns last went on (codexLeads), even when
|
||||
// the lead named another in spawn_agent (cleverpigo on X: a lead on
|
||||
// WorkBuddy's DeepSeek named gpt-5.6-sol, and the subagent went to
|
||||
// ChatGPT). native says the request can go to Codex's own ChatGPT sign-in
|
||||
// (its backend's route), where a lead on one of Codex's own models is
|
||||
// followed too; elsewhere such a lead leaves the request as asked.
|
||||
func (s *Server) codexSubagentPick(r *http.Request, agent, kind, asked string, body []byte, native bool) *SubagentPick {
|
||||
// Codex by its token or by its User-Agent (fromCodex: its CLI, exec,
|
||||
// the IDE extension, the desktop app)
|
||||
if agent != "codex" && !fromCodex(r.Header) || usage.PurposeOf(kind) != "kind:collab_spawn" {
|
||||
return nil
|
||||
}
|
||||
to := provider.CodexSubagentModel()
|
||||
to, lead := provider.CodexSubagentModel(), false
|
||||
if to == provider.CodexSubagentLead {
|
||||
to, _, _ = s.codexLeads.lookup(r, body)
|
||||
lead = true
|
||||
}
|
||||
if to == "" || to == asked {
|
||||
return nil
|
||||
}
|
||||
pick := &SubagentPick{Asked: asked, To: to}
|
||||
pick := &SubagentPick{Asked: asked, To: to, Lead: lead}
|
||||
if lead && !strings.Contains(to, "/") {
|
||||
// the lead on one of Codex's own models: the subagent goes to
|
||||
// the ChatGPT sign-in on it, where a model the user disabled is
|
||||
// refused (codexNativeOff)
|
||||
if !native {
|
||||
return nil
|
||||
}
|
||||
return pick
|
||||
}
|
||||
if _, off := idOff(to); off {
|
||||
// the user disabled it (#1867): the subagent stays on its lead's
|
||||
// model, itself refused when it is disabled too
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package gateway
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -80,3 +81,80 @@ func TestCodexSubagentSealedTaskStaysOffAChatProvider(t *testing.T) {
|
||||
t.Fatalf("trace: %+v", r.Subagent)
|
||||
}
|
||||
}
|
||||
|
||||
// cleverpigo on X: Codex's lead on WorkBuddy's DeepSeek through magpie, the
|
||||
// subagent model left at what read "Same as the lead", and the Routing
|
||||
// page showed a subagent on gpt-5.6-sol through Codex's own sign-in: the
|
||||
// lead named it in spawn_agent, where Codex lists its own models first.
|
||||
// Set to the lead's model, every subagent goes on the model the lead's own
|
||||
// turns go on, whatever the lead names, and ChatGPT isn't asked.
|
||||
func TestCodexSubagentFollowsTheLeadWhenSet(t *testing.T) {
|
||||
up := codexSubagentSetup(t)
|
||||
token := chatRecordedOn(t, "token", "deepseek-v4.1-flash")
|
||||
if err := provider.SetCodexSubagentModel(provider.CodexSubagentLead); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
s := New()
|
||||
if rec := codexSubTurn(s, "token/deepseek-v4.1-flash", "lead-1", "", leadAsk); rec.Code != 200 {
|
||||
t.Fatalf("lead: %d %s", rec.Code, rec.Body.String())
|
||||
}
|
||||
// a subagent the lead named one of Codex's own models for, and one it
|
||||
// named another of magpie's for, each its own thread (a resumed one
|
||||
// stays on the model it started on)
|
||||
for i, asked := range []string{"gpt-5.6-sol", "third/gpt-6-astra"} {
|
||||
rec := codexAsksIn(s, fmt.Sprintf("worker-%d", i+1), asked, "collab_spawn", plainTask)
|
||||
if rec.Code != 200 || !strings.Contains(rec.Body.String(), "ok") {
|
||||
t.Fatalf("%s: %d %s", asked, rec.Code, rec.Body.String())
|
||||
}
|
||||
if got := up.asked(); len(got) != 0 {
|
||||
t.Fatalf("%s: ChatGPT was asked for %v", asked, got)
|
||||
}
|
||||
r := lastRoute(s)
|
||||
if r.Subagent == nil || *r.Subagent != (SubagentPick{Asked: asked, To: "token/deepseek-v4.1-flash", Lead: true}) || r.Provider != "token" {
|
||||
t.Fatalf("%s: trace: provider %q subagent %+v", asked, r.Provider, r.Subagent)
|
||||
}
|
||||
}
|
||||
if got := token.requests(); len(got) != 3 || !strings.Contains(got[2], "read the README") {
|
||||
t.Fatalf("token was asked %d times", len(got))
|
||||
}
|
||||
// the lead's own turn stays as asked
|
||||
if rec := codexSubTurn(s, "token/deepseek-v4.1-flash", "lead-1", "", leadAsk); rec.Code != 200 {
|
||||
t.Fatalf("lead: %d", rec.Code)
|
||||
}
|
||||
if r := lastRoute(s); r.Subagent != nil {
|
||||
t.Fatalf("lead traced %+v", r.Subagent)
|
||||
}
|
||||
}
|
||||
|
||||
// Set to the lead's model with the lead on one of Codex's own: a subagent
|
||||
// the lead named one of magpie's models for goes to the ChatGPT sign-in on
|
||||
// the lead's model. With no lead turn seen, a subagent goes as asked.
|
||||
func TestCodexSubagentFollowsALeadOnCodexsOwnModel(t *testing.T) {
|
||||
up := codexSubagentSetup(t)
|
||||
token := chatRecordedOn(t, "token", "deepseek-v4.1-flash")
|
||||
if err := provider.SetCodexSubagentModel(provider.CodexSubagentLead); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
s := New()
|
||||
if rec := codexAsks(s, "token/deepseek-v4.1-flash", "collab_spawn", plainTask); rec.Code != 200 {
|
||||
t.Fatalf("no lead: %d %s", rec.Code, rec.Body.String())
|
||||
}
|
||||
if r := lastRoute(s); r.Subagent != nil || len(token.requests()) != 1 {
|
||||
t.Fatalf("no lead: traced %+v, token asked %d times", r.Subagent, len(token.requests()))
|
||||
}
|
||||
if rec := codexSubTurn(s, "gpt-5.5", "lead-1", "", leadAsk); rec.Code != 200 {
|
||||
t.Fatalf("lead: %d %s", rec.Code, rec.Body.String())
|
||||
}
|
||||
if rec := codexAsksIn(s, "worker-2", "token/deepseek-v4.1-flash", "collab_spawn", plainTask); rec.Code != 200 {
|
||||
t.Fatalf("subagent: %d %s", rec.Code, rec.Body.String())
|
||||
}
|
||||
if got := up.asked(); len(got) != 2 || got[1] != "gpt-5.5" {
|
||||
t.Fatalf("ChatGPT was asked for %v", got)
|
||||
}
|
||||
if n := len(token.requests()); n != 1 {
|
||||
t.Fatalf("token was asked %d times", n)
|
||||
}
|
||||
if r := lastRoute(s); r.Subagent == nil || *r.Subagent != (SubagentPick{Asked: "token/deepseek-v4.1-flash", To: "gpt-5.5", Lead: true}) {
|
||||
t.Fatalf("trace: %+v", r.Subagent)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,13 +64,18 @@ func codexSubagentSetup(t *testing.T) *chatgptSeen {
|
||||
// codexAsks is a request of Codex's, a subagent's when kind is
|
||||
// collab_spawn, a lead's when it is "".
|
||||
func codexAsks(s *Server, model, kind, input string) *httptest.ResponseRecorder {
|
||||
return codexAsksIn(s, "worker-1", model, kind, input)
|
||||
}
|
||||
|
||||
// codexAsksIn is codexAsks from the thread session.
|
||||
func codexAsksIn(s *Server, session, model, kind, input string) *httptest.ResponseRecorder {
|
||||
rec := httptest.NewRecorder()
|
||||
body := `{"model":"` + model + `","stream":true,"input":[` + input + `]}`
|
||||
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("User-Agent", "codex_cli_rs/0.159.0 (Mac OS 26.2.0; arm64)")
|
||||
req.Header.Set("session_id", "worker-1")
|
||||
req.Header.Set("session_id", session)
|
||||
if kind != "" {
|
||||
req.Header.Set("x-openai-subagent", kind)
|
||||
req.Header.Set("x-codex-parent-thread-id", "lead-1")
|
||||
|
||||
@@ -2318,7 +2318,7 @@ func (s *Server) serve(w http.ResponseWriter, r *http.Request, from provider.Pro
|
||||
// model it was
|
||||
subagent := subagentPickOf(r)
|
||||
if subagent == nil {
|
||||
subagent = codexSubagentPick(r, agent, call.Kind, call.Model, body)
|
||||
subagent = s.codexSubagentPick(r, agent, call.Kind, call.Model, body, false)
|
||||
}
|
||||
var desktopPick *SubagentPick
|
||||
if subagent == nil {
|
||||
|
||||
@@ -3987,10 +3987,18 @@ const codexOwnSub = (a, f) => f.label === "subagents" && codexSub(a);
|
||||
// named rows in Codex's settings: no square too (the owner, 10-25)
|
||||
const hermesBot = (f) => f.key.startsWith("profile:");
|
||||
const codexRowed = (a, f) => a.id === "codex" && !gatewayMode && (f.label === SUB_MODEL || f.label === MEMORIES);
|
||||
// Lead's pick ("") leaves each subagent on the model the lead names for it,
|
||||
// one of Codex's own as well; Same as the lead (CODEX_SUB_LEAD) holds every
|
||||
// subagent to the lead's own model, whatever it names (cleverpigo on X: a
|
||||
// lead on DeepSeek named gpt-5.6-sol under what read "same as the lead")
|
||||
const CODEX_SUB_LEAD = "lead";
|
||||
const LEADS_PICK = "Lead's pick";
|
||||
const SAME_AS_LEAD = "Same as the lead";
|
||||
const SUB_MODEL_UNSET = "The lead picks each subagent's model; one it names none for runs on the lead's model ({model}). A resumed subagent stays on the model it started on. A model picked here holds every subagent to it, even when the lead names another.";
|
||||
const SUB_MODEL_UNSET_PLAIN = "The lead picks each subagent's model; one it names none for runs on the lead's model. A resumed subagent stays on the model it started on. A model picked here holds every subagent to it, even when the lead names another.";
|
||||
const SUB_MODEL_SET = "Every subagent runs on this model, even when the lead names another. Same as the lead gives the pick back to the lead.";
|
||||
const SUB_MODEL_UNSET = "The lead picks each subagent's model, one of Codex's own too; one it names none for runs on the lead's model ({model}). A resumed subagent stays on the model it started on. Same as the lead, or a model picked here, holds every subagent to it, even when the lead names another.";
|
||||
const SUB_MODEL_UNSET_PLAIN = "The lead picks each subagent's model, one of Codex's own too; one it names none for runs on the lead's model. A resumed subagent stays on the model it started on. Same as the lead, or a model picked here, holds every subagent to it, even when the lead names another.";
|
||||
const SUB_MODEL_LEAD = "Every subagent runs on the lead's model ({model}), even when the lead names another. Lead's pick lets the lead choose again.";
|
||||
const SUB_MODEL_LEAD_PLAIN = "Every subagent runs on the lead's model, even when the lead names another. Lead's pick lets the lead choose again.";
|
||||
const SUB_MODEL_SET = "Every subagent runs on this model, even when the lead names another. Lead's pick lets the lead choose again.";
|
||||
const SUB_MODEL_OLD = "Codex's config still starts subagents on {model} when the lead names none; picking here replaces it.";
|
||||
// codexSubSaid: the subagent model's name, what it does
|
||||
function codexSubSaid(a, f) {
|
||||
@@ -3998,8 +4006,9 @@ function codexSubSaid(a, f) {
|
||||
const main = a.fields.find((x) => x.key === "model");
|
||||
const lead = main && (optionFor(main, main.value)?.label || main.value);
|
||||
const old = a.fields.find((x) => x.label === "subagents")?.value;
|
||||
const name = f.value ? opt?.label || f.value : t(SAME_AS_LEAD);
|
||||
const line = f.value ? t(SUB_MODEL_SET) : (lead ? t(SUB_MODEL_UNSET, { model: lead }) : t(SUB_MODEL_UNSET_PLAIN)) + (old ? "\n" + t(SUB_MODEL_OLD, { model: optionFor(a.fields.find((x) => x.label === "subagents"), old)?.label || old }) : "");
|
||||
const name = f.value === CODEX_SUB_LEAD ? t(SAME_AS_LEAD) : f.value ? opt?.label || f.value : t(LEADS_PICK);
|
||||
const line = f.value === CODEX_SUB_LEAD ? (lead ? t(SUB_MODEL_LEAD, { model: lead }) : t(SUB_MODEL_LEAD_PLAIN))
|
||||
: f.value ? t(SUB_MODEL_SET) : (lead ? t(SUB_MODEL_UNSET, { model: lead }) : t(SUB_MODEL_UNSET_PLAIN)) + (old ? "\n" + t(SUB_MODEL_OLD, { model: optionFor(a.fields.find((x) => x.label === "subagents"), old)?.label || old }) : "");
|
||||
return { name, line, old, lead };
|
||||
}
|
||||
const extra = (f) => f.key === "tiers" || FOLLOWS_MODEL.includes(f.label) || f.label === "sign-in" || toggled(f) || f.label === SUB_EFFORT || f.label === SUB_MODEL || f.label === AUTO_MODE || f.label === MEMORIES;
|
||||
@@ -4781,7 +4790,9 @@ function openPicker(agent, field, anchor, ev, only) {
|
||||
} else if (field.label === SUB_MODEL && codexSub(agent) && !options.some((o) => o.value === "")) {
|
||||
const said = codexSubSaid(agent, { ...field, value: "" });
|
||||
const main = agent.fields.find((f) => f.key === "model");
|
||||
options.unshift({ value: "", label: t(SAME_AS_LEAD), note: said.lead ? t("{model}, or another the lead picks for a subagent", { model: said.lead }) : t("the lead's model, or another the lead picks for a subagent"), icon: (main && optionFor(main, main.value)?.icon) || agent.icon, reset: true });
|
||||
const leadIcon = (main && optionFor(main, main.value)?.icon) || agent.icon;
|
||||
options.unshift({ value: "", label: t(LEADS_PICK), note: said.lead ? t("{model} unless the lead names another", { model: said.lead }) : t("the lead's model unless it names another"), icon: leadIcon, reset: true },
|
||||
{ value: CODEX_SUB_LEAD, label: t(SAME_AS_LEAD), note: said.lead ? t("{model}, for every subagent", { model: said.lead }) : t("the lead's model, for every subagent"), icon: leadIcon, reset: true });
|
||||
} else if (!only && !field.menu && !field.onPick && !options.some((o) => o.value === "")) {
|
||||
// Pi picks the first provider signed in when none is set (#709)
|
||||
const note = agent.id === "reasonix" && ["model", "planner"].includes(field.key) ? "restore the previous {field} selection"
|
||||
@@ -21311,7 +21322,8 @@ function renderCodexSubagentModel() {
|
||||
const b = el("button", "rt-cond on");
|
||||
b.type = "button";
|
||||
b.setAttribute("aria-label", t("Codex subagent model"));
|
||||
b.append(icon((f.value ? optionFor(f, f.value)?.icon : main && optionFor(main, main.value)?.icon) || "generic"), el("span", "", f.value ? optNamed(optionFor(f, f.value), f.value) : said.name));
|
||||
const own = f.value && f.value !== CODEX_SUB_LEAD;
|
||||
b.append(icon((own ? optionFor(f, f.value)?.icon : main && optionFor(main, main.value)?.icon) || "generic"), el("span", "", own ? optNamed(optionFor(f, f.value), f.value) : said.name));
|
||||
b.onclick = (ev) => openPicker(a, f, b, ev);
|
||||
$("#codexSubagentModelPick").replaceChildren(b);
|
||||
b.title = said.line;
|
||||
|
||||
+32
-20
@@ -1237,12 +1237,15 @@ const I18N = {
|
||||
"Same as the session": "跟随当前会话",
|
||||
"Codex memories model": "Codex 记忆整理模型",
|
||||
"Same as the lead": "跟主代理一样",
|
||||
"The lead picks each subagent's model; one it names none for runs on the lead's model ({model}). A resumed subagent stays on the model it started on. A model picked here holds every subagent to it, even when the lead names another.": "主代理为每个子代理选模型;主代理没指定时,子代理用主代理的模型({model})。恢复的子代理仍用它最初的模型。在这里选定一个模型,所有子代理都固定用它,主代理指定了别的也一样。",
|
||||
"The lead picks each subagent's model; one it names none for runs on the lead's model. A resumed subagent stays on the model it started on. A model picked here holds every subagent to it, even when the lead names another.": "主代理为每个子代理选模型;主代理没指定时,子代理用主代理的模型。恢复的子代理仍用它最初的模型。在这里选定一个模型,所有子代理都固定用它,主代理指定了别的也一样。",
|
||||
"Every subagent runs on this model, even when the lead names another. Same as the lead gives the pick back to the lead.": "所有子代理都用这个模型,主代理指定了别的也一样。选“跟主代理一样”就把选择交还给主代理。",
|
||||
"The lead picks each subagent's model, one of Codex's own too; one it names none for runs on the lead's model ({model}). A resumed subagent stays on the model it started on. Same as the lead, or a model picked here, holds every subagent to it, even when the lead names another.": "主代理为每个子代理选模型,也可能选 Codex 自带的模型;主代理没指定时,子代理用主代理的模型({model})。恢复的子代理仍用它最初的模型。选“跟主代理一样”或在这里选定一个模型,所有子代理都固定用它,主代理指定了别的也一样。",
|
||||
"The lead picks each subagent's model, one of Codex's own too; one it names none for runs on the lead's model. A resumed subagent stays on the model it started on. Same as the lead, or a model picked here, holds every subagent to it, even when the lead names another.": "主代理为每个子代理选模型,也可能选 Codex 自带的模型;主代理没指定时,子代理用主代理的模型。恢复的子代理仍用它最初的模型。选“跟主代理一样”或在这里选定一个模型,所有子代理都固定用它,主代理指定了别的也一样。",
|
||||
"Every subagent runs on this model, even when the lead names another. Lead's pick lets the lead choose again.": "所有子代理都用这个模型,主代理指定了别的也一样。选“由主代理自选”就让主代理重新选择。",
|
||||
"Every subagent runs on the lead's model ({model}), even when the lead names another. Lead's pick lets the lead choose again.": "所有子代理都用主代理的模型({model}),主代理指定了别的也一样。选“由主代理自选”就让主代理重新选择。",
|
||||
"Every subagent runs on the lead's model, even when the lead names another. Lead's pick lets the lead choose again.": "所有子代理都用主代理的模型,主代理指定了别的也一样。选“由主代理自选”就让主代理重新选择。",
|
||||
"Codex's config still starts subagents on {model} when the lead names none; picking here replaces it.": "Codex 配置里还写着:主代理没指定时,子代理用 {model}。在这里选一次就会替换掉它。",
|
||||
"{model}, or another the lead picks for a subagent": "{model},或主代理给子代理另选的模型",
|
||||
"the lead's model, or another the lead picks for a subagent": "主代理正在用的模型,或主代理给子代理另选的模型",
|
||||
"{model}, for every subagent": "{model},所有子代理都用它",
|
||||
"the lead's model, for every subagent": "主代理的模型,所有子代理都用它",
|
||||
"the lead's model unless it names another": "主代理的模型,主代理指定其他模型时除外",
|
||||
"Codex subagent model": "Codex 子代理模型",
|
||||
"{agent} settings": "{agent} 设置",
|
||||
"In {agent}'s settings, on the Agents page": "在 Agent 页的 {agent} 设置里",
|
||||
@@ -5797,12 +5800,15 @@ const I18N = {
|
||||
"Same as the session": "跟隨目前工作階段",
|
||||
"Codex memories model": "Codex 記憶整理模型",
|
||||
"Same as the lead": "跟主代理一樣",
|
||||
"The lead picks each subagent's model; one it names none for runs on the lead's model ({model}). A resumed subagent stays on the model it started on. A model picked here holds every subagent to it, even when the lead names another.": "主代理為每個子代理選模型;主代理沒指定時,子代理用主代理的模型({model})。恢復的子代理仍用它最初的模型。在這裡選定一個模型,所有子代理都固定用它,主代理指定了別的也一樣。",
|
||||
"The lead picks each subagent's model; one it names none for runs on the lead's model. A resumed subagent stays on the model it started on. A model picked here holds every subagent to it, even when the lead names another.": "主代理為每個子代理選模型;主代理沒指定時,子代理用主代理的模型。恢復的子代理仍用它最初的模型。在這裡選定一個模型,所有子代理都固定用它,主代理指定了別的也一樣。",
|
||||
"Every subagent runs on this model, even when the lead names another. Same as the lead gives the pick back to the lead.": "所有子代理都用這個模型,主代理指定了別的也一樣。選「跟主代理一樣」就把選擇交還給主代理。",
|
||||
"The lead picks each subagent's model, one of Codex's own too; one it names none for runs on the lead's model ({model}). A resumed subagent stays on the model it started on. Same as the lead, or a model picked here, holds every subagent to it, even when the lead names another.": "主代理為每個子代理選模型,也可能選 Codex 自帶的模型;主代理沒指定時,子代理用主代理的模型({model})。恢復的子代理仍用它最初的模型。選「跟主代理一樣」或在這裡選定一個模型,所有子代理都固定用它,主代理指定了別的也一樣。",
|
||||
"The lead picks each subagent's model, one of Codex's own too; one it names none for runs on the lead's model. A resumed subagent stays on the model it started on. Same as the lead, or a model picked here, holds every subagent to it, even when the lead names another.": "主代理為每個子代理選模型,也可能選 Codex 自帶的模型;主代理沒指定時,子代理用主代理的模型。恢復的子代理仍用它最初的模型。選「跟主代理一樣」或在這裡選定一個模型,所有子代理都固定用它,主代理指定了別的也一樣。",
|
||||
"Every subagent runs on this model, even when the lead names another. Lead's pick lets the lead choose again.": "所有子代理都用這個模型,主代理指定了別的也一樣。選「由主代理自選」就讓主代理重新選擇。",
|
||||
"Every subagent runs on the lead's model ({model}), even when the lead names another. Lead's pick lets the lead choose again.": "所有子代理都用主代理的模型({model}),主代理指定了別的也一樣。選「由主代理自選」就讓主代理重新選擇。",
|
||||
"Every subagent runs on the lead's model, even when the lead names another. Lead's pick lets the lead choose again.": "所有子代理都用主代理的模型,主代理指定了別的也一樣。選「由主代理自選」就讓主代理重新選擇。",
|
||||
"Codex's config still starts subagents on {model} when the lead names none; picking here replaces it.": "Codex 設定裡還寫著:主代理沒指定時,子代理用 {model}。在這裡選一次就會取代它。",
|
||||
"{model}, or another the lead picks for a subagent": "{model},或主代理給子代理另選的模型",
|
||||
"the lead's model, or another the lead picks for a subagent": "主代理正在用的模型,或主代理給子代理另選的模型",
|
||||
"{model}, for every subagent": "{model},所有子代理都用它",
|
||||
"the lead's model, for every subagent": "主代理的模型,所有子代理都用它",
|
||||
"the lead's model unless it names another": "主代理的模型,主代理指定其他模型時除外",
|
||||
"Codex subagent model": "Codex 子代理模型",
|
||||
"{agent} settings": "{agent} 設定",
|
||||
"In {agent}'s settings, on the Agents page": "在 Agent 頁的 {agent} 設定裡",
|
||||
@@ -10326,12 +10332,15 @@ const I18N = {
|
||||
"Same as the session": "セッションと同じ",
|
||||
"Codex memories model": "Codex メモリ整理のモデル",
|
||||
"Same as the lead": "リードと同じ",
|
||||
"The lead picks each subagent's model; one it names none for runs on the lead's model ({model}). A resumed subagent stays on the model it started on. A model picked here holds every subagent to it, even when the lead names another.": "各サブエージェントのモデルはリードが選びます。指定がなければリードのモデル({model})で動きます。再開したサブエージェントは最初のモデルのままです。ここでモデルを選ぶと、リードが別のモデルを指定しても、すべてのサブエージェントがそのモデルに固定されます。",
|
||||
"The lead picks each subagent's model; one it names none for runs on the lead's model. A resumed subagent stays on the model it started on. A model picked here holds every subagent to it, even when the lead names another.": "各サブエージェントのモデルはリードが選びます。指定がなければリードのモデルで動きます。再開したサブエージェントは最初のモデルのままです。ここでモデルを選ぶと、リードが別のモデルを指定しても、すべてのサブエージェントがそのモデルに固定されます。",
|
||||
"Every subagent runs on this model, even when the lead names another. Same as the lead gives the pick back to the lead.": "リードが別のモデルを指定しても、すべてのサブエージェントがこのモデルで動きます。「リードと同じ」を選ぶと、選択をリードに戻します。",
|
||||
"The lead picks each subagent's model, one of Codex's own too; one it names none for runs on the lead's model ({model}). A resumed subagent stays on the model it started on. Same as the lead, or a model picked here, holds every subagent to it, even when the lead names another.": "各サブエージェントのモデルはリードが選びます(Codex 自身のモデルも含みます)。指定がなければリードのモデル({model})で動きます。再開したサブエージェントは最初のモデルのままです。「リードと同じ」またはここで選んだモデルにすると、リードが別のモデルを指定しても、すべてのサブエージェントがそのモデルに固定されます。",
|
||||
"The lead picks each subagent's model, one of Codex's own too; one it names none for runs on the lead's model. A resumed subagent stays on the model it started on. Same as the lead, or a model picked here, holds every subagent to it, even when the lead names another.": "各サブエージェントのモデルはリードが選びます(Codex 自身のモデルも含みます)。指定がなければリードのモデルで動きます。再開したサブエージェントは最初のモデルのままです。「リードと同じ」またはここで選んだモデルにすると、リードが別のモデルを指定しても、すべてのサブエージェントがそのモデルに固定されます。",
|
||||
"Every subagent runs on this model, even when the lead names another. Lead's pick lets the lead choose again.": "リードが別のモデルを指定しても、すべてのサブエージェントがこのモデルで動きます。「リードが選ぶ」を選ぶと、選択をリードに戻します。",
|
||||
"Every subagent runs on the lead's model ({model}), even when the lead names another. Lead's pick lets the lead choose again.": "リードが別のモデルを指定しても、すべてのサブエージェントがリードのモデル({model})で動きます。「リードが選ぶ」を選ぶと、選択をリードに戻します。",
|
||||
"Every subagent runs on the lead's model, even when the lead names another. Lead's pick lets the lead choose again.": "リードが別のモデルを指定しても、すべてのサブエージェントがリードのモデルで動きます。「リードが選ぶ」を選ぶと、選択をリードに戻します。",
|
||||
"Codex's config still starts subagents on {model} when the lead names none; picking here replaces it.": "Codex の設定には、リードが指定しないときのサブエージェントのモデルとして {model} が残っています。ここで選ぶとそれを置き換えます。",
|
||||
"{model}, or another the lead picks for a subagent": "{model}、またはリードがサブエージェントに選ぶ別のモデル",
|
||||
"the lead's model, or another the lead picks for a subagent": "リードと同じモデル、またはリードがサブエージェントに選ぶ別のモデル",
|
||||
"{model}, for every subagent": "{model}(すべてのサブエージェント)",
|
||||
"the lead's model, for every subagent": "リードのモデル(すべてのサブエージェント)",
|
||||
"the lead's model unless it names another": "リードのモデル(リードが別のモデルを指定した場合を除く)",
|
||||
"Codex subagent model": "Codex サブエージェントのモデル",
|
||||
"{agent} settings": "{agent} の設定",
|
||||
"In {agent}'s settings, on the Agents page": "エージェントページの {agent} の設定にあります",
|
||||
@@ -14886,12 +14895,15 @@ const I18N = {
|
||||
"Same as the session": "Wie die Sitzung",
|
||||
"Codex memories model": "Codex-Modell für Erinnerungen",
|
||||
"Same as the lead": "Wie der Haupt-Agent",
|
||||
"The lead picks each subagent's model; one it names none for runs on the lead's model ({model}). A resumed subagent stays on the model it started on. A model picked here holds every subagent to it, even when the lead names another.": "Der Haupt-Agent wählt das Modell jedes Subagenten; nennt er keins, läuft der Subagent auf dem Modell des Haupt-Agenten ({model}). Ein fortgesetzter Subagent bleibt auf seinem ersten Modell. Ein hier gewähltes Modell legt alle Subagenten darauf fest, auch wenn der Haupt-Agent ein anderes nennt.",
|
||||
"The lead picks each subagent's model; one it names none for runs on the lead's model. A resumed subagent stays on the model it started on. A model picked here holds every subagent to it, even when the lead names another.": "Der Haupt-Agent wählt das Modell jedes Subagenten; nennt er keins, läuft der Subagent auf dem Modell des Haupt-Agenten. Ein fortgesetzter Subagent bleibt auf seinem ersten Modell. Ein hier gewähltes Modell legt alle Subagenten darauf fest, auch wenn der Haupt-Agent ein anderes nennt.",
|
||||
"Every subagent runs on this model, even when the lead names another. Same as the lead gives the pick back to the lead.": "Alle Subagenten laufen auf diesem Modell, auch wenn der Haupt-Agent ein anderes nennt. „Wie der Haupt-Agent“ gibt die Wahl an den Haupt-Agenten zurück.",
|
||||
"The lead picks each subagent's model, one of Codex's own too; one it names none for runs on the lead's model ({model}). A resumed subagent stays on the model it started on. Same as the lead, or a model picked here, holds every subagent to it, even when the lead names another.": "Der Haupt-Agent wählt das Modell jedes Subagenten, auch eines von Codex selbst; nennt er keins, läuft der Subagent auf dem Modell des Haupt-Agenten ({model}). Ein fortgesetzter Subagent bleibt auf seinem ersten Modell. „Wie der Haupt-Agent“ oder ein hier gewähltes Modell legt alle Subagenten darauf fest, auch wenn der Haupt-Agent ein anderes nennt.",
|
||||
"The lead picks each subagent's model, one of Codex's own too; one it names none for runs on the lead's model. A resumed subagent stays on the model it started on. Same as the lead, or a model picked here, holds every subagent to it, even when the lead names another.": "Der Haupt-Agent wählt das Modell jedes Subagenten, auch eines von Codex selbst; nennt er keins, läuft der Subagent auf dem Modell des Haupt-Agenten. Ein fortgesetzter Subagent bleibt auf seinem ersten Modell. „Wie der Haupt-Agent“ oder ein hier gewähltes Modell legt alle Subagenten darauf fest, auch wenn der Haupt-Agent ein anderes nennt.",
|
||||
"Every subagent runs on this model, even when the lead names another. Lead's pick lets the lead choose again.": "Alle Subagenten laufen auf diesem Modell, auch wenn der Haupt-Agent ein anderes nennt. „Wahl des Haupt-Agenten“ lässt ihn wieder wählen.",
|
||||
"Every subagent runs on the lead's model ({model}), even when the lead names another. Lead's pick lets the lead choose again.": "Alle Subagenten laufen auf dem Modell des Haupt-Agenten ({model}), auch wenn der Haupt-Agent ein anderes nennt. „Wahl des Haupt-Agenten“ lässt ihn wieder wählen.",
|
||||
"Every subagent runs on the lead's model, even when the lead names another. Lead's pick lets the lead choose again.": "Alle Subagenten laufen auf dem Modell des Haupt-Agenten, auch wenn der Haupt-Agent ein anderes nennt. „Wahl des Haupt-Agenten“ lässt ihn wieder wählen.",
|
||||
"Codex's config still starts subagents on {model} when the lead names none; picking here replaces it.": "Die Codex-Konfiguration startet Subagenten noch auf {model}, wenn der Haupt-Agent keins nennt; eine Wahl hier ersetzt das.",
|
||||
"{model}, or another the lead picks for a subagent": "{model} oder ein anderes, das der Haupt-Agent für einen Subagenten wählt",
|
||||
"the lead's model, or another the lead picks for a subagent": "das Modell des Haupt-Agenten oder ein anderes, das er für einen Subagenten wählt",
|
||||
"{model}, for every subagent": "{model}, für alle Subagenten",
|
||||
"the lead's model, for every subagent": "das Modell des Haupt-Agenten, für alle Subagenten",
|
||||
"the lead's model unless it names another": "das Modell des Haupt-Agenten, außer er nennt ein anderes",
|
||||
"Codex subagent model": "Codex-Subagenten-Modell",
|
||||
"{agent} settings": "Einstellungen von {agent}",
|
||||
"In {agent}'s settings, on the Agents page": "In den Einstellungen von {agent}, auf der Seite Agenten",
|
||||
|
||||
@@ -3337,9 +3337,14 @@ function routingPage(part) {
|
||||
// or why the lead's pick stood
|
||||
function subagentWhy(r) {
|
||||
const agent = agentName(r.agent);
|
||||
const said = { agent, model: r.subagent.asked, to: r.subagent.to, why: r.subagent.kept ? t(r.subagent.kept) : "" };
|
||||
// set to follow the lead (cleverpigo on X): To is the lead's model
|
||||
if (r.subagent.lead) return r.subagent.kept
|
||||
? t("{agent} requested a subagent on {model} and it stayed there: its subagents follow their lead, on {to}, but {why}.", said)
|
||||
: t("{agent} requested a subagent on {model}; magpie put it on {to}, the model its lead is on.", said);
|
||||
return r.subagent.kept
|
||||
? t("{agent} requested a subagent on {model} and it stayed there: its subagents are set to {to}, but {why}.", { agent, model: r.subagent.asked, to: r.subagent.to, why: t(r.subagent.kept) })
|
||||
: t("{agent} requested a subagent on {model}; magpie put it on {to}, the model set for its subagents.", { agent, model: r.subagent.asked, to: r.subagent.to });
|
||||
? t("{agent} requested a subagent on {model} and it stayed there: its subagents are set to {to}, but {why}.", said)
|
||||
: t("{agent} requested a subagent on {model}; magpie put it on {to}, the model set for its subagents.", said);
|
||||
}
|
||||
// a request a stand-in of magpie's put on another model than it named
|
||||
// (Route.Moved): why, on its row's tag, its title and its story. Neo on
|
||||
|
||||
@@ -531,6 +531,8 @@ magpie.strings({
|
||||
"{agent} requested a subagent on {model}.": "{agent} 请求了使用 {model} 的子代理。",
|
||||
"{agent} requested a subagent on {model} and it stayed there: its subagents are set to {to}, but {why}.": "{agent} 请求了使用 {model} 的子代理,并保留在该模型上:它的子代理设为 {to},但{why}。",
|
||||
"{agent} requested a subagent on {model}; magpie put it on {to}, the model set for its subagents.": "{agent} 请求了使用 {model} 的子代理;magpie 将其改用 {to},即为它的子代理设定的模型。",
|
||||
"{agent} requested a subagent on {model}; magpie put it on {to}, the model its lead is on.": "{agent} 请求了使用 {model} 的子代理;magpie 将其改用 {to},即主代理正在用的模型。",
|
||||
"{agent} requested a subagent on {model} and it stayed there: its subagents follow their lead, on {to}, but {why}.": "{agent} 请求了使用 {model} 的子代理,并保留在该模型上:它的子代理跟随主代理,用 {to},但{why}。",
|
||||
"Background prompt suggestions": "后台提示词建议",
|
||||
"magpie ran this web search for {agent}'s {model}, which can't search the web by itself: {searcher} searched, and {model} goes on answering once it has what was found. Not a turn of the conversation.": "magpie 代 {agent} 的 {model} 发起的联网搜索:{model} 无法自行搜索,由 {searcher} 搜索,{model} 拿到结果后继续回答。不属于对话轮次。",
|
||||
"{agent} called magpie's web_search MCP tool: {searcher} searched for it. Not a turn of the conversation.": "{agent} 调用了 magpie 的 web_search MCP 工具:由 {searcher} 代为搜索。不属于对话轮次。",
|
||||
@@ -1186,6 +1188,8 @@ magpie.strings({
|
||||
"{agent} requested a subagent on {model}.": "{agent} 請求了使用 {model} 的子代理。",
|
||||
"{agent} requested a subagent on {model} and it stayed there: its subagents are set to {to}, but {why}.": "{agent} 請求了使用 {model} 的子代理,並保留在該模型上:它的子代理設為 {to},但{why}。",
|
||||
"{agent} requested a subagent on {model}; magpie put it on {to}, the model set for its subagents.": "{agent} 請求了使用 {model} 的子代理;magpie 將其改用 {to},即為它的子代理設定的模型。",
|
||||
"{agent} requested a subagent on {model}; magpie put it on {to}, the model its lead is on.": "{agent} 請求了使用 {model} 的子代理;magpie 將其改用 {to},即主代理正在用的模型。",
|
||||
"{agent} requested a subagent on {model} and it stayed there: its subagents follow their lead, on {to}, but {why}.": "{agent} 請求了使用 {model} 的子代理,並保留在該模型上:它的子代理跟隨主代理,用 {to},但{why}。",
|
||||
"Background prompt suggestions": "後臺提示詞建議",
|
||||
"magpie ran this web search for {agent}'s {model}, which can't search the web by itself: {searcher} searched, and {model} goes on answering once it has what was found. Not a turn of the conversation.": "magpie 代 {agent} 的 {model} 發起的聯網搜尋:{model} 無法自行搜尋,由 {searcher} 搜尋,{model} 拿到結果後繼續回答。不屬於對話輪次。",
|
||||
"{agent} called magpie's web_search MCP tool: {searcher} searched for it. Not a turn of the conversation.": "{agent} 呼叫了 magpie 的 web_search MCP 工具:由 {searcher} 代為搜尋。不屬於對話輪次。",
|
||||
@@ -1839,6 +1843,8 @@ magpie.strings({
|
||||
"{agent} requested a subagent on {model}.": "{agent} が {model} のサブエージェントをリクエストしました。",
|
||||
"{agent} requested a subagent on {model} and it stayed there: its subagents are set to {to}, but {why}.": "{agent} が {model} のサブエージェントをリクエストし、そのモデルのままになりました。サブエージェントは {to} に設定されていますが、{why}。",
|
||||
"{agent} requested a subagent on {model}; magpie put it on {to}, the model set for its subagents.": "{agent} が {model} のサブエージェントをリクエストしました。magpie はサブエージェント用に設定された {to} に切り替えました。",
|
||||
"{agent} requested a subagent on {model}; magpie put it on {to}, the model its lead is on.": "{agent} が {model} のサブエージェントをリクエストしました。magpie はリードが使っている {to} に切り替えました。",
|
||||
"{agent} requested a subagent on {model} and it stayed there: its subagents follow their lead, on {to}, but {why}.": "{agent} が {model} のサブエージェントをリクエストし、そのモデルのままになりました。サブエージェントはリードに合わせて {to} を使う設定ですが、{why}。",
|
||||
"Background prompt suggestions": "バックグラウンドのプロンプト候補",
|
||||
"magpie ran this web search for {agent}'s {model}, which can't search the web by itself: {searcher} searched, and {model} goes on answering once it has what was found. Not a turn of the conversation.": "magpie が、自分でウェブ検索できない {agent} の {model} のためにこのウェブ検索を実行しました。{searcher} が検索し、{model} は結果を受け取ってから応答を続けます。会話のターンではありません。",
|
||||
"{agent} called magpie's web_search MCP tool: {searcher} searched for it. Not a turn of the conversation.": "{agent} が magpie の web_search MCP ツールを呼び出しました。{searcher} が代わりに検索しました。会話のターンではありません。",
|
||||
@@ -2494,6 +2500,8 @@ magpie.strings({
|
||||
"{agent} requested a subagent on {model}.": "{agent} hat einen Subagent mit {model} angefordert.",
|
||||
"{agent} requested a subagent on {model} and it stayed there: its subagents are set to {to}, but {why}.": "{agent} hat einen Subagent mit {model} angefordert, und er blieb dort: Seine Subagenten sind auf {to} gesetzt, aber {why}.",
|
||||
"{agent} requested a subagent on {model}; magpie put it on {to}, the model set for its subagents.": "{agent} hat einen Subagent mit {model} angefordert; magpie hat ihn auf {to} gesetzt, das für seine Subagenten festgelegte Modell.",
|
||||
"{agent} requested a subagent on {model}; magpie put it on {to}, the model its lead is on.": "{agent} hat einen Subagent mit {model} angefordert; magpie hat ihn auf {to} gesetzt, das Modell seines Haupt-Agenten.",
|
||||
"{agent} requested a subagent on {model} and it stayed there: its subagents follow their lead, on {to}, but {why}.": "{agent} hat einen Subagent mit {model} angefordert, und er blieb dort: Seine Subagenten folgen dem Haupt-Agenten auf {to}, aber {why}.",
|
||||
"Background prompt suggestions": "Prompt-Vorschläge im Hintergrund",
|
||||
"magpie ran this web search for {agent}'s {model}, which can't search the web by itself: {searcher} searched, and {model} goes on answering once it has what was found. Not a turn of the conversation.": "magpie hat diese Websuche für {model} von {agent} ausgeführt, das selbst nicht im Web suchen kann: {searcher} hat gesucht, und {model} antwortet weiter, sobald es die Ergebnisse hat. Keine Runde der Unterhaltung.",
|
||||
"{agent} called magpie's web_search MCP tool: {searcher} searched for it. Not a turn of the conversation.": "{agent} hat das web_search-MCP-Tool von magpie aufgerufen: {searcher} hat dafür gesucht. Keine Runde der Unterhaltung.",
|
||||
|
||||
@@ -109,36 +109,46 @@ function server(lang, sets) {
|
||||
|
||||
// the words as i18n.js has them
|
||||
const W = {
|
||||
en: { unset: "subagent model: Same as the lead", line: "The lead picks each subagent's model; one it names none for runs on the lead's model (GPT-5.5). A resumed subagent stays on the model it started on. A model picked here holds every subagent to it, even when the lead names another.",
|
||||
en: { unset: "subagent model: Lead's pick", line: "The lead picks each subagent's model, one of Codex's own too; one it names none for runs on the lead's model (GPT-5.5). A resumed subagent stays on the model it started on. Same as the lead, or a model picked here, holds every subagent to it, even when the lead names another.",
|
||||
old: "Codex's config still starts subagents on gpt-5.4-mini when the lead names none; picking here replaces it.",
|
||||
def: "Same as the lead", note: "GPT-5.5, or another the lead picks for a subagent", set: "subagent model: GPT-6 Astra", setLine: "Every subagent runs on this model, even when the lead names another. Same as the lead gives the pick back to the lead.", row: "Codex subagent model",
|
||||
def: "Lead's pick", note: "GPT-5.5 unless the lead names another", set: "subagent model: GPT-6 Astra", setLine: "Every subagent runs on this model, even when the lead names another. Lead's pick lets the lead choose again.", row: "Codex subagent model",
|
||||
moved: "Codex requested a subagent on gpt-5.5; magpie put it on codex/gpt-6-astra, the model set for its subagents.",
|
||||
kept: "Codex requested a subagent on gpt-5.5 and it stayed there: its subagents are set to codex/gpt-6-astra, but no ChatGPT account on in magpie serves it.",
|
||||
sealed: "Codex requested a subagent on gpt-5.5 and it stayed there: its subagents are set to token/gpt-6.1-sol, but its task was sealed by the ChatGPT backend that answered its lead, and only a ChatGPT account can open it." },
|
||||
zh: { unset: "子代理模型:跟主代理一样", line: "主代理为每个子代理选模型;主代理没指定时,子代理用主代理的模型(GPT-5.5)。恢复的子代理仍用它最初的模型。在这里选定一个模型,所有子代理都固定用它,主代理指定了别的也一样。",
|
||||
sealed: "Codex requested a subagent on gpt-5.5 and it stayed there: its subagents are set to token/gpt-6.1-sol, but its task was sealed by the ChatGPT backend that answered its lead, and only a ChatGPT account can open it.",
|
||||
lead: "subagent model: Same as the lead", leadLine: "Every subagent runs on the lead's model (GPT-5.5), even when the lead names another. Lead's pick lets the lead choose again.", same: "Same as the lead",
|
||||
leadMoved: "Codex requested a subagent on gpt-6-astra; magpie put it on token/gpt-6.1-sol, the model its lead is on." },
|
||||
zh: { unset: "子代理模型:由主代理自选", line: "主代理为每个子代理选模型,也可能选 Codex 自带的模型;主代理没指定时,子代理用主代理的模型(GPT-5.5)。恢复的子代理仍用它最初的模型。选“跟主代理一样”或在这里选定一个模型,所有子代理都固定用它,主代理指定了别的也一样。",
|
||||
old: "Codex 配置里还写着:主代理没指定时,子代理用 gpt-5.4-mini。在这里选一次就会替换掉它。",
|
||||
def: "跟主代理一样", note: "GPT-5.5,或主代理给子代理另选的模型", set: "子代理模型:GPT-6 Astra", setLine: "所有子代理都用这个模型,主代理指定了别的也一样。选“跟主代理一样”就把选择交还给主代理。", row: "Codex 子代理模型",
|
||||
def: "由主代理自选", note: "GPT-5.5,主代理指定其他模型时除外", set: "子代理模型:GPT-6 Astra", setLine: "所有子代理都用这个模型,主代理指定了别的也一样。选“由主代理自选”就让主代理重新选择。", row: "Codex 子代理模型",
|
||||
moved: "Codex 请求了使用 gpt-5.5 的子代理;magpie 将其改用 codex/gpt-6-astra,即为它的子代理设定的模型。",
|
||||
kept: "Codex 请求了使用 gpt-5.5 的子代理,并保留在该模型上:它的子代理设为 codex/gpt-6-astra,但magpie 中启用的 ChatGPT 账号都不提供该模型。",
|
||||
sealed: "Codex 请求了使用 gpt-5.5 的子代理,并保留在该模型上:它的子代理设为 token/gpt-6.1-sol,但它的任务由回答主代理的 ChatGPT 后端加密,只有 ChatGPT 账号能打开。" },
|
||||
"zh-TW": { unset: "子代理模型:跟主代理一樣", line: "主代理為每個子代理選模型;主代理沒指定時,子代理用主代理的模型(GPT-5.5)。恢復的子代理仍用它最初的模型。在這裡選定一個模型,所有子代理都固定用它,主代理指定了別的也一樣。",
|
||||
sealed: "Codex 请求了使用 gpt-5.5 的子代理,并保留在该模型上:它的子代理设为 token/gpt-6.1-sol,但它的任务由回答主代理的 ChatGPT 后端加密,只有 ChatGPT 账号能打开。",
|
||||
lead: "子代理模型:跟主代理一样", leadLine: "所有子代理都用主代理的模型(GPT-5.5),主代理指定了别的也一样。选“由主代理自选”就让主代理重新选择。", same: "跟主代理一样",
|
||||
leadMoved: "Codex 请求了使用 gpt-6-astra 的子代理;magpie 将其改用 token/gpt-6.1-sol,即主代理正在用的模型。" },
|
||||
"zh-TW": { unset: "子代理模型:由主代理自選", line: "主代理為每個子代理選模型,也可能選 Codex 自帶的模型;主代理沒指定時,子代理用主代理的模型(GPT-5.5)。恢復的子代理仍用它最初的模型。選「跟主代理一樣」或在這裡選定一個模型,所有子代理都固定用它,主代理指定了別的也一樣。",
|
||||
old: "Codex 設定裡還寫著:主代理沒指定時,子代理用 gpt-5.4-mini。在這裡選一次就會取代它。",
|
||||
def: "跟主代理一樣", note: "GPT-5.5,或主代理給子代理另選的模型", set: "子代理模型:GPT-6 Astra", setLine: "所有子代理都用這個模型,主代理指定了別的也一樣。選「跟主代理一樣」就把選擇交還給主代理。", row: "Codex 子代理模型",
|
||||
def: "由主代理自選", note: "GPT-5.5,主代理指定其他模型時除外", set: "子代理模型:GPT-6 Astra", setLine: "所有子代理都用這個模型,主代理指定了別的也一樣。選「由主代理自選」就讓主代理重新選擇。", row: "Codex 子代理模型",
|
||||
moved: "Codex 請求了使用 gpt-5.5 的子代理;magpie 將其改用 codex/gpt-6-astra,即為它的子代理設定的模型。",
|
||||
kept: "Codex 請求了使用 gpt-5.5 的子代理,並保留在該模型上:它的子代理設為 codex/gpt-6-astra,但magpie 中啟用的 ChatGPT 帳號都不提供該模型。",
|
||||
sealed: "Codex 請求了使用 gpt-5.5 的子代理,並保留在該模型上:它的子代理設為 token/gpt-6.1-sol,但它的任務由回應主代理的 ChatGPT 後端加密,只有 ChatGPT 帳號能打開。" },
|
||||
ja: { unset: "サブエージェントのモデル:リードと同じ", line: "各サブエージェントのモデルはリードが選びます。指定がなければリードのモデル(GPT-5.5)で動きます。再開したサブエージェントは最初のモデルのままです。ここでモデルを選ぶと、リードが別のモデルを指定しても、すべてのサブエージェントがそのモデルに固定されます。",
|
||||
sealed: "Codex 請求了使用 gpt-5.5 的子代理,並保留在該模型上:它的子代理設為 token/gpt-6.1-sol,但它的任務由回應主代理的 ChatGPT 後端加密,只有 ChatGPT 帳號能打開。",
|
||||
lead: "子代理模型:跟主代理一樣", leadLine: "所有子代理都用主代理的模型(GPT-5.5),主代理指定了別的也一樣。選「由主代理自選」就讓主代理重新選擇。", same: "跟主代理一樣",
|
||||
leadMoved: "Codex 請求了使用 gpt-6-astra 的子代理;magpie 將其改用 token/gpt-6.1-sol,即主代理正在用的模型。" },
|
||||
ja: { unset: "サブエージェントのモデル:リードが選ぶ", line: "各サブエージェントのモデルはリードが選びます(Codex 自身のモデルも含みます)。指定がなければリードのモデル(GPT-5.5)で動きます。再開したサブエージェントは最初のモデルのままです。「リードと同じ」またはここで選んだモデルにすると、リードが別のモデルを指定しても、すべてのサブエージェントがそのモデルに固定されます。",
|
||||
old: "Codex の設定には、リードが指定しないときのサブエージェントのモデルとして gpt-5.4-mini が残っています。ここで選ぶとそれを置き換えます。",
|
||||
def: "リードと同じ", note: "GPT-5.5、またはリードがサブエージェントに選ぶ別のモデル", set: "サブエージェントのモデル:GPT-6 Astra", setLine: "リードが別のモデルを指定しても、すべてのサブエージェントがこのモデルで動きます。「リードと同じ」を選ぶと、選択をリードに戻します。", row: "Codex サブエージェントのモデル",
|
||||
def: "リードが選ぶ", note: "GPT-5.5(リードが別のモデルを指定した場合を除く)", set: "サブエージェントのモデル:GPT-6 Astra", setLine: "リードが別のモデルを指定しても、すべてのサブエージェントがこのモデルで動きます。「リードが選ぶ」を選ぶと、選択をリードに戻します。", row: "Codex サブエージェントのモデル",
|
||||
moved: "Codex が gpt-5.5 のサブエージェントをリクエストしました。magpie はサブエージェント用に設定された codex/gpt-6-astra に切り替えました。",
|
||||
kept: "Codex が gpt-5.5 のサブエージェントをリクエストし、そのモデルのままになりました。サブエージェントは codex/gpt-6-astra に設定されていますが、magpie で有効な ChatGPT アカウントはどれもこのモデルを提供していません。",
|
||||
sealed: "Codex が gpt-5.5 のサブエージェントをリクエストし、そのモデルのままになりました。サブエージェントは token/gpt-6.1-sol に設定されていますが、そのタスクはリードに応答した ChatGPT バックエンドが暗号化しており、開けるのは ChatGPT アカウントだけです。" },
|
||||
de: { unset: "Modell der Subagenten: Wie der Haupt-Agent", line: "Der Haupt-Agent wählt das Modell jedes Subagenten; nennt er keins, läuft der Subagent auf dem Modell des Haupt-Agenten (GPT-5.5). Ein fortgesetzter Subagent bleibt auf seinem ersten Modell. Ein hier gewähltes Modell legt alle Subagenten darauf fest, auch wenn der Haupt-Agent ein anderes nennt.",
|
||||
sealed: "Codex が gpt-5.5 のサブエージェントをリクエストし、そのモデルのままになりました。サブエージェントは token/gpt-6.1-sol に設定されていますが、そのタスクはリードに応答した ChatGPT バックエンドが暗号化しており、開けるのは ChatGPT アカウントだけです。",
|
||||
lead: "サブエージェントのモデル:リードと同じ", leadLine: "リードが別のモデルを指定しても、すべてのサブエージェントがリードのモデル(GPT-5.5)で動きます。「リードが選ぶ」を選ぶと、選択をリードに戻します。", same: "リードと同じ",
|
||||
leadMoved: "Codex が gpt-6-astra のサブエージェントをリクエストしました。magpie はリードが使っている token/gpt-6.1-sol に切り替えました。" },
|
||||
de: { unset: "Modell der Subagenten: Wahl des Haupt-Agenten", line: "Der Haupt-Agent wählt das Modell jedes Subagenten, auch eines von Codex selbst; nennt er keins, läuft der Subagent auf dem Modell des Haupt-Agenten (GPT-5.5). Ein fortgesetzter Subagent bleibt auf seinem ersten Modell. „Wie der Haupt-Agent“ oder ein hier gewähltes Modell legt alle Subagenten darauf fest, auch wenn der Haupt-Agent ein anderes nennt.",
|
||||
old: "Die Codex-Konfiguration startet Subagenten noch auf gpt-5.4-mini, wenn der Haupt-Agent keins nennt; eine Wahl hier ersetzt das.",
|
||||
def: "Wie der Haupt-Agent", note: "GPT-5.5 oder ein anderes, das der Haupt-Agent für einen Subagenten wählt", set: "Modell der Subagenten: GPT-6 Astra", setLine: "Alle Subagenten laufen auf diesem Modell, auch wenn der Haupt-Agent ein anderes nennt. „Wie der Haupt-Agent“ gibt die Wahl an den Haupt-Agenten zurück.", row: "Codex-Subagenten-Modell",
|
||||
def: "Wahl des Haupt-Agenten", note: "GPT-5.5, außer der Haupt-Agent nennt ein anderes", set: "Modell der Subagenten: GPT-6 Astra", setLine: "Alle Subagenten laufen auf diesem Modell, auch wenn der Haupt-Agent ein anderes nennt. „Wahl des Haupt-Agenten“ lässt ihn wieder wählen.", row: "Codex-Subagenten-Modell",
|
||||
moved: "Codex hat einen Subagent mit gpt-5.5 angefordert; magpie hat ihn auf codex/gpt-6-astra gesetzt, das für seine Subagenten festgelegte Modell.",
|
||||
kept: "Codex hat einen Subagent mit gpt-5.5 angefordert, und er blieb dort: Seine Subagenten sind auf codex/gpt-6-astra gesetzt, aber kein eingeschaltetes ChatGPT-Konto in magpie bietet es an.",
|
||||
sealed: "Codex hat einen Subagent mit gpt-5.5 angefordert, und er blieb dort: Seine Subagenten sind auf token/gpt-6.1-sol gesetzt, aber seine Aufgabe wurde vom ChatGPT-Backend versiegelt, das seinen Lead beantwortet hat, und nur ein ChatGPT-Konto kann sie öffnen." },
|
||||
sealed: "Codex hat einen Subagent mit gpt-5.5 angefordert, und er blieb dort: Seine Subagenten sind auf token/gpt-6.1-sol gesetzt, aber seine Aufgabe wurde vom ChatGPT-Backend versiegelt, das seinen Lead beantwortet hat, und nur ein ChatGPT-Konto kann sie öffnen.",
|
||||
lead: "Modell der Subagenten: Wie der Haupt-Agent", leadLine: "Alle Subagenten laufen auf dem Modell des Haupt-Agenten (GPT-5.5), auch wenn der Haupt-Agent ein anderes nennt. „Wahl des Haupt-Agenten“ lässt ihn wieder wählen.", same: "Wie der Haupt-Agent",
|
||||
leadMoved: "Codex hat einen Subagent mit gpt-6-astra angefordert; magpie hat ihn auf token/gpt-6.1-sol gesetzt, das Modell seines Haupt-Agenten." },
|
||||
};
|
||||
|
||||
const codex = '.row.agent[data-id="codex@wsl:Ubuntu-24.04"]';
|
||||
|
||||
@@ -20,10 +20,17 @@ import (
|
||||
// opens only on a ChatGPT account again: the gateway leaves such a
|
||||
// subagent on the model asked for when the one set can't open it, and the
|
||||
// route trace says so. "" leaves every subagent on the model its lead
|
||||
// asked for.
|
||||
// asked for. CodexSubagentLead puts every subagent on the model its lead's
|
||||
// own turns go on, even when the lead names another (cleverpigo on X: a
|
||||
// lead on WorkBuddy's DeepSeek named gpt-5.6-sol, the first of Codex's own
|
||||
// models spawn_agent lists, and its subagent went to ChatGPT).
|
||||
|
||||
// CodexSubagentLead is the value of settings.CodexSubagentModel that puts
|
||||
// Codex's subagents on their lead's model, whatever the lead names.
|
||||
const CodexSubagentLead = settings.CodexSubagentLead
|
||||
|
||||
// CodexSubagentModel is the model Codex's subagents are put on, "" for
|
||||
// the one the lead asks for.
|
||||
// the one the lead asks for, CodexSubagentLead for the lead's own.
|
||||
func CodexSubagentModel() string {
|
||||
return strings.TrimSpace(heldSettings().CodexSubagentModel)
|
||||
}
|
||||
@@ -78,7 +85,7 @@ func CodexSubagentUnserved(id string) string {
|
||||
|
||||
// SetCodexSubagentModel puts Codex's subagents on id, a model or routing
|
||||
// group of magpie's (provider/model, group/<id>); "" leaves them on the
|
||||
// model their lead asks for. One magpie doesn't serve now is kept all the
|
||||
// model their lead asks for, CodexSubagentLead puts them on the lead's. One magpie doesn't serve now is kept all the
|
||||
// same — a backup or profile put back on a computer whose providers
|
||||
// differ, or an account signed in again later — and the gateway leaves
|
||||
// subagents on the model asked for until it is served, saying why in the
|
||||
@@ -86,7 +93,7 @@ func CodexSubagentUnserved(id string) string {
|
||||
// model of magpie's to put the request on.
|
||||
func SetCodexSubagentModel(id string) error {
|
||||
id = strings.TrimSpace(id)
|
||||
if pid, model, ok := strings.Cut(id, "/"); id != "" && (!ok || pid == "" || model == "") {
|
||||
if pid, model, ok := strings.Cut(id, "/"); id != "" && id != CodexSubagentLead && (!ok || pid == "" || model == "") {
|
||||
return fmt.Errorf("Codex's subagents can't be put on %q: pick one of magpie's models (provider/model)", id)
|
||||
}
|
||||
s := settings.Load()
|
||||
|
||||
@@ -39,6 +39,11 @@ import (
|
||||
// auto-review on the session's own model.
|
||||
const CodexAutoReviewSession = "session"
|
||||
|
||||
// CodexSubagentLead is CodexSubagentModel's value that puts every Codex
|
||||
// subagent on the model its lead's own turns go on, whatever the lead
|
||||
// names for it in spawn_agent.
|
||||
const CodexSubagentLead = "lead"
|
||||
|
||||
// Settings is what the user chose. "" and "system" both mean "follow the OS".
|
||||
type Settings struct {
|
||||
Theme string `json:"theme,omitempty"` // system | light | dark
|
||||
@@ -694,7 +699,8 @@ type Settings struct {
|
||||
// whatever model its lead asked for in spawn_agent: a model a ChatGPT
|
||||
// account in magpie serves (provider/model), since a subagent's task
|
||||
// is sealed for one (willz on Discord). "" leaves each on the model its
|
||||
// lead asked for.
|
||||
// lead asked for; CodexSubagentLead puts each on the model its lead's
|
||||
// own turns go on, even when the lead names another.
|
||||
CodexSubagentModel string `json:"codexSubagentModel,omitempty"`
|
||||
// DesktopSubagentModel is the model the gateway puts Claude Desktop's
|
||||
// subagent tool turns on. "" leaves them on the model their lead asks
|
||||
@@ -2126,7 +2132,7 @@ func saveOwn(s Settings, recording, reads bool) error {
|
||||
return fmt.Errorf("the model for Codex's auto-review must be a model's id such as openai/gpt-5-mini, not %q", s.CodexAutoReview)
|
||||
}
|
||||
s.CodexSubagentModel = strings.TrimSpace(s.CodexSubagentModel)
|
||||
if s.CodexSubagentModel != "" && !strings.Contains(s.CodexSubagentModel, "/") {
|
||||
if s.CodexSubagentModel != "" && s.CodexSubagentModel != CodexSubagentLead && !strings.Contains(s.CodexSubagentModel, "/") {
|
||||
return fmt.Errorf("the model for Codex's subagents must be a model's id such as codex/gpt-5.5, not %q", s.CodexSubagentModel)
|
||||
}
|
||||
s.RedactRouteTo = strings.TrimSpace(s.RedactRouteTo)
|
||||
|
||||
Reference in New Issue
Block a user