Repository navigation
Conversation
Without a managed config, the Codex router menu came from every cached system.ai GPT and OSS service, while Codex could only start models in its own catalog. Router picks such as gpt-6-luna then failed spawn_agent with "Unknown model". Routed launches now use one catalog file for both. A configured model_catalog_json is used as before. Otherwise ug discovers the system.ai models Codex can use from /codex/v1/models, builds the catalog with prepare_codex_catalog like a managed list, and passes it to Codex. When discovery fails, the session has no catalog and no routing. Co-authored-by: Isaac <no-reply@databricks.com>
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
Smart routed Codex sessions now build the router menu from the same catalog file Codex loads, so the router can only pick models Codex can start.
Problem
Without a managed config,
launch_codexoffered the router every cachedsystem.aiGPT and OSS service (codex_models+oss_models, 29 names on a staging workspace). Codex's own list is its bundled catalog plus/codex/v1/models, which covered 10 of them on an older Codex. A pick outside that list, such asgpt-6-luna, madespawn_agentfail withUnknown model.Change
_launch_smart_routingresolves one catalog file: the configuredmodel_catalog_jsonwhen there is one, otherwise a catalog ug writes from discovery./codex/v1/modelswith parent schemasystem.ai, which returns everysystem.aimodel Codex can use, GPT included. The names go throughprepare_codex_catalog, the same builder managed lists use, so GPT models keep Codex's bundled metadata and native aliases. The per model "missing metadata" warnings stay off for discovered names, since they are not admin choices.launch_codextakescatalog_path, passes it to Codex, and reads the router menu from it. The cachedcodex_models/oss_modelsfallback is removed.codex/v1/models is not enabled for this workspace) or returns nothing, the session launches without a catalog and without routing.Testing
uv run pytest): 4809 passed.tests/test_skills.py::test_orchestrator_injects_the_installed_agent_instructionsalso fails onmainon my machine and was deselected.ruff check,ruff format --check, andty checkpass.system.aimodels, the start model stayedgpt-6.1-sol, the router pickedsystem.ai.gpt-6-luna, and the spawn namegpt-6-lunais in the written catalog.This pull request and its description were written by Isaac.