Skip to content

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]

update docs

LingXuanYinc9e1088fdae7
diff --git a/litellm/llms/volcengine/chat/transformation.py b/litellm/llms/volcengine/chat/transformation.py
index 62073a1a2df..3a6daee025b 100644
--- a/litellm/llms/volcengine/chat/transformation.py
+++ b/litellm/llms/volcengine/chat/transformation.py
@@ -97,9 +97,9 @@ class VolcEngineChatConfig(OpenAILikeChatConfig):
and isinstance(thinking_value, dict)
and thinking_value.get("type", None) in ["enabled", "disabled", "auto"], # legal values, see docs
):
- # Add thinking parameter to extra_body for all other cases
+ # Add thinking parameter to extra_body for all legal cases
optional_params.setdefault("extra_body", {})["thinking"] = thinking_value
else:
- # Skip adding thinking parameter when it's not set
+ # Skip adding thinking parameter when it's not set or has invalid value
pass
return optional_params
diff --git a/tests/test_litellm/llms/volcengine/test_volcengine.py b/tests/test_litellm/llms/volcengine/test_volcengine.py
index 6a513d479ae..056979f209c 100644
--- a/tests/test_litellm/llms/volcengine/test_volcengine.py
+++ b/tests/test_litellm/llms/volcengine/test_volcengine.py
@@ -24,7 +24,7 @@ class TestVolcEngineConfig:
drop_params=False,
)
- # Fixed: thinking disabled should be omitted from extra_body
+ # Fixed: thinking disabled should appear in extra_body
assert mapped_params == {
"extra_body": {"thinking": {"type": "disabled"}}
}