{"record":{"id":"5bdcca8f7b78b38c","repo":"BerriAI/litellm","slug":"unsupported-tool-type-tool-type","errorCode":null,"errorMessage":"Unsupported tool type: {tool['type']}","messagePattern":"Unsupported tool type: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/anthropic/chat/transformation.py","lineNumber":771,"sourceCode":"        elif tool[\"type\"] == ANTHROPIC_ADVISOR_TOOL_TYPE:\n            from litellm.types.llms.anthropic import AnthropicAdvisorTool\n\n            _tool_dict: Final = cast(dict, tool)\n            advisor_model: Final = _tool_dict.get(\"model\")\n            if not isinstance(advisor_model, str):\n                raise ValueError(\"Advisor tool must have a valid model\")\n            _advisor_tool: Final = AnthropicAdvisorTool(\n                type=ANTHROPIC_ADVISOR_TOOL_TYPE,\n                name=\"advisor\",\n                model=advisor_model,\n            )\n            if _tool_dict.get(\"max_uses\") is not None:\n                _advisor_tool[\"max_uses\"] = _tool_dict[\"max_uses\"]\n            if _tool_dict.get(\"caching\") is not None:\n                _advisor_tool[\"caching\"] = _tool_dict[\"caching\"]\n            returned_tool = _advisor_tool\n        if returned_tool is None and mcp_server is None:\n            raise ValueError(f\"Unsupported tool type: {tool['type']}\")\n\n        ## check if cache_control is set in the tool\n        _cache_control: Final = tool.get(\"cache_control\", None)\n        _cache_control_function: Final = tool.get(\"function\", {}).get(\"cache_control\", None)\n        if returned_tool is not None:\n            # Only set cache_control on tools that support it (not tool search tools)\n            tool_type = returned_tool.get(\"type\", \"\")\n            if tool_type not in (\n                \"tool_search_tool_regex_20251119\",\n                \"tool_search_tool_bm25_20251119\",\n            ):\n                if _cache_control is not None:\n                    returned_tool[\"cache_control\"] = _cache_control\n                elif _cache_control_function is not None and isinstance(_cache_control_function, dict):\n                    returned_tool[\"cache_control\"] = ChatCompletionCachedContent(**_cache_control_function)\n\n        ## check if defer_loading is set in the tool\n        _defer_loading: Final = tool.get(\"defer_loading\", None)","sourceCodeStart":753,"sourceCodeEnd":789,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/anthropic/chat/transformation.py#L753-L789","documentation":"Anthropic tool translation catch-all: the tool's 'type' matches none of the supported kinds (function, computer_, hosted tools, url/mcp, tool_search, advisor), so it cannot be translated to an Anthropic tool definition.","triggerScenarios":"Thrown at litellm/llms/anthropic/chat/transformation.py:771 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported tool type (e.g. 'custom', 'computer_...', 'bash_...', 'text_editor_...'); remove or convert the unsupported type."],"exampleFix":null,"handlingStrategy":"validation","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"}