Skip to content

Request parameter policy

Last updated: 2026-11-27T01:59:36-03:00 (UTC-3)

An alias often needs the same request parameters on every call: a reasoning model that should think at minimal effort unless the app asks for more, a cheaper service_tier, store: false for every call to a provider that keeps conversations by default, or a ceiling on output tokens so one request cannot run up the bill. Without the gateway, every application has to know and send these values, and a client that sends a parameter one provider rejects fails on that provider only.

The request parameter policy sets these per target, in the gateway, so applications stay unchanged and each fallback target gets the parameters it needs. Flag: request_parameter_policy (off by default).

features:
request_parameter_policy: true
models:
- id: gpt-5-mini
unsupported_parameters: refuse # or drop (see below); default refuse
targets:
- provider: openai
model: gpt-5-mini
request_defaults: # only when the client did not send them
reasoning_effort: minimal
service_tier: flex
request_overrides: # always, replacing the client's value
store: false
max_output_tokens: 4096 # ceiling on the output limit
drop_parameters: [temperature] # removed before this target is called
# A path removes a member below a top-level field:
# drop_parameters: [temperature, "tools[*].function.strict", metadata.user_id]
- provider: anthropic # fallback: its own policy, or none
model: claude-sonnet-4-5
request_defaults: {temperature: 0.2}

With the flag off, the fields stay stored and validated but nothing is applied: requests go out exactly as before. Turning the flag on or off takes effect on the next request (it is a runtime flag, editable in Settings → Features).

All fields are optional. They belong to one target (models[].targets[]), except unsupported_parameters, which belongs to the alias.

Field Default Values
models[].targets[].request_defaults none Map of allowlisted parameter → value. Set only when the client did not send the parameter, or sent null.
models[].targets[].request_overrides none Same allowlist. Always set, replacing what the client sent. A name cannot be in both maps.
models[].targets[].max_output_tokens none (no ceiling) Whole number from 1 to 10,000,000.
models[].targets[].drop_parameters none Up to 32 distinct entries. An entry is a top-level field name (lowercase letters, digits and _) or a path below one, such as tools[*].input_examples. model, messages, input, contents and stream cannot be dropped, nor anything below them, nor store (without it a Responses provider keeps the conversation, its default) or stream_options (without it a stream loses the usage the gateway meters). The cost of that protection: a compatible backend that rejects either field cannot be helped by dropping it here. A name cannot also be set by request_defaults or request_overrides. Names are those of the body the target receives: see which names apply.
models[].targets[].drop_presets none [sampling]: a ready-made list added to drop_parameters. See drop presets.
models[].targets[].unsupported_parameters (alias) refuse refuse or drop.

The policy applies to aliases whose capabilities are chat, messages, responses or generate_content; a policy on an embeddings, images or other alias is refused when the configuration loads.

request_defaults and request_overrides accept only these names, by their Chat Completions name. An unknown name or a value of the wrong type is refused when the configuration loads or when the console or API saves the model, never at request time.

Parameter Value
reasoning_effort A word such as minimal, low, medium or high, or an object {effort, summary}
service_tier A word such as auto, default, flex or priority
temperature Number from 0 to 2
top_p Number from 0 to 1
max_tokens, max_completion_tokens Whole number from 1 to 10,000,000; at most one of the two per map, and not above max_output_tokens
verbosity low, medium or high
parallel_tool_calls true or false
seed Whole number
presence_penalty, frequency_penalty Number from -2 to 2
store true or false
reasoning_summary auto, concise or detailed: asks the provider for a summary of its reasoning. See reasoning summaries

The list is closed on purpose: these are the parameters that change cost, latency or retention without changing what the conversation means. Fields that do (messages, tools, response_format) are left to the application.

reasoning_effort as an object. Some values exist only in the Responses API, such as a reasoning summary. The object form carries them: reasoning_effort: {effort: high, summary: auto} reaches a Responses API target as reasoning: {effort: high, summary: auto}. Any other target receives only effort ("high"); an object without effort is not applied to it. A client may not send the object form itself: on Chat Completions it is still refused with 422, as before this feature. On an api: auto target the policy runs before the API is chosen, so an object effort, or a policy effort together with the client’s function tools, sends that attempt to the Responses API; a default or override the chosen API has no field for (seed on Responses) is reported in parameters_not_applicable.

A reasoning model does not always return what it thought. The OpenAI Responses API returns a reasoning summary only when the request asks for one (reasoning.summary), and recent Claude models return an empty thinking block unless the request sets thinking.display to summarized. A client that shows the reasoning to its user then shows nothing, and the fix belongs in every application.

reasoning_summary asks for the summary in the gateway, per target:

models:
- id: claude
capabilities: [messages]
targets:
- provider: anthropic
model: claude-sonnet-4-6
request_defaults:
reasoning_summary: auto # only when the client did not choose
Target receives What is set When
Anthropic Messages, native /v1/messages thinking.display: "summarized" Only when the request’s thinking.type is enabled or adaptive. A request without thinking is not changed.
Anthropic Messages, translated from Chat Completions thinking.display: "summarized" Only when the request has a reasoning_effort, which is what turns thinking on.
OpenAI Responses API, native /v1/responses or translated reasoning.summary with the configured value On every request to the target, like the object form of reasoning_effort. Use it only on a reasoning model: any other model refuses the field.
Chat Completions on an openai provider, Gemini, Bedrock, Cohere, OCI Nothing The protocol has no field for a summary. The entry is named in parameters_not_applicable.
  • As a default (request_defaults), the client’s own choice wins: a request that already says thinking.display: "omitted" or reasoning.summary: "concise" goes out as the client wrote it.
  • As an override (request_overrides), the configured value replaces the client’s. Use it when the operator, not the application, decides that summaries are returned.
  • Anthropic has one summary level, so auto, concise and detailed all become summarized there. To hide the thinking instead, drop the client’s choice with drop_parameters: [thinking.display] on a model whose default is omitted.
  • A summary is billed as output tokens by the provider. That is why it is off unless configured.
  • On an api: auto target, reasoning_summary sends the attempt to the Responses API, like the object form of reasoning_effort: Chat Completions has no field for it.
  • The summary is applied after the other defaults and overrides, so it is kept when the policy also sets reasoning_effort.
  • The attempt is logged with parameters_defaulted or parameters_overridden naming reasoning_summary, only when it changed the request.

max_tokens and max_completion_tokens are one parameter. A default for either applies only when the client sent neither; an override replaces whichever the client sent, so the request never carries both.

For each attempt, the gateway builds the body that target receives, starting from the client’s body every time, in this order:

  1. drop_parameters removes the listed fields.
  2. request_defaults fills the parameters the client left out. A default or override this target’s protocol cannot carry (for example seed or verbosity on Anthropic, seed on the Responses API) is not added: it is named in parameters_not_applicable instead, so a policy never makes a request fail, or report a drop, for a field the client did not send.
  3. request_overrides sets its parameters, replacing the client’s. An override the target’s protocol cannot carry is skipped and logged in parameters_not_applicable; the client’s own value for that field then follows the unsupported_parameters mode (dropped or refused), never the override.
  4. max_output_tokens lowers a larger max_tokens or max_completion_tokens. Any JSON number with a whole value counts (500, 500.0 and 5e2 are all lowered); a limit that is not a positive whole number (10.5, "500", 0) is refused with 422 before any provider call, because the ceiling cannot be enforced on it. When the request has no limit, or only null limits, max_completion_tokens is set to the ceiling and the null keys are removed.
  5. With unsupported_parameters: drop, fields the target’s protocol declares unsupported are removed (see below).
  6. Translation to the target’s protocol (Anthropic Messages, Gemini, Bedrock Converse, Cohere, OCI, the Responses API).

Because the body is rebuilt per attempt, a fallback target never inherits the previous target’s defaults or drops. The client’s own body, the semantic cache key and guardrail checks see the request as the client sent it.

Example: with the configuration above, the client sends

{"model": "gpt-5-mini", "messages": [{"role": "user", "content": "Hi"}], "temperature": 0.5, "max_completion_tokens": 9000, "store": true}

and OpenAI receives

{"model": "gpt-5-mini", "messages": [{"role": "user", "content": "Hi"}], "max_completion_tokens": 4096, "store": false, "reasoning_effort": "minimal", "service_tier": "flex"}

The answer carries X-Gateway-Dropped-Parameters: temperature.

A translated target supports a known set of fields. Anthropic Messages has no seed or logprobs, for example, and Gemini has no logprobs. By default (refuse), such a target cannot take the request: when the alias has another target, the refusing one is skipped without a call and the next target is tried (fallback across translation refusals); when no target accepts it, the request is answered 422 unsupported_on_provider before any provider call, naming the field. This is the behavior without this feature.

With unsupported_parameters: drop, those fields are removed for that target instead, and the request goes through. This is for clients that send parameters their own default provider understands and that the operator accepts to lose on another one.

  • Only whole fields the translation declares unsupported are dropped. A value the target cannot honor is still refused: reasoning_effort: minimal on Anthropic, or a max_tokens below the thinking budget, still answers 422.
  • store: false on a native protocol is met without being sent and is not reported as a drop.
  • Targets that receive the body as it is (Chat Completions on an openai provider, SageMaker) declare nothing, so nothing is dropped there. A field an OpenAI model refuses (for example temperature on a reasoning model, which answers 400) is removed with drop_parameters on that target.
  • A dropped field can change the answer (n, logprobs) or its cost. That is why every drop is reported, never silent.
Route Applied Notes
/v1/chat/completions Everything In Chat Completions names.
/v1/messages, /v1/responses, Gemini generateContent translated to another provider Everything The request goes through the chat pipeline, so the names are Chat Completions names (max_completion_tokens, reasoning_effort). X-Gateway-Dropped-Parameters uses the client’s names (max_tokens, metadata.user_id, reasoning.effort).
/v1/messages native (every target Anthropic) temperature, top_p, service_tier, the output limit (max_tokens) and max_output_tokens; reasoning_summary as thinking.display; drop_parameters in Messages names reasoning_effort (thinking needs a token budget), seed, the penalties, store, verbosity and parallel_tool_calls have no Messages field and are not applied.
/v1/responses native (OpenAI Responses API) temperature, top_p, service_tier, store, parallel_tool_calls; the output limit as max_output_tokens; reasoning_effort as reasoning (string → reasoning.effort, object → its members); reasoning_summary as reasoning.summary; verbosity as text.verbosity; drop_parameters in Responses names A default fills only the members of reasoning or text the client left out. seed and the penalties do not exist in Responses and are not applied. unsupported_parameters does not apply: the body is not translated.
Gemini generateContent native (every target Gemini) Nothing The request is passed through unchanged; the upstream_attempt log names every policy entry of the target in parameters_not_applicable, so it does not look applied. The same alias’s /v1/chat/completions route does apply the policy.
Embeddings, images, audio and the other routes Nothing A policy on such an alias is refused when the configuration loads.

A policy entry that does not apply to the route is named in parameters_not_applicable of the request log, so a missing effect is visible.

drop_parameters removes top-level fields of the body this target receives, before translation, so the names depend on the path the request takes, not on the route the client called:

  • /v1/chat/completions and every translated route (Messages, Responses or GenerateContent to another provider): Chat Completions names. On a Messages request, metadata.user_id is user and max_tokens is max_completion_tokens.
  • Native /v1/messages and /v1/responses: that dialect’s own names (for example metadata or top_k on Messages, metadata or include on Responses).

An alias that changes from native to translated (adding a target of another provider) therefore changes which fields its names match. Review drop_parameters when you change an alias’s providers; a name that does not occur in the body removes nothing.

Some lists are the same on every target of a kind. The Claude models from Opus 4.7 on refuse the sampling parameters (temperature, top_p, top_k) with a 400, and every client that still sends one fails on them. Instead of writing the three names on each such target:

targets:
- provider: anthropic
model: claude-opus-4-8
drop_presets: [sampling]
Preset Removes
sampling temperature, top_p, top_k
  • A preset is exactly its list, added after drop_parameters; a name in both is removed once. What it removes is reported by name in X-Gateway-Dropped-Parameters and parameters_dropped, only when the request carried it.
  • It is off unless the target lists it, and applies under the same flag and on the same routes as drop_parameters.
  • A name a preset removes cannot also be set by request_defaults or request_overrides on that target.
  • The list is closed. A preset never grows a name between releases without a line in the changelog, because a dropped parameter can change an answer.
  • It removes the parameter whatever its value. A model that accepts the default value only (temperature: 1) loses nothing by it.

Some fields a provider refuses are not at the top of the body. A Bedrock or Vertex Claude target refuses input_examples inside a tool definition, a compatible server refuses strict inside a function, and neither can be removed by dropping the whole tools list. A path removes only that member:

Entry Removes
temperature The top-level field.
metadata.user_id The member user_id of the object metadata.
tools[*].input_examples input_examples from every element of the list tools.
tools[*].function.strict strict from the function object of every tool.
response_format.json_schema.strict A member three objects deep.
  • A dot enters an object. [*] enters every element of a list. There are no indexes ([0]), no quoting and no recursive search, on purpose: a path says exactly where it reaches.
  • The first step is a top-level field name, with the same rule as a plain name. The steps after it may use upper case, _, $ and -, because member names inside schemas do. A path has at most 8 steps ([*] counts as one) and 200 characters, and always ends in a member name: a path removes members, never the elements of a list.
  • A path whose first step is model, messages, input, contents, stream, store or stream_options is refused at load. The conversation is not edited by this policy.
  • Only the member is removed. The object that held it stays, even when it becomes empty: metadata.user_id on {"user_id": "u1"} leaves "metadata": {}. Drop metadata itself when the provider refuses an empty object.
  • Where the body has another shape (a string where the path expects an object), or the member is absent, nothing is removed and nothing is reported.
  • Members keep the client’s order, and every value that is not on the path keeps its bytes, so a provider’s prompt cache keeps matching the parts that did not change. Only the objects and lists the path walks through are written again, compactly (without the client’s spaces between members). When a member name occurs twice in one object, every occurrence is removed.
  • A removed path is reported like a name: X-Gateway-Dropped-Parameters: tools[*].input_examples and parameters_dropped in the attempt log, only when it removed something. A path is reported as it is configured; it is not rewritten to the client’s names on a translated route.
  • A client field whose own name looks like a path (a top-level field literally called metadata.user_id) is not what a path entry names, and is left alone.
  • The context window check estimates the body the target receives: what a path removes (a long tool description, for example) is not counted for that target, whether or not the policy flag is on, as with a field dropped by name.
  • On a translated route the path is applied to the Chat Completions body, before translation, so it uses Chat Completions shapes (tools[*].function.strict). On native /v1/messages and /v1/responses it uses that dialect’s shapes (tools[*].input_examples).

X-Gateway-Dropped-Parameters lists, comma-separated, the fields the answering attempt removed (drop_parameters and unsupported_parameters: drop). It is absent when nothing was removed. After a fallback, it describes the target that answered.

Each upstream_attempt log record of an attempt that changed something adds these attributes, with parameter names only, never values or content:

Attribute Meaning
parameters_defaulted Defaults applied
parameters_overridden Overrides applied
parameters_capped Output limit lowered or set by max_output_tokens
parameters_dropped Removed by drop_parameters
parameters_unsupported_dropped Removed by unsupported_parameters: drop
parameters_not_applicable Policy entries this route has no field for
{"msg":"upstream_attempt","provider":"openai","model":"gpt-5-mini","status":200,"parameters_defaulted":"reasoning_effort,service_tier","parameters_dropped":"temperature"}

Budgets and TPM reserve tokens from the request before the call, and only single-target aliases are protected. With the policy on, the reservation is computed from the body the target will receive, so a lower max_output_tokens lowers the reservation and an override that raises the limit raises it. A policy that adds a parameter the quota profile does not accept (service_tier, verbosity) is treated exactly as if the client had sent that parameter: under a budget or TPM policy the request is refused, because its cost cannot be reserved.

Model catalog → Edit routing: each target has a Request parameters block (defaults, overrides, maximum output tokens and drop parameters) and the alias has Unsupported request parameters. The model API (PUT /api/v1/admin/models/{id}) takes the same fields as the YAML, with the same validation; a model saved from the console is versioned and audited like any other model change. With the flag off, a stored policy stays visible and removable, marked inactive.

  • An unreadable output limit (for example max_tokens: 10.5) is refused when the attempt that has a max_output_tokens ceiling is reached, not before the first target is tried; an earlier target without a ceiling may already have been called.
  • Defaults and overrides set only top-level parameters; nested fields (tool_choice members) are not set. drop_parameters removes nested members by path, except below the protected fields (stream_options, messages). Asking a stream for its usage is a separate alias setting, stream_usage: inject, applied to each attempt after this policy and independent of its flag.
  • Native Gemini generateContent, batch files and the other routes are not covered (native generateContent logs that it did not apply).
  • drop_parameters names are not checked against the dialect at load: a name that does not occur in the body removes nothing.
  • The semantic cache keeps answers made with and without the policy apart: turning the flag on or off on an alias with a policy does not serve the other state’s answers.
  • The ceiling is set as max_completion_tokens when the client sent no limit. An OpenAI-compatible server that reads only max_tokens should get request_defaults: {max_tokens: N} as well, so the client-less case sends max_tokens and the ceiling lowers it.
  • service_tier and reasoning_effort values are checked for shape, not against each provider’s current list: a value the provider rejects comes back as the provider’s 400.

Nothing changes until the flag is turned on and a policy is declared. Existing aliases keep refuse, the previous behavior.

m7gtw[email protected]