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
spring-ai-client-chat/src/main/java/org/springframework/ai/chat/client/DefaultChatClientUtils.java:85 has a comment // User Test => Last in the list, but this block handles the user text payload (processedUserText).
It’s clearly a typo and should read “User Text,” since no “test” concept exists in this method.
Environment
Spring AI main (current HEAD), JVM 21 (but version does not matter; this is a source typo).
Steps to reproduce
- Open
DefaultChatClientUtils#processRequest(ChatClientRequest<?>). - Scroll to the user message section (around line 85).
- Observe the comment
// User Test => Last in the listjust above the processedUserText logic.
Expected behavior
The comment should be // User Text => Last in the list to match the accompanying code and to avoid confusion for readers.
Minimal Complete Reproducible example
Source snippet showing the issue:
// User Test => Last in the list
String processedUserText = inputRequest.getUserText();
Changing the comment to
// User Text => Last in the list
String processedUserText = inputRequest.getUserText();
resolves the typo.
Comment From: parazit-IR
Hi, I'd be happy to fix this typo. Can I take this issue?