{"record":{"id":"b3376f08e0f4a8bb","repo":"BerriAI/litellm","slug":"missing-required-parameter-display-width-px-or-di","errorCode":null,"errorMessage":"Missing required parameter: display_width_px or display_height_px","messagePattern":"Missing required parameter: display_width_px or display_height_px","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/anthropic/chat/transformation.py","lineNumber":695,"sourceCode":"                input_schema=input_anthropic_schema,\n                type=\"custom\",\n            )\n\n            _description: Final = tool[\"function\"].get(\"description\")\n            if _description is not None:\n                _tool[\"description\"] = _description\n\n            returned_tool = _tool\n\n        elif tool[\"type\"].startswith(\"computer_\"):\n            ## check if all required 'display_' params are given\n            if \"parameters\" not in tool[\"function\"]:\n                raise ValueError(\"Missing required parameter: parameters\")\n\n            _display_width_px: Final[int | None] = tool[\"function\"][\"parameters\"].get(\"display_width_px\")\n            _display_height_px: Final[int | None] = tool[\"function\"][\"parameters\"].get(\"display_height_px\")\n            if _display_width_px is None or _display_height_px is None:\n                raise ValueError(\"Missing required parameter: display_width_px or display_height_px\")\n\n            _computer_tool: Final = AnthropicComputerTool(\n                type=tool[\"type\"],\n                name=tool[\"function\"].get(\"name\", \"computer\"),\n                display_width_px=_display_width_px,\n                display_height_px=_display_height_px,\n            )\n\n            _display_number: Final = tool[\"function\"][\"parameters\"].get(\"display_number\")\n            if _display_number is not None:\n                _computer_tool[\"display_number\"] = _display_number\n\n            returned_tool = _computer_tool\n        elif any(tool[\"type\"].startswith(t) for t in ANTHROPIC_HOSTED_TOOLS):\n            function_name_obj: Final = tool.get(\"name\", tool.get(\"function\", {}).get(\"name\"))\n            if function_name_obj is None or not isinstance(function_name_obj, str):\n                raise ValueError(\"Missing required parameter: name\")\n            function_name: Final = function_name_obj","sourceCodeStart":677,"sourceCodeEnd":713,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/anthropic/chat/transformation.py#L677-L713","documentation":"Anthropic computer-use tool mapping guard: the tool's parameters lack display_width_px or display_height_px, both mandatory for computer-use tools; the request is rejected before it reaches Anthropic.","triggerScenarios":"Thrown at litellm/llms/anthropic/chat/transformation.py:695 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide display_width_px or display_height_px in the computer-use tool definition."],"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"}