Skip to content

feat(provider): add deepseek provider for the DeepSeek pay-per-use API #134

Description

@ferminquant

Feature request: add deepseek provider for the DeepSeek pay-per-use API

Summary

Add a new clawpatch provider named deepseek that calls the DeepSeek
OpenAI-compatible chat completions endpoint directly via fetch(). This
unblocks clawpatch users who have a DeepSeek API key (pay-per-use billing at
https://platform.deepseek.com) when their default provider (codex) is
unavailable or rate-limited, or when they prefer to use DeepSeek for reviews.

Motivation

  • The current codex default requires a local Codex CLI. Users who do
    not have Codex installed or authenticated have to fall back to acpx
    (which routes through openclaw) or to one of the other local CLI
    providers.
  • DeepSeek exposes an OpenAI-compatible chat completions API at
    https://api.deepseek.com/v1/chat/completions on pay-per-use billing
    (no subscription, top up at https://platform.deepseek.com). This is a
    clean fit for clawpatch's per-call provider contract.
  • clawpatch today supports 10 providers (codex, acpx, claude, cursor,
    grok, minimax, opencode, pi, mock, mock-fail). Adding
    deepseek covers a different distribution and is a real maintenance
    burden shared with maintainers.

Surface

Operation Supported
map yes
review yes
revalidate yes
fix no (chat-completions API has no filesystem access; mirrors minimax contract)
doctor (check) yes

Configuration

Env var Required Default Purpose
DEEPSEEK_API_KEY yes Pay-per-use API key from https://platform.deepseek.com
DEEPSEEK_BASE_URL no https://api.deepseek.com/v1 Override the endpoint
DEEPSEEK_MODEL no deepseek-v4-flash Default model
CLAWPATCH_DEEPSEEK_TIMEOUT_MS no 300000 Per-call timeout
CLAWPATCH_PROVIDER_TIMEOUT_MS no 300000 Fallback timeout

Endpoints

  • POST /chat/completions — review, revalidate, map
  • GET /models — connectivity check (used by check())

Live usage

A locally-patched implementation on the author's machine (not in the
upstream tarball) has been running against the real
https://api.deepseek.com/v1/chat/completions endpoint for ~7 days across
100+ features reviewed in ferminquant/budget, completing in 50–85s per
feature. A TypeScript port mirroring the merged minimax provider shape is
planned as a follow-up PR.

Labels

  • enhancement — new feature
  • help wanted — community contribution welcome
  • impact:auth-provider — touches the auth/credentials surface
  • documentation — README provider list + docs/providers.md need updates

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerThis issue is about auth, provider routing, model choice, or SecretRef resolution.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions