{"record":{"id":"9632a266b98e7c2f","repo":"browser-use/browser-use","slug":"self-model-only-supports-adaptive-thinking-omit","errorCode":null,"errorMessage":"{self.model} only supports adaptive thinking. Omit thinking or use adaptive display options such as {\"type\": \"adaptive\", \"display\": \"summarized\"}.","messagePattern":"(.+?) only supports adaptive thinking\\. Omit thinking or use adaptive display options such as (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"browser_use/llm/anthropic/chat.py","lineNumber":110,"sourceCode":"\tdef _is_adaptive_thinking_only_model(self) -> bool:\n\t\tmodel = self.name.lower()\n\t\treturn 'claude-fable-5' in model or 'claude-mythos-5' in model\n\n\tdef _requires_auto_tool_choice(self) -> bool:\n\t\tmodel = self.name.lower()\n\t\tif 'claude-fable-5' in model or 'claude-mythos-5' in model:\n\t\t\treturn True\n\t\tif self.thinking is None:\n\t\t\treturn False\n\t\treturn self.thinking.get('type') != 'disabled'\n\n\tdef _validate_thinking_config(self) -> None:\n\t\tif not self.thinking or not self._is_adaptive_thinking_only_model():\n\t\t\treturn\n\n\t\tthinking_type = self.thinking.get('type')\n\t\tif thinking_type in {'enabled', 'disabled'} or 'budget_tokens' in self.thinking:\n\t\t\traise ValueError(\n\t\t\t\tf'{self.model} only supports adaptive thinking. Omit thinking or use adaptive display options such as '\n\t\t\t\t'{\"type\": \"adaptive\", \"display\": \"summarized\"}.'\n\t\t\t)\n\n\tdef _get_betas_for_invoke(self) -> list[str] | None:\n\t\tbetas = self.betas\n\n\t\tif self.fallbacks is None:\n\t\t\treturn betas\n\n\t\tbetas = list(betas or [])\n\t\tif not any(beta.startswith('server-side-fallback-') for beta in betas):\n\t\t\tbetas.append('server-side-fallback-2026-06-01')\n\t\treturn betas\n\n\tdef _get_extra_body_for_invoke(self) -> dict[str, Any] | None:\n\t\textra_body: dict[str, Any] = {}\n","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/browser-use/browser-use/blob/6c73fced2f6d45a11d88622fe56365a5fe18f28b/browser_use/llm/anthropic/chat.py#L92-L128","documentation":"Raised by ChatAnthropic._validate_thinking_config when the model is an adaptive-thinking-only model (per _is_adaptive_thinking_only_model, e.g. claude-fable-5 / claude-mythos-5 families) but the thinking dict uses the legacy extended-thinking API: type 'enabled'/'disabled' or a budget_tokens key. Those models accept only the adaptive form (or omitting thinking entirely), so the old config shape is rejected at construction/validation time.","triggerScenarios":"ChatAnthropic(model='claude-fable-5-...', thinking={'type': 'enabled', 'budget_tokens': 4096}); reusing a config written for claude-sonnet/opus extended thinking on a newer adaptive-only model.","commonSituations":"Upgrading to a new Claude model generation while keeping the old thinking payload; copying sample code that sets budget_tokens; enabling thinking unconditionally across a fleet of mixed models.","solutions":["Omit the thinking parameter entirely for these models","Or use the adaptive form: thinking={'type': 'adaptive', 'display': 'summarized'}","Keep per-model configs instead of one shared thinking dict across model generations"],"exampleFix":"# before\nllm = ChatAnthropic(model='claude-fable-5-sonnet',\n                    thinking={'type': 'enabled', 'budget_tokens': 4096})\n\n# after\nllm = ChatAnthropic(model='claude-fable-5-sonnet',\n                    thinking={'type': 'adaptive', 'display': 'summarized'})","handlingStrategy":"validation","validationCode":"ADAPTIVE_ONLY = ('claude-fable-5', 'claude-mythos-5')\n\ndef validate_thinking(model: str, thinking: dict | None) -> None:\n    if thinking and any(m in model for m in ADAPTIVE_ONLY):\n        assert thinking.get('type') not in ('enabled', 'disabled') and 'budget_tokens' not in thinking, \\\n            'use {\"type\": \"adaptive\", ...} or omit thinking for this model'","typeGuard":"def is_adaptive_only_model(model: str) -> bool:\n    return 'claude-fable-5' in model or 'claude-mythos-5' in model","tryCatchPattern":"try:\n    llm = ChatAnthropic(model=model, thinking=thinking_cfg)\nexcept ValueError as e:\n    if 'adaptive thinking' in str(e):\n        llm = ChatAnthropic(model=model)  # retry without thinking\n    else:\n        raise","preventionTips":["Per-model config files instead of one shared thinking dict","When adopting a new Claude generation, re-check the thinking API shape","Default to omitting thinking unless a model explicitly needs it"],"tags":["llm","anthropic","thinking","configuration"],"backgroundTag":null,"analyzedSha":"6c73fced2f6d45a11d88622fe56365a5fe18f28b","analyzedAt":"2026-08-14T19:42:40.557Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}