Skip to content

[Core] The ChatClient auto-configuration doesn't back off when a ChatClient.Builder bean exists already #2034

@ThomasVitale

Description

@ThomasVitale

Bug description
The ChatClient.Builder bean auto-configured in ChatClientAutoConfiguration is created even though a bean already exists (defined custom by an application).

Environment
Spring AI 1.0.0-SNAPSHOT
Java 23

Expected behavior
When a custom ChatClient.Builder bean is defined by an application, the default auto-configured one should not be created (the @ConditionalOnMissingBean should be added). That is in line with how other Builder beans are configured in Spring Boot (e.g. RestClient.Builder).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions