- Notifications
You must be signed in to change notification settings - Fork1k
Addvendor_id
andfinish_reason
to Gemini/Google model responses#1800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@davide-andreoli Thanks! Can you please have a look at the failing tests, and also implement this in the new |
@DouweM The test failures are due to the vendor_details field. I see two potential ways to address this:
Please let me know which approach you’d prefer. And sure, no problem with adding the fields to |
DouweM commentedMay 22, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@davide-andreoli I had a chat about this with@dmontagu and we decided to make it so that dataclass fields with default values are excluded from reps:#1812. So once that merges (should be soon), you can merge/rebase, drop |
28dec6a
to273e783
CompareHello@DouweM, work is done and tests are passing. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
id
andfinish_reason
to Geminivendor_id
andfinish_reason
to Gemini/Google model responses1e22652
intopydantic:mainUh oh!
There was an error while loading.Please reload this page.
@davide-andreoli Thanks Davide! |
Uh oh!
There was an error while loading.Please reload this page.
Add
id
andfinish_reason
to GeminiDescription
FollowingPR#1761 , this update adds
vendor_id
andfinish_reason
to Gemini answers.Below the details:
vendor_id
: maps toresponseId
finish_reason
:finishReason
for the first candidate of the output. The finish reason is added in vendor_details, following the attribute specificationThe handling of finish_reasons aligns with the current approach for other response parts, where only the first candidate's reason is considered.
Testing
The changes were validated using my API key, and the behavior matches expectations.
Impact
This update impacts only Gemini Responses, but it is not a breaking change.