resolve managed models from the config alone and skip redundant disco… - #274
Merged
Conversation
AarushiShah-db
approved these changes
Aug 5, 2026
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.
Changes
Models specified in a workspace's managed config are now the whole allowlist for that agent, and the per-launch Databricks model discovery is skipped when the config already names them.
Model resolution: Each Claude family resolves to its own slot in the config, or to the config's default_model when that slot is unset. With neither set the family is left out entirely, so ucode writes no ANTHROPIC_DEFAULT__MODEL and the agent falls back to its own default rather than a model the admin never sanctioned — previously an unset family inherited whatever the developer had discovered locally, which let launches reach models outside the config. The developer's own list still stands when the config names no models for that agent at all.
Skipping discovery: managed_supplies_models reports whether the config names a provider, a default_model, or any model list entry, and the launch path folds that into the existing skip_model_discovery flag alongside the --provider case. That drops several seconds per launch — mostly discover_model_services walking Unity Catalog for models the config has already specified. The check reads the persisted managed-state.json rather than the fresh fetch, since the decision has to be made before configure_shared_state runs; it's a local file, and a first launch (no persisted copy yet) discovers exactly as before.
Enterprise settings warning: Claude Code's enterprise scope outranks the --settings file ucode writes and can't be excluded with --setting-sources, so a model pinned there quietly beats the admin's. A non-blocking warning now names the file (reusing the same platform discovery as the relayed-auth check) when it pins any of the five model keys ucode selects with.
Test Plan
uv run pytest - 1209 passed
e2e tests passing
Screen.Recording.2026-08-05.at.11.10.38.AM.mov