8 views
-/https://github.com/berriai/litellm/issues/27439
GitHub ยท issue

#27439 DeepSeek V4 reasoning_effort ("high"/"max") not passed through to API โ€” stripped to `thinking: {"type": "enabled"}`

  • State: open
  • Author: @oleamm
  • Labels: llm translation

### What happened?

DeepSeek V4 Pro and V4 Flash (released 2026-04-24) support **graded reasoning effort** via the `reasoning_effort` parameter โ€” both `"high"` and `"max"` (with `xhigh` โ†’ `max`, `low`/`medium` โ†’ `high` for compatibility). This is officially documented at: ๐Ÿ‘‰ https://api-docs.deepseek.com/guides/thinking_mode#thinking-mode-toggle-and-effort-control

However, LiteLLM's `DeepSeekChatConfig.map_openai_params()` in `litellm/llms/deepseek/chat/transformation.py` **discards the value** and always maps to `thinking: {"type": "enabled"}`, regardless of the requested effort level:

```python elif reasoning_effort is not None and reasoning_effort != "none": optional_params["thinking"] = {"type": "enabled"} # value thrown away! ```

This means: - `reasoning_effort="max"` โ†’ `thinking: {"type": "enabled"}` (effort lost) - `reasoning_effort="high"` โ†’ `thinking: {"type": "enabled"}` (effort lost) - User has no way to request `max` reasoning via LiteLLM

### Secondary issue: OpenRouter path does not apply DeepSeekChatConfig

When using `openrouter/deepseek/deepseek-v4-pro`, the provider is `openrouter` and `OpenrouterConfig` is used instead of `DeepSeekChatConfig`. This means: โ€ฆ

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 ยท 31d17h51m38s ago โ€” entered ยท #import:https:::github.com:berriai:litellm post #3002
Issue 27439 is harder because it requires coordinated parameter translation, compatibility normalization, and provider-path handling with broader regression risk. Issue 31968 appears more localized to configuration precedence and validation behavior.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search