Skip to content

feat(providers): DeepSeek provider#937

Merged
jaylfc merged 1 commit into
devfrom
feat/deepseek-provider
Jun 15, 2026
Merged

feat(providers): DeepSeek provider#937
jaylfc merged 1 commit into
devfrom
feat/deepseek-provider

Conversation

@jaylfc

@jaylfc jaylfc commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Adds DeepSeek as a first-class cloud model provider.

Base URL: the official https://api.deepseek.com (no /v1 suffix; DeepSeek serves the OpenAI-compatible API at the bare host). This is the official-DeepSeek path, not the ark/Volcengine gateway that Hermes happens to use locally.

Model ids seeded: deepseek-v4-pro and deepseek-v4-flash (the V4 generation), plus deepseek-chat and deepseek-reasoner (compatibility aliases, scheduled for deprecation 2026/07/24). DeepSeek's /models endpoint requires an API key, so a fresh add without a working key will not auto-discover; the seed list guarantees the provider registers routable models. With a valid key, live /models discovery replaces the seed as it does for every other cloud provider.

API key: no key is hardcoded. The provider references the user-supplied key the same way every other cloud provider does, through api_key_secret resolved to os.environ/<secret_name> in the LiteLLM config and injected from the taOS secrets store on reload. The conventional env var name is DEEPSEEK_API_KEY.

Registration: deepseek is a native LiteLLM provider, so it maps to the deepseek/ prefix in BACKEND_TYPE_MAP / CHAT_BACKEND_TYPE_MAP and LiteLLM emits deepseek/ entries with api_base set to the official base. Changes mirror the existing openrouter/kilocode entries exactly:

  • tinyagentos/providers/init.py: deepseek added to ALL_TYPES, CLOUD_TYPES, and the two routing maps (prefix deepseek).
  • tinyagentos/routes/providers.py: base URL default https://api.deepseek.com and a seed model list (mirrors the kilocode seed pattern).
  • tinyagentos/backend_adapters.py: deepseek wired to CloudAPIAdapter (probes /models; 401 without a key reads as online).
  • desktop/src/apps/ProvidersApp.tsx: DeepSeek added to FALLBACK_CLOUD_TYPES, DEFAULT_URLS, and CLOUD_PROVIDER_META so it appears in the Add Provider wizard.
  • desktop/src/lib/models.ts: deepseek added to CLOUD_PROVIDER_TYPES so its models flatten into the picker.

Verification: create_app() imports clean; provider test suites (test_routes_providers, test_provider_refresh, test_provider_lifecycle_api) pass 39/39.

Summary by CodeRabbit

Release Notes

  • New Features
    • Added DeepSeek as a supported cloud provider with automatic model discovery and pre-configured API defaults for seamless integration.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 94e51347-bbc6-4286-b420-48c100cd452c

📥 Commits

Reviewing files that changed from the base of the PR and between 9aaa767 and 56c2d16.

📒 Files selected for processing (5)
  • desktop/src/apps/ProvidersApp.tsx
  • desktop/src/lib/models.ts
  • tinyagentos/backend_adapters.py
  • tinyagentos/providers/__init__.py
  • tinyagentos/routes/providers.py

📝 Walkthrough

Walkthrough

DeepSeek is added as a recognized cloud provider in both the backend and frontend. The backend registers it in provider type sets, the LiteLLM backend map, the CloudAPIAdapter health-check registry, default URL constants, and a seeded model catalog. The frontend adds it to fallback type lists, URL defaults, and the provider metadata map.

Changes

DeepSeek Cloud Provider Integration

Layer / File(s) Summary
Backend type registry, adapter, and provider defaults
tinyagentos/providers/__init__.py, tinyagentos/backend_adapters.py, tinyagentos/routes/providers.py
"deepseek" added to ALL_TYPES, CLOUD_TYPES, and BACKEND_TYPE_MAP; mapped to CloudAPIAdapter() in _ADAPTERS; canonical base URL added to PROVIDER_URL_DEFAULTS; model catalog seeded with deepseek-v4-pro, deepseek-v4-flash, and aliases deepseek-chat / deepseek-reasoner in PROVIDER_DEFAULT_MODELS.
Frontend type constant, URL default, and provider metadata
desktop/src/lib/models.ts, desktop/src/apps/ProvidersApp.tsx
"deepseek" added to CLOUD_PROVIDER_TYPES, FALLBACK_CLOUD_TYPES, and DEFAULT_URLS; full CLOUD_PROVIDER_META entry registered with display label, description, default URL, and API key placeholder.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐇 A new friend joins the cloud today,
DeepSeek hops in without delay!
Its types are set, its URLs true,
V4 models shining brand new.
The registry grows, the adapters cheer —
Another provider is finally here! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding DeepSeek as a new cloud provider across the codebase, which is the primary objective of all modifications.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/deepseek-provider

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment on lines +43 to +48
"deepseek": [
{"id": "deepseek-v4-pro"},
{"id": "deepseek-v4-flash"},
{"id": "deepseek-chat"},
{"id": "deepseek-reasoner"},
],

@gitar-bot gitar-bot Bot Jun 15, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Edge Case: Seed model ids may not be routable until live discovery succeeds

The seed list registers deepseek-v4-pro and deepseek-v4-flash as routable models for any DeepSeek provider added without a working API key (the /models probe needs auth, so these seeds persist until a valid key enables live discovery). If those exact ids are not yet served by https://api.deepseek.com, they will appear selectable in the picker but fail at request time with a model-not-found error, since LiteLLM emits deepseek/<id> verbatim. The deepseek-chat/deepseek-reasoner aliases are known-good; please double-check the V4 ids match DeepSeek's current public catalog (and note deepseek-chat/deepseek-reasoner are flagged deprecated 2026/07/24, so the seed will need maintenance). Consider seeding only ids you can confirm route today, or documenting that the V4 ids are placeholders pending live discovery.

Reorder to lead with confirmed-routable ids and flag the V4 ids for verification.:

"deepseek": [
    # Confirmed routable today via deepseek/<id>:
    {"id": "deepseek-chat"},
    {"id": "deepseek-reasoner"},
    # V4 generation — keep only after confirming they are served by
    # https://api.deepseek.com (otherwise they 404 at request time).
    {"id": "deepseek-v4-pro"},
    {"id": "deepseek-v4-flash"},
],

Was this helpful? React with 👍 / 👎

@gitar-bot

gitar-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 0 resolved / 1 findings

Integrates DeepSeek as a first-class cloud model provider with native LiteLLM support and UI configuration. Consider that seed model IDs may remain unroutable until a valid API key enables live discovery via the /models endpoint.

💡 Edge Case: Seed model ids may not be routable until live discovery succeeds

📄 tinyagentos/routes/providers.py:43-48

The seed list registers deepseek-v4-pro and deepseek-v4-flash as routable models for any DeepSeek provider added without a working API key (the /models probe needs auth, so these seeds persist until a valid key enables live discovery). If those exact ids are not yet served by https://api.deepseek.com, they will appear selectable in the picker but fail at request time with a model-not-found error, since LiteLLM emits deepseek/<id> verbatim. The deepseek-chat/deepseek-reasoner aliases are known-good; please double-check the V4 ids match DeepSeek's current public catalog (and note deepseek-chat/deepseek-reasoner are flagged deprecated 2026/07/24, so the seed will need maintenance). Consider seeding only ids you can confirm route today, or documenting that the V4 ids are placeholders pending live discovery.

Reorder to lead with confirmed-routable ids and flag the V4 ids for verification.
"deepseek": [
    # Confirmed routable today via deepseek/<id>:
    {"id": "deepseek-chat"},
    {"id": "deepseek-reasoner"},
    # V4 generation — keep only after confirming they are served by
    # https://api.deepseek.com (otherwise they 404 at request time).
    {"id": "deepseek-v4-pro"},
    {"id": "deepseek-v4-flash"},
],
🤖 Prompt for agents
Code Review: Integrates DeepSeek as a first-class cloud model provider with native LiteLLM support and UI configuration. Consider that seed model IDs may remain unroutable until a valid API key enables live discovery via the /models endpoint.

1. 💡 Edge Case: Seed model ids may not be routable until live discovery succeeds
   Files: tinyagentos/routes/providers.py:43-48

   The seed list registers `deepseek-v4-pro` and `deepseek-v4-flash` as routable models for any DeepSeek provider added without a working API key (the `/models` probe needs auth, so these seeds persist until a valid key enables live discovery). If those exact ids are not yet served by `https://api.deepseek.com`, they will appear selectable in the picker but fail at request time with a model-not-found error, since LiteLLM emits `deepseek/<id>` verbatim. The `deepseek-chat`/`deepseek-reasoner` aliases are known-good; please double-check the V4 ids match DeepSeek's current public catalog (and note `deepseek-chat`/`deepseek-reasoner` are flagged deprecated 2026/07/24, so the seed will need maintenance). Consider seeding only ids you can confirm route today, or documenting that the V4 ids are placeholders pending live discovery.

   Fix (Reorder to lead with confirmed-routable ids and flag the V4 ids for verification.):
   "deepseek": [
       # Confirmed routable today via deepseek/<id>:
       {"id": "deepseek-chat"},
       {"id": "deepseek-reasoner"},
       # V4 generation — keep only after confirming they are served by
       # https://api.deepseek.com (otherwise they 404 at request time).
       {"id": "deepseek-v4-pro"},
       {"id": "deepseek-v4-flash"},
   ],

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@jaylfc jaylfc marked this pull request as ready for review June 15, 2026 14:27
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@jaylfc

jaylfc commented Jun 15, 2026

Copy link
Copy Markdown
Owner Author

Re gitar's note on V4 model id routability: verified against DeepSeek's official API docs. deepseek-v4-pro and deepseek-v4-flash are the current primary model ids; the legacy deepseek-chat/deepseek-reasoner are scheduled for deprecation on 2026-07-24 (they now alias v4-flash non-thinking/thinking). Leading with the V4 ids is correct and future-proof, so keeping the order as-is. Legacy ids retained for back-compat until the deprecation date.

@jaylfc jaylfc merged commit 3f749f7 into dev Jun 15, 2026
8 of 10 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in TinyAgentOS Roadmap Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant