Skip to content

feat(circuitbreaker): remove 429 from circuit breaker failure conditions#276

Draft
ssncferreira wants to merge 1 commit intomainfrom
ssncf/remove-429-circuit-breaker
Draft

feat(circuitbreaker): remove 429 from circuit breaker failure conditions#276
ssncferreira wants to merge 1 commit intomainfrom
ssncf/remove-429-circuit-breaker

Conversation

@ssncferreira
Copy link
Copy Markdown
Contributor

@ssncferreira ssncferreira commented Apr 20, 2026

Rate-limit responses (429) are key-specific errors that will be handled by key failover, not provider-level failures. This cleanly separates key errors (429, 401, 403) from provider errors (503, 504, 529).

Changes

  • Remove http.StatusTooManyRequests from DefaultIsFailure
  • Update all circuit breaker tests to trip on 503 instead of 429
  • Add TestCircuitBreaker_429DoesNotTrip integration test

The Anthropic custom IsFailure (which adds 529) delegates to DefaultIsFailure and requires no changes.

Related to: coder/internal#1445
Related to: https://linear.app/codercom/issue/AIGOV-196

🤖 Generated by Coder Agents, modified and reviewed by @ssncferreira .

@ssncferreira ssncferreira force-pushed the ssncf/remove-429-circuit-breaker branch 5 times, most recently from 1420860 to 3093fba Compare April 20, 2026 10:35
@ssncferreira ssncferreira force-pushed the ssncf/remove-429-circuit-breaker branch from 3093fba to bf7088f Compare April 20, 2026 12:30
@ssncferreira ssncferreira changed the title fix(circuitbreaker): remove 429 from circuit breaker failure conditions feat(circuitbreaker): remove 429 from circuit breaker failure conditions Apr 20, 2026
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