﻿# How can a gateway preserve reasoning metadata without displaying it?

LiteLLM v1.108.19 retains OpenRouter chunks that only carry reasoning_details. See what that means for client filters and multi-turn state.

Author: Retrivium editorial team
Updated: 2026-11-28
Canonical URL: https://retrivium.ai/journal/daily-20261128-routing-litellm-reasoning-only-frames/
Language: en

A stream event can have no user-visible text while carrying data the next turn needs. In LiteLLM v1.108.19, released on 26 November, the maintainers backported a change that stops the affected OpenRouter streaming path from discarding chunks containing only `reasoning_details`. The pull request discusses signed and encrypted metadata. It also lists limits: the separate `stream_chunk_builder` behavior was outside this change, and the `/v1/messages` output was unchanged.

## Track display and transport independently

An SSE filter that only recognises text deltas can accidentally drop tool arguments or model-specific continuation fields. Classify events at the protocol boundary before deciding what to render. Forward recognised metadata in its original order and encoding when the receiving endpoint expects it. The frontend can still keep those fields out of the chat window. Scope storage and retention to the data your integration needs and the applicable provider policy.

## Test a second turn, not just the first

Use an approved staging fixture with a metadata-only event between ordinary events, and exercise the parser that production actually uses. Verify that the UI stays unchanged, that the event is forwarded exactly once, and that the client includes required state when building a supported follow-up request. Where metadata is signed, regard the bytes as opaque rather than rewriting them to match a preferred schema. Run the same test on the alternate adapter if your gateway supports one.

## Keep expectations specific to the adapter

The patch describes a stream forwarding behavior. A separate aggregator may still drop metadata as it builds a non-streaming message. Treat successful display, preservation through the transport, and successful continuation as three different assertions. Record the selected endpoint, client and gateway version alongside the result. That makes it possible to identify whether a later regression belongs to the provider, the gateway or an application-specific filter.

## Design logs for protocol debugging

For everyday monitoring, record the event type, presence of an expected field, and parser outcome. These attributes help you distinguish a missing upstream frame from a frame the client dropped. They can usually be collected without storing the field value. Compare two captures only in a permitted staging environment. A raw trace from a real conversation can contain material that the application deliberately keeps out of its display and logs.

## Sources

- [Primary source · litellm v1.108.19](https://github.com/BerriAI/litellm/releases/tag/v1.108.19)
- [Primary source · litellm #54564](https://github.com/BerriAI/litellm/pull/54564)

## Related reading

- [Related guide · Learn openrouter reasoning details](/journal/learn-openrouter-reasoning-details/)
- [Related guide · Learn openrouter content blocks](/journal/learn-openrouter-content-blocks/)
