Skip to content

[AIGTWY-4573] Resolve managed static model lists and discovery locations - #591

Closed
david-siqi-liu wants to merge 2 commits into
david/AIGTWY-4573from
david/AIGTWY-4573-managed-picker-helpers
Closed

david-siqi-liu wants to merge 2 commits into
david/AIGTWY-4573from
david/AIGTWY-4573-managed-picker-helpers

Conversation

@david-siqi-liu

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

Copy link
Copy Markdown
Collaborator

Add the shared managed_resolve helpers that both agent pickers need, a static model allow-list and a discovery location, before the agent-specific consumers so the shared logic reviews once.

Changes

  • managed_resolve: add managed_static_models and managed_model_service_location; populate claude_static_models, codex_static_models, and the per-agent model_service_location into state; extend managed_supplies_models so claude counts a discovery location (skips ug discovery) but codex does not (codex has no reader, so discovery still runs).

Validate

  • uv run ruff check . and uv run pytest pass (3 known pre-existing env failures aside).
  • Focused: uv run pytest tests/test_managed_resolve.py.
  • Scope check: the diff against the base touches only managed_resolve.py and its test.

This pull request and its description were written by Isaac.

@david-siqi-liu
david-siqi-liu force-pushed the david/AIGTWY-4573-managed-picker-helpers branch from 8539119 to 37216b9 Compare September 13, 2026 12:25
@david-siqi-liu
david-siqi-liu added this pull request to stack #595 September 13, 2026 12:37
@david-siqi-liu
david-siqi-liu force-pushed the david/AIGTWY-4573-managed-picker-helpers branch from 37216b9 to 7b3dbaa Compare September 13, 2026 12:50
@david-siqi-liu
david-siqi-liu force-pushed the david/AIGTWY-4573-managed-picker-helpers branch from 7b3dbaa to 30487a1 Compare September 13, 2026 14:43
@david-siqi-liu
david-siqi-liu force-pushed the david/AIGTWY-4573-managed-picker-helpers branch from 30487a1 to 85c9d45 Compare September 13, 2026 15:57
@david-siqi-liu
david-siqi-liu force-pushed the david/AIGTWY-4573-managed-picker-helpers branch from 85c9d45 to 371945e Compare September 13, 2026 16:07
david-siqi-liu and others added 2 commits September 13, 2026 16:51
With the config parsed (the stacked parse PR), apply the managed configuration to every enabled
agent at launch, but only when it changed since the last apply (an update_time watermark) or on
--refresh, so an unchanged launch never re-writes the OS-managed files or prompts for a password.
Also remove the post-configure probe validation, fix how managed MCP servers and skills are
consumed, and rename user-facing strings.

- Gate the launch apply on update_time. refresh_managed_config always fetches; a launch re-applies
  the managed configuration (the only step that writes the OS-managed files and can prompt for a
  password) only when update_time is newer than the applied watermark, or on ug <agent> --refresh,
  and records the new watermark. An unchanged launch skips the apply and never prompts. ug configure
  always applies and records the watermark. The "was updated; re-applying it" note prints only on a
  genuine version change, not on a no-op --refresh. The per-tool launch write is wrapped in
  suppressed_managed_writes() so the apply-all owns the single OS write.
- Consume managed mcp_servers and skills from their 3-part UC FQN (catalog.schema.name), matching
  the config and the coding-agent-config validator. managed_mcp_server_entry reads an mcp-service
  name as a dotted FQN (register under the dot-free slug, URL at the dotted name) instead of
  requiring dash form; download_managed_skills_on_launch reads each skills.names entry as a skill
  FQN and downloads that one skill instead of a whole schema. Both were silently skipped before.
- `ug configure` wires the managed config's MCP servers and skills at configure time (not only at
  launch), and suppresses the interactive MCP/skills/plugins prompt when the managed config already
  defines them, so a managed workspace is set up without asking the developer to configure MCP.
- Stop ug configure from validating agents with a probe message. Remove the post-configure
  validation and the --skip-validate flag: it is not configure's job to test models, the probe also
  reverted a freshly-written config on failure, and the gateway enforces model access regardless.
  The now-unused validate_all_tools / provider_permission_error / resolve_managed_for_tool helpers
  are removed; validate_tool stays for headless and e2e callers.
- Drop the "Using managed config - launching <agent>" banner and the redundant post-panel "Starting
  <agent>" line from the bare-ug launch, so bare ug matches ug <agent>.
- When a config we previously applied is gone (deleted, or the feature turned off), the launch
  does not auto-revert the OS-managed files; it notes that Unity Gateway managed configurations are
  still applied and points the developer to `ug revert`. Keyed on the applied watermark, so a
  workspace that never had a config still just uses the developer's own settings.
- Rename the product string "CLI Managed Configuration" to "managed configuration" (lowercase)
  across user-facing lines, tighten the budget-tier recommendation line, and remove the
  --skip-validate docs.

Co-authored-by: Isaac <no-reply@databricks.com>
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>
@david-siqi-liu
david-siqi-liu force-pushed the david/AIGTWY-4573-managed-picker-helpers branch from 371945e to fb39b86 Compare September 13, 2026 16:51
@david-siqi-liu

Copy link
Copy Markdown
Collaborator Author

Combined into #594 (the shared managed_resolve helpers live there now, alongside the picker/catalog/headers). Closing.

@david-siqi-liu
david-siqi-liu deleted the david/AIGTWY-4573-managed-picker-helpers branch September 13, 2026 18:17
@david-siqi-liu
david-siqi-liu removed this pull request from stack #595 September 13, 2026 18:20
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