Skip to content

Spring AI 1.1.1 breaks compatibility with Spring Boot 3.5's default Kotlin version (Kotlin 1.9.x) #5045

@breun

Description

@breun

Bug description
Upgrading from Spring AI 1.1.0 to 1.1.1 introduces this build error:

 (-1, -1) Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.2.0, expected version is 1.9.0.

It looks like 62b3290 broke compatibility with Spring Boot 3.5's default Kotlin version (1.9.25).

Environment
Spring Boot 3.5.8 with Spring AI 1.1.1.

Steps to reproduce

  1. Create a new Spring Boot application on https://start.spring.io using Maven, Kotlin and Spring Boot 3.5.8.
  2. Add spring-ai-bom:1.1.1 to dependency management.
  3. Add spring-ai-client-chat as a compile dependency.
  4. Run ./mvnw verify.
  5. The build fails with this error: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.2.0, expected version is 1.9.0.

Expected behavior
I expect the build to complete without errors, like it does with Spring AI 1.1.0.

Minimal Complete Reproducible example

I've published a reproducer project here: https://github.com/breun/spring-ai-1.1.1-kotlin-compatibility-issue

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions