spring-projects / spring-projects/spring-ai

GoogleGenAiChatModel: Thought information missing in meta data v1.1.4

Open Beginner friendly
#5,804 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

https://github.com/spring-projects/spring-ai/blob/061d9a15313e32379c0bfe683df0d2e7e7ea96dc/models/spring-ai-google-genai/src/main/java/org/springframework/ai/google/genai/GoogleGenAiChatModel.java#L686

GoogleGenAiChatModel does not include the thought information in the meta data. Adding the following lines will be useful:

 // Natively check if this specific part is a thought
 boolean isThought = part.thought().orElse(false);
 messageMetadata.put("isThought", isThought);

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 in models/spring-ai-google-genai/src/main/java/org/springframework/ai/google/genai/GoogleGenAiChatModel.java around line 686, where message metadata is assembled. Inspect the surrounding handling of each part, then ensure the part's thought information is included in metadata under isThought. Done means thought parts and non-thought parts expose the corresponding metadata value.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ai
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
85/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.