feat: hardcode client name for Tavily#3540
Merged
Merged
Conversation
Contributor
Coverage report (tavily)Click to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
sjrl
approved these changes
Jul 3, 2026
sjrl
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the contribution and looks good!
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.
Related Issues
Proposed Changes:
Adds Tavily request attribution for the Haystack integration by passing
client_name="haystack"when initializing bothTavilyClientandAsyncTavilyClient.This makes Tavily API requests from
TavilyWebSearchidentifiable as coming from the Haystack integration.How did you test it?
UV_CACHE_DIR=/private/tmp/uv-cache uv run --project . --with pytest --with pytest-asyncio python -m pytest -m "not integration" tests/test_tavily_websearch.pyResult:
15 passed, 2 deselectedUV_CACHE_DIR=/private/tmp/uv-cache uv run --project . --with ruff ruff check integrations/tavily/src/haystack_integrations/components/websearch/tavily/tavily_websearch.py integrations/tavily/tests/test_tavily_websearch.pyResult:
All checks passedCLIENT_NAME = haystack.Notes for the reviewer
The change intentionally uses the Tavily Python SDK’s
client_nameparameter instead of manually setting HTTP headers.Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.