Add DeepSeek V4 model support (direct API + OpenRouter)#452
Open
junaid-hasan wants to merge 1 commit into
Open
Add DeepSeek V4 model support (direct API + OpenRouter)#452junaid-hasan wants to merge 1 commit into
junaid-hasan wants to merge 1 commit into
Conversation
- Add deepseek-v4-pro and deepseek-v4-flash to both direct DeepSeek
provider catalog and OpenRouter model list
- Retain deepseek-chat and deepseek-reasoner (deprecated 2026/07/24)
- Fix reasoning/thinking for direct DeepSeek API:
- _supports_reasoning_extra_body() now recognizes deepseek.com URLs
- Use DeepSeek-native format: extra_body={'thinking': {'type': 'enabled/disabled'}}
- Add top-level reasoning_effort param (high/max) per DeepSeek API spec
- OpenRouter path unchanged — continues using existing reasoning format
Tested end-to-end via Gauss agent with deepseek-v4-pro, deepseek-v4-flash,
deepseek-chat (direct + OpenRouter), all passing.
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.
Tested end-to-end via Gauss agent with deepseek-v4-pro, deepseek-v4-flash, deepseek-chat (direct + OpenRouter), all passing.
What does this PR do?
Adds DeepSeek V4 model support and fixes thinking mode for the direct DeepSeek API endpoint. DeepSeek's new V4 models (deepseek-v4-pro, deepseek-v4-flash) use a different thinking mode format
than OpenRouter —
extra_body={"thinking": {"type": "enabled"}}+ top-levelreasoning_effortinstead ofextra_body={"reasoning": {...}}. The direct API endpoint was previously unreachable forthinking mode because
_supports_reasoning_extra_body()only returned true for OpenRouter URLs. The existingdeepseek-chat/deepseek-reasonermodels are being deprecated July 2026, so thecatalog needs the V4 replacements.
Related Issue
Fixes # (no existing issue — this is a new provider model update)
Type of Change
Changes Made
gauss_cli/models.py— Added deepseek-v4-pro and deepseek-v4-flash to direct DeepSeek provider catalog and OpenRouter model listrun_agent.py—_supports_reasoning_extra_body()now recognizes deepseek.com base URLsrun_agent.py—_build_api_kwargs()uses DeepSeek-native thinking format ({"thinking": {"type": "enabled/disabled"}} in extra_body, reasoning_effort as top-level param)How to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
gauss --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs