chore: Fix typo in documentation and comments#5
Merged
Conversation
rm-openai
previously approved these changes
Mar 11, 2025
# Conflicts: # tests/docs/config.md # tests/docs/guardrails.md # tests/docs/tracing.md
rm-openai
approved these changes
Mar 12, 2025
DIZ-admin
pushed a commit
to DIZ-admin/openai-agents-python
that referenced
this pull request
Nov 18, 2025
Implemented comprehensive rate limiting: - Token Bucket algorithm for RPM and TPM limits - Separate buckets for requests/minute and tokens/minute - Automatic token refilling at constant rate - Graceful degradation with queuing when limits reached - Concurrent request limiting with semaphore Features: - Per-model rate limits (gpt-4o: 30K TPM, gpt-4o-mini: 200K TPM) - Automatic wait time calculation - Statistics tracking (throttle rate, wait times, etc.) - Thread-safe with asyncio locks - Context manager API for easy usage Integration: - Integrated into Vision API (_call_openai_vision_api_with_retry) - Automatic token estimation based on image and schema size - Added to DI container with lazy initialization - Global rate limiter registry for singleton pattern Benefits: - Prevents 429 rate limit errors from OpenAI - Automatic queuing instead of failing requests - Better resource utilization with concurrent limiting - Detailed metrics for monitoring and optimization - Configurable limits per model tier Tests: - 19 comprehensive unit tests for rate limiter - Test token bucket algorithm, refilling, wait times - Test concurrent request limiting - Test per-model configuration - All tests passing Resolves: openai#5 (HIGH priority) Impact: Eliminates rate limit errors and improves API reliability
3 tasks
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.
This pull request corrects minor typographical errors found in the documentation and inline comments to enhance readability and clarity.
There are no functional changes included in this update.