spring-projects / spring-projects/spring-ai

chatClientBuilder in org.springframework.ai.autoconfigure.chat.client.ChatClientAutoConfiguration required a single bean, but more were found:

Open
#2,230 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 7h
Merged PRs (30d)
6

Description

Parameter 1 of method chatClientBuilder in org.springframework.ai.autoconfigure.chat.client.ChatClientAutoConfiguration required a single bean, but 3 were found:
- moonshotChatModel: defined by method 'moonshotChatModel' in class path resource [org/springframework/ai/autoconfigure/moonshot/MoonshotAutoConfiguration.class]
- openAiChatModel: defined by method 'openAiChatModel' in class path resource [org/springframework/ai/autoconfigure/openai/OpenAiAutoConfiguration.class]
- zhiPuAiChatModel: defined by method 'zhiPuAiChatModel' in class path resource [org/springframework/ai/autoconfigure/zhipuai/ZhiPuAiAutoConfiguration.class]

This may be due to missing parameter name information

Integration of multiple vendor AI emerged

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading org.springframework.ai.autoconfigure.chat.client.ChatClientAutoConfiguration and the moonshot, OpenAI, and ZhiPuAi auto-configuration classes named in the error. Reproduce the application startup failure with multiple vendor chat model beans, then verify that the resulting configuration supports the reported multi-vendor integration without the single-bean error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
ai, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.