[AIGTWY-4573] Apply static/auto model curation to each agent's /model picker - #547
Closed
david-siqi-liu wants to merge 3 commits into
Closed
david-siqi-liu wants to merge 3 commits into
david-siqi-liu wants to merge 3 commits into
Conversation
david-siqi-liu
marked this pull request as ready for review
September 9, 2026 23:53
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 10, 2026 01:04
4eab7d0 to
b27b6c5
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 10, 2026 03:11
b27b6c5 to
714cb0f
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 10, 2026 20:38
714cb0f to
a7fdf68
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
2 times, most recently
from
September 10, 2026 21:33
38a8d9f to
ca6e3f9
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
2 times, most recently
from
September 11, 2026 05:35
75f55d4 to
37567e9
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 11, 2026 11:46
37567e9 to
cd97bcc
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 11, 2026 12:43
cd97bcc to
6d748aa
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 11, 2026 14:48
6d748aa to
7614465
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 11, 2026 15:58
7614465 to
916cbc1
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 11, 2026 18:36
916cbc1 to
c6ac063
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 11, 2026 18:50
c6ac063 to
8ef7673
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 11, 2026 18:56
8ef7673 to
988956a
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 11, 2026 21:33
988956a to
3c48380
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 12, 2026 01:14
3c48380 to
2dab9ad
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 12, 2026 02:08
2dab9ad to
5664402
Compare
david-siqi-liu
added this pull request to stack #582
September 12, 2026 14:02
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
2 times, most recently
from
September 13, 2026 01:56
473036a to
fa053c3
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 13, 2026 02:24
fa053c3 to
f0c5fd2
Compare
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 13, 2026 02:56
f0c5fd2 to
521182e
Compare
Both the Claude picker and the Codex catalog need the same two inputs from the managed config: an explicit static model allow-list and a model-service discovery location. Add those shared resolvers and thread them into state, ahead of the two agent-specific consumers, so the shared logic is reviewed once. Stacked on the launch-apply PR (david/AIGTWY-4573). - managed_resolve: add managed_static_models and managed_model_service_location; extend managed_state_overrides to populate claude_static_models / codex_static_models and the per-agent model_service_location state keys; extend _manifest_models and managed_supplies_models to recognize flat-list agents and the static-list / discovery-location sources. For codex a location alone does not count as supplying models (codex has no discovery-location reader), so discovery still runs; for claude it does. Co-authored-by: Isaac <no-reply@databricks.com>
When the managed config pins a static model list, write Claude's availableModels, enforceAvailableModels, and modelPicker so /model shows exactly those models; when it names a discovery location instead, turn on gateway model discovery. Ownership markers let ug prune the keys it wrote on a later static-to-discovery transition without clobbering an admin-authored picker, and are cleared only when the managed file was actually written. Stacked on the shared-helpers PR (david/AIGTWY-4573-managed-picker-helpers). - claude: render the picker keys from claude_static_models, or enable discovery from claude_model_service_location; add ownership-marker state keys and pruning in the managed and private compose paths. Both skipped under a provider/relayed launch. The server guarantees every default_alias_models value is one of models.names, so a family default is never hidden. Co-authored-by: Isaac <no-reply@databricks.com>
When the managed config pins a static model list for Codex, fetch the real gateway model catalog, filter it to the allow-list preserving each full ModelPreset and the gateway ordering, and write it to ~/.codex/ucode-models.json, pointing Codex at it through model_catalog_json so /model shows exactly those models. On a fetch failure the existing catalog is preserved (a transient blip does not wipe it); a successful-but-empty result falls back to discovery. Stacked on the Claude-picker PR (david/AIGTWY-4573-claude-picker). - codex: add _fetch_gateway_codex_models and build_codex_catalog (None preserves on fetch failure, an empty dict falls back to discovery, a payload writes the catalog); add model_catalog_json to the managed keys and render_overlay; drop a stale provider-service header via one _strip_provider_header helper when moving off a provider or a static list. - README: document the Claude picker and the Codex catalog, and the ucode-models.json managed file. Co-authored-by: Isaac <no-reply@databricks.com>
david-siqi-liu
force-pushed
the
david/AIGTWY-4573-model-picker
branch
from
September 13, 2026 12:05
521182e to
87cc0a4
Compare
Collaborator
Author
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.
Stacked on #545 (branch
david/AIGTWY-4573), merge that first. This is the second half of AIGTWY-4573: now that the client parses the config (including the staticmodels.nameslist andmodel_service_location), turn each agent's model source into its own/modelpicker.managed_resolve: exposemanaged_static_models+managed_model_service_location, count them inmanaged_supplies_modelsso ucode skips its own discovery, and layer them into state for the Claude/Codex writers.availableModels+enforceAvailableModels+ amodelPickerthat replaces the built-in options, so/modelshows exactly the named ids (including non-Claude gateway models, which discovery alone omits); a discovery location instead turns on gateway model discovery. Both are skipped under a provider or relayed launch, and stale picker keys are pruned when the config drops its list.model_catalog_jsoncatalog of fullModelPresets (Codex's StaticModelsManager replaces remote discovery); auto needs no catalog, since the provider base_url already drives Codex's discovery. The catalog file is removed when the list goes away.Verified:
render_overlaywrites the expected Claude keys, and the generated Codex catalog is accepted by the real Codex 0.146.1 (codex debug modelsrenders exactly the listed models withvisibility: "list"). The pickers are soft curation (they do not fence an explicit--model); hard governance stays gateway-side. The Codex preset's runtime-behavior fields (base_instructions, truncation_policy, etc.) are generic defaults, sufficient for the/modellisting this PR targets; per-model behavior tuning is a follow-up.This pull request and its description were written by Isaac.