feat: add DeepSeek as a supported model provider#3361
Merged
Conversation
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
dgageot
approved these changes
Jul 1, 2026
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
Adds DeepSeek as a built-in OpenAI-compatible alias provider, following the existing Groq/Baseten pattern. Closes #3347.
Definition of Done
deepseek(openai,https://api.deepseek.com/v1,DEEPSEEK_API_KEY)IsCatalogProvider("deepseek")is trueCatalogProviders()task testandtask lintpassexamples/deepseek.yaml)Changes
pkg/model/provider/aliases.godeepseekalias entrypkg/config/auto.gocloudProvidersandDefaultModels["deepseek"] = "deepseek-chat"agent-schema.json,docs/**,examples/README.mddocs/providers/deepseek/index.md,examples/deepseek.yamlTests
TestDeepSeekAliasIsKnownProvider/IsCatalogProvidertrueauto_test.gocasesTestShouldMergeConsecutiveMessages_Gating(deepseek case)TestDeepSeekProvider_EndToEndRequestBearer DEEPSEEK_API_KEY,/chat/completionsrouting, verbatim model, serialized user message, stream reassemblyTestDeepSeekLiveAPIapi.deepseek.com, gated onDEEPSEEK_API_KEY(skipped otherwise)Design notes
deepseek-chatis the default because it exists in the bundled models.dev snapshot, so the example passes the catalog lookup anddeepseekis not added tomodelsDevAbsentProviders.deepseek-chat,deepseek-reasoner), so it is deliberately left out ofopenModelHostProviders/shouldMergeConsecutiveMessages, consistent withmistralandxai. This decision was not verified against the live API; if DeepSeek's API turns out to reject multiple system messages, adding it toopenModelHostProvidersis a one-line follow-up.TestDeepSeekLiveAPI) was not exercised in CI (no key available); all other coverage runs hermetically.