Skip to content

fix(deepseek): map minimal reasoning effort to low - #6132

Merged
chengyongru merged 1 commit into
HKUDS:mainfrom
ZedingZhang:fix/deepseek-minimal-reasoning
Oct 10, 2026
Merged

chengyongru merged 1 commit into
HKUDS:mainfrom
ZedingZhang:fix/deepseek-minimal-reasoning

Conversation

@ZedingZhang

@ZedingZhang ZedingZhang commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

DeepSeek's Chat Completions requests currently send reasoning_effort="minimal" together with thinking.type="disabled", even though DeepSeek documents minimal as an alias for low-effort thinking.

Normalize both the semantic and wire effort to low in the DeepSeek request builder. This enables thinking consistently and lets the existing history handling backfill missing reasoning_content for tool calls. Explicit none still disables thinking, and an unspecified effort keeps the provider default.

The production change is three lines. Tests cover minimal, low, none, and the default, plus existing reasoning history and missing tool-call reasoning. The provider registry and other providers' effort mappings are unchanged.

Fixes #6122.

Validation on Windows / Python 3.13:

  • Before the production fix, the updated regression selection failed in three cases: the conflicting effort and missing history reasoning for plain/prefixed deepseek-flash.
  • python -m pytest tests/providers/test_openai_compat_spec.py tests/providers/test_mistral_provider.py tests/providers/test_xiaomi_mimo_thinking.py -q: 194 passed.
  • python -m pytest tests/providers/test_model_api_presets.py -q -k deepseek: 20 passed.
  • ruff check nanobot tests conftest.py: passed.
  • Scoped BasedPyright check of nanobot/providers/openai_compat_provider.py: 0 errors, 0 warnings.
  • Python compile checks and git diff --check: passed.

Verification used offline fixtures and isolated local dependencies. No live provider calls were made; the full Python suite and CI dependency/platform matrix were not run locally.

@chengyongru chengyongru added bug Something isn't working fix priority: p2 Normal backlog: minor bug, enhancement, docs, cleanup, edge case, or unvalidated proposal. provider labels Oct 10, 2026
@chengyongru

Copy link
Copy Markdown
Collaborator

@ZedingZhang could you rebase this PR on the latest main so it can be merged

@ZedingZhang
ZedingZhang force-pushed the fix/deepseek-minimal-reasoning branch from 0c85f92 to 2beaace Compare October 10, 2026 03:58
@ZedingZhang
ZedingZhang force-pushed the fix/deepseek-minimal-reasoning branch from 2beaace to 7514e7a Compare October 10, 2026 03:59
@chengyongru
chengyongru merged commit ff339e5 into HKUDS:main Oct 10, 2026
8 checks passed
@ZedingZhang
ZedingZhang deleted the fix/deepseek-minimal-reasoning branch October 10, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fix priority: p2 Normal backlog: minor bug, enhancement, docs, cleanup, edge case, or unvalidated proposal. provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DeepSeek: reasoning_effort="minimal" sends contradictory thinking controls

2 participants