Skip to content

Remove OpenAI AI setters from options#5960

Closed
sdeleuze wants to merge 10 commits intospring-projects:mainfrom
sdeleuze:openai-ai-remove-options
Closed

Remove OpenAI AI setters from options#5960
sdeleuze wants to merge 10 commits intospring-projects:mainfrom
sdeleuze:openai-ai-remove-options

Conversation

@sdeleuze
Copy link
Copy Markdown
Contributor

@sdeleuze sdeleuze commented May 6, 2026

  • Remove @NestedConfigurationProperty from OpenAiChatOptions
  • Expose options directly under the spring.ai.openai.chat prefix instead of spring.ai.openai.chat.options
  • Implement Spring Boot deprecation mechanism for the legacy options nested properties to gracefully guide users during upgrades

@sdeleuze sdeleuze added this to the 2.0.0-M6 milestone May 6, 2026
@sdeleuze sdeleuze requested a review from ilayaperumalg May 6, 2026 16:21
@ilayaperumalg ilayaperumalg self-assigned this May 6, 2026
@ilayaperumalg
Copy link
Copy Markdown
Member

The class AbstractOpenAiOptions still has some setter methods.

sdeleuze added 3 commits May 7, 2026 15:31
- Remove `@NestedConfigurationProperty` from `OpenAiChatOptions`
- Expose options directly under the `spring.ai.openai.chat` prefix
  instead of `spring.ai.openai.chat.options`
- Implement Spring Boot deprecation mechanism for the legacy `options`
  nested properties to gracefully guide users during upgrades

Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
@sdeleuze sdeleuze force-pushed the openai-ai-remove-options branch from 3729ea9 to 8770847 Compare May 7, 2026 13:31
sdeleuze added 3 commits May 7, 2026 17:39
Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
this.options = options;
}

public class Options {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These options don't include the properties from AbstractOpenAiOptions (which are now getting deprecated). For instance, the property spring.ai.openai.chat.base-url is no longer supported/deprecated.

@ilayaperumalg
Copy link
Copy Markdown
Member

OpenAiBindingsPropertiesProcessor and TanzuBindingsPropertiesProcessor need to be fixed with the changes.

@ilayaperumalg
Copy link
Copy Markdown
Member

Can we add a note at the upgrade-notes on the changes introduced as part of these ongoing changes with the deprecations across the models?

sdeleuze added 2 commits May 7, 2026 22:14
…ptions

Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
…operties

Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
@sdeleuze sdeleuze force-pushed the openai-ai-remove-options branch from cfadb87 to d9506b3 Compare May 7, 2026 20:37
Comment thread spring-ai-docs/src/main/antora/modules/ROOT/pages/upgrade-notes.adoc Outdated
sdeleuze added 2 commits May 8, 2026 00:03
Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
@sdeleuze sdeleuze force-pushed the openai-ai-remove-options branch from a989131 to 4c4a2dc Compare May 7, 2026 22:03
@ilayaperumalg
Copy link
Copy Markdown
Member

Rebased and merged without squashing the commits to make it easier to go through the changes.

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.

3 participants