Skip to content

feat: add DeepSeek as a supported model provider#3361

Merged
dgageot merged 1 commit into
mainfrom
feat/deepseek-provider
Jul 1, 2026
Merged

feat: add DeepSeek as a supported model provider#3361
dgageot merged 1 commit into
mainfrom
feat/deepseek-provider

Conversation

@Sayt-0

@Sayt-0 Sayt-0 commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

Adds DeepSeek as a built-in OpenAI-compatible alias provider, following the existing Groq/Baseten pattern. Closes #3347.

Definition of Done

Item Status
Alias entry deepseek (openai, https://api.deepseek.com/v1, DEEPSEEK_API_KEY) done
Unit test asserts the alias resolves and IsCatalogProvider("deepseek") is true done
Provider appears in the model catalog via CatalogProviders() done (alias has a BaseURL)
task test and task lint pass done
Example YAML using a DeepSeek model done (examples/deepseek.yaml)

Changes

File Change
pkg/model/provider/aliases.go deepseek alias entry
pkg/config/auto.go auto-detection in cloudProviders and DefaultModels["deepseek"] = "deepseek-chat"
agent-schema.json, docs/**, examples/README.md schema description, nav, tables, new provider page
docs/providers/deepseek/index.md, examples/deepseek.yaml new provider doc and example config

Tests

Test Kind Proves
TestDeepSeekAlias unit alias resolves; IsKnownProvider/IsCatalogProvider true
auto_test.go cases unit auto-detection, default model, precedence chain, integration
TestShouldMergeConsecutiveMessages_Gating (deepseek case) unit first-party API is not message-merged
TestDeepSeekProvider_EndToEndRequest end-to-end real HTTP over TCP through the full stack (alias resolution, OpenAI client, SSE parse): asserts POST, Bearer DEEPSEEK_API_KEY, /chat/completions routing, verbatim model, serialized user message, stream reassembly
TestDeepSeekLiveAPI live real call to api.deepseek.com, gated on DEEPSEEK_API_KEY (skipped otherwise)

Design notes

  • deepseek-chat is the default because it exists in the bundled models.dev snapshot, so the example passes the catalog lookup and deepseek is not added to modelsDevAbsentProviders.
  • DeepSeek is treated as a first-party API with a fixed model lineup (deepseek-chat, deepseek-reasoner), so it is deliberately left out of openModelHostProviders/shouldMergeConsecutiveMessages, consistent with mistral and xai. This decision was not verified against the live API; if DeepSeek's API turns out to reject multiple system messages, adding it to openModelHostProviders is a one-line follow-up.
  • The live API path (TestDeepSeekLiveAPI) was not exercised in CI (no key available); all other coverage runs hermetically.

Add deepseek as a built-in OpenAI-compatible alias provider, following the
groq/baseten pattern. Registers the alias (base URL https://api.deepseek.com/v1,
token DEEPSEEK_API_KEY), auto-detection in cloudProviders, default model
deepseek-chat, schema and docs updates, an example config, and unit tests.

DeepSeek is present in models.dev, so it is a first-class catalog provider and
is intentionally not added to modelsDevAbsentProviders. Its first-party API has
a fixed model lineup (deepseek-chat, deepseek-reasoner), so it is left out of
shouldMergeConsecutiveMessages like the other first-party APIs (mistral, xai).

Also adds an end-to-end test that drives a real HTTP request through the full
stack against a local OpenAI-compatible server, plus a DEEPSEEK_API_KEY-gated
live API test.

Closes #3347
@Sayt-0 Sayt-0 requested a review from a team as a code owner July 1, 2026 11:03
@dgageot dgageot merged commit 811ac9d into main Jul 1, 2026
13 checks passed
@Sayt-0 Sayt-0 deleted the feat/deepseek-provider branch July 1, 2026 11:09
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.

Add DeepSeek as a supported model provider

2 participants