feat(routing): add configurable subagent model hooks - #52
Merged
Merged
Conversation
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an experimental, opt-in subagent model-routing hook example with the requested defaults:
gpt-5.6-lunalowgpt-5.6-solhighgpt-6-astrahighThis does not change the main session model, install hooks into the maintainer's environment, modify installed skills, or create agents automatically. It makes no additional model/API calls. Main-agent classification and explicit delegation authority remain required.
Validation
python3 scripts/validate_repo.pyquick_validate.py— not applicable; no skill changed.Additional evidence:
.venv-routing/bin/python -W error::ResourceWarning -m unittest discover -s scripts/tests -p 'test_*.py'— 76 passed, including 27 routing tests.python3 skills/maintain-codex-wiki/scripts/wiki_lint.py .— passed.git diff --check— passed.Not verified: live Codex app hook activation or actual child-model switching. The locally available terminal CLI is 0.143.0; the app runtime may differ. This PR intentionally includes a smoke-test checklist and does not claim a minimum compatible version or token/cost savings.
Official contracts: Hooks, Subagents. ECC/RouteLLM inspiration is attributed in the example guide.
Safety and scope
Risks and boundaries:
Rollback: disable/remove only the two installed handlers or set
routing.enabled: falsein the private policy. Preserve unrelated hooks and local state. Repository rollback requires reverting this PR; no production service or migration is affected.