Files
litellm/tests
xuan07t2 f3f1acd338 fix(vertex_ai): separate Tool objects for each tool type per API spec
Fix Vertex AI API error: "tools[0].tool_type: one_of 'tool_type' has more
than one initialized field"

The Vertex AI API requires each Tool object to contain exactly one type
of tool (e.g., FunctionDeclaration, GoogleSearch, CodeExecution).
Previously, all tool types were combined into a single Tool object,
causing INVALID_ARGUMENT errors when using multiple tools simultaneously.

This change creates separate Tool objects for each tool type:
- Function declarations in one Tool
- Google Search in its own Tool
- Code Execution in its own Tool
- etc.

Ref: https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1beta1/Tool

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 08:48:35 +07:00
..

In total litellm runs 1000+ tests

[02/20/2025] Update:

To make it easier to contribute and map what behavior is tested,

we've started mapping the litellm directory in tests/test_litellm

This folder can only run mock tests.