BerriAI/litellm · error · ValueError
Missing required parameter: parameters
Error message
Missing required parameter: parameters
What it means
Anthropic computer-use tool mapping guard: a computer_ tool was passed without the required 'parameters' in its function definition, so the hosted tool cannot be constructed — the caller must supply the parameters object.
Solutions
- Include the 'parameters' field (JSON schema object) in the tool definition.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/llms/anthropic/chat/transformation.py:690 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/624e098de52f0eea.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/llms/anthropic/chat/transformation.py:690
input_anthropic_schema: Final = sanitize_input_schema_for_anthropic(_input_schema)
_tool: Final = AnthropicMessagesTool(
name=tool["function"]["name"],
input_schema=input_anthropic_schema,
type="custom",
)
_description: Final = tool["function"].get("description")
if _description is not None:
_tool["description"] = _description
returned_tool = _tool
elif tool["type"].startswith("computer_"):
## check if all required 'display_' params are given
if "parameters" not in tool["function"]:
raise ValueError("Missing required parameter: parameters")
_display_width_px: Final[int | None] = tool["function"]["parameters"].get("display_width_px")
_display_height_px: Final[int | None] = tool["function"]["parameters"].get("display_height_px")
if _display_width_px is None or _display_height_px is None:
raise ValueError("Missing required parameter: display_width_px or display_height_px")
_computer_tool: Final = AnthropicComputerTool(
type=tool["type"],
name=tool["function"].get("name", "computer"),
display_width_px=_display_width_px,
display_height_px=_display_height_px,
)
_display_number: Final = tool["function"]["parameters"].get("display_number")
if _display_number is not None:
_computer_tool["display_number"] = _display_number
returned_tool = _computer_toolView on GitHub (pinned to 77b7c6c40c)