From 87c62498e97aa0eca67ac2512ad63729d77a3cb5 Mon Sep 17 00:00:00 2001 From: "10946620@163.com" <> Date: Wed, 28 Jan 2026 14:23:24 +0800 Subject: [PATCH 1/2] Add DeepSeek provider support to onboarding flow --- AGENTS.md | 5 +- findings.md | 19 +++++ progress.md | 9 +++ src/agents/model-auth.ts | 1 + src/agents/models-config.providers.ts | 46 +++++++++++ src/commands/auth-choice-options.ts | 8 ++ src/commands/auth-choice.apply.deepseek.ts | 92 ++++++++++++++++++++++ src/commands/auth-choice.apply.ts | 2 + src/commands/onboard-auth.config-core.ts | 69 ++++++++++++++++ src/commands/onboard-auth.credentials.ts | 13 +++ src/commands/onboard-auth.models.ts | 24 ++++++ src/commands/onboard-auth.ts | 5 ++ src/commands/onboard-types.ts | 2 + src/infra/provider-usage.fetch.deepseek.ts | 17 ++++ src/infra/provider-usage.fetch.ts | 1 + src/infra/provider-usage.load.ts | 3 + src/infra/provider-usage.shared.ts | 2 + src/infra/provider-usage.types.ts | 1 + task_plan.md | 13 +++ 19 files changed, 331 insertions(+), 1 deletion(-) create mode 100644 findings.md create mode 100644 progress.md create mode 100644 src/commands/auth-choice.apply.deepseek.ts create mode 100644 src/infra/provider-usage.fetch.deepseek.ts create mode 100644 task_plan.md diff --git a/AGENTS.md b/AGENTS.md index 44b0149fd..6fae71ceb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,10 +47,13 @@ - Type-check/build: `pnpm build` (tsc) - Lint/format: `pnpm lint` (oxlint), `pnpm format` (oxfmt) - Tests: `pnpm test` (vitest); coverage: `pnpm test:coverage` +- Run single test: `pnpm vitest run src/path/to/test.ts` (fastest feedback loop). ## Coding Style & Naming Conventions - Language: TypeScript (ESM). Prefer strict typing; avoid `any`. -- Formatting/linting via Oxlint and Oxfmt; run `pnpm lint` before commits. +- Formatting/linting via Oxlint and Oxfmt; run `pnpm lint` before commits. Use `pnpm lint:fix` to auto-fix both. +- Imports: Use standard ESM imports. No path aliases are configured; use relative paths. +- Error Handling: Use strongly typed errors where possible. Handle specific error types rather than catching generic `Error`. - Add brief code comments for tricky or non-obvious logic. - Keep files concise; extract helpers instead of “V2” copies. Use existing patterns for CLI options and dependency injection via `createDefaultDeps`. - Aim to keep files under ~700 LOC; guideline only (not a hard guardrail). Split/refactor when it improves clarity or testability. diff --git a/findings.md b/findings.md new file mode 100644 index 000000000..4fc534cc5 --- /dev/null +++ b/findings.md @@ -0,0 +1,19 @@ +# Findings + +## Onboarding Implementation +- Onboarding logic is spread across `src/commands/onboard-*` and `src/wizard/onboarding*.ts`. +- `onboard-auth.ts` exports functions to apply configurations for various providers. +- `onboard-auth.config-core.ts` and `onboard-auth.credentials.ts` handle core provider setup. +- `onboard-auth.models.ts` defines model defaults. +- **DeepSeek is currently missing** from the onboarding flow. + +## DeepSeek Integration Plan +1. **Define Defaults**: Add DeepSeek model constants in `src/commands/onboard-auth.models.ts` (reuse constants from `models-config.providers.ts` if possible, but they are private there, so likely redefine or export). +2. **Config Applicator**: Create `applyDeepSeekProviderConfig` and `applyDeepSeekConfig` in `src/commands/onboard-auth.config-core.ts` (or a new file if needed, but core seems fine). +3. **Credential Setter**: Add `setDeepSeekApiKey` in `src/commands/onboard-auth.credentials.ts`. +4. **Interactive Flow**: Update `src/commands/onboard-interactive.ts` or `src/commands/auth-choice.ts` to include DeepSeek as an option. +5. **Export**: Update `src/commands/onboard-auth.ts` to export the new functions. + +## Implementation Details +- `DEEPSEEK_DEFAULT_MODEL_ID` = `deepseek-chat` +- `DEEPSEEK_DEFAULT_MODEL_REF` = `deepseek/deepseek-chat` diff --git a/progress.md b/progress.md new file mode 100644 index 000000000..3a2594543 --- /dev/null +++ b/progress.md @@ -0,0 +1,9 @@ +# Progress Log + +## Session Start +- Initialized planning files. +- Started Discovery phase. +- Identified onboarding files. +- Implemented `DeepSeek` in onboarding flow. +- Verified compilation with `bunx tsc`. +- Completed task. diff --git a/src/agents/model-auth.ts b/src/agents/model-auth.ts index 96e4e4ae6..6975b5734 100644 --- a/src/agents/model-auth.ts +++ b/src/agents/model-auth.ts @@ -283,6 +283,7 @@ export function resolveEnvApiKey(provider: string): EnvApiKeyResult | null { minimax: "MINIMAX_API_KEY", synthetic: "SYNTHETIC_API_KEY", venice: "VENICE_API_KEY", + deepseek: "DEEPSEEK_API_KEY", mistral: "MISTRAL_API_KEY", opencode: "OPENCODE_API_KEY", }; diff --git a/src/agents/models-config.providers.ts b/src/agents/models-config.providers.ts index a176dac8a..bf0a79286 100644 --- a/src/agents/models-config.providers.ts +++ b/src/agents/models-config.providers.ts @@ -64,6 +64,18 @@ const QWEN_PORTAL_DEFAULT_COST = { cacheWrite: 0, }; +const DEEPSEEK_BASE_URL = "https://api.deepseek.com"; +const DEEPSEEK_CHAT_MODEL_ID = "deepseek-chat"; +const DEEPSEEK_REASONER_MODEL_ID = "deepseek-reasoner"; +const DEEPSEEK_DEFAULT_CONTEXT_WINDOW = 64000; +const DEEPSEEK_DEFAULT_MAX_TOKENS = 8192; +const DEEPSEEK_DEFAULT_COST = { + input: 0.14, + output: 0.28, + cacheRead: 0.014, + cacheWrite: 0.14, +}; + const OLLAMA_BASE_URL = "http://127.0.0.1:11434/v1"; const OLLAMA_API_BASE_URL = "http://127.0.0.1:11434"; const OLLAMA_DEFAULT_CONTEXT_WINDOW = 128000; @@ -333,6 +345,33 @@ function buildQwenPortalProvider(): ProviderConfig { }; } +function buildDeepSeekProvider(): ProviderConfig { + return { + baseUrl: DEEPSEEK_BASE_URL, + api: "openai-completions", + models: [ + { + id: DEEPSEEK_CHAT_MODEL_ID, + name: "DeepSeek Chat (V3)", + reasoning: false, + input: ["text"], + cost: DEEPSEEK_DEFAULT_COST, + contextWindow: DEEPSEEK_DEFAULT_CONTEXT_WINDOW, + maxTokens: DEEPSEEK_DEFAULT_MAX_TOKENS, + }, + { + id: DEEPSEEK_REASONER_MODEL_ID, + name: "DeepSeek Reasoner (R1)", + reasoning: true, + input: ["text"], + cost: DEEPSEEK_DEFAULT_COST, + contextWindow: DEEPSEEK_DEFAULT_CONTEXT_WINDOW, + maxTokens: DEEPSEEK_DEFAULT_MAX_TOKENS, + }, + ], + }; +} + function buildSyntheticProvider(): ProviderConfig { return { baseUrl: SYNTHETIC_BASE_URL, @@ -374,6 +413,13 @@ export async function resolveImplicitProviders(params: { providers.minimax = { ...buildMinimaxProvider(), apiKey: minimaxKey }; } + const deepseekKey = + resolveEnvApiKeyVarName("deepseek") ?? + resolveApiKeyFromProfiles({ provider: "deepseek", store: authStore }); + if (deepseekKey) { + providers.deepseek = { ...buildDeepSeekProvider(), apiKey: deepseekKey }; + } + const moonshotKey = resolveEnvApiKeyVarName("moonshot") ?? resolveApiKeyFromProfiles({ provider: "moonshot", store: authStore }); diff --git a/src/commands/auth-choice-options.ts b/src/commands/auth-choice-options.ts index 6b49ff17b..7e4738bfe 100644 --- a/src/commands/auth-choice-options.ts +++ b/src/commands/auth-choice-options.ts @@ -20,6 +20,7 @@ export type AuthChoiceGroupId = | "minimax" | "synthetic" | "venice" + | "deepseek" | "qwen"; export type AuthChoiceGroup = { @@ -53,6 +54,12 @@ const AUTH_CHOICE_GROUP_DEFS: { hint: "M2.1 (recommended)", choices: ["minimax-api", "minimax-api-lightning"], }, + { + value: "deepseek", + label: "DeepSeek", + hint: "V3 / R1 (low cost)", + choices: ["deepseek-api-key"], + }, { value: "qwen", label: "Qwen", @@ -147,6 +154,7 @@ export function buildAuthChoiceOptions(params: { label: "Venice AI API key", hint: "Privacy-focused inference (uncensored models)", }); + options.push({ value: "deepseek-api-key", label: "DeepSeek API key" }); options.push({ value: "github-copilot", label: "GitHub Copilot (GitHub device login)", diff --git a/src/commands/auth-choice.apply.deepseek.ts b/src/commands/auth-choice.apply.deepseek.ts new file mode 100644 index 000000000..cae1a5175 --- /dev/null +++ b/src/commands/auth-choice.apply.deepseek.ts @@ -0,0 +1,92 @@ +import { ensureAuthProfileStore, resolveAuthProfileOrder } from "../agents/auth-profiles.js"; +import { resolveEnvApiKey } from "../agents/model-auth.js"; +import { + formatApiKeyPreview, + normalizeApiKeyInput, + validateApiKeyInput, +} from "./auth-choice.api-key.js"; +import type { ApplyAuthChoiceParams, ApplyAuthChoiceResult } from "./auth-choice.apply.js"; +import { applyDefaultModelChoice } from "./auth-choice.default-model.js"; +import { + applyAuthProfileConfig, + applyDeepSeekConfig, + applyDeepSeekProviderConfig, + DEEPSEEK_DEFAULT_MODEL_REF, + setDeepSeekApiKey, +} from "./onboard-auth.js"; + +export async function applyAuthChoiceDeepSeek( + params: ApplyAuthChoiceParams, +): Promise { + let nextConfig = params.config; + let agentModelOverride: string | undefined; + const noteAgentModel = async (model: string) => { + if (!params.agentId) return; + await params.prompter.note( + `Default model set to ${model} for agent "${params.agentId}".`, + "Model configured", + ); + }; + + const authChoice = params.authChoice; + if ( + authChoice === "deepseek-api-key" || + (authChoice === "apiKey" && params.opts?.tokenProvider === "deepseek") + ) { + let hasCredential = false; + if (!hasCredential && params.opts?.token && params.opts?.tokenProvider === "deepseek") { + await setDeepSeekApiKey(normalizeApiKeyInput(params.opts.token), params.agentDir); + hasCredential = true; + } + + if (!hasCredential) { + await params.prompter.note( + [ + "DeepSeek provides low-cost, high-performance models (V3, R1).", + "Get your API key at: https://platform.deepseek.com/api_keys", + ].join("\n"), + "DeepSeek", + ); + } + const envKey = resolveEnvApiKey("deepseek"); + if (envKey) { + const useExisting = await params.prompter.confirm({ + message: `Use existing DEEPSEEK_API_KEY (${envKey.source}, ${formatApiKeyPreview(envKey.apiKey)})?`, + initialValue: true, + }); + if (useExisting) { + await setDeepSeekApiKey(envKey.apiKey, params.agentDir); + hasCredential = true; + } + } + if (!hasCredential) { + const key = await params.prompter.text({ + message: "Enter DeepSeek API key", + validate: validateApiKeyInput, + }); + await setDeepSeekApiKey(normalizeApiKeyInput(String(key)), params.agentDir); + } + nextConfig = applyAuthProfileConfig(nextConfig, { + profileId: "deepseek:default", + provider: "deepseek", + mode: "api_key", + }); + { + const applied = await applyDefaultModelChoice({ + config: nextConfig, + setDefaultModel: params.setDefaultModel, + defaultModel: DEEPSEEK_DEFAULT_MODEL_REF, + applyDefaultConfig: applyDeepSeekConfig, + applyProviderConfig: applyDeepSeekProviderConfig, + noteDefault: DEEPSEEK_DEFAULT_MODEL_REF, + noteAgentModel, + prompter: params.prompter, + }); + nextConfig = applied.config; + agentModelOverride = applied.agentModelOverride ?? agentModelOverride; + } + return { config: nextConfig, agentModelOverride }; + } + + return null; +} diff --git a/src/commands/auth-choice.apply.ts b/src/commands/auth-choice.apply.ts index f139b509f..e3b9a8f9a 100644 --- a/src/commands/auth-choice.apply.ts +++ b/src/commands/auth-choice.apply.ts @@ -4,6 +4,7 @@ import type { WizardPrompter } from "../wizard/prompts.js"; import { applyAuthChoiceAnthropic } from "./auth-choice.apply.anthropic.js"; import { applyAuthChoiceApiProviders } from "./auth-choice.apply.api-providers.js"; import { applyAuthChoiceCopilotProxy } from "./auth-choice.apply.copilot-proxy.js"; +import { applyAuthChoiceDeepSeek } from "./auth-choice.apply.deepseek.js"; import { applyAuthChoiceGitHubCopilot } from "./auth-choice.apply.github-copilot.js"; import { applyAuthChoiceGoogleAntigravity } from "./auth-choice.apply.google-antigravity.js"; import { applyAuthChoiceGoogleGeminiCli } from "./auth-choice.apply.google-gemini-cli.js"; @@ -45,6 +46,7 @@ export async function applyAuthChoice( applyAuthChoiceGoogleAntigravity, applyAuthChoiceGoogleGeminiCli, applyAuthChoiceCopilotProxy, + applyAuthChoiceDeepSeek, applyAuthChoiceQwenPortal, ]; diff --git a/src/commands/onboard-auth.config-core.ts b/src/commands/onboard-auth.config-core.ts index 921ee01d1..702e2e000 100644 --- a/src/commands/onboard-auth.config-core.ts +++ b/src/commands/onboard-auth.config-core.ts @@ -19,6 +19,10 @@ import { import { buildKimiCodeModelDefinition, buildMoonshotModelDefinition, + buildDeepSeekModelDefinition, + DEEPSEEK_BASE_URL, + DEEPSEEK_DEFAULT_MODEL_ID, + DEEPSEEK_DEFAULT_MODEL_REF, KIMI_CODE_BASE_URL, KIMI_CODE_MODEL_ID, KIMI_CODE_MODEL_REF, @@ -27,6 +31,71 @@ import { MOONSHOT_DEFAULT_MODEL_REF, } from "./onboard-auth.models.js"; +export function applyDeepSeekProviderConfig(cfg: MoltbotConfig): MoltbotConfig { + const models = { ...cfg.agents?.defaults?.models }; + models[DEEPSEEK_DEFAULT_MODEL_REF] = { + ...models[DEEPSEEK_DEFAULT_MODEL_REF], + alias: models[DEEPSEEK_DEFAULT_MODEL_REF]?.alias ?? "DeepSeek V3", + }; + + const providers = { ...cfg.models?.providers }; + const existingProvider = providers.deepseek; + const existingModels = Array.isArray(existingProvider?.models) ? existingProvider.models : []; + const defaultModel = buildDeepSeekModelDefinition(); + const hasDefaultModel = existingModels.some((model) => model.id === DEEPSEEK_DEFAULT_MODEL_ID); + const mergedModels = hasDefaultModel ? existingModels : [...existingModels, defaultModel]; + const { apiKey: existingApiKey, ...existingProviderRest } = (existingProvider ?? {}) as Record< + string, + unknown + > as { apiKey?: string }; + const resolvedApiKey = typeof existingApiKey === "string" ? existingApiKey : undefined; + const normalizedApiKey = resolvedApiKey?.trim(); + providers.deepseek = { + ...existingProviderRest, + baseUrl: DEEPSEEK_BASE_URL, + api: "openai-completions", + ...(normalizedApiKey ? { apiKey: normalizedApiKey } : {}), + models: mergedModels.length > 0 ? mergedModels : [defaultModel], + }; + + return { + ...cfg, + agents: { + ...cfg.agents, + defaults: { + ...cfg.agents?.defaults, + models, + }, + }, + models: { + mode: cfg.models?.mode ?? "merge", + providers, + }, + }; +} + +export function applyDeepSeekConfig(cfg: MoltbotConfig): MoltbotConfig { + const next = applyDeepSeekProviderConfig(cfg); + const existingModel = next.agents?.defaults?.model; + return { + ...next, + agents: { + ...next.agents, + defaults: { + ...next.agents?.defaults, + model: { + ...(existingModel && "fallbacks" in (existingModel as Record) + ? { + fallbacks: (existingModel as { fallbacks?: string[] }).fallbacks, + } + : undefined), + primary: DEEPSEEK_DEFAULT_MODEL_REF, + }, + }, + }, + }; +} + export function applyZaiConfig(cfg: MoltbotConfig): MoltbotConfig { const models = { ...cfg.agents?.defaults?.models }; models[ZAI_DEFAULT_MODEL_REF] = { diff --git a/src/commands/onboard-auth.credentials.ts b/src/commands/onboard-auth.credentials.ts index b2fb58542..1a35752ab 100644 --- a/src/commands/onboard-auth.credentials.ts +++ b/src/commands/onboard-auth.credentials.ts @@ -73,6 +73,19 @@ export async function setMoonshotApiKey(key: string, agentDir?: string) { }); } +export async function setDeepSeekApiKey(key: string, agentDir?: string) { + // Write to resolved agent dir so gateway finds credentials on startup. + upsertAuthProfile({ + profileId: "deepseek:default", + credential: { + type: "api_key", + provider: "deepseek", + key, + }, + agentDir: resolveAuthAgentDir(agentDir), + }); +} + export async function setKimiCodeApiKey(key: string, agentDir?: string) { // Write to resolved agent dir so gateway finds credentials on startup. upsertAuthProfile({ diff --git a/src/commands/onboard-auth.models.ts b/src/commands/onboard-auth.models.ts index de5a4edaa..22723e2dd 100644 --- a/src/commands/onboard-auth.models.ts +++ b/src/commands/onboard-auth.models.ts @@ -21,6 +21,18 @@ export const KIMI_CODE_HEADERS = { "User-Agent": "KimiCLI/0.77" } as const; export const KIMI_CODE_COMPAT = { supportsDeveloperRole: false } as const; // Pricing: MiniMax doesn't publish public rates. Override in models.json for accurate costs. +export const DEEPSEEK_BASE_URL = "https://api.deepseek.com"; +export const DEEPSEEK_DEFAULT_MODEL_ID = "deepseek-chat"; +export const DEEPSEEK_DEFAULT_MODEL_REF = `deepseek/${DEEPSEEK_DEFAULT_MODEL_ID}`; +export const DEEPSEEK_DEFAULT_CONTEXT_WINDOW = 64000; +export const DEEPSEEK_DEFAULT_MAX_TOKENS = 8192; +export const DEEPSEEK_DEFAULT_COST = { + input: 0.14, + output: 0.28, + cacheRead: 0.014, + cacheWrite: 0.14, +}; + export const MINIMAX_API_COST = { input: 15, output: 60, @@ -103,6 +115,18 @@ export function buildMoonshotModelDefinition(): ModelDefinitionConfig { }; } +export function buildDeepSeekModelDefinition(): ModelDefinitionConfig { + return { + id: DEEPSEEK_DEFAULT_MODEL_ID, + name: "DeepSeek Chat (V3)", + reasoning: false, + input: ["text"], + cost: DEEPSEEK_DEFAULT_COST, + contextWindow: DEEPSEEK_DEFAULT_CONTEXT_WINDOW, + maxTokens: DEEPSEEK_DEFAULT_MAX_TOKENS, + }; +} + export function buildKimiCodeModelDefinition(): ModelDefinitionConfig { return { id: KIMI_CODE_MODEL_ID, diff --git a/src/commands/onboard-auth.ts b/src/commands/onboard-auth.ts index b122d89cf..af0abd248 100644 --- a/src/commands/onboard-auth.ts +++ b/src/commands/onboard-auth.ts @@ -5,6 +5,8 @@ export { export { VENICE_DEFAULT_MODEL_ID, VENICE_DEFAULT_MODEL_REF } from "../agents/venice-models.js"; export { applyAuthProfileConfig, + applyDeepSeekConfig, + applyDeepSeekProviderConfig, applyKimiCodeConfig, applyKimiCodeProviderConfig, applyMoonshotConfig, @@ -35,6 +37,7 @@ export { export { OPENROUTER_DEFAULT_MODEL_REF, setAnthropicApiKey, + setDeepSeekApiKey, setGeminiApiKey, setKimiCodeApiKey, setMinimaxApiKey, @@ -50,10 +53,12 @@ export { ZAI_DEFAULT_MODEL_REF, } from "./onboard-auth.credentials.js"; export { + buildDeepSeekModelDefinition, buildKimiCodeModelDefinition, buildMinimaxApiModelDefinition, buildMinimaxModelDefinition, buildMoonshotModelDefinition, + DEEPSEEK_DEFAULT_MODEL_REF, DEFAULT_MINIMAX_BASE_URL, KIMI_CODE_BASE_URL, KIMI_CODE_MODEL_ID, diff --git a/src/commands/onboard-types.ts b/src/commands/onboard-types.ts index aa1d9afe0..0dec3a8fc 100644 --- a/src/commands/onboard-types.ts +++ b/src/commands/onboard-types.ts @@ -27,6 +27,7 @@ export type AuthChoice = | "minimax" | "minimax-api" | "minimax-api-lightning" + | "deepseek-api-key" | "opencode-zen" | "github-copilot" | "copilot-proxy" @@ -68,6 +69,7 @@ export type OnboardOptions = { geminiApiKey?: string; zaiApiKey?: string; minimaxApiKey?: string; + deepseekApiKey?: string; syntheticApiKey?: string; veniceApiKey?: string; opencodeZenApiKey?: string; diff --git a/src/infra/provider-usage.fetch.deepseek.ts b/src/infra/provider-usage.fetch.deepseek.ts new file mode 100644 index 000000000..d72a96b21 --- /dev/null +++ b/src/infra/provider-usage.fetch.deepseek.ts @@ -0,0 +1,17 @@ +import type { ProviderUsageSnapshot } from "./provider-usage.types.js"; + +export async function fetchDeepSeekUsage( + _token: string, + _timeoutMs: number, + _fetchFn: typeof fetch, +): Promise { + // DeepSeek API currently does not provide a standard usage/subscription endpoint + // that matches the OpenAI format or similar. + // We return a placeholder to satisfy the interface. + return { + provider: "deepseek", + displayName: "DeepSeek", + windows: [], + // error: "Usage API not supported", // Optional: hide error if we don't want it to show up as failed + }; +} diff --git a/src/infra/provider-usage.fetch.ts b/src/infra/provider-usage.fetch.ts index 070396554..a96393265 100644 --- a/src/infra/provider-usage.fetch.ts +++ b/src/infra/provider-usage.fetch.ts @@ -4,4 +4,5 @@ export { fetchCodexUsage } from "./provider-usage.fetch.codex.js"; export { fetchCopilotUsage } from "./provider-usage.fetch.copilot.js"; export { fetchGeminiUsage } from "./provider-usage.fetch.gemini.js"; export { fetchMinimaxUsage } from "./provider-usage.fetch.minimax.js"; +export { fetchDeepSeekUsage } from "./provider-usage.fetch.deepseek.js"; export { fetchZaiUsage } from "./provider-usage.fetch.zai.js"; diff --git a/src/infra/provider-usage.load.ts b/src/infra/provider-usage.load.ts index 39a97a86c..d4b828b4c 100644 --- a/src/infra/provider-usage.load.ts +++ b/src/infra/provider-usage.load.ts @@ -4,6 +4,7 @@ import { fetchClaudeUsage, fetchCodexUsage, fetchCopilotUsage, + fetchDeepSeekUsage, fetchGeminiUsage, fetchMinimaxUsage, fetchZaiUsage, @@ -66,6 +67,8 @@ export async function loadProviderUsageSummary( return await fetchCodexUsage(auth.token, auth.accountId, timeoutMs, fetchFn); case "minimax": return await fetchMinimaxUsage(auth.token, timeoutMs, fetchFn); + case "deepseek": + return await fetchDeepSeekUsage(auth.token, timeoutMs, fetchFn); case "zai": return await fetchZaiUsage(auth.token, timeoutMs, fetchFn); default: diff --git a/src/infra/provider-usage.shared.ts b/src/infra/provider-usage.shared.ts index 6c8c1d9bb..1aa4f7a3a 100644 --- a/src/infra/provider-usage.shared.ts +++ b/src/infra/provider-usage.shared.ts @@ -9,6 +9,7 @@ export const PROVIDER_LABELS: Record = { "google-gemini-cli": "Gemini", "google-antigravity": "Antigravity", minimax: "MiniMax", + deepseek: "DeepSeek", "openai-codex": "Codex", zai: "z.ai", }; @@ -19,6 +20,7 @@ export const usageProviders: UsageProviderId[] = [ "google-gemini-cli", "google-antigravity", "minimax", + "deepseek", "openai-codex", "zai", ]; diff --git a/src/infra/provider-usage.types.ts b/src/infra/provider-usage.types.ts index cef446ceb..169439f7e 100644 --- a/src/infra/provider-usage.types.ts +++ b/src/infra/provider-usage.types.ts @@ -23,5 +23,6 @@ export type UsageProviderId = | "google-gemini-cli" | "google-antigravity" | "minimax" + | "deepseek" | "openai-codex" | "zai"; diff --git a/task_plan.md b/task_plan.md new file mode 100644 index 000000000..d9db5f78f --- /dev/null +++ b/task_plan.md @@ -0,0 +1,13 @@ +# Task Plan: Enable DeepSeek in Onboarding + +## Goal +Verify and enable DeepSeek provider support in the `moltbot onboard` command. + +## Phases +- [ ] Discovery: Analyze `moltbot onboard` implementation to see how providers are listed. +- [ ] Implementation: Add DeepSeek to the onboarding provider list if missing. +- [ ] Verification: Verify the changes. + +## Current Status +- Phase: Discovery +- Status: Pending From 0f56c7086df48fb6efa47ac2b6e50b226d5a295c Mon Sep 17 00:00:00 2001 From: "10946620@163.com" <> Date: Fri, 30 Jan 2026 14:13:20 +0800 Subject: [PATCH 2/2] reset --- task_plan.md | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 task_plan.md diff --git a/task_plan.md b/task_plan.md deleted file mode 100644 index d9db5f78f..000000000 --- a/task_plan.md +++ /dev/null @@ -1,13 +0,0 @@ -# Task Plan: Enable DeepSeek in Onboarding - -## Goal -Verify and enable DeepSeek provider support in the `moltbot onboard` command. - -## Phases -- [ ] Discovery: Analyze `moltbot onboard` implementation to see how providers are listed. -- [ ] Implementation: Add DeepSeek to the onboarding provider list if missing. -- [ ] Verification: Verify the changes. - -## Current Status -- Phase: Discovery -- Status: Pending