Support for max_completion_tokens was introduced in ChatCompletionsOptions class (Azure SDK for Java - package com.azure.ai.openai.models) last year.

Reference - https://github.com/Azure/azure-sdk-for-java/pull/43037

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)

Comment From: iAMSagar44

I have submitted a pull request for this change - https://github.com/spring-projects/spring-ai/pull/3305