- 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
66 lines
2.9 KiB
JavaScript
66 lines
2.9 KiB
JavaScript
import { describe, expect, it } from "vitest";
|
|
import { getCapabilitiesForModel } from "../../open-sse/providers/capabilities.js";
|
|
|
|
describe("getCapabilitiesForModel", () => {
|
|
const claudeSonnet5Expected = {
|
|
contextWindow: 1000000,
|
|
maxOutput: 128000,
|
|
thinkingFormat: "claude-adaptive",
|
|
reasoning: true,
|
|
vision: true,
|
|
search: true,
|
|
};
|
|
|
|
const kiroGpt56Expected = {
|
|
contextWindow: 272000,
|
|
maxOutput: 128000,
|
|
thinkingFormat: "openai",
|
|
reasoning: true,
|
|
vision: true,
|
|
search: true,
|
|
};
|
|
|
|
it("reports Kiro Claude Opus 5 variants as 1M adaptive-thinking models", () => {
|
|
for (const model of [
|
|
"claude-opus-5",
|
|
"anthropic/claude-opus-5",
|
|
"claude-opus-5-thinking",
|
|
"claude-opus-5-agentic",
|
|
"claude-opus-5-thinking-agentic",
|
|
]) {
|
|
expect(getCapabilitiesForModel("kiro", model)).toMatchObject(claudeSonnet5Expected);
|
|
}
|
|
});
|
|
|
|
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);
|
|
expect(getCapabilitiesForModel("kiro", "claude-opus-4-8").contextWindow).toBe(1000000);
|
|
expect(getCapabilitiesForModel("kiro", "claude-opus-4.8-thinking").contextWindow).toBe(1000000);
|
|
expect(getCapabilitiesForModel("kiro", "claude-opus-4-8-thinking").contextWindow).toBe(1000000);
|
|
});
|
|
|
|
it("reports Kiro Claude Sonnet 5 as a 1M adaptive-thinking model", () => {
|
|
expect(getCapabilitiesForModel("kiro", "claude-sonnet-5")).toMatchObject(claudeSonnet5Expected);
|
|
expect(getCapabilitiesForModel("kiro", "anthropic/claude-sonnet-5")).toMatchObject(claudeSonnet5Expected);
|
|
expect(getCapabilitiesForModel("kiro", "claude-sonnet-5-thinking")).toMatchObject(claudeSonnet5Expected);
|
|
expect(getCapabilitiesForModel("kiro", "claude-sonnet-5-agentic")).toMatchObject(claudeSonnet5Expected);
|
|
expect(getCapabilitiesForModel("kiro", "claude-sonnet-5-thinking-agentic")).toMatchObject(claudeSonnet5Expected);
|
|
});
|
|
|
|
it("reports Kiro GPT 5.6 models with the Kiro 272k context window", () => {
|
|
expect(getCapabilitiesForModel("kiro", "gpt-5.6-sol")).toMatchObject(kiroGpt56Expected);
|
|
expect(getCapabilitiesForModel("kiro", "openai/gpt-5.6-sol")).toMatchObject(kiroGpt56Expected);
|
|
expect(getCapabilitiesForModel("kiro", "gpt-5.6-terra-thinking")).toMatchObject(kiroGpt56Expected);
|
|
expect(getCapabilitiesForModel("kiro", "gpt-5.6-luna-agentic")).toMatchObject(kiroGpt56Expected);
|
|
expect(getCapabilitiesForModel("kiro", "gpt-5.6-sol-thinking-agentic")).toMatchObject(kiroGpt56Expected);
|
|
});
|
|
});
|