TECHNOLOGY

LiteLLM restores streamed chat completions for OpenCode Go Messages models

In this article
THE QUICK TAKE

Replay a Messages-shaped stream through the chat client and check terminal events, JSON-mode settings and usage; non-streaming success does not establish bridge parity.

The November 15 LiteLLM v1.111.0-dev.4 prerelease fixes streaming OpenCode Go models that use the Messages protocol through chat completions. Non-streaming calls could already work while streaming failed. Interoperability acceptance should inspect event shape, structured-output behavior and provider-reported cost together, because a bridge can deliver text correctly while losing another part of the application contract.

The upstream protocol selects the adapter

Configure a synthetic Go deployment using the affected Messages protocol and a control using the already working path. Send the same harmless request with streaming on and off. Capture which adapter produces the response. A model prefix alone may hide protocol differences, so acceptance should record the resolved configuration rather than assume every Go model exercises the same iterator or error path.

Text and termination are separate assertions

Replay content, finish and final stream termination through the real client parser. Assert the assembled answer once and a completed request state. A client that receives all text but waits forever for a terminal event remains broken for orchestration. Include an empty valid answer and an upstream error after partial content, keeping partial output marked incomplete instead of manufacturing a normal finish for every exception.

Preserve structured settings and cost provenance

Use a synthetic JSON-mode schema and distinct provider usage metadata. Inspect the forwarded settings and returned accounting separately from text. The implementation retains the Go-reported cost path, so do not replace it with a guessed local price merely because the response now uses chat chunks. Reconcile the request identity with one spend row and verify structured output still reaches the application’s own validator.

Cancellation should release the bridged response

Disconnect the synthetic client after a known chunk and observe upstream response closure, then run a second request through the same gateway. This checks cleanup and continued service separately from normal completion. The prerelease fixes a specific bridge; it does not establish every Messages-compatible provider or every frontend adapter. A useful migration record names the protocol, client parser, structured mode and accounting path that were actually validated.

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