Warnings
A warnings array on the response tells you Gateway served your request but degraded it on the way: a tool the route cannot execute, a reasoning level it does not accept, a cache marker it cannot honor. Read it when an answer does not match the request you wrote, and log it in anything that measures cost or quality.
A warning means the request ran differently. See Errors for the requests that do not run at all.
The warning shape
code is the stable identifier to branch on. message is written for a human reading a log. detail carries the specifics for that code and its keys vary by code, so read it defensively.
The field is absent or null when nothing was degraded. It is never an empty array on a clean request.
Warning codes
Reasoning
Tools
Web search
Caching and request translation
Where warnings arrive
warnings is a Gateway extension on the compatible surfaces, so a strict SDK client may drop it from its typed response object. When it does, read it from the raw response or the raw event.
A warning raised mid-stream still reaches the last frame, so a client that only reads the terminal frame sees everything. Interim frames carry no warnings.