Skip to content

resolve managed models from the config alone and skip redundant disco… - #274

Merged
asujithan merged 4 commits into
mainfrom
managed-default-model
Aug 5, 2026
Merged

resolve managed models from the config alone and skip redundant disco…#274
asujithan merged 4 commits into
mainfrom
managed-default-model

Conversation

@asujithan

@asujithan asujithan commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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

Comment thread src/ucode/managed_resolve.py Outdated
@asujithan
asujithan merged commit 562695e into main Aug 5, 2026
2 checks passed
@asujithan
asujithan deleted the managed-default-model branch August 5, 2026 20:44
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.

2 participants