test(ai-proxy): retry transient provider errors in LLM integration test#1758
Open
nbouliol wants to merge 1 commit into
Open
test(ai-proxy): retry transient provider errors in LLM integration test#1758nbouliol wants to merge 1 commit into
nbouliol wants to merge 1 commit into
Conversation
… check The 'all models should support tool calls' integration test treated a transient Anthropic 529 overloaded_error as a model capability failure, turning a provider blip into a red CI run. The dispatcher uses maxRetries: 0 by design, so nothing absorbs the blip. Retry transient errors (429/5xx/529/timeouts) with backoff; if still failing, skip the model (logged) instead of counting it as a failure. Genuine capability failures and hard infra errors (auth/DNS) stay blocking. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
The
LLM Integration Tests (ai-proxy)job onmaingoes red whenever a provider returns a transient error. Theall models should support tool callstest treated an AnthropicHTTP 529 overloaded_erroras a model capability failure:The dispatcher is built with
maxRetries: 0by design (passthrough proxy), so nothing absorbs the blip, andexpect(failures).toEqual([])fails on a purely transient provider availability issue that says nothing about the model.Fix
429/5xx/529/overloaded/ network timeouts) with a small backoff (up to 3 attempts).401/403/auth/DNS) still fail loudly — those mean the test setup is broken.This job already has
continue-on-error: trueand is not in the releaseneeds, so it never blocked publishing; this just stops the noise and makes the signal meaningful.🤖 Generated with Claude Code
Note
Retry transient provider errors in LLM integration tool-call test
queryModelToolSupport, a helper that issues anai-querywith a function tool and retries up to 3 times (MAX_MODEL_QUERY_ATTEMPTS) with incremental backoff on transient errors.hard(auth/infra),transient(rate-limit/5xx/network), orcapabilityusing two new regex patterns; hard errors fail immediately, transient errors are retried then skipped with a warning, and capability errors fail the test.'all models should support tool calls'test in llm.integration.test.ts to collect skipped and failed models separately, so intermittent provider outages no longer cause false test failures.Macroscope summarized fcc6648.