Conversation
Exercise both hard quota codes and transient provider quota retries through synchronous and asynchronous completion. Co-authored-by: openhands <openhands@all-hands.dev>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Owner
Author
|
Relocated upstream: the regression test is now on the OpenHands#4917 branch ( |
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.
HUMAN:
AGENT:
Prepared by an AI agent on behalf of Engel as a follow-up to OpenHands#4917.
Why
The latest parent revision already fixes the broad quota match and the type annotation raised in review, but its quota regressions only exercised synchronous completion.
Summary
usage_limit_reachedandinsufficient_quotathrough synchronous and asynchronous completion.Issue Number
Follow-up to OpenHands#4917; related issue OpenHands#4936.
How to Test
From this branch:
Result: 45 passed and all applicable pre-commit hooks passed.
The tests drive the public
LLM.completion()andLLM.acompletion()paths, injecting provider failures at the LiteLLM transport boundary.Hard quota errors make one primary attempt and then use the fallback; transient quota errors make two primary attempts before trying the fallback.
No live provider quota was consumed or deliberately exhausted.
Video/Screenshots
Not applicable; this is regression coverage for backend retry behavior.
Design Doc
Not applicable; no production behavior or public API changes.
Type
Notes
This PR targets
review/pr-4917-quota-fallback, an exact mirror of original PR OpenHands#4917 at2b97474214e81ee1e648462350e1884920633e82, and contains only the additional regression coverage.Creating the PR directly against
all-hands-bot/software-agent-sdk:quota-fallback-immediatewas rejected by GitHub with HTTP 403 (Resource not accessible by integration), so this fork PR makes the change reviewable now; merging it here does not update the original PR branch.The enyst SDK fork's main branch was fast-forwarded to upstream before preparing this change.