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: only use think level for gpt-oss model
kowyo6896c60b5b11
diff --git a/litellm/llms/ollama/chat/transformation.py b/litellm/llms/ollama/chat/transformation.pyindex c2c5a366ecb..e78e9920bb0 100644--- a/litellm/llms/ollama/chat/transformation.py+++ b/litellm/llms/ollama/chat/transformation.py@@ -186,7 +186,10 @@ class OllamaChatConfig(BaseConfig):optional_params["format"] = value["json_schema"]["schema"]### FUNCTION CALLING LOGIC ###if param == "reasoning_effort" and value is not None:- optional_params["think"] = value+ if model.startswith("gpt-oss"):+ optional_params["think"] = value+ else:+ optional_params["think"] = Trueif param == "tools":## CHECK IF MODEL SUPPORTS TOOL CALLING ##try:diff --git a/litellm/llms/ollama/completion/transformation.py b/litellm/llms/ollama/completion/transformation.pyindex dd0280a00bf..b476e5c8a63 100644--- a/litellm/llms/ollama/completion/transformation.py+++ b/litellm/llms/ollama/completion/transformation.py@@ -180,7 +180,10 @@ class OllamaConfig(BaseConfig):elif param == "stop":optional_params["stop"] = valueelif param == "reasoning_effort" and value is not None:- optional_params["think"] = value+ if model.startswith("gpt-oss"):+ optional_params["think"] = value+ else:+ optional_params["think"] = Trueelif param == "response_format" and isinstance(value, dict):if value["type"] == "json_object":optional_params["format"] = "json"