You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New field max_completion_tokens added by OpenAI, is to set an upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. Replaces max_tokens field which is now deprecated.
max_completion_tokens works on all models but max_tokens doesn't work on the new models - o1-mini etc
max_tokens
Deprecated
integer or null
Optional
The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.
This value is now deprecated in favor of max_completion_tokens, and is not compatible with [o1 series models](https://platform.openai.com/docs/guides/reasoning).
…chat options
- Add new option 'maxCompletionTokens' to spring.ai.openai.chat.options
- Mark 'maxTokens' as deprecated
- Update documentation to reflect these changes in OpenAI chat configuration
Related to #1411 and #1412
New field
max_completion_tokens
added by OpenAI, is to set an upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. Replacesmax_tokens
field which is now deprecated.max_completion_tokens
works on all models butmax_tokens
doesn't work on the new models - o1-mini etchttps://platform.openai.com/docs/api-reference/chat/create#chat-create-max_completion_tokens
The text was updated successfully, but these errors were encountered: