• Your Name's avatar
    Fix streaming rate limit error handling and retry logic · a2a816ac
    Your Name authored
    Analysis of debug.log showed 429 rate limit errors during streaming
    were not being caught by the retry logic because:
    1. Streaming generators don't raise exceptions until consumed
    2. Error message 'Claude API error (429): Error' didn't contain retry keywords
    
    Changes:
    1. Added _handle_streaming_request_with_retry() wrapper that catches
       rate limit errors and re-raises with proper keywords
    2. Added _wrap_streaming_with_retry() method that consumes streaming
       generator and retries with fallback models on rate limit errors
    3. Updated retry logic to check for '429' keyword in error messages
    4. Added exponential backoff with jitter before retry attempts
    5. Improved error messages to include rate limit context
    
    This ensures that when streaming hits a 429 rate limit, the system
    will automatically retry with fallback models instead of failing.
    a2a816ac
Name
Last commit
Last update
aisbf Loading commit data...
config Loading commit data...
docs Loading commit data...
static Loading commit data...
templates Loading commit data...
.gitignore Loading commit data...
.providers.json.swp Loading commit data...
=0.5.0 Loading commit data...
AI.PROMPT Loading commit data...
API_EXAMPLES.md Loading commit data...
CHANGELOG.md Loading commit data...
CLAUDE_OAUTH2_DEEP_DIVE.md Loading commit data...
CLAUDE_OAUTH2_SETUP.md Loading commit data...
DEBUG_GUIDE.md Loading commit data...
DOCUMENTATION.md Loading commit data...
LICENSE.txt Loading commit data...
MANIFEST.in Loading commit data...
PYPI.md Loading commit data...
README.md Loading commit data...
TODO.md Loading commit data...
aisbf.sh Loading commit data...
build.sh Loading commit data...
clean.sh Loading commit data...
cli.py Loading commit data...
main.py Loading commit data...
pyproject.toml Loading commit data...
requirements.txt Loading commit data...
screenshot.png Loading commit data...
setup.py Loading commit data...
start_proxy.sh Loading commit data...
test_google.sh Loading commit data...
test_kiro_models_origin.py Loading commit data...
test_proxy.sh Loading commit data...
test_response_cache.py Loading commit data...