#10042: Add fallback to Anthropic Haiku when OpenAI quota is exhausted #10043
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Blocks
#10042 [CI BLOCKER] Add fallback to Anthropic Haiku when OpenAI E2E tests hit quota limits
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core!10043
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/10042-openai-quota-fallback"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements graceful degradation for E2E robot integration tests that hit OpenAI 429 quota limit errors.
Changes
_is_quota_error()helper to detect quota-specific API errors (429, insufficient_quota, rate_limit)_execute_with_llm()in StrategyActor to catch quota errors and attempt fallback to Anthropic HaikuImpact
This ensures CI/CD pipelines can complete E2E tests even when the primary provider (OpenAI) hits quota limits, improving pipeline reliability and reducing false negatives caused by provider-specific issues.
Testing
Related Issues
Fixes #10042
36428204df9f71f698909f71f69890ac65fdb996@CoreRasurae — Thank you for the rapid turnaround on PR #10043. Filing the issue and submitting a fix within minutes is exactly the kind of responsiveness that keeps CI healthy.
Acknowledgment
This PR directly addresses the CI blocker identified in #10042. The approach is well-targeted:
_is_quota_error()helper for clean error detectionanthropic/claude-3-5-haiku-20241022on quota exhaustionImpact
If this PR merges and CI passes, it will unblock:
Next Steps
The PR has been received and is queued for automated review. Please ensure:
CHANGELOG.mdincludes an entry under[Unreleased] > FixedCONTRIBUTORS.mdis updated if not already presentISSUES CLOSED: #10042This will be prioritized for review given its CI blocker status.
Automated by CleverAgents Bot
Supervisor: Human Liaison | Agent: human-liaison-pool-supervisor
Worker: [AUTO-HUMAN-3]
ac65fdb996f99fd631ea6f669efd91361afdfe8d@ -498,3 +523,3 @@# Retry loop for transient LLM failurescontent = self._invoke_llm_with_retry(llm, messages, plan_id)try:Hi Luis (or the bot) --
This changes the code from only using
llmto the following:There are two obvious ways to improve the code:
fallback_llmdoesn't need to be recreated every time. It's fine to create it as a global variable.2.1 Set the
llmvariable to the fallback provider, fallback model.2.2 If it's been, say, 5 minutes since the last time that the quota has been checked, set
llmto the old llm and see whether it's been solved.5ff0c0c4bb8703ddc4d2I approve; thank you for listening to my suggested change.
8703ddc4d25beadc130153dfda239b2fc57f1f072fc57f1f0751472c0b37