Skip to content

Add Model Provider Service routing for claude and codex#174

Open
AarushiShah-db wants to merge 9 commits into
mainfrom
model-provider-services
Open

Add Model Provider Service routing for claude and codex#174
AarushiShah-db wants to merge 9 commits into
mainfrom
model-provider-services

Conversation

@AarushiShah-db

@AarushiShah-db AarushiShah-db commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Adds two new commands

  1. ucode claude/codex --provider catalog.schema.mps -> which will launch claude code or codex routing to a specific model provider service
provider_example.mov
  1. ucode configure which 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:

  • If the model provider service is not available yet on the workspace, we will display a user-friendly error message
  • If the user does not have exeucte permissions on the model provider service, we will display user-friendly error message

Co-authored-by: Isaac

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
@AarushiShah-db AarushiShah-db requested a review from rohita5l June 25, 2026 22:42
@AarushiShah-db AarushiShah-db force-pushed the model-provider-services branch from 1e1373d to d3a5b37 Compare June 25, 2026 23:01
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.
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