litellm/tests/unit/llms/perplexity/chat
Mateo Wang 113b316783
fix(perplexity): let Perplexity's own agent models take chat tools (#55310)
* fix(perplexity): let Perplexity's own agent models take chat tools

Agent API models whose ids repeat the provider prefix, such as perplexity/perplexity/glm-5.3, lost tools,
tool_choice, parallel_tool_calls, reasoning_effort and web_search_options on /v1/chat/completions because the
capability lookups stripped the prefix a second time and missed the row routing had matched. The supported-params
check now hands those lookups the id routing resolved, so an explicit supports_function_calling false still wins
and Sonar stays tools-off

* refactor(perplexity): read the routed row without catching every exception

Ask the catalog lookup routing uses which row matched instead of wrapping get_model_info in a broad except, and cover an unmapped doubled-prefix id.
2026-12-02 17:17:34 -08:00
..
__init__.py test: add __init__.py to phase 12 unit test directories 2026-09-20 12:36:15 +00:00
test_perplexity_chat_transformation.py fix(perplexity): let Perplexity's own agent models take chat tools (#55310) 2026-12-02 17:17:34 -08:00
test_transformation.py fix(openai): send chat completions through client.post so the SDK's per-message param transform stops holding the event loop (#46967) 2026-10-16 18:06:01 -07:00