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
// @ts-nocheck
import assert from "node:assert/strict";
import test from "node:test";
const { FORWARDABLE_CLIENT_BETAS, mergeClientAnthropicBeta } =
await import("../../open-sse/config/anthropicHeaders.ts");
// Captured from @anthropic-ai/[email protected] binary: v("message_threads","message-threads-2026-08-12")
const THREADS_BETA = "message-threads-2026-08-12";
test("#15705 mergeClientAnthropicBeta forwards the client-negotiated message-threads beta", () => {
assert.ok(FORWARDABLE_CLIENT_BETAS.includes(THREADS_BETA));
const merged = mergeClientAnthropicBeta(
"claude-code-20250219",
["claude-code-20250219", "effort-2025-11-24", THREADS_BETA].join(",")
);
assert.ok(merged.split(",").includes(THREADS_BETA), `${THREADS_BETA} must reach upstream`);
});
test("#15705 the beta is not invented when the client did not negotiate it", () => {
const merged = mergeClientAnthropicBeta("claude-code-20250219", "effort-2025-11-24");
assert.ok(!merged.split(",").includes(THREADS_BETA));
});