fix(claude): update spoofed cli version to 2.1.280 to support Opus 5.5

Anthropic's newly released Claude Opus 5.5 model strictly requires
claude-cli version 2.1.280 or newer. Spoofing the older 2.1.258
version results in an HTTP 400 `claude_code_version_too_old` error.

This commit updates the hardcoded `CLAUDE_CLI_VERSION` in
`open-sse/providers/shared.js` and aligns the corresponding unit
tests and baselines to bypass Anthropic's version gating.
This commit is contained in:
Ilhom (MBP M5 Pro)
2026-09-23 12:15:34 +07:00
parent e7c269b8c9
commit 8403576095
3 changed files with 3 additions and 3 deletions

View File

@@ -93,7 +93,7 @@
"Anthropic-Version": "2023-06-01",
"Anthropic-Beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,context-management-2025-06-27,prompt-caching-scope-2026-01-05,advanced-tool-use-2025-11-20,effort-2025-11-24,structured-outputs-2025-12-15,fast-mode-2026-02-01,redact-thinking-2026-02-12,token-efficient-tools-2026-03-28",
"Anthropic-Dangerous-Direct-Browser-Access": "true",
"User-Agent": "claude-cli/2.1.258 (external, sdk-cli)",
"User-Agent": "claude-cli/2.1.280 (external, sdk-cli)",
"X-App": "cli",
"X-Stainless-Helper-Method": "stream",
"X-Stainless-Retry-Count": "0",

View File

@@ -12,7 +12,7 @@ import { CLAUDE_TOOL_SUFFIX } from "../../open-sse/config/appConstants.js";
it("advertises a Claude Code version accepted by Fable 5.1", () => {
const body = applyCloaking({ messages: [] }, "sk-ant-oat-test", "session-id");
expect(body.system[0].text).toMatch(/^x-anthropic-billing-header: cc_version=2.1.258\./);
expect(body.system[0].text).toMatch(/^x-anthropic-billing-header: cc_version=2.1.280\./);
});
describe("cloakClaudeTools", () => {

View File

@@ -29,7 +29,7 @@ describe("DefaultExecutor.buildHeaders() — claude provider", () => {
headers["Anthropic-Version"] === "2023-06-01" ||
headers["anthropic-version"] === "2023-06-01";
expect(hasVersion).toBe(true);
expect(headers["User-Agent"]).toBe("claude-cli/2.1.258 (external, sdk-cli)");
expect(headers["User-Agent"]).toBe("claude-cli/2.1.280 (external, sdk-cli)");
});
it("includes heavy-agent beta flags for claude-opus-5", () => {