Update Claude Opus and GPT thinking metadata

This commit is contained in:
Mario Zechner
2026-05-28 21:51:40 +02:00
parent ae50dec121
commit bfa3d1fa60
15 changed files with 306 additions and 61 deletions

View File

@@ -125,22 +125,22 @@ describe("Anthropic thinking disable payload", () => {
expect(payload.output_config).toBeUndefined();
});
it("sends thinking.type=disabled for Claude Opus 4.7 when thinking is off", async () => {
const payload = await capturePayload(getModel("anthropic", "claude-opus-4-7"));
it("sends thinking.type=disabled for Claude Opus 4.8 when thinking is off", async () => {
const payload = await capturePayload(getModel("anthropic", "claude-opus-4-8"));
expect(payload.thinking).toEqual({ type: "disabled" });
expect(payload.output_config).toBeUndefined();
});
it("uses adaptive thinking for Claude Opus 4.7 when reasoning is enabled", async () => {
const payload = await capturePayload(getModel("anthropic", "claude-opus-4-7"), { reasoning: "high" });
it("uses adaptive thinking for Claude Opus 4.8 when reasoning is enabled", async () => {
const payload = await capturePayload(getModel("anthropic", "claude-opus-4-8"), { reasoning: "high" });
expect(payload.thinking).toEqual({ type: "adaptive", display: "summarized" });
expect(payload.output_config).toEqual({ effort: "high" });
});
it("maps xhigh reasoning to effort=xhigh for Claude Opus 4.7", async () => {
const payload = await capturePayload(getModel("anthropic", "claude-opus-4-7"), { reasoning: "xhigh" });
it("maps xhigh reasoning to effort=xhigh for Claude Opus 4.8", async () => {
const payload = await capturePayload(getModel("anthropic", "claude-opus-4-8"), { reasoning: "xhigh" });
expect(payload.thinking).toEqual({ type: "adaptive", display: "summarized" });
expect(payload.output_config).toEqual({ effort: "xhigh" });