Skip to content

fix: correct jitter comment to reflect 25% scaling #2566

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

harjothkhara
Copy link

This pull request updates a comment in src/openai/_base_client.py to accurately describe the jitter applied to retry delays.

Previously, the comment said "plus-or-minus half a second" when the code actually scales the delay down by up to 25% (it multiplies by 1 - 0.25 * random()). This can mislead readers. The new comment reads: "Apply jitter by scaling the delay down by up to 25% to spread retries and avoid thundering‑herd effects."

No functional changes are introduced – just a documentation fix.

@harjothkhara harjothkhara requested a review from a team as a code owner August 19, 2025 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant