Repository navigation
Conversation
ug copilot --model-location <catalog>.<schema> registers the schema's model services in the session registry, from the gateway's Anthropic model listing as for Claude Code. Services are sent by full name; the gateway routes them as model services. Services named like Claude or GPT models use their usual wire (GPT 5+ on Responses, since GPT 5+ rejects the temperature Copilot sends on the Anthropic wire); the rest use the Anthropic wire, which the gateway translates for other models. The saved Custom Model Location and the managed unity_catalog_location apply to Copilot like Claude Code and Codex. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Under a managed unity_catalog_location or model_provider_service, Copilot dropped the budget recommendation and the managed default_model. README now lists Copilot for the saved Custom Model Location. Co-authored-by: Isaac <no-reply@databricks.com>
…Code and Codex Unit tests for the saved location and its precedence with --provider, a managed location or provider, the configure picker, and workspace and single-agent configure. Single-agent `ug configure --agent copilot` now applies the managed model source like the other location agents. The launch branch per agent uses the AGENT_* constants. Co-authored-by: Isaac <no-reply@databricks.com>
… for ug agents add The location catalog strips gateway aliases with smart routing's unwrap_anthropic_gateway_model instead of its own pattern. The single-agent AI-tools install forces a managed-config refresh unless one already ran, so ug agents add copilot keeps it. Co-authored-by: Isaac <no-reply@databricks.com>
f1c6dd0 to
c925d9e
Compare
Polly AI ReviewBlocking issues
Security vulnerabilitiesNone identified in the changed code. This is a static assessment, not live security validation. Non-blocking notes
ApproachThe Foundry approach is consistent with existing provider-support and wire-classification patterns. No materially simpler implementation is apparent. The location feature also reuses existing discovery; its bootstrap handoff needs completion. SummaryDiff size (computed): 14 files; +498 / -55 lines (553 changed text lines); 0 binary files.
Shares use additions + deletions, including generated text and lockfiles. Binary files have no line count. Tests include fixtures/helpers under test paths and colocated test/spec files; categories are path-based, not coverage measurements. ChangesThe intended outcome is to allow Copilot to use Microsoft Foundry provider services, selecting Anthropic for Claude, Responses for GPT-5+/o-series, and Chat Completions otherwise. The diff contains implementation, unit/component tests, live integration scenarios, and documentation. It also includes stacked Copilot model-location support: schema discovery, saved and managed source selection, and transient launch state. No dependency or generated-file changes are included. The Foundry changes are proportional to the outcome. The location work explains much of the additional breadth, subject to the scope question above. The concrete reduction opportunity is shared CLI conflict-test setup rather than removing distinct lifecycle coverage. TestsTest-by-test assessment
Existing unchanged tests cover provider headers, native endpoints, bearer handling, Claude token limits, catalog failures, model fallback, and launch cleanup. These provide useful coverage without duplicating every assertion in live tests. The concrete missing regression is the first-run location path identified above. Existing first-run tests mock configuration and therefore miss its availability failure. A Copilot-only component test with real bootstrap is sufficient; another live scenario is not required for that bug. The new Foundry live scenario exercises GPT/Responses, not Claude or DeepSeek transport. Classification and declaration-override assertions cover those routing decisions locally; the reported manual transport checks were not independently repeated. The frozen snapshot checksum and both required policy files were verified. No tests, collection, lint, or typecheck were executed; no passing result is claimed. To confirm the bootstrap fix manually, use an isolated fresh UG profile and a workspace with no global Copilot models but a usable service in the selected schema: ug copilot --workspace <workspace> --model-location <catalog.schema> --model <service-full-name> -p "reply ok"The selected schema should permit startup instead of producing the global availability error. ScopeFoundry acceptance, classification, selection, and associated documentation support the stated outcome. Copilot model-location support is coherent with the parent-stack context but is not explicitly included in the Foundry description; its inclusion needs clarification. No clearly unrelated changes were established. Automated review by Polly · workflow run |
…gents Co-authored-by: Isaac <no-reply@databricks.com>
Foundry's Claude targets use the Anthropic wire whatever they declare (Foundry serves Claude on Anthropic Messages, not Chat Completions); its GPT 5+ and o-series targets use Responses and the rest Chat Completions, as for OpenAI and Azure OpenAI services. Co-authored-by: Isaac <no-reply@databricks.com>
c925d9e to
2c81f2a
Compare
|
Thanks for the review.
|
Co-authored-by: Isaac <no-reply@databricks.com>
🥞 Stacked PR
Use this link to review incremental changes.
What did you change, and why?
Change:
ug copilot --provider <catalog>.<schema>.<name>now accepts Microsoft Foundry (microsoft_foundry) Model Provider Services, as Codex already does. Before, Copilot refused them ("can't route to ... microsoft_foundry").openai/v1/chat/completions, including the Claude ones.dbx-anthropicon/ai-gateway/anthropic), whatever they declare. Foundry answers Claude on Anthropic Messages and Responses but returns 404 on Chat Completions. On the Anthropic wire Copilot also sends its Claude request settings, and limits are capped at 200K as for other provider services./ai-gateway/openai/v1, as for OpenAI and Azure OpenAI services.ug configurenow offers Foundry services for Copilot under External Models, and a managedmodel_provider_serviceof this type applies to Copilot.How do you know it works?
Testing:
gpt-5-nanoon Responses, DeepSeek on Chat Completions;service_usable_for_toolandsupports_provider_serviceacceptmicrosoft_foundryfor Copilot.just lintis clean.tests/integration/test_ug_copilot_providers.py, non-blocking Copilot lane): a file task through the existing Foundry MPS fixture ongpt-5-nano(the one Codex's Foundry journey uses), ondbx-responses, with the answering model checked from Copilot's session events.ugfrom this branch, three Foundry services on a Databricks workspace, API-key and Entra auth):claude-opus-4-8, and the default start modeldeepseekgpt-5.4-nanoA direct request per gateway route for the same targets: Claude answered on Anthropic Messages and Responses, and 404'd on Chat Completions; DeepSeek answered on Chat Completions and Responses, and 404'd on Anthropic Messages.
Stacked on #1256.
This pull request and its description were written by Isaac.