88b4c00ea11c8653cada22e11edf20ab1594de43
4
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
125dad5cbb |
gateway: a codex provider used only through routing groups keeps the ChatGPT account's own models out of Codex's list (#1602)
With Codex signed in to ChatGPT, Codex asks magpie's /backend-api/codex/models
for its list, and codexModels passes the backend's own models through,
narrowed only by the codex provider's picks (CodexNativePicked) and the
Agents page's hides (CodexNativeHidden, built from Catalog()). A provider
set to "Only through routing groups" (Provider.Unlisted) has none of its
models in Catalog(), so neither filter saw them: all of the account's
models stayed in Codex's picker, and the Agents page had no Codex group to
hide. Every other agent's list is Catalog-based and already left them out.
provider.CodexNativeUnlisted says which of the account's models are kept
out of agents' lists: every one when the codex provider is Unlisted, and by
slug those a group with Unlists names. codexModels drops them (hidden
entries such as codex-auto-review stay, as with picks; a Codex reached for
failover alone keeps them, as it is handed no groups), spawnChoices drops
the same ones from spawn_agent's list, and CodexListTag carries them so
Codex refetches. gateway-routing.md says so.
Test: TestCodexModelListUnlistedForGroups (a group unlisting gpt-5.5 takes
gpt-5.5 alone; the provider Unlisted takes gpt-6-sol and gpt-5.5 and keeps
codex-auto-review; ETag changes; spawn_agent offers neither; own-only keeps
them). With codex_backend.go and codex_spawn_models.go reverted it fails on
all three checks. Not tried with a real ChatGPT sign-in and Codex app.
Run (sandbox HOME, private GOCACHE, worktree at origin/main
|
||
|
|
403f3845e2 |
gateway: Codex's spawn_agent names every model also when Codex hands it to the lead through a tool search, as it does on 0.162 (Gearclickist on Discord)
Gearclickist, after v0.1.1214: the lead still saw only five models for
its subagents. v0.1.1214 (
|
||
|
|
3c4f8f9aed |
gateway: the models added to Codex's spawn_agent are headed neutrally, naming neither magpie nor Codex's limit (Gearclickist on Discord)
|
||
|
|
5d33f060b7 |
gateway: Codex's spawn_agent names every model a subagent may be put on, not only the first five (Gearclickist on Discord)
Gearclickist turned on "Codex subagents on any model", but when Codex dispatched subagents only a few models could be picked. Codex itself caps the list: spawn_agent's description names only the first five show_in_picker models of its catalog (codex-rs child_config.rs MAX_SPAWN_AGENT_MODEL_OVERRIDES, multi_agents_spec.rs spawn_agent_models_description), Codex's own ahead of magpie's. Yet it takes any catalog model by name (find_spawn_agent_model_name). So the lead saw none of magpie's models. spawnAgentModels (codex_spawn_models.go) adds the rest of the catalog Codex was handed after Codex's own list, under a line of its own, at most 200. It covers spawn_agent at the top level and in Codex's multi_agent_v1 namespace, at CodexPath (codexBackend) and at /v1/responses for Codex (handle). - At CodexPath the list is Codex's own listed models less those hidden on the Agents page, then CodexListed unless Codex is held to its own. - At /v1 it is CodexCatalog under the key's allowance. - A lead the ChatGPT backend answers in multi-agent V2 seals its subagents' tasks for a ChatGPT account (#619), so it is offered Codex's own only. Only the tool's description changes, never base_instructions. With V1 on, it does change in requests to the ChatGPT backend too. Not covered: the model_catalog_in_context feature (under development, off by default) puts a five-model catalog in context, and it is not widened. Run: - go test ./internal/gateway ./internal/agent -count=1 under a sandbox HOME: ok. - TestSpawnAgentNamesEveryModel uses 40 models on a real Codex 0.162.0 request (testdata/workdir/codex-0.162.0.json). Its 4 subtests are CodexPath, /v1, a sealed V2 lead and a V1 lead, and all pass. - With spawnAgentModels returning body by hand: CodexPath, /v1 and V1 go red. - With the sealed rule taken out: V2 goes red. - go vet on darwin, GOOS=linux -tags nogui, and GOOS=windows; gofmt -l is clean. Not verified: a real Codex lead picking one of magpie's models past the fifth from the longer list. |