Skip to main content
Send the X-Gateway-Metadata: enabled header and the response gains one extra top-level block, gateway_metadata. Without the header the block is absent and nothing else changes, so it is safe to enable per request, for part of your traffic, or only while debugging. The block is also returned under its former name, omnirelay_metadata, with the same content, and the former header name X-OmniRelay-Metadata stays accepted (see Compatibility).
The value is case-insensitive. Any value other than enabled is treated as off.

What you get

strategy, attempt and attempts are there so the shape does not change when routing and fallback arrive. They report what actually happened, never a plan.

On a stream

With stream: true the block rides the first chunk, because the model and provider are settled before any token is generated. Later chunks do not repeat it.

In the console

The API debug tool on the Playground page always requests metadata, so the block appears in its response panel without the header.