2ff85f8a2bc33f87aa1fdfefce580433afff76e3
4
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3ee37aea64 |
gui: Codex's card has no subagent-model or memories square beside its settings rows
Codex's sheet has "Codex subagent model" and "Codex memories model" as
named rows (renderCodexSubagentModel, renderCodexMemories), just under
the card, and the card also drew a square for each: the same setting
twice (the owner, 10-25, a screenshot of the notebook square beside the
memories row). The squares are no longer drawn for the Codex those rows
read (id "codex", not gateway mode); they are left out of the extras
count and of the extras toggle too. A Codex in WSL, which the rows don't
read, keeps its squares.
Tests: codex-memories and codex-subagent-model run the square on a WSL
Codex and check Codex's own card has none; codex-subagent-model picks
and resets through #codexSubagentModelRow; codex-memories-settings
resets through the row instead of the square.
Run: GUI codex-memories, codex-memories-settings, codex-subagent-model,
codex-subagents-lead, desktop-subagent-model, Chromium and WebKit, every
language and width they have: 82 of 82. Earlier run of these plus
codex-start-model-field, subagent-effort, agent-prefs, agent-tweak-fold,
gateway-mode and mobile-web at concurrency 4: only the expected square
reds plus two page.goto/click timeouts under load (codex-subagents-lead
webkit zh-TW 560, desktop-subagent-model webkit zh 1100), both green in
the 82-of-82 run. After the rebase on origin/main the change was trimmed (one sq helper
for the extras toggle and count) and the budgets raised to its size:
app.js 1,322,537, core 1,530,050, with no room added (TestCoreScriptBudget
ok). Rerun at that tree: codex-memories, codex-memories-settings,
codex-subagent-model, agent-tweak-fold, gateway-mode, 58 of 60; the two
reds are gateway-mode's masking tab, red the same on origin/main
|
||
|
|
1cdc3a59fe |
gui: Codex has one subagent model, Same as the lead or one model for every subagent
The owner, looking at Codex's New sessions line: two squares, subagents
and subagent model, read alike and nobody could tell them apart ("这两个
用户压根分辨不出来区别"). One was Codex's own [agents]
default_subagent_model, a model a subagent starts on only when its lead
names none; the other magpie's, which puts every subagent on one model
whatever the lead asks for. They are one setting now:
- Codex's card shows the subagent model alone. Unset it says "Same as
the lead" (跟主代理一样): each subagent runs on the lead's model, or on
another the lead picks for it. A model picked: every subagent runs on
it, whatever the lead asks for. Its picker opens on Same as the lead,
the lead's model in the note. With no model of magpie's to pick there,
Codex's own square stays as it was.
- Codex's sheet has the same setting as a row with a name, Codex
subagent model, beside Codex subagents on any model, as the memories
model got one when its square wasn't found (Hu9956).
- A model Codex's config still has in [agents] default_subagent_model
is said on the square, which is lit: "Codex's config still starts
subagents on {model} when the lead names none; picking here replaces
it."
For users who set default_subagent_model themselves: a pick in the
subagent model, Same as the lead too, removes it from Codex's config
(and a subagent effort the subagents' model no longer has), so the one
setting shown is the one that holds. Until they pick, it stays and is
said on the square. The CLI and profiles keep the subagents field.
Claude Code's, omp's and Claude Desktop's subagent squares are unchanged.
Every new string has zh, zh-TW, ja and de. app.js grows 4,011 bytes,
the Agents page's, which the tray panel draws too: the core budget is
raised to it, with no room added, and says why.
|
||
|
|
221e24a3c7 |
agents, gateway: Codex's subagent model offers every provider's models, not only ChatGPT's (#1633, laacmilan)
The Agents page's Codex "subagent model" field (settings.CodexSubagentModel,
which the gateway puts x-openai-subagent collab_spawn requests on) listed
only the ChatGPT accounts' models, and its setter refused any other
provider's. A user whose lead runs on a chat provider (Token中心, 智谱Plan)
couldn't put its subagents there.
- provider: CodexSubagentModels is Codex's shown catalog
(CatalogFor("codex"), so hidden or unpicked models stay out), ChatGPT
accounts first, routing groups included. SetCodexSubagentModel takes any
provider/model or group id, refuses a bare Codex name.
CodexSubagentUnserved says "magpie doesn't serve it now" for a non-ChatGPT
id that isn't served. CodexAccountModel exported.
- gateway: codexSubagentPick gets the body. When the lead ran on the
ChatGPT backend the task arrives sealed (encrypted_content), and only a
ChatGPT account can open it: set to another provider, such a subagent
stays on the model asked for, with Kept = sealedKept in the route trace
(#1613's constraint; the reverse, a chat lead with a subagent on ChatGPT,
was already handled by
|
||
|
|
189586612e |
agents, gateway: Codex's subagents go on a model set in its row, a ChatGPT account's (willz on Discord)
Codex's lead names each subagent's model itself in spawn_agent, and
Codex's [agents] config can't overrule it. The Agents page's Codex row
now has a "subagent model" square (the app's model picker, Default
first). Its options are only models a ChatGPT account in magpie serves,
because a subagent's task is sealed for ChatGPT accounts.
- settings.CodexSubagentModel holds it. It is an agent Field
(subagent_model), so the TUI/CLI, profiles, davsync's "agents" part
and WSL twins carry it too. The setter refuses another provider's
model. It keeps a ChatGPT account's model that isn't served now, so a
backup restored on another computer still applies (ApplyFields stops
at the first failed Set). POST /api/settings keeps it.
- The gateway (codexSubagentPick) moves a collab_spawn request onto it.
codexBackend does this for Codex's own bare models; serve() does it
for any other model. When no ChatGPT account on in magpie serves it,
or a held gateway key may not use it, the request stays on the model
asked for. Route.Subagent records asked/to/kept. The lead's turns,
titles, guardian and the rest are never moved. Off (the default)
changes nothing.
- Routing page: kindWhy says the subagent was put on the model set, or
stayed on its own and why. "only account on for" names the model it
went on. Strings added in zh, zh-TW, ja and de.
- docs/subsystems: gateway-routing.md and agent-wiring.md describe it.
Run (darwin, rebased on origin/main):
- gofmt -l internal/: clean.
- go vet -tags nogui on gateway, provider, agent, gui and settings:
darwin, GOOS=linux and GOOS=windows.
- go build ./...
- HOME=<temp> go test -tags nogui ./...: all ok.
TestSettingsSaveKeepsWhatItDoesNotSend flagged the new field; it is
now set there.
- GUI tests, Chromium + WebKit:
- codex-subagent-model.test.cjs: 20/20 (en, zh, zh-TW, ja, de at
1100 and 560 px).
- Also green: routing-kind, subagent-effort, codex-memories,
codex-memories-settings, i18n-keys, gui-ja, gui-de, gui-zh-tw and
click-scroll.
Failing without the change (codexSubagentPick returning nil):
- TestCodexSubagentPutOnTheModelSet
- TestCodexSubagentOnAnotherProviderPutOnTheModelSet
- TestCodexSubagentModelNotServedKeepsTheAsked
- TestCodexSubagentModelHeldKeyKeepsTheAsked
TestCodexSubagentModelLeavesOtherRequests guards the other side: the
lead's turns, titles and guardian stay untouched.
Not tried with a real Codex CLI and ChatGPT account. A subagent spawn
needs a signed-in Codex home, and this session may not touch the live
~/.codex. The fake ChatGPT backend tests cover both routes.
|