Skip to content

Required properties not being set on litellm tool call #2202

@thiagosalvatore

Description

@thiagosalvatore

Describe the bug
I've been testing some MCP tools that have required attributes, as well as some internal tools that I'm configuring and I've noticed that the required attribute is not being passed when using litellm.

It looks like the source of the problem is at _function_declaration_to_tool_param inside lite_llm.py.

My question is: Was it on purpose? If not, I'm happy to send a PR fixing this. This is causing several issues for us.

To Reproduce
Steps to reproduce the behavior:

  1. Configure an agent using litellm
  2. Setup a tool with required properties
  3. Inspect the call - the required field won't be there.

Expected behavior
It should pass the required field when doing the API calls.

Metadata

Metadata

Assignees

Labels

bot triaged[Bot] This issue is triaged by ADK botmcp[Component] Issues about MCP supportmodels[Component] Issues related to model support

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions