Retry transient Claude model discovery failures - #412
Merged
Conversation
andy-xu-db
enabled auto-merge (squash)
August 28, 2026 21:32
lilly-luo
reviewed
Aug 28, 2026
lilly-luo
reviewed
Aug 28, 2026
lilly-luo
reviewed
Aug 28, 2026
lilly-luo
approved these changes
Aug 28, 2026
Collaborator
|
would be good to see client-side debug logs or video or smth of the retry |
lilly-luo
reviewed
Aug 28, 2026
andy-xu-db
force-pushed
the
andy/model-discovery-retry
branch
from
August 28, 2026 23:52
e293352 to
36fd336
Compare
andy-xu-db
force-pushed
the
andy/model-discovery-retry
branch
from
August 28, 2026 23:56
36fd336 to
86fed74
Compare
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.
Why
AI Gateway model discovery can return HTTP 429 when the workspace-level models-list rate limit is exceeded. Both ucode setup and the runtime Claude Code model-discovery proxy must retry so discovery remains available under a short burst.
Related gateway change: https://github.com/databricks-eng/universe/pull/2514436
Changes
Retry-After, and use bounded exponential backoff with jitter.GET /v1/modelsHTTP 429 responses once inside the Claude discovery proxy before relaying a failure to Claude Code. The single retry keeps the request within Claude Code's roughly three-second discovery deadline.Testing
Actual Claude Code client retry probe
Ran Claude Code 2.1.251 against a deterministic upstream through the ucode proxy. The upstream returned 429 once and then 200; inference returned
OKand Claude Code exited 0.LiteSwap E2E (gateway rate limit set to 200 RPS)
Tested against the gateway change through
testenv://liteswap/andy-aigw-models-rlinstaging-aws-us-east-1-0.REQUEST_LIMIT_EXCEEDED.GET /v1/modelsreceived HTTP 429, ucode retried with bounded backoff, the retry returned HTTP 200 with 12 models, and Sonnet 4.6 inference returned HTTP 200 with outputOKand process exit code 0.