Repository navigation
docs: document config.num_retries for rate-limit handling - #4194
IsmaelMartinez merged 2 commits into
Conversation
The rate-limit section previously recommended raising config.ai_timeout, which does not affect 429 responses. Document config.num_retries (the setting that controls per-call retries in the completion client) and clarify the distinction. Also point to pr_reviewer.publish_error_details for diagnosing manual review failures. Fixes The-PR-Agent#4193
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
⚙️ Agent run details
|
IsmaelMartinez
left a comment
There was a problem hiding this comment.
Thanks @HarshRajSinghania for turning #4193 around so quickly; the num_retries recommendation, the fallback note and the publish_error_details pointer all match the code. Two small wording fixes inline: num_retries is not a plain retry count once LiteLLM adds its own retries, and the workflow env takes YAML, so the error-details example needs the YAML form.
…he-PR-Agent#4425 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IsmaelMartinez
left a comment
There was a problem hiding this comment.
Thanks @HarshRajSinghania. #4425 has since made the handler the only retry layer, so I pushed the matching num_retries comment and the YAML form of publish_error_details. Merging.
User description
Summary
Updates the GitHub Action installation documentation so the rate-limit guidance points to the correct setting.
Motivation
Fixes #4193.
The Rate Limiting section and the "Rate limit exceeded" troubleshooting entry currently recommend raising
config.ai_timeout(or adding a fallback model). A 429 is returned immediately;ai_timeoutonly bounds the duration of each individual request and does not change rate-limit behavior. The setting that controls per-call retries inside the completion client isconfig.num_retries(commented out by default inpr_agent/settings/configuration.toml).Implementation
config.num_retriesand explain that each model in a fallback chain receives its own retry budget. Note that quota/hard-limit errors are retried but will not recover, and thatai_timeoutis for timeouts only.config.num_retriesand mentionpr_reviewer.publish_error_details(settable only via workflowenv) as a way to surface a sanitized failure reason for a manual/review.No code or configuration defaults were changed.
Testing
num_retriesinconfiguration.tomlandlitellm_ai_handler.py.No automated tests are affected (documentation-only change).
PR Type
Documentation
Description
Recommend
config.num_retriesfor transient rate limits.Explain fallback retry budgets and quota limitations.
Clarify timeouts do not resolve rate limits.
Document workflow-only diagnostics for manual review failures.
File Walkthrough
github.md
Correct rate-limit retries and review troubleshooting guidancedocs/docs/installation/github.md
config.num_retriesto the workflow example for transient providererrors.
unrecoverable quota errors.
config.ai_timeoutaddresses timeouts rather than HTTP 429responses.
pr_reviewer.publish_error_detailsfor sanitizedmanual
/reviewfailure details and link to review documentation.⚙️ Agent run details