test(ai-proxy): stop failing the LLM suite on a provider outage - #1817
Merged
Conversation
The tool-support check counted a provider 5xx as "this model does not support tool calls", so an OpenAI outage failed the suite on unrelated PRs. It happened twice in a row on gpt-3.5-turbo-16k while main and other branches were green, with AIProviderUnavailableError (HTTP 500). A 5xx carries no signal about tool support and cannot be answered by the denylist this test feeds, so those models are now reported as skipped instead. A real capability failure still fails, and the run is asserted to have verified at least one model so a total outage cannot pass green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
hercemer42
approved these changes
Aug 10, 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.

LLM Integration Tests (ai-proxy)fails the whole suite when OpenAI has an outage, blocking PRs that have nothing to do withai-proxy.What happened
It failed twice in a row on #1815, while
mainand two other feature branches were green — and a run on another branch that succeeded landed between my two failures, so it is correlated with time, not with the branch.Same cause both times:
Why the test is wrong here
The suite exists to answer one question: does this model support tool calls? A provider 5xx carries no signal about that. It is also not actionable through the mechanism this test feeds — per
packages/ai-proxy/CLAUDE.md, a model that fails here is meant to be added to thesupported-models.tsdenylist, and denylisting a model because the provider had a bad minute would encode an outage as a permanent capability claim.The existing
isInfrastructureErrorbranch already separates rate limits, auth and network errors from real capability failures. Provider 5xx simply was not in that list, so it fell through to "failed tool support".The change
Models whose call raises
AIProviderUnavailableErrorare collected separately and reported as skipped with a warning, instead of counted as failures. A genuine capability failure still fails the test.To keep the skip from hiding a real problem, the test now also asserts that at least one model was actually verified — so a total provider outage fails loudly rather than passing green having checked nothing.
Verification
yarn workspace @forestadmin/ai-proxy test— 469 tests, 39 suites, green.test/llm.integration.test.tsrun against the real APIs — 40 tests green, so OpenAI is healthy again and the check still does its job end to end.One honest limitation: because every model was available during that run, the new skip branch was not itself exercised. It is matched on the
String(error)prefix observed verbatim in the CI logs above.Note
Skip provider unavailability errors in the LLM integration test suite
Updates the
all models should support tool callstest in llm.integration.test.ts to distinguishAIProviderUnavailableErrorfailures from real test failures. Models that return this error are collected separately, logged as a warning, and excluded from the failure count. A final assertion checks that at least one model was actually tested, preventing a total outage from producing a false pass.Macroscope summarized efafeb7.