TECHNOLOGY

LiteLLM preserves root-union tool schemas on the Vertex JSON Schema path

In this article
THE QUICK TAKE

Test both branches of a union-root tool and keep invalid arguments rejected; LiteLLM’s schema transport fix does not replace execution-time validation.

The November 15 LiteLLM v1.111.0-dev.4 prerelease fixes Vertex failures for tools whose parameter schemas use a top-level union. Its implementation chooses Google’s JSON Schema field for the affected shapes. Successful schema transmission still needs to be checked separately from the model producing valid arguments and the application authorizing the resulting tool call.

Use a tool with meaningfully different branches

A harmless lookup tool can accept either an internal identifier or a name, with explicit requirements for each branch. Capture the outgoing declaration and verify the union remains intact. Test a valid request for each branch and an input satisfying neither. This establishes that solving the upstream schema rejection has not been achieved by flattening the tool into a more permissive contract that the application never intended.

Transmission and generation are different checks

First inspect the serialized schema with deterministic provider responses. Then allow the real model to select a branch and generate arguments. A provider accepting the declaration proves only that its schema interface accepted the payload. The generated call can still be incomplete or semantically wrong. Retain application-side validation before the tool executes, especially when branch choice changes which record or operation the request targets.

Forced calls deserve their own fixture

The implementation describes a preserved exception for forced-call handling of a bare root union. If the application forces tool choice or supplies provider-specific extra fields, reproduce that exact configuration. Do not extrapolate an automatic-choice test to a forced call. Capture which parameter field reaches the provider and compare behavior with a conventional object-root tool, preserving a control for the unaffected path.

Keep token and policy checks attached

Tool schemas contribute to request size and can affect local token estimates. Inspect the count path for the declaration actually sent, then evaluate the application’s budget and authorization rules independently. The release provides an interoperability correction for specific schema shapes. It does not establish that every provider supports every JSON Schema feature, nor that a model-selected branch is permitted to perform a consequential action.

Sources

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles