{"record":{"id":"8b3655d55bf83ed1","repo":"BerriAI/litellm","slug":"invalid-reasoning-effort-reasoning-effort-r-mu","errorCode":null,"errorMessage":"Invalid reasoning_effort: {reasoning_effort!r}. Must be one of: 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'none'","messagePattern":"Invalid reasoning_effort: (.+?)\\. Must be one of: 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'none'","errorType":"http","errorClass":"AnthropicError","httpStatus":400,"severity":"error","filePath":"litellm/llms/anthropic/experimental_pass_through/messages/transformation.py","lineNumber":296,"sourceCode":"        try:\n            mapped_thinking: Final = AnthropicConfig._map_reasoning_effort(\n                reasoning_effort=reasoning_effort,\n                model=model,\n                custom_llm_provider=custom_llm_provider,\n            )\n        except _BadRequestError as e:\n            raise AnthropicError(message=str(e.message), status_code=400)\n\n        if mapped_thinking is None:\n            optional_params.pop(\"thinking\", None)\n            optional_params.pop(\"output_config\", None)\n            return\n\n        optional_params.setdefault(\"thinking\", mapped_thinking)\n        if AnthropicModelInfo._is_adaptive_thinking_model(model, custom_llm_provider):\n            mapped_effort: Final = REASONING_EFFORT_TO_OUTPUT_CONFIG_EFFORT.get(reasoning_effort)\n            if mapped_effort is None:\n                raise AnthropicError(\n                    message=(\n                        f\"Invalid reasoning_effort: {reasoning_effort!r}. \"\n                        f\"Must be one of: 'minimal', 'low', 'medium', 'high', \"\n                        f\"'xhigh', 'max', 'none'\"\n                    ),\n                    status_code=400,\n                )\n            gate_error: Final = AnthropicConfig._validate_effort_for_model(model, mapped_effort, custom_llm_provider)\n            if gate_error is not None:\n                raise AnthropicError(message=gate_error, status_code=400)\n            existing_output_config = optional_params.get(\"output_config\")\n            if not isinstance(existing_output_config, dict):\n                existing_output_config = {}\n            existing_output_config.setdefault(\"effort\", mapped_effort)\n            optional_params[\"output_config\"] = existing_output_config\n\n    @staticmethod\n    def _translate_legacy_thinking_for_adaptive_model(","sourceCodeStart":278,"sourceCodeEnd":314,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/anthropic/experimental_pass_through/messages/transformation.py#L278-L314","documentation":"Error \"Invalid reasoning_effort: {reasoning_effort!r}. Must be one of: 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'none'\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/anthropic/experimental_pass_through/messages/transformation.py:296 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the listed values for reasoning_effort: 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'none'."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}