From d5b5ebbf2fe710fc29066bdd2e0a545036ae81ad Mon Sep 17 00:00:00 2001 From: Yujong Lee Date: Sat, 10 Oct 2026 12:16:57 -0700 Subject: [PATCH] test(rust): support automatic Vertex tool selection --- litellm-rust/crates/inference-messages/tests/live/vertex_ai.rs | 2 +- litellm-rust/crates/inference-testing/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm-rust/crates/inference-messages/tests/live/vertex_ai.rs b/litellm-rust/crates/inference-messages/tests/live/vertex_ai.rs index 7de93033586..1f46f295e6b 100644 --- a/litellm-rust/crates/inference-messages/tests/live/vertex_ai.rs +++ b/litellm-rust/crates/inference-messages/tests/live/vertex_ai.rs @@ -62,7 +62,7 @@ async fn tool_round_trip(route: MessagesRoute, #[case] stream: bool) { route, PROVIDER, stream, - json!({"tool_choice": {"type": "tool", "name": "echo"}}), + json!({"tool_choice": {"type": "auto"}}), ) .await; } diff --git a/litellm-rust/crates/inference-testing/README.md b/litellm-rust/crates/inference-testing/README.md index 344786390be..959aaccbb08 100644 --- a/litellm-rust/crates/inference-testing/README.md +++ b/litellm-rust/crates/inference-testing/README.md @@ -27,7 +27,7 @@ LITELLM_LIVE_MESSAGES_VERTEX_AI_MODEL= \ For Vertex AI, set `LITELLM_LIVE_MESSAGES_VERTEX_AI_MODEL` to a Claude model published in the project's location. Credentials, project and location resolve through the production Rust GCP authentication, from `GOOGLE_APPLICATION_CREDENTIALS` or `VERTEXAI_CREDENTIALS`, with `VERTEXAI_PROJECT` and `VERTEXAI_LOCATION` -Vertex AI cases live in `inference-messages/tests/live/vertex_ai.rs`. They cover plain and system messages, text streaming, and complete and streaming tool round trips +Vertex AI cases live in `inference-messages/tests/live/vertex_ai.rs`. They cover plain and system messages, text streaming, and complete and streaming tool round trips. Tool cases use automatic selection because current Claude models reject forced `tool_choice`. Each case still requires a tool call, checks its arguments, and sends the tool result back Tool cases require a model that supports forced `tool_choice`, except where a provider's section says otherwise. A provider rejection fails the selected case instead of skipping it