Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create. If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:

Bug description A clear and concise description of what the bug is about.

Image

Environment Please provide as many details as possible: Spring AI version, Java version, which vector store you use if any, etc JDK21 + Spring ai 1.0.0

Steps to reproduce Steps to reproduce the issue. 1. There is a system prompt, and the system prompt is not the first message. 2. Augment the system message

Expected behavior A clear and concise description of what you expected to happen. Add only one system prompt.

Comment From: sunyuhan1998

I have reproduced your issue, and it is indeed as you described. I have submitted a PR to fix this issue: https://github.com/spring-projects/spring-ai/pull/3268