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
test_openai_responses_api_web_search_cost_tracking
Ishaan Jafff74640cb99cb
diff --git a/litellm/litellm_core_utils/llm_cost_calc/tool_call_cost_tracking.py b/litellm/litellm_core_utils/llm_cost_calc/tool_call_cost_tracking.pyindex 629d6c9e311..8f7d14b20fd 100644--- a/litellm/litellm_core_utils/llm_cost_calc/tool_call_cost_tracking.py+++ b/litellm/litellm_core_utils/llm_cost_calc/tool_call_cost_tracking.py@@ -86,8 +86,9 @@ class StandardBuiltInToolCostTracking:return search_context_pricing.get("search_context_size_medium", 0.0)elif web_search_options.get("search_context_size", None) == "high":return search_context_pricing.get("search_context_size_high", 0.0)- else:- return 0.0+ return StandardBuiltInToolCostTracking.get_default_cost_for_web_search(+ model_info+ )@staticmethoddef get_default_cost_for_web_search(model_info: ModelInfo) -> float: