Skip to navigation

Warnings

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

A warnings array means Gateway served your request but changed it, such as removing a tool the route can’t run or adjusting a reasoning level it doesn’t accept. Log it wherever you measure cost or quality. Requests that don’t run at all are errors.

{
"warnings": [
{
"code": "reasoning_effort_adjusted",
"message": "reasoning effort 'max' was adjusted to 'xhigh': the highest level the resolved route accepts",
"detail": {
"requested_effort": "max",
"applied_effort": "xhigh",
"model": "moonshot/kimi-k3",
"vendor": "baseten"
}
}
]
}

Branch on code; message is for humans. detail is optional with keys that vary by code, so read it defensively. On a clean request the field is absent or null, never an empty array.

Warning codes

codeSurfacesMeaning
reasoning_effort_adjustedAllThe requested effort isn’t one the route accepts, so the closest level ran. detail.applied_effort is null when the route has no effort control. See Reasoning.
reasoning_effort_policy_boundAllThe routing policy’s effort bounds for the model changed the effort you asked for
reasoning_exhaustedAllThe model billed output tokens but returned no content, usually because reasoning used the whole budget. The response is still a 200, with finish_reason max_tokens on native /v1/responses (length on OpenAI-compatible surfaces). Raise the token limit or lower the effort.
reasoning_summary_unavailableAllreasoning.summary wasn’t returned, because the output budget was too small or ran out, or the OpenAI model doesn’t reason. detail.reason says which.
cache_control_ignoredAllThe route can’t honor your cache markers, so they were removed. detail names the vendor and prompt_caching_mode. See Prompt caching.
server_tool_iteration_limit_reachedAllA web search loop hit its limit of 6 iterations, so the model answered from the results it had. detail.max_iterations is 6.
web_search_remappedAllA vendor-hosted search tool ran as merge:web_search under your organization’s web search mode. detail lists remapped_tools and web_search_mode.
openai_fields_ignoredPOST /v1/responsesOpenAI-only fields with no native equivalent were ignored. detail.ignored_fields lists them. Call /v1/openai/responses or send X-Merge-Wire-Format: openai instead. See OpenAI Responses API clients.
tools_dropped/v1/openai/responsesCustom tool types the route can’t express were removed. detail.dropped_tools names them.
tools_mapped/v1/openai/responsesA custom tool was sent as a function tool, so its grammar isn’t enforced. detail.mapped_tools names them.
openai_tool_search_dropped/v1/openai/responsesThe route moved off OpenAI after the request was accepted, so tool_search was removed and every deferred tool was loaded up front
openai_web_search_dropped/v1/openai/responsesOpenAI hosted web_search was removed because the route isn’t direct OpenAI. Use {"type": "merge:web_search"} for search on any model
openai_image_generation_dropped/v1/openai/responsesOpenAI hosted image_generation was removed because the route isn’t direct OpenAI. Route to an openai/ model or call POST /v1/images/generations
openai_params_ignored/v1/openai/responsesThe route is served through chat completions, so parameters with no equivalent had no effect. detail.ignored_params lists them.
input_items_dropped/v1/openai/responsesThe route is served through chat completions, so replayed reasoning and other items it can’t represent were dropped. detail.dropped_item_types counts them.

Where warnings arrive

On SDK-compatible surfaces warnings is a Gateway extension that a strict SDK may drop from its typed object, so read it from the raw response or event.

SurfaceNon-streamingStreaming
POST /v1/responsesTop-level warningsThe terminal response.done frame
/v1/openai/chat/completionsTop-level warningsThe final chunk
/v1/openai/responsesTop-level warnings, omitted when emptyInside response.completed
/v1/anthropic/v1/messagesTop-level warnings, null when emptyThe final message_delta, repeated on message_stop
/v1/ai-sdk/chat/completionsTop-level warningsThe final chunk
/v1/ai-sdk/responsesNot returnedInside response.completed
/v1/langchain/chat/completionsTop-level warningsThe final chunk

Non-streaming /v1/openai/responses requests that use OpenAI’s server-executed tool_search return OpenAI’s response without warnings. Interim stream frames never carry warnings, and a warning raised mid-stream still reaches the terminal frame.

Next steps