spring-projects / spring-projects/spring-ai
Support Gemini Structured Outputs
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
Expected Behavior
Currently, we cannot use structured outputs with Google Gemini models through Vertex. This is supported and would be extremely beneficial. We allow customers to define the output that they want the want to output in so we would want to pass this through to the API.
Current Behavior
We are currently including additional prompting to get Gemini to behave how the user wants, but there are times where this output is still not enforced.
Context
https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/control-generated-output
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Vertex AI documentation on controlled generated output and trace how Spring AI currently handles Gemini requests and additional prompting. Identify the existing customer output-definition path, then verify that it reaches the Vertex API as structured output configuration and that responses follow the requested schema.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- google-cloud, java, spring
- Domain
- ai, api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100