# Both starters in one Spring Boot 4.1.1 application

Spring AI: spring-ai-starter-model-openai 2.0.1.  LangChain4j: langchain4j-open-ai-spring-boot4-starter 1.22.0-beta32.

1. Both starters, nothing else:
   FAILED: BeanDefinitionOverrideException: bean 'openAiChatModel' is defined twice, by org.springframework.ai.model.openai.autoconfigure.OpenAiChatAutoConfiguration and by dev.langchain4j.openai.spring.OpenAiAutoConfiguration

2. spring.autoconfigure.exclude=dev.langchain4j.openai.spring.OpenAiAutoConfiguration:
   context started
   bean chatClientBuilder -> org.springframework.ai.chat.client.ChatClient$Builder
   bean openAiChatModel -> org.springframework.ai.openai.OpenAiChatModel
   beans of type dev.langchain4j.model.chat.ChatModel: 0
   beans of type org.springframework.ai.chat.model.ChatModel: 1

3. spring.main.allow-bean-definition-overriding=true:
   context started
   bean openAiChatModel -> org.springframework.ai.openai.OpenAiChatModel
   bean chatClientBuilder -> org.springframework.ai.chat.client.ChatClient$Builder
   beans of type dev.langchain4j.model.chat.ChatModel: 0
   beans of type org.springframework.ai.chat.model.ChatModel: 1
