Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

1.7 KB
Raw Blame
import { getAnthropicCompatHeaders, type RegistryEntry } from "../../shared.ts";

export const deepseekProvider: RegistryEntry = {
  id: "deepseek",
  alias: "ds",
  format: "openai",
  executor: "default",
  baseUrl: "https://api.deepseek.com/chat/completions",
  authType: "apikey",
  defaultContextLength: 1_000_000,
  authHeader: "bearer",
  alternateFormats: [
    {
      format: "openai-responses",
      baseUrl: "https://api.deepseek.com/responses",
      authHeader: "bearer",
      label: "Responses-compatible",
    },
    {
      format: "claude",
      baseUrl: "https://api.deepseek.com/anthropic/v1/messages",
      authHeader: "x-api-key",
      headers: getAnthropicCompatHeaders(),
      label: "Anthropic-compatible",
    },
  ],
  models: [
    {
      id: "deepseek-v4-pro",
      name: "DeepSeek V4 Pro (0813)",
      contextLength: 1_000_000,
      maxOutputTokens: 384_000,
      supportsReasoning: true,
      supportedThinkingEfforts: ["none", "low", "high", "max"],
      toolCalling: true,
    },
    {
      id: "deepseek-v4-flash",
      name: "DeepSeek V4 Flash (0731)",
      contextLength: 1_000_000,
      maxOutputTokens: 384_000,
      supportsReasoning: true,
      supportedThinkingEfforts: ["none", "low", "high", "max"],
      toolCalling: true,
      // Flash reads images on the official API; v4-pro stays text-only.
      supportsVision: true,
    },
    {
      id: "deepseek-flash",
      name: "DeepSeek V4.1 Flash",
      contextLength: 1_000_000,
      maxOutputTokens: 384_000,
      supportsReasoning: true,
      supportedThinkingEfforts: ["none", "low", "high", "max"],
      toolCalling: true,
      supportsVision: true,
    },
  ],
};