From 6bbd689ab41606c1bc6894bd409d4466cf591916 Mon Sep 17 00:00:00 2001 From: Apexsf <50563213+Apexsf@users.noreply.github.com> Date: Fri, 25 Sep 2026 06:21:06 +0800 Subject: [PATCH] [Bugfix] Align DeepSeek-V4.1 reasoning effort budgets (#39929) Co-authored-by: fengtinglei Co-authored-by: Liangsheng Yin Co-authored-by: Liangsheng Yin --- docs/cookbook/autoregressive/DeepSeek/DeepSeek-V4_1.mdx | 2 +- python/sglang/srt/entrypoints/openai/encoding_dsv41.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/cookbook/autoregressive/DeepSeek/DeepSeek-V4_1.mdx b/docs/cookbook/autoregressive/DeepSeek/DeepSeek-V4_1.mdx index 61da2cc29a..26b1a53dcc 100644 --- a/docs/cookbook/autoregressive/DeepSeek/DeepSeek-V4_1.mdx +++ b/docs/cookbook/autoregressive/DeepSeek/DeepSeek-V4_1.mdx @@ -134,7 +134,7 @@ print("Answer:", msg.content) -On the request, `reasoning_effort` accepts the tiers `low`, `high`, `xhigh` and `max`, or a float in `[0.0, 0.99]` that maps onto the model's 1–100 budget. An integer budget is reachable only through `chat_template_kwargs.reasoning_effort`, and that route does not switch thinking on by itself — pair it with `chat_template_kwargs.thinking`. `none` turns thinking off. The remaining OpenAI tiers, which have no V4.1 counterpart (`minimal`, `medium`), log a warning and fall back to the server-side default rather than erroring; that default is `high`, and `SGLANG_DSV41_REASONING_EFFORT` overrides it. +On the request, `reasoning_effort` accepts the tiers `low` (50), `high` (75), `xhigh` (75), and `max` (100), or a float in `[0.0, 0.99]` that maps onto the model's 1–100 budget. An integer budget is reachable only through `chat_template_kwargs.reasoning_effort`, and that route does not switch thinking on by itself — pair it with `chat_template_kwargs.thinking`. `none` turns thinking off. The remaining OpenAI tiers, which have no V4.1 counterpart (`minimal`, `medium`), log a warning and fall back to the server-side default rather than erroring; that default is `high` (75), and `SGLANG_DSV41_REASONING_EFFORT` overrides it. ### 3.2 Tool Calling diff --git a/python/sglang/srt/entrypoints/openai/encoding_dsv41.py b/python/sglang/srt/entrypoints/openai/encoding_dsv41.py index 86b1dd68dc..c04d8059d8 100644 --- a/python/sglang/srt/entrypoints/openai/encoding_dsv41.py +++ b/python/sglang/srt/entrypoints/openai/encoding_dsv41.py @@ -66,8 +66,8 @@ REASONING_EFFORT_TEMPLATE = ( ) REASONING_EFFORT_MAPPINGS: Dict[str, int] = { - "low": 25, - "high": 50, + "low": 50, + "high": 75, "xhigh": 75, "max": 100, }