[GH-ISSUE #7401] [Feature]: Native DeepSeek provider #4123

Closed
opened 2026-10-21 06:11:10 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @ylli-selmani on GitHub (Oct 10, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7401

Originally assigned to: @ylli-selmani on GitHub.

What problem does this solve?

DeepSeek has no built-in connection type. The usual workaround — a Custom (OAI-Compatible)
connection — works, but the natural-looking setup fails quietly and confusingly:

Setting the connection's Provider to OpenAI and pointing the Base URL at https://api.deepseek.com/v1
does not produce an OpenAI-shaped request. shouldSuppressUnknownModelParameters("openai", "deepseek-v4-pro")
returns true, because openai has a built-in catalog and DeepSeek's models are not in it, so the panel hides
Temperature, Top P, Top K, penalties, Reasoning Effort and Verbosity, and the sent body is left with
little more than max_tokens. A user who did this and lost the Reasoning Effort control reported it as a
regression and considered downgrading to an older release.

deepseek also falls through to the generic path everywhere a provider id is matched, so its real request
rules are not modelled: DeepSeek accepts reasoning_effort (none/low/high/max) plus a separate
thinking: {type: enabled|disabled} switch, returns thinking under reasoning_content, and rejects or
ignores
several fields the generic OpenAI rules would send.

Finally, the shipped catalog is stale. DEEPSEEK_MODELS (packages/shared/src/constants/model-lists.ts)
lists deepseek-chat, deepseek-coder and deepseek-reasoner — all retired on 2026-07-24 — plus the legacy
deepseek-v4-flash, and it is missing deepseek-flash, the current model name.

Proposed solution

Add deepseek as a first-class provider, in the same shape as zai, arli and the other
OpenAI-compatible built-ins:

  • Connection type: deepseek in the APIProvider union, the shared connection schema, and the Drizzle
    enum; a PROVIDERS.deepseek entry with default base URL https://api.deepseek.com/v1, so it appears in
    the provider picker next to the other services.
  • Model catalog: MODEL_LISTS.deepseek, refreshed to what the API actually serves — deepseek-flash
    and deepseek-v4-pro — dropping the retired ids. Host inference for api.deepseek.com.
  • Request shaping: route deepseek through OpenAIProvider with its own provider kind, mirroring the
    documented contract so the parameter panel and the sent body agree:
    • shown: Max Output Tokens, Reasoning Effort (mapped to none/low/high/max), Temperature, Top P,
      Assistant Prefill, Assistant Reasoning Prefill, Thinking Tags, Custom Parameters
    • hidden: Verbosity, Top K, Frequency Penalty, Presence Penalty, Service Tier — DeepSeek documents no
      verbosity, no top_k/min_p, and marks both penalties deprecated with "will not take effect"
    • thinking on/off via thinking: {type}, reasoning read back from reasoning_content
  • Parameter relevance rules: deepseek in OPENAI_COMPATIBLE and KNOWN_PROVIDERS, a NEVER_SENT
    entry, and the reasoning-model rule, so the gating above is what the panel actually applies.

Scope is the text/chat provider only. DeepSeek image generation is deliberately out of scope.

Alternatives considered

  • Just tell users to pick Custom (OAI-Compatible). It works today and is the right immediate advice, but
    it is an undocumented workaround for a service with a public, documented API, and it leaves the mis-pairing
    trap in place for the next person who reasonably picks "OpenAI" for an OpenAI-compatible endpoint.
  • Make the OpenAI provider stop suppressing unknown models. The suppression exists because OpenAI's own API
    rejects fields it does not know, so relaxing it would reintroduce real 400s for genuine OpenAI users.
  • Show Verbosity on DeepSeek anyway. Rejected: the parameter does not exist upstream, so the control would
    silently do nothing — the exact class of misleading control that #6776 set out to remove.

Additional context

  • Related: #6804 (the parameter-relevance work that introduced the provider/model gating), #6698 (umbrella).
  • Docs: Chat Completions API,
    Reasoning Model.
  • The relevance regression (scripts/regressions/generation-parameter-relevance.regression.ts) is the natural
    place to pin the new rows; it already probes each provider's real request body and compares it against what
    the panel shows.
  • docs/connections/providers-reference.md needs a DeepSeek section (and the docs-i18n branch mirrored).

Template check

  • I DID NOT read this template and provide the requested details.

🤖 Drafted with Claude (Anthropic) for @ylli-selmani.

Originally created by @ylli-selmani on GitHub (Oct 10, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7401 Originally assigned to: @ylli-selmani on GitHub. ## What problem does this solve? DeepSeek has no built-in connection type. The usual workaround — a **Custom (OAI-Compatible)** connection — works, but the natural-looking setup fails quietly and confusingly: Setting the connection's Provider to **OpenAI** and pointing the Base URL at `https://api.deepseek.com/v1` does not produce an OpenAI-shaped request. `shouldSuppressUnknownModelParameters("openai", "deepseek-v4-pro")` returns true, because `openai` has a built-in catalog and DeepSeek's models are not in it, so the panel hides Temperature, Top P, Top K, penalties, **Reasoning Effort** and **Verbosity**, and the sent body is left with little more than `max_tokens`. A user who did this and lost the Reasoning Effort control reported it as a regression and considered downgrading to an older release. `deepseek` also falls through to the generic path everywhere a provider id is matched, so its real request rules are not modelled: DeepSeek accepts `reasoning_effort` (`none`/`low`/`high`/`max`) plus a separate `thinking: {type: enabled|disabled}` switch, returns thinking under `reasoning_content`, and **rejects or ignores** several fields the generic OpenAI rules would send. Finally, the shipped catalog is stale. `DEEPSEEK_MODELS` (`packages/shared/src/constants/model-lists.ts`) lists `deepseek-chat`, `deepseek-coder` and `deepseek-reasoner` — all retired on 2026-07-24 — plus the legacy `deepseek-v4-flash`, and it is **missing `deepseek-flash`**, the current model name. ## Proposed solution Add `deepseek` as a first-class provider, in the same shape as `zai`, `arli` and the other OpenAI-compatible built-ins: - **Connection type:** `deepseek` in the `APIProvider` union, the shared connection schema, and the Drizzle enum; a `PROVIDERS.deepseek` entry with default base URL `https://api.deepseek.com/v1`, so it appears in the provider picker next to the other services. - **Model catalog:** `MODEL_LISTS.deepseek`, refreshed to what the API actually serves — `deepseek-flash` and `deepseek-v4-pro` — dropping the retired ids. Host inference for `api.deepseek.com`. - **Request shaping:** route `deepseek` through `OpenAIProvider` with its own provider kind, mirroring the documented contract so the parameter panel and the sent body agree: - **shown:** Max Output Tokens, Reasoning Effort (mapped to `none`/`low`/`high`/`max`), Temperature, Top P, Assistant Prefill, Assistant Reasoning Prefill, Thinking Tags, Custom Parameters - **hidden:** Verbosity, Top K, Frequency Penalty, Presence Penalty, Service Tier — DeepSeek documents no `verbosity`, no `top_k`/`min_p`, and marks both penalties deprecated with "will not take effect" - thinking on/off via `thinking: {type}`, reasoning read back from `reasoning_content` - **Parameter relevance rules:** `deepseek` in `OPENAI_COMPATIBLE` and `KNOWN_PROVIDERS`, a `NEVER_SENT` entry, and the reasoning-model rule, so the gating above is what the panel actually applies. Scope is the text/chat provider only. DeepSeek image generation is deliberately out of scope. ## Alternatives considered - **Just tell users to pick Custom (OAI-Compatible).** It works today and is the right immediate advice, but it is an undocumented workaround for a service with a public, documented API, and it leaves the mis-pairing trap in place for the next person who reasonably picks "OpenAI" for an OpenAI-compatible endpoint. - **Make the OpenAI provider stop suppressing unknown models.** The suppression exists because OpenAI's own API rejects fields it does not know, so relaxing it would reintroduce real 400s for genuine OpenAI users. - **Show Verbosity on DeepSeek anyway.** Rejected: the parameter does not exist upstream, so the control would silently do nothing — the exact class of misleading control that #6776 set out to remove. ## Additional context - Related: #6804 (the parameter-relevance work that introduced the provider/model gating), #6698 (umbrella). - Docs: [Chat Completions API](https://api-docs.deepseek.com/api/create-chat-completion), [Reasoning Model](https://api-docs.deepseek.com/guides/reasoning_model). - The relevance regression (`scripts/regressions/generation-parameter-relevance.regression.ts`) is the natural place to pin the new rows; it already probes each provider's real request body and compares it against what the panel shows. - `docs/connections/providers-reference.md` needs a DeepSeek section (and the `docs-i18n` branch mirrored). ## Template check - [ ] I DID NOT read this template and provide the requested details. --- 🤖 Drafted with Claude (Anthropic) for @ylli-selmani.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4123
No description provided.