mirror of
https://github.com/Alishahryar1/free-claude-code.git
synced 2026-04-28 11:30:03 +00:00
feat: deepseek api support (#118)
## Summary * add native DeepSeek provider support via the shared OpenAI-compatible provider base * allow `deepseek/...` model prefixes in config validation * add `DEEPSEEK_API_KEY` and `DEEPSEEK_BASE_URL` settings * add DeepSeek entries to `.env.example` and `config/env.example` * implement `DeepSeekProvider` and register it in provider dependencies * add a DeepSeek request builder with DeepSeek-specific thinking payload handling * preserve Anthropic thinking blocks as `reasoning_content` for DeepSeek-compatible continuation flows * update `claude-pick` to discover DeepSeek models from the DeepSeek API * document DeepSeek usage in `README.md` * add tests for config validation, provider dependency wiring, request building, and streaming behavior ## Motivation DeepSeek exposes an OpenAI-compatible API and can be used directly without routing through OpenRouter. This lets users spend their existing DeepSeek balance through the proxy while keeping the same Claude Code workflow and per-model provider mapping. ## Example ```dotenv DEEPSEEK_API_KEY="sk-..." DEEPSEEK_BASE_URL="https://api.deepseek.com" MODEL_OPUS="deepseek/deepseek-reasoner" MODEL_SONNET="deepseek/deepseek-chat" MODEL_HAIKU="deepseek/deepseek-chat" MODEL="deepseek/deepseek-chat" --------- Co-authored-by: Alishahryar1 <alishahryar2@gmail.com>
This commit is contained in:
parent
c3f6dbe0bc
commit
e719e4aed2
13 changed files with 410 additions and 14 deletions
|
|
@ -6,13 +6,17 @@ NVIDIA_NIM_API_KEY=""
|
|||
OPENROUTER_API_KEY=""
|
||||
|
||||
|
||||
# DeepSeek Config
|
||||
DEEPSEEK_API_KEY=""
|
||||
|
||||
|
||||
# LM Studio Config (local provider, no API key required)
|
||||
LM_STUDIO_BASE_URL="http://localhost:1234/v1"
|
||||
|
||||
|
||||
# All Claude model requests are mapped to these models, plain model is fallback
|
||||
# Format: provider_type/model/name
|
||||
# Valid providers: "nvidia_nim" | "open_router" | "lmstudio"
|
||||
# Valid providers: "nvidia_nim" | "open_router" | "deepseek" | "lmstudio" | "llamacpp"
|
||||
MODEL_OPUS="nvidia_nim/z-ai/glm4.7"
|
||||
MODEL_SONNET="open_router/arcee-ai/trinity-large-preview:free"
|
||||
MODEL_HAIKU="open_router/stepfun/step-3.5-flash:free"
|
||||
|
|
@ -68,4 +72,4 @@ FAST_PREFIX_DETECTION=true
|
|||
ENABLE_NETWORK_PROBE_MOCK=true
|
||||
ENABLE_TITLE_GENERATION_SKIP=true
|
||||
ENABLE_SUGGESTION_MODE_SKIP=true
|
||||
ENABLE_FILEPATH_EXTRACTION_MOCK=true
|
||||
ENABLE_FILEPATH_EXTRACTION_MOCK=true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue