Skip to content

GH-5656: Fix AzureOpenAiChatOptions.stop field initializer regression#5661

Open
ZhangDT-sky wants to merge 1 commit intospring-projects:mainfrom
ZhangDT-sky:GH-5656
Open

GH-5656: Fix AzureOpenAiChatOptions.stop field initializer regression#5661
ZhangDT-sky wants to merge 1 commit intospring-projects:mainfrom
ZhangDT-sky:GH-5656

Conversation

@ZhangDT-sky
Copy link

@ZhangDT-sky ZhangDT-sky commented Mar 23, 2026

This PR fixes a regression where the stop field in AzureOpenAiChatOptions was initialized to an empty ArrayList. This caused the JSON payload to always include "stop": [], which is rejected by Azure OpenAI reasoning models (e.g., o1, o3).

Changes:

  • Removed the default initialization of the stop field.
  • Added a regression test in AzureOpenAiChatOptionsTests to ensure the stop field remains null after options merging and Jackson roundtrips.

Fixes #5656

…izer regression

This PR fixes a regression where the 'stop' field in 'AzureOpenAiChatOptions' was initialized to an empty 'ArrayList'. This caused the JSON payload to always include '"stop": []', which is rejected by Azure OpenAI reasoning models (o1, o3).

Changes:
- Removed default initialization of the 'stop' field.
- Added a regression test in 'AzureOpenAiChatOptionsTests' to ensure 'stop' remains 'null' after options merging/Jackson roundtrips.

Closes spring-projects#5656

Signed-off-by: ZhangDT-sky <485918776@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AzureOpenAiChatOptions.stop field initializer regression in M3 causes "stop": [] to be sent to Azure, breaking reasoning models

1 participant