Skip to content

feat: add opt-in retries honoring Retry-After - #183

Open
mikemikimike wants to merge 2 commits into
tavily-ai:masterfrom
mikemikimike:fix/177-opt-in-retries
Open

feat: add opt-in retries honoring Retry-After#183
mikemikimike wants to merge 2 commits into
tavily-ai:masterfrom
mikemikimike:fix/177-opt-in-retries

Conversation

@mikemikimike

Copy link
Copy Markdown

Summary

  • add shared, deterministic retry policy helpers for integer and HTTP-date Retry-After values
  • add opt-in max_retries=0 support to sync and async clients
  • retry safe endpoints for transient statuses and connection errors
  • restrict crawl and non-stream research retries to HTTP 429 to avoid duplicate jobs
  • leave streaming research behavior unchanged
  • bound retry sleeps by the request timeout budget

Closes #177

Tests

  • python -m pytest -q — 102 passed
  • python -m compileall -q tavily
  • git diff --check

No API keys, GPU, model downloads, or external services are required.

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.

Opt-in automatic retry honoring the Retry-After header on 429

1 participant