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]

feat(fireworks_ai): drop reasoning_effort=auto to the model default

Miles Adkins599283584f2d
diff --git a/litellm/llms/fireworks_ai/chat/transformation.py b/litellm/llms/fireworks_ai/chat/transformation.py
index 4740e84d513..a05b160413e 100644
--- a/litellm/llms/fireworks_ai/chat/transformation.py
+++ b/litellm/llms/fireworks_ai/chat/transformation.py
@@ -295,7 +295,7 @@ class FireworksAIConfig(FireworksAIMixin, OpenAIGPTConfig):
optional_params["reasoning_effort"] = "medium"
elif value is False:
optional_params["reasoning_effort"] = "none"
- else:
+ elif value != "auto":
optional_params["reasoning_effort"] = value
elif param in supported_openai_params:
if value is not None:
@@ -303,7 +303,9 @@ class FireworksAIConfig(FireworksAIMixin, OpenAIGPTConfig):
return optional_params
- def map_extra_body_params(self, optional_params: Mapping[str, object], model: str) -> dict: # noqa: LIT001 # http handler pops extra_body off the returned dict
+ def map_extra_body_params(
+ self, optional_params: Mapping[str, object], model: str
+ ) -> dict: # mutable-ok: http handler pops extra_body off the returned dict
extra_body: Final = optional_params.get("extra_body")
if not isinstance(extra_body, dict):
return dict(optional_params) # mutable-ok: JSON request body
diff --git a/tests/test_litellm/llms/fireworks_ai/chat/test_fireworks_ai_chat_transformation.py b/tests/test_litellm/llms/fireworks_ai/chat/test_fireworks_ai_chat_transformation.py
index 3fbbc70916a..bbb7fb197d0 100644
--- a/tests/test_litellm/llms/fireworks_ai/chat/test_fireworks_ai_chat_transformation.py
+++ b/tests/test_litellm/llms/fireworks_ai/chat/test_fireworks_ai_chat_transformation.py
@@ -1153,6 +1153,22 @@ def test_reasoning_effort_integer_passthrough():
assert isinstance(result["reasoning_effort"], int)
+def test_reasoning_effort_auto_dropped_to_model_default():
+ """
+ Fireworks rejects reasoning_effort="auto" (accepted set: low/medium/high/
+ xhigh/max/none/adaptive). Omitting the param is the model default, which is
+ exactly what "auto" means on OpenAI's side, so it must not reach the request.
+ """
+ config = FireworksAIConfig()
+ result = config.map_openai_params(
+ {"reasoning_effort": "auto"},
+ {},
+ _REASONING_MODEL,
+ drop_params=False,
+ )
+ assert "reasoning_effort" not in result
+
+
def test_transform_response_captures_perf_metrics():
body = {
**_BASE_CHAT_COMPLETION_RESPONSE,