TECHNOLOGY

How do you verify streamed Cohere tool calls through LiteLLM LTS?

In this article
THE QUICK TAKE

Validate reconstructed arguments and call identity at the application boundary before invoking a tool.

LiteLLM v1.108.15 LTS was published on November 21, 2026. Its notes include a fix for Cohere v2 streamed tool calls that previously appeared as one empty chunk in the circumstances addressed by the patch. The linked change handles tool-call start and delta events. This type of compatibility change matters to agents because an HTTP response can be successful while the stream lacks a complete tool invocation.

Reconstruct across event boundaries

A streamed tool request can spread its identity, action name and argument bytes across different pieces. Buffer and assemble those pieces according to the client protocol. Validate the resulting data against the tool schema once the call is complete. Treat a stream that closes with an incomplete call as an application error. Otherwise a client can mistake transport completion for a tool invocation that is ready to use.

Check call identity and order

When the tool interface supports more than one call, test more than one independent call in the same response. Make sure arguments stay associated with the right call identity and downstream handling preserves the required order. Use synthetic tools that return local evidence of invocation without external side effects. Compare the number of completed calls with the tool executions recorded by the client.

Compare before and after the proxy

Run the test against a supported direct route and the intended proxy route. Compare the reconstructed meaning of the calls since wire events can differ across those paths. Include a case whose ordinary text output is empty and tool output is present. This makes it harder for a test that only checks for a nonempty text response to miss the integration path.

Record the conditions for a repeatable check

Write down the proxy build, provider API generation and client version used. Keep observed call assembly separate from the application’s retry and execution rules. If the same event sequence reappears after a retry, the application should be able to identify which tool operations have already completed. That is a distinct check from parsing the stream correctly.

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