Skip to content

test(ai-proxy): retry transient provider errors in LLM integration test#1758

Open
nbouliol wants to merge 1 commit into
mainfrom
fix/ci-llm-integration-transient-retry
Open

test(ai-proxy): retry transient provider errors in LLM integration test#1758
nbouliol wants to merge 1 commit into
mainfrom
fix/ci-llm-integration-transient-retry

Conversation

@nbouliol

@nbouliol nbouliol commented Jul 13, 2026

Copy link
Copy Markdown
Member

Problem

The LLM Integration Tests (ai-proxy) job on main goes red whenever a provider returns a transient error. The all models should support tool calls test treated an Anthropic HTTP 529 overloaded_error as a model capability failure:

AIProviderUnavailableError: Anthropic server error (HTTP 529): ... "type":"overloaded_error" ... model: claude-opus-4-5

The dispatcher is built with maxRetries: 0 by design (passthrough proxy), so nothing absorbs the blip, and expect(failures).toEqual([]) fails on a purely transient provider availability issue that says nothing about the model.

Fix

  • Retry transient errors (429 / 5xx / 529 / overloaded / network timeouts) with a small backoff (up to 3 attempts).
  • If a model still errors transiently after retries, skip it (logged) instead of counting it as a failure — a provider blip is not a capability signal.
  • Genuine capability failures still fail the test.
  • Hard infra errors (401/403/auth/DNS) still fail loudly — those mean the test setup is broken.

This job already has continue-on-error: true and is not in the release needs, 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

  • Adds queryModelToolSupport, a helper that issues an ai-query with a function tool and retries up to 3 times (MAX_MODEL_QUERY_ATTEMPTS) with incremental backoff on transient errors.
  • Classifies provider errors into hard (auth/infra), transient (rate-limit/5xx/network), or capability using two new regex patterns; hard errors fail immediately, transient errors are retried then skipped with a warning, and capability errors fail the test.
  • Updates the '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.

… 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>
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