Improve AI Gateway diagnostics during configure - #453
Merged
Conversation
lilly-luo
reviewed
Sep 2, 2026
lilly-luo
reviewed
Sep 2, 2026
lilly-luo
reviewed
Sep 2, 2026
lilly-luo
reviewed
Sep 2, 2026
david-siqi-liu
force-pushed
the
david/es-2185388-gateway-capabilities
branch
from
September 2, 2026 17:10
0508cb9 to
7a2446b
Compare
lilly-luo
approved these changes
Sep 2, 2026
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.
What did you change, and why?
Change:
ucode configurenow reports whether it can access a Unity Catalog model service. If no accessible model service is returned, it probes legacy endpoints internally to determine whether Unity AI Gateway is still usable. The user-facing success output remains focused on the model service result.Why: Today,
ucode configureprovides little telemetry about the discovery path it can access. Users can eventually see a CSP-related fallback error even when the actionable problem is missing access tosystem.ai. Reporting the model-service result makes that failure clear, while avoiding an unnecessary legacy probe when model-service discovery already succeeds.Related: ES-2185388
Expected output by scenario
An accessible model service is returned
The legacy endpoint API is not probed.
Model-service discovery is reachable but returns nothing accessible, and the legacy endpoint API is reachable
This applies whether the legacy endpoint listing is empty or contains an accessible endpoint. The fallback is checked internally and is not printed.
Model-service discovery is unavailable or forbidden, and the legacy endpoint API is reachable
The exact model-service reason is printed after replacing any API-version terminology with resource-oriented language. The reachable legacy endpoint fallback is not printed.
Model-service discovery is reachable but empty, and the legacy endpoint API is unavailable
No success summary is printed. Configuration raises an actionable model-service access error with this guidance:
Model-service discovery is unavailable, and legacy endpoint access is forbidden
No success summary is printed. Configuration raises an actionable legacy endpoint permission error.
Neither discovery path is reachable
No success summary is printed. Configuration reports that Unity AI Gateway is not enabled and includes both resource-oriented failure reasons.
The access token is invalid
No success summary is printed. Configuration stops immediately with
databricks auth logoutanddatabricks auth loginguidance. If model-service discovery identifies the invalid token, the legacy endpoint API is not probed.A successful empty model-service response, including
HTTP 200 {}, confirms that the API is reachable. It does not prove that the caller can access a model service.How do you know it works?
configure_shared_state.system.aipermission hint.uv run ruff check .anduv run ruff format --check src/ tests/passed.2176 passed, 37 skipped, 1 deselected. The deselected live Claude user-agent E2E is blocked in this development environment because system-managed Claude settings override its localhost capture server.