fix(deepseek): update default model names to DeepSeek V4#317
Merged
asdek merged 4 commits intoMay 27, 2026
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates PentAGI’s DeepSeek provider defaults from the legacy deepseek-chat / deepseek-reasoner model IDs to the newer DeepSeek V4 model IDs, to avoid future breakage when the legacy aliases are removed.
Changes:
- Switch embedded DeepSeek defaults and example provider config to
deepseek-v4-flash/deepseek-v4-proby role intent. - Update DeepSeek model catalog metadata (
models.yml) and theDeepSeekAgentModelfallback constant. - Refresh user-facing docs and installer wizard text that referenced the legacy model names, including adding a README deprecation notice.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates DeepSeek docs/examples to V4 names and adds a legacy deprecation notice. |
| examples/configs/deepseek.provider.yml | Updates example per-role default model IDs to V4 Flash/Pro. |
| backend/pkg/providers/deepseek/models.yml | Renames declared DeepSeek models to V4 Flash/Pro and updates descriptions/thinking flags. |
| backend/pkg/providers/deepseek/deepseek.go | Updates fallback default model constant to deepseek-v4-flash. |
| backend/pkg/providers/deepseek/config.yml | Updates embedded per-role DeepSeek defaults to V4 Flash/Pro. |
| backend/docs/llms_how_to.md | Updates DeepSeek example snippet to use deepseek-v4-pro. |
| backend/docs/config.md | Updates LiteLLM prefix example to use deepseek-v4-flash. |
| backend/cmd/installer/wizard/locale/locale.go | Updates DeepSeek LiteLLM prefix example text in installer wizard locale strings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- README: align supported-models intro with the local convention used
by every other provider section ("Models marked with `*` are used
in default configuration"), so the asterisk on each model ID has a
near-by explanation.
- Installer help (`LLMFormDeepSeekHelp`): swap the legacy
"DeepSeek-Chat" / "DeepSeek-Reasoner" bullets in "Default PentAGI
Models" for the current `deepseek-v4-flash` / `deepseek-v4-pro`
defaults so the wizard guidance matches the bundled config.
No code, schema, or LiteLLM prefix behavior changes.
…text - Update model descriptions to reflect V4 1M context window (up to 384K output) instead of legacy 128K wording in models.yml and README. - Split Flash and Pro pricing per official DeepSeek API docs: - deepseek-v4-flash: input 0.14 / output 0.28 / cache_hit 0.0028 per 1M tokens - deepseek-v4-pro: input 0.435 / output 0.87 / cache_hit 0.003625 per 1M tokens - Apply per-role price split across all 13 role configs in both the embedded config.yml and the user-facing examples/configs/deepseek.provider.yml. - Replace stale "cache pricing is 10% of input cost" claim in the README, which no longer holds for either V4 model. - No change to LiteLLM prefix behavior, role-to-model mapping, lifecycle, queues, GraphQL schema, migrations, frontend, or installer flow.
…h roles DeepSeek V4 thinking mode defaults to enabled on both deepseek-v4-flash and deepseek-v4-pro; non-thinking behavior requires an explicit toggle. Per official docs, in thinking mode temperature/top_p/presence_penalty/ frequency_penalty are ignored, so the existing Flash role sampling knobs would have been silently no-ops without the toggle. Add extra_body.thinking.type=disabled to the five non-thinking Flash roles so deepseek-v4-flash actually runs in non-thinking mode and honors the role's temperature/top_p settings: - simple, simple_json, adviser, searcher, enricher Pro roles (primary_agent, assistant, generator, refiner, reflector, coder, installer, pentester) intentionally keep thinking enabled (the V4 default) for reasoning, tool-use, and security analysis. PentAGI provider config already supports extra_body as a first-class yaml field on AgentConfig and forwards it through openai.WithExtraBody, which the vxcontrol langchaingo fork serializes at the top level of the Chat Completions request - the same pattern Kimi uses for tool_choice. No code, schema, or LiteLLM prefix changes required. Touches: - backend/pkg/providers/deepseek/config.yml (embedded production config) - examples/configs/deepseek.provider.yml (user-facing example) No change to role-to-model mapping, model metadata, pricing, README wording, LiteLLM prefix, unrelated providers, lifecycle, queues, or installer flow.
Contributor
|
thank you for the PR! |
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.
Summary
Closes #314.
Update the DeepSeek provider's default model names from the legacy
deepseek-chat/deepseek-reasonerpair to the currentdeepseek-v4-flash/deepseek-v4-propair, plus the documentationand installer help strings that referenced the legacy names. LiteLLM
prefix behavior is unchanged.
Problem
The embedded DeepSeek config at
backend/pkg/providers/deepseek/{config.yml,models.yml}, theDeepSeekAgentModelfallback constant indeepseek.go, and theexample file
examples/configs/deepseek.provider.ymlall default tothe legacy DeepSeek model names. DeepSeek has announced that these
legacy aliases are deprecated and scheduled for removal on
2026-07-24. After that date a first-run PentAGI install that
accepts the bundled defaults will fail because DeepSeek will reject
the legacy model names on the wire.
Solution
Swap every default model name in the DeepSeek provider config (and
the matching example file) to the V4 family, mapped by the role's
intent:
simple,simple_json,adviser,searcher,enricher) ->deepseek-v4-flashprimary_agent,assistant,generator,refiner,reflector,coder,installer,pentester) ->deepseek-v4-proUpdate
models.ymlto declare those two models with the V4 Flash /V4 Pro descriptions and
thinking: false/thinking: truerespectively. Update the
DeepSeekAgentModelfallback constant indeepseek.gotodeepseek-v4-flash.Update the three documentation references that mention the legacy
names in user-facing examples (README LiteLLM prefix example,
backend/docs/config.mdLiteLLM example,backend/docs/llms_how_to.mdGo snippet) and the one installer wizard help string in
backend/cmd/installer/wizard/locale/locale.go. Add a shortdeprecation notice in the README pointing at the 2026-07-24 cut-off
date, so users who hit older docs understand why the names changed.
The LiteLLM prefix mechanism itself (
DEEPSEEK_PROVIDERenv var,provider.ApplyModelPrefix/provider.StripModelPrefix,backend/pkg/providers/provider/litellm_test.go) is untouched.Note on the mapping in the issue body
Issue #314 lists the mapping as
deepseek-chat -> deepseek-v4-proand
deepseek-reasoner -> deepseek-v4-flash. The official DeepSeekdocs (
api-docs.deepseek.com/quick_start/pricingand.../updates)show both legacy aliases now point at a single
deepseek-v4-flashendpoint under different modes, so the issue's mapping is not a
direct 1:1 rename. This PR picks the mapping by role intent
inside PentAGI's config instead: thinking-heavy roles get
deepseek-v4-pro, non-thinking roles getdeepseek-v4-flash. Thatpreserves the existing per-role behavior (a reasoning role keeps
extended thinking enabled, a fast role keeps a fast model) while
moving everyone to a non-deprecated name.
User Impact
continue to work after the 2026-07-24 DeepSeek deprecation date.
pinning their config to the bundled defaults; in that case they
see the same behavior, just routed to a non-deprecated name.
deepseek/deepseek-chattodeepseek/deepseek-v4-flashonly ifthey use the bundled config; the prefix mechanism itself is
unchanged.
Test Plan
git diff --check(no whitespace errors)go test ./pkg/providers/deepseek/...(PASS, 0.189s)go test ./pkg/providers/provider/... -run 'TestApplyModelPrefix|TestStripModelPrefix|TestLoadModels'(PASS, 0.240s)go build ./pkg/providers/deepseek/... ./pkg/providers/provider/... ./cmd/installer/wizard/...(clean)rg 'deepseek-chat|deepseek-reasoner'across the editedpaths only matches the intentional deprecation notice in the
README; no other stale references remain
authored as
mason5052 <ehehwnwjs5052@gmail.com>