Skip to content

[AIGTWY-4573] Apply v2 static/auto model curation to /model picker - #547

Open
david-siqi-liu wants to merge 1 commit into
david/AIGTWY-4573from
david/AIGTWY-4573-model-picker
Open

[AIGTWY-4573] Apply v2 static/auto model curation to /model picker#547
david-siqi-liu wants to merge 1 commit into
david/AIGTWY-4573from
david/AIGTWY-4573-model-picker

Conversation

@david-siqi-liu

@david-siqi-liu david-siqi-liu commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #545 (branch david/AIGTWY-4573) — merge that first. This is the second half of AIGTWY-4573: now that the client parses the v2 config (including models.names and model_service_location), turn each agent's model source into its own /model picker.

  • managed_resolve: expose managed_static_models + managed_model_service_location, count them in managed_supplies_models so ucode skips its own discovery, and layer them into state for the Claude/Codex writers.
  • Claude: a static list becomes availableModels + enforceAvailableModels + a modelPicker that replaces the built-in options, so /model shows 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.
  • Codex: a static list is written as a model_catalog_json catalog of full ModelPresets (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_overlay writes the expected Claude keys, and the generated Codex catalog is accepted by the real Codex 0.146.1 (codex debug models renders exactly the listed models with visibility: "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 /model listing this PR targets; per-model behavior tuning is a follow-up.

This pull request and its description were written by Isaac.

@david-siqi-liu
david-siqi-liu marked this pull request as ready for review September 9, 2026 23:53
@david-siqi-liu
david-siqi-liu force-pushed the david/AIGTWY-4573-model-picker branch from 4eab7d0 to b27b6c5 Compare September 10, 2026 01:04
@david-siqi-liu
david-siqi-liu force-pushed the david/AIGTWY-4573-model-picker branch from b27b6c5 to 714cb0f Compare September 10, 2026 03:11
@david-siqi-liu
david-siqi-liu force-pushed the david/AIGTWY-4573-model-picker branch from 714cb0f to a7fdf68 Compare September 10, 2026 20:38
@david-siqi-liu
david-siqi-liu force-pushed the david/AIGTWY-4573-model-picker branch 2 times, most recently from 38a8d9f to ca6e3f9 Compare September 10, 2026 21:33
@david-siqi-liu
david-siqi-liu force-pushed the david/AIGTWY-4573-model-picker branch 2 times, most recently from 75f55d4 to 37567e9 Compare September 11, 2026 05:35
@david-siqi-liu
david-siqi-liu force-pushed the david/AIGTWY-4573-model-picker branch from 37567e9 to cd97bcc Compare September 11, 2026 11:46
@david-siqi-liu
david-siqi-liu force-pushed the david/AIGTWY-4573-model-picker branch from cd97bcc to 6d748aa Compare September 11, 2026 12:43
…del picker

Stacked on the v2-consume + TTL PR (david/AIGTWY-4573). With the v2 config parsed (including
the models.names allow-list and model_service_location), turn each agent's model source into its
own picker so /model reflects it.

- managed_resolve: expose managed_static_models + managed_model_service_location, count them in
  managed_supplies_models so ucode skips its own discovery, and layer them into state for the
  Claude/Codex writers.
- claude: a static list becomes availableModels + enforceAvailableModels + a modelPicker that
  replaces the built-in options (so exactly the named ids, non-Claude included); a discovery
  location turns on gateway model discovery instead. Both skipped under a provider/relayed launch.
  Stale picker keys are pruned when the config no longer supplies a list. (The server guarantees
  every default_alias_models value is one of models.names, so a family default is never hidden.)
- codex: a static list is written as a model_catalog_json catalog of full ModelPresets
  (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 the generated Codex catalog parses in the real Codex 0.146.1 (codex debug models), and the
Claude picker keys via render_overlay + an isolated /model capture. Pickers are soft curation (they
don't fence an explicit --model); hard governance stays gateway-side.

Co-authored-by: Isaac <no-reply@databricks.com>
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.

1 participant