Skip to content

Add fetch_timeout and cache_fallback search parameters - #197

Merged
yashb1708 merged 3 commits into
masterfrom
feat/fetch-timeout-cache-fallback
Sep 18, 2026
Merged

yashb1708 merged 3 commits into
masterfrom
feat/fetch-timeout-cache-fallback

Conversation

@MayRamati

@MayRamati MayRamati commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add fetch_timeout (float, seconds) and cache_fallback (bool) to search() and the internal _search(), in both TavilyClient and AsyncTavilyClient
  • Both are None/unset by default and only sent to the API when explicitly provided
  • Follow-ons to the max_hours parameter (tavily-search): fetch_timeout bounds the live-fetch timeout for raw-content/freshness-triggered fetches, cache_fallback controls whether a failed/timed-out freshness refetch falls back to the stale cached copy

MayRamati and others added 2 commits September 16, 2026 13:03
Follow-on to the tavily-search max_hours parameter (approved in the
same Slack thread). Named params on search()/_search(), sync and
async, threaded through to the request body exactly like every other
optional parameter -- omitted when unset.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…cache-fallback

# Conflicts:
#	tavily/async_tavily.py
#	tavily/tavily.py
#	tests/test_search.py
yashb1708
yashb1708 previously approved these changes Sep 17, 2026
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@yashb1708
yashb1708 merged commit 1aeb9db into master Sep 18, 2026
6 checks passed
@yashb1708
yashb1708 deleted the feat/fetch-timeout-cache-fallback branch September 18, 2026 15:20
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.

2 participants