The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(fireworks_ai): keep file_search on LiteLLM's emulated search for the Responses API
mateo-berri0157808187bc
diff --git a/litellm/llms/fireworks_ai/responses/transformation.py b/litellm/llms/fireworks_ai/responses/transformation.pyindex 9265d12e75e..121d3b5d9a9 100644--- a/litellm/llms/fireworks_ai/responses/transformation.py+++ b/litellm/llms/fireworks_ai/responses/transformation.py@@ -94,3 +94,6 @@ class FireworksAIResponsesAPIConfig(OpenAIResponsesAPIConfig):def supports_native_websocket(self) -> bool:return False++ def supports_native_file_search(self) -> bool:+ return Falsediff --git a/tests/test_litellm/llms/fireworks_ai/responses/test_fireworks_ai_responses_transformation.py b/tests/test_litellm/llms/fireworks_ai/responses/test_fireworks_ai_responses_transformation.pyindex e6e92824ee1..f948acb7bf3 100644--- a/tests/test_litellm/llms/fireworks_ai/responses/test_fireworks_ai_responses_transformation.py+++ b/tests/test_litellm/llms/fireworks_ai/responses/test_fireworks_ai_responses_transformation.py@@ -19,6 +19,7 @@ from typing_extensions import ReadOnlyimport litellmfrom litellm.llms.fireworks_ai.responses.transformation import FireworksAIResponsesAPIConfig+from litellm.responses.file_search.emulated_handler import should_use_emulated_file_searchfrom litellm.types.llms.openai import InputTokensDetails, ResponseAPIUsage, ResponsesAPIResponsefrom litellm.types.router import GenericLiteLLMParamsfrom litellm.types.utils import LlmProviders@@ -180,6 +181,14 @@ def test_responses_call_sends_developer_items_as_system_messages() -> None:)+def test_file_search_tools_take_litellm_emulated_search_not_fireworks() -> None:+ config: Final = FireworksAIResponsesAPIConfig()+ file_search: Final = ({"type": "file_search", "vector_store_ids": ("vs_kb",)},)+ function_tool: Final = ({"type": "function", "name": "get_weather", "parameters": {"type": "object"}},)+ assert should_use_emulated_file_search(tools=file_search, provider_config=config)+ assert not should_use_emulated_file_search(tools=function_tool, provider_config=config)++def test_responses_call_sends_session_affinity_for_caller_session_id() -> None:client: Final = _mock_http_client(_fireworks_response("accounts/fireworks/models/kimi-k3"))with patch(HTTPX_CLIENT_FACTORY, return_value=client):