## Features - **Xiaomi MiMo**: merge MiMo Desktop support into `xiaomi-mimo` with dual auth (API key + Desktop/OAuth session), Preview models support, and encrypted-callback OAuth flow - **Claude Code**: add 1M-context toggle (`[1m]` marker) and drive `CLAUDE_CODE_AUTO_COMPACT_WINDOW` directly from the dashboard - **Models**: add DeepSeek-V4.1-Flash to DeepSeek provider, CodeBuddy-Intl, and Ollama (`deepseek-v4.1-flash:cloud`); enable `low`..`max` reasoning effort levels and vision capability for DeepSeek-V4.* - **i18n**: integrate Persian (fa) translation ## Fixes - **OpenCode / OpenCode Go**: resolve 403 `FreeTierError` and 429 rate limits with canonical session format, valid User-Agent, and stable upstream session reuse; force stream and declare `forceStream` for free-tier SSE aggregation; cloak decoy tools, normalize Muse Free tool choice, and strip prior reasoning items on Responses models; route Union Alpha via Messages API - **Kiro**: preserve underscores in tool names (`mcp__server__tool`) and restore client tool names in responses; use neutral placeholder for tool-result-only turns; forward tool-result images - **Stream**: report aborts after HTTP 200 in-band (per-format error frames) instead of closing silently - **Command Code**: preserve images and `reasoning_effort` on `/alpha/generate`; retry transient stream errors and avoid fake stop chunks; add Quota Tracker support - **Zed**: harden OAuth lifecycle (preserve `systemId`, renew proxy timeout), support live model resolution, and lower display priority in OAuth list - **Antigravity**: scope cached thought signatures to model family; strip Claude Code billing headers from system prompts; sanitize Hermes system identity - **Codex**: route bare `codex-auto-review` requests to the Codex provider (#4135) - **Auth**: do not cool down an account for request-scoped 4xx errors - **Usage**: improve DeepSeek credit balance display as currency credit instead of 0/total quota bar - **Model Catalog**: scope synced catalog to gateways and declare vision capabilities for DeepSeek V4.1-Flash IDs
73 lines
2.6 KiB
JavaScript
73 lines
2.6 KiB
JavaScript
import { CLAUDE_API_HEADERS } from "../shared.js";
|
|
|
|
export default {
|
|
id: "deepseek",
|
|
priority: 110,
|
|
alias: "deepseek",
|
|
aliases: [
|
|
"ds",
|
|
],
|
|
uiAlias: "ds",
|
|
display: {
|
|
name: "DeepSeek",
|
|
icon: "bolt",
|
|
color: "#4D6BFE",
|
|
textIcon: "DS",
|
|
website: "https://deepseek.com",
|
|
notice: {
|
|
apiKeyUrl: "https://platform.deepseek.com/api_keys",
|
|
},
|
|
},
|
|
category: "apikey",
|
|
transport: {
|
|
baseUrl: "https://api.deepseek.com/chat/completions",
|
|
validateUrl: "https://api.deepseek.com/models",
|
|
reasoningInject: {
|
|
scope: "all",
|
|
},
|
|
quirks: {
|
|
// DeepSeek's Anthropic-compatible endpoint
|
|
// (https://api.deepseek.com/anthropic/v1/messages) accepts ONLY the
|
|
// built-in web_search_* tools and rejects client-defined `custom` tools
|
|
// (MCP / Read / Bash / etc.) with HTTP 400
|
|
// "tools[0]: unknown variant `custom`, expected
|
|
// `web_search_20250305` or `web_search_20260209`".
|
|
//
|
|
// Declaring this whitelist makes prepareClaudeRequest() forward only
|
|
// web_search_* tools and strip everything else before sending, so MCP /
|
|
// function tools are dropped instead of failing the whole request.
|
|
// DeepSeek's OpenAI-compatible transport is unaffected (targetFormat
|
|
// there is "openai", not "claude", so prepareClaudeRequest is not run).
|
|
claudeSupportedToolTypes: ["web_search_20250305", "web_search_20260209"],
|
|
},
|
|
},
|
|
// Multi-endpoint: pick the transport matching client sourceFormat to skip translation.
|
|
transports: [
|
|
{
|
|
format: "openai",
|
|
baseUrl: "https://api.deepseek.com/chat/completions",
|
|
auth: { combined: true, header: "Authorization", scheme: "bearer" },
|
|
},
|
|
{
|
|
format: "claude",
|
|
baseUrl: "https://api.deepseek.com/anthropic/v1/messages",
|
|
headers: { ...CLAUDE_API_HEADERS },
|
|
auth: { combined: true, header: "x-api-key", scheme: "raw" },
|
|
},
|
|
],
|
|
models: [
|
|
{ id: "deepseek-v4-pro", name: "DeepSeek V4 Pro" },
|
|
{ id: "deepseek-v4-pro-max", name: "DeepSeek V4 Pro Max", upstreamModelId: "deepseek-v4-pro" },
|
|
{ id: "deepseek-v4-pro-none", name: "DeepSeek V4 Pro No Thinking", upstreamModelId: "deepseek-v4-pro" },
|
|
{ id: "deepseek-v4.1-flash", name: "DeepSeek V4.1 Flash" },
|
|
{ id: "deepseek-v4-flash", name: "DeepSeek V4 Flash" },
|
|
{ id: "deepseek-v4-flash-vision-exp", name: "DeepSeek V4 Flash Vision (Exp)" },
|
|
{ id: "deepseek-chat", name: "DeepSeek V3.2 Chat" },
|
|
{ id: "deepseek-reasoner", name: "DeepSeek V3.2 Reasoner" },
|
|
],
|
|
features: {
|
|
usage: true,
|
|
usageApikey: true,
|
|
},
|
|
};
|