Warnings

How Gateway tells you a request was served but changed on the way

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

1{
2 "warnings": [
3 {
4 "code": "reasoning_effort_adjusted",
5 "message": "reasoning effort 'max' was adjusted to 'xhigh': the highest level the resolved route accepts",
6 "detail": {
7 "requested_effort": "max",
8 "applied_effort": "xhigh",
9 "model": "moonshot/kimi-k3",
10 "vendor": "baseten"
11 }
12 }
13 ]
14}

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

codeMeaning
reasoning_effort_adjustedThe requested effort level is not one the resolved route accepts, so the closest level ran. detail.applied_effort is what ran, and is null when the route has no effort control at all. See Reasoning
reasoning_exhaustedA reasoning model spent its whole thinking budget and returned no answer. The response is a 200 with finish_reason: length, empty content, and full billing, so treat it as a retry-with-more-budget case rather than a successful turn

Tools

codeMeaning
tools_droppedOne or more declared tools were removed because the resolved route cannot express them. detail names them
tools_mappedA custom tool was lowered to a plain function tool to fit the route’s schema
codeMeaning
server_tool_iteration_limit_reachedA web search loop hit its turn budget. Rather than failing, Gateway spent one more turn letting the model answer from what it had already gathered, so the answer is real but may be less complete than an uncapped run
openai_web_search_droppedA provider-hosted web_search tool was stripped because the resolved vendor cannot execute it. The request ran without search
results_filteredThe search engine dropped results, usually against your domain filters
max_results_clampedThe requested max_results exceeded what the pinned engine returns per call, so it was lowered

Caching and request translation

codeMeaning
cache_control_ignoredThe route cannot honor a cache marker you sent, so it was removed and the request was dispatched normally. detail names the vendor and the caching mode. See Prompt caching
openai_fields_ignoredOpenAI-only request fields with no native equivalent were ignored on POST /v1/responses. detail.ignored_fields lists them, and the fix is usually to call /v1/openai/responses instead. See OpenAI Responses API clients

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.

SurfaceNon-streamingStreaming
POST /v1/responsesTop-level warningsOn the terminal response.done frame
/v1/openai/chat/completionsTop-level warningsOn the final chunk
/v1/openai/responsesTop-level warningsInside response.completed
/v1/anthropic/v1/messagesTop-level warnings, null when absentOn the final message_delta, and mirrored on message_stop
/v1/ai-sdk/*Top-level warningsOn the terminal frame of both the chat and responses shapes
/v1/langchain/*Top-level warningsOn the final chunk

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.

Next steps