← Back to PRs

#14393: feat: add standalone DeepSeek provider support

by osoulmate open 2026-02-12 02:05 View on GitHub →
docs cli commands agents stale size: M
### Motivation - Add first-class support for DeepSeek so users with only a DeepSeek account can authenticate and use DeepSeek models directly instead of routing through aggregators. - Make DeepSeek discoverable from env/profiles and integrable into the existing onboarding flows (interactive and non-interactive). ### Description - Added a DeepSeek model catalog and constants in `src/agents/deepseek-models.ts` and exposed `DEEPSEEK_BASE_URL` and `DEEPSEEK_DEFAULT_MODEL_REF` for wiring. - Wired implicit provider discovery so `deepseek` is auto-registered when `DEEPSEEK_API_KEY` or a `deepseek` auth profile exists in `src/agents/models-config.providers.ts` and added env var mapping in `src/agents/model-auth.ts`. - Implemented provider config appliers and default-model helpers in `src/commands/onboard-auth.config-core.ts` and credential helper `setDeepseekApiKey` in `src/commands/onboard-auth.credentials.ts`. - Extended onboarding types, CLI flags and onboarding command plumbing to accept `deepseek-api-key` / `--deepseek-api-key` in `src/commands/onboard-types.ts` and `src/cli/program/register.onboard.ts`. - Added DeepSeek to auth-choice UX: grouped option + preferred provider mapping + interactive application flow (prompts and profile creation) in `src/commands/auth-choice-options.ts`, `src/commands/auth-choice.preferred-provider.ts`, and `src/commands/auth-choice.apply.api-providers.ts`. - Hooked non-interactive onboarding inference & application for DeepSeek in `src/commands/onboard-non-interactive/local/*` and `src/commands/onboard-non-interactive/local/auth-choice-inference.ts`. - Added tests to cover implicit provider generation and CLI wiring and updated smoke/unit tests to include DeepSeek cases (`src/agents/models-config.skips-writing-models-json-no-env-token.test.ts`, `src/cli/program.smoke.test.ts`, `src/commands/auth-choice-options.test.ts`). - Added documentation `docs/providers/deepseek.md` and linked it from `docs/providers/index.md`. ### Testing - Ran targeted unit tests: `pnpm test -- src/agents/models-config.skips-writing-models-json-no-env-token.test.ts src/cli/program.smoke.test.ts src/commands/auth-choice-options.test.ts`, all tests passed (Test Files: 3, Tests: 32 passed). - Verified TypeScript checks with `pnpm tsgo`, which completed successfully. - Ran formatting with `pnpm format` to update style, which completed successfully. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_698c4aa0cc58832697388e3c2cb43425) <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds first-class DeepSeek support across the model catalog, implicit provider discovery, and both interactive/non-interactive onboarding flows. It introduces a DeepSeek provider definition (`src/agents/deepseek-models.ts`), auto-registers the provider when `DEEPSEEK_API_KEY` or a DeepSeek auth profile exists, and extends CLI flags/types and auth-choice UX so users can configure DeepSeek via `--auth-choice deepseek-api-key` and `--deepseek-api-key`. The change fits into the existing architecture by following the same patterns used for other API-key providers (e.g., Together/Venice): env/profile discovery populates `models.json`, onboarding writes an auth profile (`deepseek:default`), and config appliers register provider+models and optionally set the default model to `deepseek/deepseek-chat`. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - Changes follow existing provider/onboarding patterns, and the added DeepSeek wiring appears consistent with other API-key providers; the only issue found is a test assertion mismatch with current env-var behavior. - src/agents/models-config.skips-writing-models-json-no-env-token.test.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs