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
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
import type { RegistryEntry } from "../../shared.ts";
import { ANTHROPIC_BETA_API_KEY, ANTHROPIC_VERSION_HEADER } from "../../shared.ts";
export const anthropicProvider: RegistryEntry = {
id: "anthropic",
alias: "anthropic",
format: "claude",
executor: "default",
baseUrl: "https://api.anthropic.com/v1/messages",
urlSuffix: "?beta=true",
authType: "apikey",
authHeader: "x-api-key",
defaultContextLength: 200000,
headers: {
"Anthropic-Version": ANTHROPIC_VERSION_HEADER,
"Anthropic-Beta": ANTHROPIC_BETA_API_KEY,
},
models: [
{
id: "claude-fable-5-1",
name: "Claude Fable 5.1",
contextLength: 1000000,
maxOutputTokens: 128000,
supportsReasoning: true,
supportedThinkingEfforts: ["low", "medium", "high", "xhigh", "max"],
supportsXHighEffort: true,
supportsVision: true,
unsupportedParams: ["temperature", "top_p", "top_k"],
},
{
id: "claude-fable-5",
name: "Claude Fable 5",
contextLength: 1048576,
supportsReasoning: true,
supportedThinkingEfforts: ["low", "medium", "high", "xhigh", "max"],
supportsXHighEffort: true,
unsupportedParams: ["temperature", "top_p", "top_k"],
},
{
id: "claude-opus-5-5",
name: "Claude Opus 5.5",
contextLength: 1000000,
maxOutputTokens: 128000,
supportsReasoning: true,
supportedThinkingEfforts: ["low", "medium", "high", "xhigh", "max"],
supportsXHighEffort: true,
supportsVision: true,
unsupportedParams: ["temperature", "top_p", "top_k"],
},
{
id: "claude-opus-5",
name: "Claude Opus 5",
contextLength: 1000000,
maxOutputTokens: 128000,
supportsXHighEffort: true,
supportsReasoning: true,
supportedThinkingEfforts: ["low", "medium", "high", "xhigh", "max"],
unsupportedParams: ["temperature", "top_p", "top_k"],
},
{
id: "claude-opus-4.7",
name: "Claude Opus 4.7",
// Opus 4.7+ rejects non-default temperature/top_p/top_k with a 400 (sampling fixed;
// reasoning via output_config.effort). Mirrors the dashed `claude` registry ids.
supportsReasoning: true,
supportedThinkingEfforts: ["low", "medium", "high", "xhigh", "max"],
supportsXHighEffort: true,
unsupportedParams: ["temperature", "top_p", "top_k"],
},
{
id: "claude-opus-4.8",
name: "Claude Opus 4.8",
contextLength: 1048576,
// Opus 4.7+ (incl. 4.8, Fable 5) reject non-default sampling with a 400. Mirrors claude-opus-4.7.
supportsReasoning: true,
supportedThinkingEfforts: ["low", "medium", "high", "xhigh", "max"],
supportsXHighEffort: true,
unsupportedParams: ["temperature", "top_p", "top_k"],
},
{
id: "claude-opus-4.6",
name: "Claude Opus 4.6",
supportsReasoning: true,
supportedThinkingEfforts: ["low", "medium", "high", "max"],
},
{
id: "claude-opus-4.5",
name: "Claude Opus 4.5",
supportsReasoning: true,
supportedThinkingEfforts: ["low", "medium", "high"],
},
{
id: "claude-sonnet-5",
name: "Claude Sonnet 5",
contextLength: 1048576,
// Sonnet 5 rejects non-default sampling params with a 400 (adaptive-only).
unsupportedParams: ["temperature", "top_p", "top_k"],
},
{
id: "claude-sonnet-5-5",
name: "Claude Sonnet 5.5",
contextLength: 1048576,
supportedThinkingEfforts: ["low", "medium", "high", "xhigh"],
unsupportedParams: ["temperature", "top_p", "top_k"],
},
{ id: "claude-sonnet-4.6", name: "Claude Sonnet 4.6" },
{ id: "claude-sonnet-4.5", name: "Claude Sonnet 4.5" },
{ id: "claude-haiku-4.5", name: "Claude Haiku 4.5" },
],
};