Skip to content

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

Merged
asdek merged 4 commits into
vxcontrol:feature/next-releasefrom
mason5052:codex/issue-314-deepseek-v4-models
May 27, 2026
Merged

fix(deepseek): update default model names to DeepSeek V4#317
asdek merged 4 commits into
vxcontrol:feature/next-releasefrom
mason5052:codex/issue-314-deepseek-v4-models

Conversation

@mason5052
Copy link
Copy Markdown
Contributor

Summary

Closes #314.

Update the DeepSeek provider's default model names from the legacy
deepseek-chat / deepseek-reasoner pair to the current
deepseek-v4-flash / deepseek-v4-pro pair, plus the documentation
and 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}, the
DeepSeekAgentModel fallback constant in deepseek.go, and the
example file examples/configs/deepseek.provider.yml all default to
the 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:

  • non-thinking roles (simple, simple_json, adviser,
    searcher, enricher) -> deepseek-v4-flash
  • reasoning-heavy roles (primary_agent, assistant, generator,
    refiner, reflector, coder, installer, pentester) ->
    deepseek-v4-pro

Update models.yml to declare those two models with the V4 Flash /
V4 Pro descriptions and thinking: false / thinking: true
respectively. Update the DeepSeekAgentModel fallback constant in
deepseek.go to deepseek-v4-flash.

Update the three documentation references that mention the legacy
names in user-facing examples (README LiteLLM prefix example,
backend/docs/config.md LiteLLM example, backend/docs/llms_how_to.md
Go snippet) and the one installer wizard help string in
backend/cmd/installer/wizard/locale/locale.go. Add a short
deprecation 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_PROVIDER env 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-pro
and deepseek-reasoner -> deepseek-v4-flash. The official DeepSeek
docs (api-docs.deepseek.com/quick_start/pricing and .../updates)
show both legacy aliases now point at a single deepseek-v4-flash
endpoint 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 get deepseek-v4-flash. That
preserves 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

  • A fresh PentAGI install using the bundled DeepSeek config will
    continue to work after the 2026-07-24 DeepSeek deprecation date.
  • Users on existing installs are unaffected unless they were
    pinning their config to the bundled defaults; in that case they
    see the same behavior, just routed to a non-deprecated name.
  • LiteLLM users see the prefixed name change from
    deepseek/deepseek-chat to deepseek/deepseek-v4-flash only if
    they use the bundled config; the prefix mechanism itself is
    unchanged.
  • No GraphQL schema, no migrations, no lifecycle/queue changes.

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 edited
    paths only matches the intentional deprecation notice in the
    README; no other stale references remain
  • Verified no AI co-author trailer and no Signed-off-by; commit
    authored as mason5052 <ehehwnwjs5052@gmail.com>

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.
Copilot AI review requested due to automatic review settings May 21, 2026 19:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-pro by role intent.
  • Update DeepSeek model catalog metadata (models.yml) and the DeepSeekAgentModel fallback 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.

Comment thread README.md Outdated
Comment thread backend/cmd/installer/wizard/locale/locale.go
mason5052 added 3 commits May 22, 2026 11:41
- 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.
@asdek asdek changed the base branch from main to feature/next-release May 27, 2026 20:09
@asdek asdek merged commit e674113 into vxcontrol:feature/next-release May 27, 2026
@asdek
Copy link
Copy Markdown
Contributor

asdek commented May 27, 2026

thank you for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: DeepSeek deprecated old model names, creating flow fails with new deepseek-v4-pro

3 participants