Skip to content

docs: document config.num_retries for rate-limit handling - #4194

Merged
IsmaelMartinez merged 2 commits into
The-PR-Agent:mainfrom
HarshRajSinghania:docs/document-num-retries-for-rate-limits
Oct 30, 2026
Merged

IsmaelMartinez merged 2 commits into
The-PR-Agent:mainfrom
HarshRajSinghania:docs/document-num-retries-for-rate-limits

Conversation

@HarshRajSinghania

@HarshRajSinghania HarshRajSinghania commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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_timeout only 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 is config.num_retries (commented out by default in pr_agent/settings/configuration.toml).

Implementation

  • In the Rate Limiting example, document config.num_retries and 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 that ai_timeout is for timeouts only.
  • In the Common Error Messages section, update the "Rate limit exceeded" solution to recommend config.num_retries and mention pr_reviewer.publish_error_details (settable only via workflow env) as a way to surface a sanitized failure reason for a manual /review.

No code or configuration defaults were changed.

Testing

  • Manually verified the updated sections against the issue description and the source of num_retries in configuration.toml and litellm_ai_handler.py.
  • Confirmed the Markdown renders the new guidance clearly and that links to the Review tool docs remain valid.

No automated tests are affected (documentation-only change).


PR Type

Documentation


Description

  • Recommend config.num_retries for 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

Relevant files
Documentation
github.md
Correct rate-limit retries and review troubleshooting guidance

docs/docs/installation/github.md

  • Add config.num_retries to the workflow example for transient provider
    errors.
  • Explain client defaults, independent fallback retry budgets, and
    unrecoverable quota errors.
  • Clarify that config.ai_timeout addresses timeouts rather than HTTP 429
    responses.
  • Document workflow-only pr_reviewer.publish_error_details for sanitized
    manual /review failure details and link to review documentation.
+9/-3     


⚙️ Agent run details
  • Model: openai/gpt-6.1-sol
  • Tokens: 5,520 in / 205 out / 5,725 total
  • Time cost: 6.7s
  • AI calls: 1

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
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 20, 2026
@the-pr-agent-bot

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

4193 - Fully compliant

Compliant requirements:

  • Recommend config.num_retries in both rate-limit guidance sections.
  • Explain independent retries for fallback models.
  • Explain that retries do not resolve quota errors.
  • Distinguish request timeouts from rate-limit responses.
  • Document workflow-only error diagnostics for manual /review failures and link to the Review tool documentation.
⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

⚙️ Agent run details
  • Model: openai/gpt-6.1-sol
  • Tokens: 6,725 in / 352 out / 7,077 total
  • Time cost: 9.9s
  • AI calls: 1

@IsmaelMartinez IsmaelMartinez left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/docs/installation/github.md Resolved
Comment thread docs/docs/installation/github.md Resolved

@IsmaelMartinez IsmaelMartinez left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@IsmaelMartinez
IsmaelMartinez merged commit 6e3efde into The-PR-Agent:main Oct 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation Review effort 1/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: the rate-limit advice suggests raising ai_timeout, which does not help a 429; document config.num_retries

2 participants