Skip to content

Add --model launch flag for custom UC model services#224

Open
grundprinzip wants to merge 1 commit into
databricks:mainfrom
grundprinzip:model_launch_flag
Open

Add --model launch flag for custom UC model services#224
grundprinzip wants to merge 1 commit into
databricks:mainfrom
grundprinzip:model_launch_flag

Conversation

@grundprinzip

Copy link
Copy Markdown

Add a launch-time --model <catalog>.<schema>.<name> flag to both ucode claude and ucode codex that pins a custom (non-system.ai) Unity Catalog model-service as the agent's default model, while still discovering and listing the system.ai models in the picker. Sibling to the existing --provider flag and mutually exclusive with it.

  • databricks.py: scope list_model_services with parent=schemas/system.ai (keep page_size + client-side filter as safety nets); add get_model_service for an existence-only singular lookup with a schema-scoped listing fallback.
  • cli.py: --model option on both commands, threaded through _launch_tool; mutual-exclusion guard vs --provider; validate the id before launch while keeping normal system.ai discovery.
  • agents/claude.py: pin ANTHROPIC_MODEL to the custom id alongside the existing family aliases so system.ai rows remain in the picker.
  • agents/codex.py: pin the custom id verbatim, bypassing the OpenAI-id rewrite.
  • Tests: +15 across databricks/claude/codex/cli covering discovery scope, singular lookup, per-agent pinning, and CLI validation/mutual-exclusion.

Co-authored-by: Isaac

Add a launch-time `--model <catalog>.<schema>.<name>` flag to both
`ucode claude` and `ucode codex` that pins a custom (non-`system.ai`)
Unity Catalog model-service as the agent's default model, while still
discovering and listing the `system.ai` models in the picker. Sibling to
the existing `--provider` flag and mutually exclusive with it.

- databricks.py: scope `list_model_services` with `parent=schemas/system.ai`
  (keep page_size + client-side filter as safety nets); add
  `get_model_service` for an existence-only singular lookup with a
  schema-scoped listing fallback.
- cli.py: `--model` option on both commands, threaded through
  `_launch_tool`; mutual-exclusion guard vs `--provider`; validate the id
  before launch while keeping normal system.ai discovery.
- agents/claude.py: pin `ANTHROPIC_MODEL` to the custom id alongside the
  existing family aliases so system.ai rows remain in the picker.
- agents/codex.py: pin the custom id verbatim, bypassing the OpenAI-id
  rewrite.
- Tests: +15 across databricks/claude/codex/cli covering discovery scope,
  singular lookup, per-agent pinning, and CLI validation/mutual-exclusion.

Co-authored-by: Isaac
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