fix(claude): support Fable 5.1
- add claude-fable-5-1 to the Claude Code model catalog (1M context, permanent adaptive thinking) - centralize the spoofed Claude Code version and update both request and billing identities to 2.1.257 (Fable 5.1 rejects < 2.1.251) - send output_config.effort without the redundant thinking switch for permanently adaptive models - add regression coverage for capabilities, headers, billing identity and adaptive-effort payload # Conflicts: # open-sse/providers/registry/claude.js # open-sse/providers/shared.js # open-sse/utils/claudeCloaking.js # tests/__baseline__/providers-baseline.json
This commit is contained in:
@@ -32,6 +32,13 @@ describe("getCapabilitiesForModel", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("reports Claude Fable 5.1 as a permanent adaptive-thinking model", () => {
|
||||
expect(getCapabilitiesForModel("claude", "claude-fable-5-1")).toMatchObject({
|
||||
...claudeSonnet5Expected,
|
||||
thinkingCanDisable: false,
|
||||
});
|
||||
});
|
||||
|
||||
it("reports Kiro Claude Opus 4.8 as a 1M context model", () => {
|
||||
expect(getCapabilitiesForModel("kiro", "claude-opus-4.8").contextWindow).toBe(1000000);
|
||||
expect(getCapabilitiesForModel("kiro", "anthropic/claude-opus-4.8").contextWindow).toBe(1000000);
|
||||
|
||||
@@ -7,9 +7,14 @@
|
||||
*/
|
||||
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { cloakClaudeTools, decloakStreamChunk } from "../../open-sse/utils/claudeCloaking.js";
|
||||
import { applyCloaking, cloakClaudeTools, decloakStreamChunk } from "../../open-sse/utils/claudeCloaking.js";
|
||||
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\./);
|
||||
});
|
||||
|
||||
describe("cloakClaudeTools", () => {
|
||||
const baseBody = {
|
||||
tools: [{ name: "todo_write", description: "write todos", input_schema: { type: "object", properties: {} } }],
|
||||
|
||||
@@ -29,6 +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)");
|
||||
});
|
||||
|
||||
it("includes heavy-agent beta flags for claude-opus-5", () => {
|
||||
|
||||
Reference in New Issue
Block a user