Skip to content

Remove the GLM restriction for Codex subagents - #273

Merged
masonc08 merged 2 commits into
mainfrom
masonc08/remove-glm-subagent-restriction
Aug 5, 2026
Merged

Remove the GLM restriction for Codex subagents#273
masonc08 merged 2 commits into
mainfrom
masonc08/remove-glm-subagent-restriction

Conversation

@masonc08

@masonc08 masonc08 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

What & why

Drops the skip_arms guard in codex_routing.route_pre_tool_use that prevented a GLM routing decision from being applied to Codex subagent spawns. With it removed, GLM is routed like any other arm — the subagent's model is rewritten to system.ai.glm-5-2.

Scope is deliberately minimal: only the guard, the now-unused GLM_SUBAGENT_SKIP_MESSAGE constant, and the one test that asserted the skip.

Caveat worth flagging

The guard existed because Codex constrains a spawned subagent's model to its own model catalog, and GLM isn't in it — so a GLM-routed subagent may be rejected at spawn until GLM is present in the catalog (either via the gateway's model-list endpoint or a client-side catalog file). This PR removes the restriction on its own; the catalog side is tracked separately.

How do you know it works

  • test_spawn_glm_decision_applies_glm_model replaces the old skip test and asserts the GLM model is injected into updatedInput.
  • Full suite: 1192 passed; ruff clean.

This pull request and its description were written by Isaac.

@masonc08
masonc08 marked this pull request as ready for review August 5, 2026 20:31
@masonc08
masonc08 requested a review from tt-le August 5, 2026 20:31
Drop the `skip_arms` guard that kept a GLM routing decision from being applied
to Codex subagent spawns, so GLM is routed like any other arm. Removes the now
unused GLM_SUBAGENT_SKIP_MESSAGE constant and updates the corresponding test.

Co-authored-by: Isaac
@masonc08
masonc08 force-pushed the masonc08/remove-glm-subagent-restriction branch from 570771d to 8c80e81 Compare August 5, 2026 20:34
@masonc08
masonc08 merged commit c1ae4f0 into main Aug 5, 2026
2 checks passed
@masonc08
masonc08 deleted the masonc08/remove-glm-subagent-restriction branch August 5, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants