A self-improving RLM agent for coding workflows and long-running autonomous tasks.
Rust
fix: treat claude opus 5.5 as always-on adaptive thinking (#2533)
kt1e2cc2278431
diff --git a/packages/ai/.changes/opus-5-5-always-on-adaptive.md b/packages/ai/.changes/opus-5-5-always-on-adaptive.mdnew file mode 100644index 0000000000..e63d7e3bf3--- /dev/null+++ b/packages/ai/.changes/opus-5-5-always-on-adaptive.md@@ -0,0 +1,2 @@+- Claude Opus 5.5 is always-on adaptive like the Fable/Mythos models: it rejects `thinking: {type: "disabled"}` and non-default sampling params with a 400, so the Anthropic and Bedrock providers stop sending both and the thinking-payload tests cover the release id.+- The model rows themselves ship from the prime-agent-catalog repo (add model: claude-opus-5-5, gpt-6-sol, gpt-6-luna); no compiled-catalog regen is needed.diff --git a/packages/ai/src/providers/amazon-bedrock.ts b/packages/ai/src/providers/amazon-bedrock.tsindex 455836a8c8..c6c14245db 100644--- a/packages/ai/src/providers/amazon-bedrock.ts+++ b/packages/ai/src/providers/amazon-bedrock.ts@@ -508,11 +508,19 @@ function supportsAdaptiveThinking(modelId: string, modelName?: string): boolean}/**- * Fable/Mythos models think every turn and reject sampling params with a 400.+ * Fable/Mythos models — and Claude Opus 5.5 — think every turn and reject+ * sampling params with a 400.*/function supportsAlwaysOnAdaptiveThinking(modelId: string, modelName?: string): boolean {const candidates = getModelMatchCandidates(modelId, modelName);- return candidates.some((s) => s.includes("fable-5") || s.includes("mythos-5") || s.includes("mythos-preview"));+ return candidates.some(+ (s) =>+ s.includes("fable-5") ||+ s.includes("mythos-5") ||+ s.includes("mythos-preview") ||+ s.includes("opus-5-5") ||+ s.includes("opus-5.5"),+ );}function mapThinkingLevelToEffort(diff --git a/packages/ai/src/providers/anthropic.ts b/packages/ai/src/providers/anthropic.tsindex 0be96d24ec..270a43da18 100644--- a/packages/ai/src/providers/anthropic.ts+++ b/packages/ai/src/providers/anthropic.ts@@ -748,11 +748,17 @@ export const streamAnthropic: StreamFunction<"anthropic-messages", AnthropicOpti};/**- * Fable/Mythos models think every turn and reject an explicit- * `thinking: {type: "disabled"}` (and any sampling params) with a 400.+ * Fable/Mythos models — and Claude Opus 5.5 — think every turn and reject an+ * explicit `thinking: {type: "disabled"}` (and any sampling params) with a 400.*/function isAlwaysOnAdaptiveThinkingModel(modelId: string): boolean {- return modelId.includes("fable-5") || modelId.includes("mythos-5") || modelId.includes("mythos-preview");+ return (+ modelId.includes("fable-5") ||+ modelId.includes("mythos-5") ||+ modelId.includes("mythos-preview") ||+ modelId.includes("opus-5-5") ||+ modelId.includes("opus-5.5")+ );}/**diff --git a/packages/ai/test/anthropic-thinking-disable.test.ts b/packages/ai/test/anthropic-thinking-disable.test.tsindex 298e3ce9c5..a5b226bf85 100644--- a/packages/ai/test/anthropic-thinking-disable.test.ts+++ b/packages/ai/test/anthropic-thinking-disable.test.ts@@ -150,6 +150,18 @@ describe("Anthropic thinking disable payload", () => {expect(payload.thinking).toEqual({ type: "adaptive", display: "summarized" });expect(payload.output_config).toEqual({ effort: "max" });});++ // Claude Opus 5.5 ships through the remote catalog (the compiled snapshot+ // does not carry the id), so this uses the release id over the Opus 5+ // surface: it rejects thinking disabled and sampling params with a 400.+ it("omits thinking disabled and temperature for Claude Opus 5.5", async () => {+ const opus55: Model<"anthropic-messages"> = { ...getModel("anthropic", "claude-opus-5"), id: "claude-opus-5-5" };+ const payload = await capturePayload(opus55, { temperature: 0.5 });+ expect(payload.thinking).toBeUndefined();+ expect(payload.temperature).toBeUndefined();+ const adaptive = await capturePayload(opus55, { reasoning: "xhigh" });+ expect(adaptive.output_config).toEqual({ effort: "xhigh" });+ });});interface CapturedRequest {