Results / request.max-tokens-field

Output limit uses the supported Chat Completions field

A short answer is requested with an output limit that must use max_completion_tokens.

Bug class: The library sends something the caller didn't ask for

The library adds, drops or renames request fields the caller didn't set, or sends a combination the provider rejects.

Calls fail on current models, or behave differently from what the caller configured.

Requirements

LevelIdCheckRequirementProviders
MUSTlimit-fieldrequest_field_equalsThe request sends the output limit as max_completion_tokens.All
MUSTno-legacy-limitrequest_field_absentThe request omits the unsupported max_tokens field.All
SHOULDno-temperaturerequest_field_absentThe request leaves temperature unset.All

Fixtures

ProviderTierany-llmlitellmpydantic-aitanstack-aivercel-ai
openai-chatrecorded✓ PASS✓ PASS✓ PASS– UNSUPPORTED✓ PASS