litellm/tests/search_tests
Simantak Dabhade fb34c184b4
feat(search): add TinyFish as search provider (#30634)
* feat(search): add TinyFish as search provider

Adds TinyFish web search (GET https://api.search.tinyfish.ai) as the
16th search provider in LiteLLM. Follows the BaseSearchConfig pattern
used by other GET-based providers like Brave.

Includes unit tests in tests/test_litellm/ for full patch coverage.

* fix(search/tinyfish): use concrete types to pass any-discipline and ruff UP006/UP045

Replace typing.Dict/List/Optional/Union with modern syntax (dict, list,
X | None) and use concrete type parameters (dict[str, str] for headers,
dict[str, object] for params) to eliminate LIT009 Any-discipline
violations. Move _append_domain_filters to module level to avoid leaking
Any through self.

* fix(search/tinyfish): eliminate Any-typed values for any-discipline gate

Use Pydantic BaseModel and TypeAdapter at httpx/base-class boundaries
to validate untyped inputs (json(), params.get(), bare set). Three
genuine external boundaries annotated with any-ok.

* style: fix black formatting for long line

* fix(search/tinyfish): move any-ok comment to violation line for any-discipline gate

The any-discipline checker matches `# any-ok` comments by line number.
The comment was on the closing-paren line (127) but the violation was
on the call-expression line (126), so the suppression did not apply.

* fix(search/tinyfish): align with approved PR #30158

Drop explicit AND from domain filter query to match the approved
implementation. Set pricing to zero. Rename test to match behavior.
2026-06-18 09:17:53 -07:00
..
__init__.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
base_search_unit_tests.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
conftest.py fix(tests): stabilize image-edit VCR cassettes to stop live gpt-image-1 spend (#28110) 2026-05-18 09:15:39 -07:00
test_brave_search.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_dataforseo_search.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_duckduckgo_search.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_exa_ai_search.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_firecrawl_search.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_google_pse_search.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_linkup_search.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_parallel_ai_search.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_perplexity_search.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_search_tool_name_filtering.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_searchapi_search.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_searxng_search.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_serper_search.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_tavily_search.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_tinyfish_search.py feat(search): add TinyFish as search provider (#30634) 2026-06-18 09:17:53 -07:00