mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7402] [MERGED] feat(connections): add a native DeepSeek provider #7718
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7718
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7402
Author: @ylli-selmani
Created: 10/10/2026
Status: ✅ Merged
Merged: 10/11/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/native-deepseek-provider📝 Commits (10+)
fc7a919feat(connections): add a native DeepSeek provider011e017fix(deepseek): send the sampler that is live in each mode63dbb73Merge remote-tracking branch 'origin/staging' into feat/native-deepseek-providera773d6di18n(connections): localize the DeepSeek API-key link7b1d6a0fix(deepseek): map medium effort to high5ca8f4bdocs(providers): add DeepSeek section to providers referencef35c0detest(deepseek): pin its parameter rules; plain-language docs8826f5cdocs(changelog): tighten the DeepSeek entrydb7b7eafix(deepseek): pick the sampler from the shipped reasoning mode6ed2a03Merge remote-tracking branch 'origin/staging' into feat/native-deepseek-provider📊 Changes
16 files changed (+241 additions, -10 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/connections/providers-reference.md(+13 -0)📝
packages/client/src/components/connections/ConnectionEditor.tsx(+6 -1)📝
packages/client/src/components/panels/ConnectionsPanel.tsx(+1 -0)📝
packages/client/src/localization/locales/en.json(+1 -0)📝
packages/server/src/db/schema/connections.ts(+1 -0)📝
packages/server/src/routes/connections.routes.ts(+3 -1)📝
packages/server/src/services/generation/generation-parameters.ts(+6 -0)📝
packages/server/src/services/llm/provider-registry.ts(+1 -0)📝
packages/server/src/services/llm/providers/openai.provider.ts(+30 -1)📝
packages/shared/src/constants/generation-parameter-relevance.ts(+22 -2)📝
packages/shared/src/constants/model-lists.ts(+12 -4)📝
packages/shared/src/constants/providers.ts(+11 -0)📝
packages/shared/src/schemas/connection.schema.ts(+1 -0)📝
packages/shared/src/types/connection.ts(+1 -0)📝
scripts/regressions/generation-parameter-relevance.regression.ts(+131 -1)📄 Description
Linked issue
Closes #7401
Why this change
DeepSeek has no built-in provider, so the natural-looking setup (Provider OpenAI pointed at
https://api.deepseek.com/v1) tripsshouldSuppressUnknownModelParameters, which hides Reasoning Effortand Verbosity and sends little more than
max_tokens. The shipped model catalog was also stale: it listedmodels DeepSeek retired on 2026-07-24 and missed
deepseek-flash, the current name.A user who hit this read it as a regression and considered downgrading. The known workaround — a Custom
(OAI-Compatible) connection — is correct advice but leaves the mis-pairing trap in place for the next
person who reasonably picks "OpenAI" for an OpenAI-compatible endpoint.
What changed
Adding
deepseekfollowing the Arli AI provider shape (#4787):APIProviderunion, the connection schema and the Drizzle enum, plusa
PROVIDERS.deepseekentry, so DeepSeek appears in the provider picker with its base URL filled in.DEEPSEEK_MODELS: addsdeepseek-flash, dropsdeepseek-chat,deepseek-coderanddeepseek-reasoner(retired 2026-07-24), keepsdeepseek-v4-flashas the documented legacy alias.OpenAIProviderkind, shaping the documented request:reasoning_effortcarries the levelitself (
noneturns thinking off),maximummaps tomaxrather than collapsing tohigh, and bothdeprecated penalties are dropped.
top_p as fixed at 1.0 whenever thinking is off. Only the live sampler is sent in each mode, and the panel
mirrors it, so a JSON agent with reasoning off keeps its low temperature and a thinking chat keeps top_p.
Tier hidden.
deepseekadded toisOpenAICompatibleProviderandsupportsAssistantReasoningPrefill, and an API-keylink in the connection editor.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Everything below was run by the drafting agent and still needs a human pass; the boxes above are left
unticked for that reason.
pnpm check(tsc + eslint + localization + format + build) exits 0 atf35c0defd, after mergingorigin/staging(b19bfbd9f). One pre-existingreact-hooks/exhaustive-depswarning inGameSurfaceis unrelated to this branch.pnpm localization:checkpasses:newEnglishKeys: 0.node scripts/run-regressions.mjs --filter generation-parameter-relevancepasses with the newdeepseekrows, and was confirmed to fail before the panel rules were aligned, so the proof is notvacuous.
Request bodies were measured against a local stub for
deepseek-flash,deepseek-v4-proanddeepseek-v4-flash, at effort maximum/high/low/off, plus an unknown model id. Panel and request agreein every case; an unknown id keeps only Max Output Tokens, which is now pinned as a deliberate assertion.
Local CodeRabbit review, run on the committed-but-unpushed branch (against
origin/staging), in tworounds. Round 1 returned four findings:
mediumeffort was offered as a separate button but served ashigh, so two buttons behavedidentically; it now maps to
highand Medium is not offered.zaisibling. My first assessment dismissed this as a false positive; on re-verification the sibling
precedent supported it, so it is implemented.
maximum→max,medium→high,no xhigh, sampler swap) and shortened the changelog/docs wording.
question, recorded under Open question below.
deepseek-coderfrom the retirement comment inmodel-lists.ts. That commentrecords the three names retired on 2026-07-24; deleting one would misstate which models stopped working.
Dismissed: sending
thinking: {type: "disabled"}instead ofreasoning_effort: "none"for the Offlevel. DeepSeek's own reference says
nonealready disables thinking mode, so the toggle wouldduplicate one decision in two fields.
noneis also what every other provider path in this file sends.Round 3, the hosted review on the pushed branch, returned three findings. Two were fixed, both reproduced
locally before anything changed:
options.reasoningEffort, but custom parameters are applied first, so acustomParameters.reasoning_effort: "none"override shipped a non-thinking request carrying
top_pand notemperature— the wrong sampler for that mode, andthe reverse of DeepSeek's rules. It now reads the effort from the body it is about to send. Pinned in the
regression, and the assertion was confirmed to fail against the previous selection.
reasoning_contentandpartial: true; DeepSeek only accepts that through chat prefix completion, which needs the/betabase URL andprefix: true. We ship/v1with neither, sodeepseekis out ofsupportsAssistantReasoningPrefilland the panel no longer offers the control. Re-enabling it is a real option, butit means the beta endpoint and the flag, not just the allowlist.
Round 4, on the merge plus the two fixes above, returned three findings. None is a defect introduced by this branch:
reasons given there.
json_schemaonresponse_format— DeepSeek documents only{"type": "json_object"}and nojson_schema, so astructured-output request is not schema-enforced on this provider. No provider in this codebase downgrades
json_schematojson_object, the game route already documents that providers may dropresponse_format(itscomment names Anthropic and the local sidecar as the same case, with the prompt plus tolerant parser as the
contract), and
professorMariWorkspaceResponseFormatsends nothing at all for most providers. Adding aDeepSeek-only downgrade would silently weaken structured output instead of surfacing it, so it is left alone.
deepseek's connection icon colour — it maps to the same sharedCONNECTION_ICON_COLORSpalette as all twentyother providers in that map, so the icon follows the app theme exactly like its siblings. Changing it would single
DeepSeek out from every other connection. Not a defect.
Open question: forced tool calls
Not implemented, and flagged rather than fixed. DeepSeek V4 models enable thinking by default, and third-party reports
say a forced tool call (
tool_choice: "required", or a named function) is rejected with HTTP 400 while thinking is on —see deepseek-ai/DeepSeek-V3#1376 and the
LiteLLM workaround. The local review raised this as a blocking finding.
I did not act on it, for three reasons:
Tool Calls pages document no such restriction — the reports are
third-party, not vendor documentation.
reasoning_efforttononewhenever a tool call is forced — would make thepanel lie in the other direction: you set High, the request sends
none. That is the same class of dishonesty thisPR exists to remove, and it would need its own panel rule and regression assertion.
Worth a follow-up once someone can reproduce it against the live API. If the 400 is real, the honest fix is to force
thinking off and surface it in the panel, not to change the request quietly.
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Done: the
[Unreleased]changelog entry, and a DeepSeek section indocs/connections/providers-reference.md(between Z.AI and Claude (Subscription)), which also calls out themis-pairing trap this PR removes. The translated packs are not updated here; the follow-up is
[docs-i18n] issue #7403.
UI evidence (if applicable)
Provider picker and the connection editor for a
deepseekconnection: the tile is in the picker, the baseURL prefills, and the model dropdown offers
deepseek-flash/deepseek-v4-pro. Screenshots to be attachedbefore this leaves draft.
🤖 Drafted with Claude (Anthropic) for @ylli-selmani.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.