fix(deepseek): update default model names to DeepSeek V4

The DeepSeek provider config still defaulted to the legacy
`deepseek-chat` and `deepseek-reasoner` model names, which the
upstream DeepSeek API has announced for deprecation on 2026-07-24.
A first-run install therefore breaks once the legacy names are
removed.

Swap the defaults to the current DeepSeek V4 family:

- non-thinking roles use `deepseek-v4-flash`
- reasoning-heavy roles use `deepseek-v4-pro`

The change is limited to the embedded `config.yml` / `models.yml`
inside `backend/pkg/providers/deepseek`, the matching example at
`examples/configs/deepseek.provider.yml`, the `DeepSeekAgentModel`
fallback constant in `deepseek.go`, and three doc references
(README.md, backend/docs/config.md, backend/docs/llms_how_to.md)
plus one installer help string in
`backend/cmd/installer/wizard/locale/locale.go`. LiteLLM prefix
behavior is untouched.
This commit is contained in:
mason5052
2026-05-21 15:44:30 -04:00
parent 2ec8ef3d9b
commit 3113ff3aa3
8 changed files with 48 additions and 43 deletions
+14 -9
View File
@@ -1845,23 +1845,28 @@ DEEPSEEK_SERVER_URL=https://api.deepseek.com
# With LiteLLM proxy
DEEPSEEK_API_KEY=your_litellm_key
DEEPSEEK_SERVER_URL=http://litellm-proxy:4000
DEEPSEEK_PROVIDER=deepseek # Adds prefix to model names (deepseek/deepseek-chat) for LiteLLM
DEEPSEEK_PROVIDER=deepseek # Adds prefix to model names (deepseek/deepseek-v4-flash) for LiteLLM
```
#### Supported Models
PentAGI supports 2 DeepSeek-V3.2 models with tool calling, streaming, thinking modes, and context caching. Both models are used in default configuration.
PentAGI supports 2 DeepSeek V4 models with tool calling, streaming, thinking modes, and context caching. Both models are used in default configuration.
| Model ID | Thinking | Context | Max Output | Price (Input/Output/Cache) | Use Case |
| --------------------- | -------- | ------- | ---------- | -------------------------- | ----------------------------------------------- |
| `deepseek-chat`* | ❌ | 128K | 8K | $0.28/$0.42/$0.03 | General dialogue, code generation, tool calling |
| `deepseek-reasoner`* | ✅ | 128K | 64K | $0.28/$0.42/$0.03 | Advanced reasoning, complex logic, security analysis |
| Model ID | Thinking | Context | Price (Input/Output/Cache) | Use Case |
| --------------------- | -------- | ------- | -------------------------- | ---------------------------------------------------- |
| `deepseek-v4-flash`* | ❌ | 128K | $0.28/$0.42/$0.03 | General dialogue, code generation, tool calling |
| `deepseek-v4-pro`* | ✅ | 128K | $0.28/$0.42/$0.03 | Advanced reasoning, complex logic, security analysis |
**Prices**: Per 1M tokens. Cache pricing is for prompt caching (10% of input cost). Models with thinking support include reinforcement learning chain-of-thought reasoning.
> The legacy model names `deepseek-chat` and `deepseek-reasoner` are scheduled
> for deprecation by DeepSeek on 2026-07-24. Existing user configurations
> referencing the legacy names continue to work until then; the defaults above
> use the current V4 names.
**Key Features**:
- **Automatic Prompt Caching**: 40-60% cost reduction on repeated context (10% of input price)
- **Extended Thinking**: Reinforcement learning CoT for complex security analysis (deepseek-reasoner)
- **Extended Thinking**: Reinforcement learning CoT for complex security analysis (deepseek-v4-pro)
- **Strong Coding**: Optimized for code generation and exploit development
- **Tool Calling**: Seamless integration with 20+ pentesting tools via function calling
- **Streaming**: Real-time response streaming for interactive workflows
@@ -2715,7 +2720,7 @@ With `LLM_SERVER_PROVIDER=moonshot`, the system automatically prefixes all model
When using LiteLLM proxy, set the corresponding `*_PROVIDER` variable to enable model prefixing:
- `deepseek` - for DeepSeek models (`DEEPSEEK_PROVIDER=deepseek` → `deepseek/deepseek-chat`)
- `deepseek` - for DeepSeek models (`DEEPSEEK_PROVIDER=deepseek` → `deepseek/deepseek-v4-flash`)
- `zai` - for GLM models (`GLM_PROVIDER=zai` → `zai/glm-4`)
- `moonshot` - for Kimi models (`KIMI_PROVIDER=moonshot` → `moonshot/kimi-k2.5`)
- `dashscope` - for Qwen models (`QWEN_PROVIDER=dashscope` → `dashscope/qwen-plus`)
@@ -2730,7 +2735,7 @@ When using LiteLLM proxy, set the corresponding `*_PROVIDER` variable to enable
# Use DeepSeek models via LiteLLM proxy with model prefixing
DEEPSEEK_API_KEY=your_litellm_proxy_key
DEEPSEEK_SERVER_URL=http://litellm-proxy:4000
DEEPSEEK_PROVIDER=deepseek # Models become deepseek/deepseek-chat, deepseek/deepseek-reasoner for LiteLLM
DEEPSEEK_PROVIDER=deepseek # Models become deepseek/deepseek-v4-flash, deepseek/deepseek-v4-pro for LiteLLM
# Direct DeepSeek API usage (no prefix needed)
DEEPSEEK_API_KEY=your_deepseek_api_key
@@ -504,7 +504,7 @@ Key Advantages:
LiteLLM Integration:
Set Provider Name to 'deepseek' when using LiteLLM proxy
Enables model prefix (e.g., deepseek/deepseek-chat) without modifying config.yml
Enables model prefix (e.g., deepseek/deepseek-v4-flash) without modifying config.yml
Optional for direct DeepSeek API usage
Best for: Teams requiring multilingual support, cost-conscious deployments, Chinese language security testing
+1 -1
View File
@@ -537,7 +537,7 @@ These settings control the integration with various Large Language Model (LLM) p
| DeepSeekServerURL | `DEEPSEEK_SERVER_URL` | `https://api.deepseek.com` | DeepSeek API endpoint URL |
| DeepSeekProvider | `DEEPSEEK_PROVIDER` | *(none)* | Provider name prefix for LiteLLM integration (optional) |
**LiteLLM Integration**: Set `DEEPSEEK_PROVIDER=deepseek` to enable model prefixing (e.g., `deepseek/deepseek-chat`) when using LiteLLM proxy with default PentAGI configs.
**LiteLLM Integration**: Set `DEEPSEEK_PROVIDER=deepseek` to enable model prefixing (e.g., `deepseek/deepseek-v4-flash`) when using LiteLLM proxy with default PentAGI configs.
### GLM LLM Provider
+1 -1
View File
@@ -1196,7 +1196,7 @@ llm, _ := openai.New(
)
resp, _ := llm.GenerateContent(ctx, messages,
llms.WithModel("deepseek-reasoner"),
llms.WithModel("deepseek-v4-pro"),
)
// Reasoning extracted from <think>...</think> tags automatically
+13 -13
View File
@@ -1,5 +1,5 @@
simple:
model: deepseek-chat
model: deepseek-v4-flash
temperature: 0.5
top_p: 0.5
n: 1
@@ -10,7 +10,7 @@ simple:
cache_read: 0.028
simple_json:
model: deepseek-chat
model: deepseek-v4-flash
temperature: 0.5
top_p: 0.5
n: 1
@@ -22,7 +22,7 @@ simple_json:
cache_read: 0.028
primary_agent:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 16384
price:
@@ -31,7 +31,7 @@ primary_agent:
cache_read: 0.028
assistant:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 16384
price:
@@ -40,7 +40,7 @@ assistant:
cache_read: 0.028
generator:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 32768
price:
@@ -49,7 +49,7 @@ generator:
cache_read: 0.028
refiner:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 20480
price:
@@ -58,7 +58,7 @@ refiner:
cache_read: 0.028
adviser:
model: deepseek-chat
model: deepseek-v4-flash
temperature: 0.7
top_p: 0.8
n: 1
@@ -69,7 +69,7 @@ adviser:
cache_read: 0.028
reflector:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 4096
price:
@@ -78,7 +78,7 @@ reflector:
cache_read: 0.028
searcher:
model: deepseek-chat
model: deepseek-v4-flash
temperature: 0.7
top_p: 0.8
n: 1
@@ -89,7 +89,7 @@ searcher:
cache_read: 0.028
enricher:
model: deepseek-chat
model: deepseek-v4-flash
temperature: 0.7
top_p: 0.8
n: 1
@@ -100,7 +100,7 @@ enricher:
cache_read: 0.028
coder:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 20480
price:
@@ -109,7 +109,7 @@ coder:
cache_read: 0.028
installer:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 16384
price:
@@ -118,7 +118,7 @@ installer:
cache_read: 0.028
pentester:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 16384
price:
+1 -1
View File
@@ -19,7 +19,7 @@ import (
//go:embed config.yml models.yml
var configFS embed.FS
const DeepSeekAgentModel = "deepseek-chat"
const DeepSeekAgentModel = "deepseek-v4-flash"
const DeepSeekToolCallIDTemplate = "call_{r:2:d}_{r:24:b}"
+4 -4
View File
@@ -1,13 +1,13 @@
- name: deepseek-chat
description: DeepSeek-V3.2 (Non-thinking Mode) - Suitable for general dialogue, code generation, and tool calling tasks. Supports JSON Output, Tool Calls, Chat Prefix Completion, and FIM Completion. 128K context, max output 8K
- name: deepseek-v4-flash
description: DeepSeek V4 Flash - Cost-efficient general-purpose model suitable for dialogue, code generation, and tool calling. Supports JSON output and tool calls. 128K context.
thinking: false
price:
input: 0.28
output: 0.42
cache_read: 0.028
- name: deepseek-reasoner
description: DeepSeek-V3.2 (Thinking Mode) - Advanced reasoning model with reinforcement learning chain-of-thought capabilities, suitable for complex logic, mathematical reasoning, and security analysis tasks. 128K context, max output 64K
- name: deepseek-v4-pro
description: DeepSeek V4 Pro - Higher-tier reasoning model suitable for complex logic, mathematical reasoning, and security analysis. 128K context.
thinking: true
price:
input: 0.28
+13 -13
View File
@@ -1,5 +1,5 @@
simple:
model: deepseek-chat
model: deepseek-v4-flash
temperature: 0.5
top_p: 0.5
n: 1
@@ -10,7 +10,7 @@ simple:
cache_read: 0.028
simple_json:
model: deepseek-chat
model: deepseek-v4-flash
temperature: 0.5
top_p: 0.5
n: 1
@@ -22,7 +22,7 @@ simple_json:
cache_read: 0.028
primary_agent:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 8000
price:
@@ -31,7 +31,7 @@ primary_agent:
cache_read: 0.028
assistant:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 8000
price:
@@ -40,7 +40,7 @@ assistant:
cache_read: 0.028
generator:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 8000
price:
@@ -49,7 +49,7 @@ generator:
cache_read: 0.028
refiner:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 8000
price:
@@ -58,7 +58,7 @@ refiner:
cache_read: 0.028
adviser:
model: deepseek-chat
model: deepseek-v4-flash
temperature: 0.7
top_p: 0.8
n: 1
@@ -69,7 +69,7 @@ adviser:
cache_read: 0.028
reflector:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 4000
price:
@@ -78,7 +78,7 @@ reflector:
cache_read: 0.028
searcher:
model: deepseek-chat
model: deepseek-v4-flash
temperature: 0.7
top_p: 0.8
n: 1
@@ -89,7 +89,7 @@ searcher:
cache_read: 0.028
enricher:
model: deepseek-chat
model: deepseek-v4-flash
temperature: 0.7
top_p: 0.8
n: 1
@@ -100,7 +100,7 @@ enricher:
cache_read: 0.028
coder:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 16384
price:
@@ -109,7 +109,7 @@ coder:
cache_read: 0.028
installer:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 8192
price:
@@ -118,7 +118,7 @@ installer:
cache_read: 0.028
pentester:
model: deepseek-reasoner
model: deepseek-v4-pro
n: 1
max_tokens: 8192
price: