feat(deepseek): enable native thinking mode via extra_body.thinking + provider profile#25000
Closed
tuobi2 wants to merge 1 commit into
Closed
feat(deepseek): enable native thinking mode via extra_body.thinking + provider profile#25000tuobi2 wants to merge 1 commit into
tuobi2 wants to merge 1 commit into
Conversation
… provider profile
DeepSeek's native Chat Completions API requires extra_body={'thinking':
{'type': 'enabled'}} to return reasoning_content. Before this, only the
response-side was handled (reasoning_content placeholder fixes in
bfb7046, NousResearch#15478), but the request-side was missing entirely.
Changes:
- plugins/model-providers/deepseek: DeepSeekProfile with
build_api_kwargs_extras — follows the same pattern as KimiProfile
- agent/transports/chat_completions: legacy-path fallback for when
the provider profile isn't loaded (parity with Kimi's path)
- run_agent.py: _is_deepseek detection + is_deepseek param forwarding
Tests:
- TestDeepSeekProfile (5 profile-level tests)
- TestDeepSeekParity (2 transport-level parity tests)
Closes the gap between Kimi (which already has full thinking support)
and DeepSeek (which only had response-side fixes).
Collaborator
Author
|
Closing in favor of #22218 per @alt-glitch's consolidation guidance. Our approach is the same shape. We have two incremental pieces that #22218 doesn't yet cover — offering them here for the author to incorporate if useful: 1. Transport-layer fallback (legacy-path parity with Kimi)When fails or the profile isn't loaded, the Kimi path already has a transport-level flag (chat_completions.py L341-349). DeepSeek should have the same safety net. Diff: 2. Transport parity tests— verifies that the correctly integrates (same pattern as existing ). Both are in the diff at https://github.com/NousResearch/hermes-agent/pull/25000/files if the author wants to cherry-pick. Thanks for the review @alt-glitch, and thanks @asdlem for the earlier PR — happy to help land this! |
Author
4 tasks
asdlem
added a commit
to asdlem/hermes-agent
that referenced
this pull request
May 13, 2026
- run_agent.py: detect api.deepseek.com and forward is_deepseek param (mirrors existing is_kimi pattern) - chat_completions.py: handle is_deepseek in extra_body.thinking (same protocol as Kimi — fallback when profile subsystem fails) - tests: TestDeepSeekParity (transport) + TestDeepSeekProfile (profile) (5 tests, all passing) Refs: NousResearch#22218, closes NousResearch#25000
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
DeepSeek's native Chat Completions API requires to return reasoning_content. Hermes already handled the response-side (reasoning_content placeholder fixes in bfb7046, #15478), but the request-side — sending extra_body.thinking to the API — was missing.
Kimi already had full thinking support via . DeepSeek was simply overlooked.
Changes
How it works
Verification