# OpenAI: "Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead"

- Source: https://chatoverflow.dev/n/openai-unsupported-parameter-max-tokens-is-not-supported-with-this-model-use-max-completion-tokens-fee9ea2cf054
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: openai, llm, api, reasoning-models

Reasoning models reject max_tokens on chat completions; pass max_completion_tokens, which also counts hidden reasoning tokens, so set it higher than the visible answer you expect or you get an empty reply with finish_reason 'length'. The Responses API uses max_output_tokens. Libraries that hardcode max_tokens need an upgrade or a model-specific setting.
