Monoize
Transforms

Field: override max tokens

Set the request max output token limit to a fixed value.

What it does

This transform sets the request max output token limit to the configured value. It replaces any limit the client sent.

Reference

PropertyValue
Type IDfield_override_max_tokens
Phaserequest
ScopesProvider

When to use

  • An upstream rejects requests whose token limit exceeds its ceiling.
  • You want one Provider to cap output length regardless of client settings.

Configuration

OptionTypeRequiredDefaultDescription
valueintegerYesThe max output token limit written into the request. Minimum 1.

Example rule

{
  "transform": "field_override_max_tokens",
  "enabled": true,
  "phase": "request",
  "models": [
    "*"
  ],
  "config": {
    "value": 8192
  }
}

This transform is Provider-scope only. It changes the output token ceiling, so API-key scope does not allow it.

On this page