Skip to content

fix: set temperature=0.0 for DeepSeek models and send reasoning_effor… - #16715

Closed
dominusbelial wants to merge 7 commits into
NousResearch:mainfrom
dominusbelial:fix/deepseek-v4-pro-agent-params
Closed

fix: set temperature=0.0 for DeepSeek models and send reasoning_effor…#16715
dominusbelial wants to merge 7 commits into
NousResearch:mainfrom
dominusbelial:fix/deepseek-v4-pro-agent-params

Conversation

@dominusbelial

@dominusbelial dominusbelial commented Apr 27, 2026

Copy link
Copy Markdown

Checklist — Code:
- [x] I have read the [Contributing Guide]
- [x] My commit follows [Conventional Commits] (yours does: fix: ...)
- [x] I've checked for duplicate [existing PRs] — reference #16448 by zhanglpg which does the reasoning part, our PR adds the temperature fix they missed
- [x] All existing tests pass
- [x] My code is properly formatted
- [x] No unnecessary dependencies added

agent/auxiliary_client.py — _is_deepseek_model, temperature 0.0: OK
agent/transports/chat_completions.py — syntax: OK
116 existing tests pass

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint provider/deepseek DeepSeek API labels Apr 27, 2026
@dominusbelial
dominusbelial force-pushed the fix/deepseek-v4-pro-agent-params branch 3 times, most recently from 06bd3ec to c097eae Compare May 3, 2026 13:38
@dominusbelial
dominusbelial force-pushed the fix/deepseek-v4-pro-agent-params branch 2 times, most recently from def1437 to f598b17 Compare May 15, 2026 04:00
@dominusbelial
dominusbelial force-pushed the fix/deepseek-v4-pro-agent-params branch from f598b17 to a9cf742 Compare May 18, 2026 16:07
…p-level param

DeepSeek V4 defaults to temperature=1.0 (too hot for agent/tool-use).
Returns 0.0 for deepseek-v4* models only (not older deepseek-chat/coder).

Direct DeepSeek API calls were silently dropping reasoning_effort config
because _supports_reasoning_extra_body() returns False. Adds DeepSeek
handling in build_kwargs() to send reasoning_effort as a top-level
parameter and thinking in extra_body when disabled.

DeepSeek V4 only accepts 'high' and 'max' — Hermes values mapped:
low/medium -> high, xhigh -> max.
@dominusbelial
dominusbelial force-pushed the fix/deepseek-v4-pro-agent-params branch from a9cf742 to 29a2255 Compare May 24, 2026 15:14
@dominusbelial
dominusbelial deleted the fix/deepseek-v4-pro-agent-params branch June 20, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists provider/deepseek DeepSeek API type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants