Add --model launch flag for custom UC model services#224
Open
grundprinzip wants to merge 1 commit into
Open
Conversation
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
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.
Add a launch-time
--model <catalog>.<schema>.<name>flag to bothucode claudeanducode codexthat pins a custom (non-system.ai) Unity Catalog model-service as the agent's default model, while still discovering and listing thesystem.aimodels in the picker. Sibling to the existing--providerflag and mutually exclusive with it.list_model_serviceswithparent=schemas/system.ai(keep page_size + client-side filter as safety nets); addget_model_servicefor an existence-only singular lookup with a schema-scoped listing fallback.--modeloption on both commands, threaded through_launch_tool; mutual-exclusion guard vs--provider; validate the id before launch while keeping normal system.ai discovery.ANTHROPIC_MODELto the custom id alongside the existing family aliases so system.ai rows remain in the picker.Co-authored-by: Isaac