Skip to content

fix: Align BookDB rate limiter with actual API tier limits (#252)#259

Merged
deucebucket merged 3 commits into
developfrom
fix/issue-252-rate-limit-alignment
Jun 12, 2026
Merged

fix: Align BookDB rate limiter with actual API tier limits (#252)#259
deucebucket merged 3 commits into
developfrom
fix/issue-252-rate-limit-alignment

Conversation

@deucebucket

Copy link
Copy Markdown
Owner

Summary

  • Increase BookDB min_delay from 3.6s (1000/hr) to 12.0s (300/hr) to match actual API key tier limits
  • Add adaptive rate limiting: reads Retry-After header from 429 responses and temporarily increases delay
  • Add specific 429 handling to identify_audio_with_bookdb() (was falling through to generic error handler)

Closes #252

Test plan

  • 290/290 pattern tests pass
  • ruff F821 clean
  • E2E: verify rate limiting doesn't cause queue stalls

deucebucket and others added 3 commits June 5, 2026 08:26
Promote develop to main after PR #217 and passing CI.
- Changed bookdb min_delay from 3.6s (1000/hr) to 12.0s (300/hr) to match
  the actual API key tier limit
- Added adaptive rate limiting: when BookDB returns a 429 with Retry-After
  header, min_delay is increased to match the server's requested pace
- Added specific 429 handling to identify_audio_with_bookdb() which
  previously fell through to the generic non-200 handler
@deucebucket deucebucket merged commit 9ed0d44 into develop Jun 12, 2026
2 of 3 checks passed
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