Add Model Provider Service routing for claude and codex#174
Open
AarushiShah-db wants to merge 9 commits into
Open
Add Model Provider Service routing for claude and codex#174AarushiShah-db wants to merge 9 commits into
AarushiShah-db wants to merge 9 commits into
Conversation
Route claude/codex through a Unity Catalog Model Provider Service (external Anthropic/OpenAI provider) via the Databricks-Model-Provider-Service header instead of pinning a Databricks model. - `ucode claude/codex --provider <catalog.schema.name>` routes per-invocation; verifies the MPS feature is enabled and fails with a clear message if not. - `ucode configure --model-provider` opt-in: lists matching services (anthropic for claude, openai for codex), persists the choice per tool; launches then use it automatically. Default configure path is unchanged. - Provider mode pins no Databricks model (the agent's own canonical names route through the header) and skips the heavy model discovery, fetching only a web-search model. - Friendlier USE CONNECTION permission error naming the service. Co-authored-by: Isaac
1e1373d to
d3a5b37
Compare
Co-authored-by: Isaac
Co-authored-by: Isaac
Show the Model Provider Service picker only on the fully interactive `ucode configure` path (no --agent/--agents). Naming agents signals the non-interactive flow and stays on Databricks. Also fall back to Databricks silently when the MPS feature isn't enabled on the workspace, instead of printing a per-tool note.
The Claude Stop hook (mlflow autolog claude stop-hook) is a short-lived one-shot process. With MLflow's default async trace logging, the root claude_code_conversation span is queued and the hook's best-effort flush can lose it before the process exits — observed on CI runners, leaving an orphaned llm span and no queryable trace (e2e tracing test failure). Set MLFLOW_ENABLE_ASYNC_TRACE_LOGGING=false so export is synchronous.
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.
Adds two new commands
ucode claude/codex --provider catalog.schema.mps-> which will launch claude code or codex routing to a specific model provider serviceprovider_example.mov
ucode configurewhich will launch the regular configure flow but also give the user the option to configure claude code and codex with MPS.Configuration demo
https://github.com/user-attachments/assets/40452e9f-515f-419c-a7b4-9cff99a13a43
Launch + model picker demo
https://github.com/user-attachments/assets/ad9ab536-8ce9-463a-89c9-10f027fbcd45
Edge cases:
Co-authored-by: Isaac