Skip to content

Commit 3304814

Browse files
author
liyongjie.103
committed
test(anthropic): cover capitalized/dotted Claude ids in thinking wire-shape matrix
Regression for the family parser fix: Claude-Opus-4.8-joybuilder and claude-opus-4.8-joybuilder must pick the adaptive wire shape, while Claude-Opus-4.6-joybuilder (below the adaptive threshold) must stay on the legacy thinking.enabled shape.
1 parent 85e4a82 commit 3304814

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎tests/anthropic-reasoning.test.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ describe("anthropic extended-thinking gate", () => {
5757
"claude-opus-4-7",
5858
"claude-opus-4-8",
5959
"claude-opus-4-8[1m]",
60+
// Vendor ids may be capitalized and/or use a dotted minor; the family parser must
61+
// still classify them as adaptive or the legacy thinking.enabled wire shape goes
62+
// out to a model that rejects it with a 400 (Bedrock ValidationException).
63+
"Claude-Opus-4.8-joybuilder",
64+
"claude-opus-4.8-joybuilder",
6065
])("adaptive-thinking model %s sends thinking.adaptive + output_config.effort", async (modelId) => {
6166
const b = await bodyOf(parsed("xhigh", { temperature: 0.3, topP: 0.9 }, modelId));
6267
expect(b.thinking).toEqual({ type: "adaptive" });
@@ -275,6 +280,9 @@ describe("anthropic extended-thinking gate", () => {
275280
"claude-sonnet-4-5",
276281
"claude-opus-4-6",
277282
"claude-opus-4-20250514",
283+
// Capitalized/dotted ids below the adaptive threshold must stay on the legacy
284+
// wire shape (guard against over-broad family parsing).
285+
"Claude-Opus-4.6-joybuilder",
278286
])("budget-thinking model %s keeps thinking.enabled with budget_tokens", async (modelId) => {
279287
const b = await bodyOf(parsed("high", {}, modelId));
280288
const thinking = b.thinking as { type: string; budget_tokens: number } | undefined;

0 commit comments

Comments
 (0)