Skip to content

Conversation

iAMSagar44
Copy link
Contributor

The maxTokens value is now deprecated in favor of max_completion_tokens, and is not compatible with o1 series models.

Reference - https://learn.microsoft.com/en-us/java/api/com.azure.ai.openai.models.chatcompletionsoptions?view=azure-java-preview#com-azure-ai-openai-models-chatcompletionsoptions-setmaxtokens(java-lang-integer)

…uest

  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.

Signed-off-by: Sagar <[email protected]>
Update content to add spring.ai.openai.chat.options.maxCompletionTokens property

Signed-off-by: Sagar <[email protected]>
@iAMSagar44 iAMSagar44 force-pushed the azure-openai-chatoptions-maxCompletionToken branch from a16565f to 87ded10 Compare May 24, 2025 02:38
@markpollack
Copy link
Member

Hi, thanks for the PR. We can't introduce a breaking change in our public API (e.g. by removing getMaxTokens() and similar accessors.) I think this should be handled in a more subtle way, keeping the current API but under the covers passing the right value into the azure sdk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants