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 structured response of tool call
Sameer Kankute3d49388d8e2f
diff --git a/litellm/integrations/websearch_interception/transformation.py b/litellm/integrations/websearch_interception/transformation.pyindex 0884d408c84..3201d99d69a 100644--- a/litellm/integrations/websearch_interception/transformation.py+++ b/litellm/integrations/websearch_interception/transformation.py@@ -3,7 +3,7 @@ WebSearch Tool TransformationTransforms between Anthropic/OpenAI tool_use format and LiteLLM search format."""-+import jsonfrom typing import Any, Dict, List, Tuplefrom litellm._logging import verbose_logger@@ -301,7 +301,7 @@ class WebSearchTransformation:"type": "function","function": {"name": tc["name"],- "arguments": str(tc["input"]),+ "arguments": json.dumps(tc["input"]) if isinstance(tc["input"], dict) else str(tc["input"]),},}for tc in tool_callsdiff --git a/litellm/llms/openai/openai.py b/litellm/llms/openai/openai.pyindex c6f502d3a25..da87852dff5 100644--- a/litellm/llms/openai/openai.py+++ b/litellm/llms/openai/openai.py@@ -926,7 +926,6 @@ class OpenAIChatCompletion(BaseLLM, BaseOpenAILLM):logging_obj=logging_obj,)stringified_response = response.model_dump()- print(f"🔥stringified_response: {stringified_response}")logging_obj.post_call(input=data["messages"],api_key=api_key,