Skip to content

[AIGTWY-4573] Parse the managed coding-agent config - #590

Merged
david-siqi-liu merged 1 commit into
mainfrom
david/AIGTWY-4573-parse
Sep 14, 2026
Merged

david-siqi-liu merged 1 commit into
mainfrom
david/AIGTWY-4573-parse

Conversation

@david-siqi-liu

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

Copy link
Copy Markdown
Collaborator

Parse the managed CodingAgentConfig and add the version and watermark helpers on their own, ahead of any launch or configure change, so the data-shape change reviews in isolation. Nothing here runs on the launch path yet; the child PR wires it in.

Changes:

  • Model the wire CodingAgentConfig as frozen dataclasses (CodingAgentConfig, EnabledAgent/AgentConfig, AgentModels, the NamesOrLocation selector, SpendTiers) parsed via from_wire and projected to the internal shape via to_internal, so the interface shape is legible instead of scattered dict reads. The model source is the server's oneof: exactly one of model_provider_service / unity_catalog_location / model_services.
  • mcp_servers and skills each parse to a names-or-location selector: an absolute names list of UC FQNs, or a unity_catalog_location (a catalog.schema) whose contents are discovered, exactly one.
  • Greenfield, so no back-compat: the deprecated wire fields the proto reserves are not read (custom_headers, the model_config oneof, tracing_config, tags), and neither are the reserved top-level display_name or the removed tracing table.
  • managed_config: add managed_config_is_newer / managed_update_time, a spec_version forward-compat gate (a newer or malformed spec_version keeps the last-known-good cache), and the UCODE_MANAGED_CONFIG_STUB local-file read for pre-server testing.
  • state: add the applied-version watermark (get/set_applied_managed_update_time) the launch gate reads.
  • managed_setup: serialize and validate the same shape (names are 3-part FQNs, location a 2-part catalog.schema, exactly one set), so serialize then normalize round-trips.
  • databricks: the managed-config update mask sends the mutable, non-reserved paths (default_agent, enabled_agents, mcp_servers, skills, spend_tiers); rename the user-facing "Unity AI Gateway" strings to "Unity Gateway".

This pull request and its description were written by Isaac.

@david-siqi-liu david-siqi-liu changed the title [AIGTWY-4573] Parse the v2 managed coding-agent config [AIGTWY-4573] Parse the managed coding-agent config Sep 13, 2026
@david-siqi-liu
david-siqi-liu added this pull request to stack #595 September 13, 2026 12:37
@david-siqi-liu
david-siqi-liu removed this pull request from stack #595 September 13, 2026 18:20
@david-siqi-liu
david-siqi-liu added this pull request to stack #598 September 13, 2026 18:20
Comment thread src/ucode/managed_config.py
Comment thread src/ucode/managed_config.py
Comment thread src/ucode/managed_config.py Outdated
Comment thread src/ucode/managed_config.py Outdated
Comment thread src/ucode/managed_config.py
Comment thread src/ucode/managed_config.py Outdated
Comment thread src/ucode/managed_config.py Outdated
Comment thread src/ucode/managed_config.py Outdated
Comment thread src/ucode/managed_config.py Outdated
Comment thread src/ucode/managed_config.py Outdated
Comment thread src/ucode/managed_config.py Outdated
Comment thread src/ucode/managed_export.py
Comment thread src/ucode/managed_setup.py

@lilly-luo lilly-luo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add a @DataClass that represents the overall API? it's difficult to grok the shape right now. the dataclass will also help with request / response validation, it's easy to make an error and use the wrong interface

Comment thread src/ucode/managed_setup.py
@david-siqi-liu
david-siqi-liu force-pushed the david/AIGTWY-4573-parse branch 5 times, most recently from 209bbb6 to d12daa2 Compare September 14, 2026 21:16
Comment thread src/ucode/managed_config.py Outdated
Land the CodingAgentConfig parsing and the version and watermark helpers on their own, ahead of any
change to launch or configure behavior, so the data-shape change is reviewable in isolation. Nothing
here runs on the launch path yet; the stacked launch-apply PR wires it in.

- managed_config: model the wire CodingAgentConfig as frozen dataclasses (CodingAgentConfig,
  EnabledAgent/AgentConfig, AgentModels, the NamesOrLocation selector, SpendTiers) parsed via
  from_wire and projected to the internal shape via to_internal, so the interface shape is legible
  instead of scattered dict reads. The model source is the server's oneof: exactly one of
  model_provider_service / unity_catalog_location / model_services. Add managed_config_is_newer and
  managed_update_time, a spec_version forward-compat gate (a newer or malformed spec_version keeps
  the last-known-good cache), and the UCODE_MANAGED_CONFIG_STUB local-file read for pre-server
  testing.
- mcp_servers and skills each parse to a names-or-location selector: an absolute names list of UC
  FQNs, or a unity_catalog_location (a catalog.schema) whose contents are discovered, exactly one.
- Greenfield, so no back-compat: the deprecated wire fields the proto reserves are not read
  (custom_headers, the model_config oneof, tracing_config, tags) and neither are the reserved
  top-level display_name or the removed tracing table.
- state: add get/set_applied_managed_update_time, the applied-version watermark the launch gate reads.
- managed_setup: serialize and validate the same shape (names are 3-part FQNs, location a 2-part
  catalog.schema, exactly one set), so serialize then normalize round-trips. spec_version is
  server-owned on export.
- databricks: set the managed-config update mask to the mutable, non-reserved paths (default_agent,
  enabled_agents, mcp_servers, skills, spend_tiers); rename the user-facing "Unity AI Gateway"
  strings to "Unity Gateway".

Co-authored-by: Isaac <no-reply@databricks.com>
@david-siqi-liu
david-siqi-liu merged commit d019c9c into main Sep 14, 2026
2 checks passed
@david-siqi-liu
david-siqi-liu deleted the david/AIGTWY-4573-parse branch September 14, 2026 23:36
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