-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(codersdk): add circuit breaker configuration support for aibridge #21546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
930deb9 to
8fe246a
Compare
8fe246a to
93cfb29
Compare
Do we not recommend this for prod deployments? If we do, then I think it's fine to shop a breaking change and call it out. Most customers will only use it after GA. |
I don't think we should frame it as disabled for BC reasons. We haven't validated this yet in production so I think making it optional for now is the conservative approach. We should enable it in dogfood after this PR lands, and keep an eye on the metrics to assess if the behaviour aligned with our expectations and requirements. |
dannykopping
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add circuit breaker support for AI Bridge to protect against cascading failures from upstream AI provider rate limits (429, 503, 529 responses). New CLI options: - --aibridge-circuit-breaker-enabled (default: false) - --aibridge-circuit-breaker-failure-threshold (default: 5) - --aibridge-circuit-breaker-interval (default: 10s) - --aibridge-circuit-breaker-timeout (default: 30s) - --aibridge-circuit-breaker-max-requests (default: 3) The circuit breaker is disabled by default for backward compatibility. When enabled, it applies to both OpenAI and Anthropic providers.
dabab8a to
f444e76
Compare
Summary
Add circuit breaker support for AI Bridge to protect against cascading failures from upstream AI provider rate limits (HTTP 429, 503, and Anthropic's 529 overloaded responses).
Changes
--aibridge-circuit-breaker-enabled(default: false)--aibridge-circuit-breaker-failure-threshold(default: 5)--aibridge-circuit-breaker-interval(default: 10s)--aibridge-circuit-breaker-timeout(default: 30s)--aibridge-circuit-breaker-max-requests(default: 3)Notes
Testing