Skip to content

Conversation

@vercel-ai-sdk
Copy link
Contributor

@vercel-ai-sdk vercel-ai-sdk bot commented Oct 29, 2025

This is an automated backport of #9867 to the release-v5.0 branch.

…schema (#9867)

## Background

A small percentage of the time when using the Gemini "URL Context"
feature we get a Zod validation error on the response due to a missing
title property.

## Summary

Added `.nullish()` to `groundingChunks[].web.title` and
`groundingChunks[].retrievedContext.title`.

Notes:

* I've personally observed the missing `title` property only on
`groundingChunks[].web.title`. I'm guessing that the same situation
could occur on `groundingChunks[].retrievedContext.title` and they
should have the same schema.
* I used `.nullish()` instead of `.optional()` to maintain consistency
with the rest of
`packages/google/src/google-generative-ai-language-model.ts`, though I
have only observed a missing (`undefined`) `title` property, not a
`title: null`.

## Related Issues

Fixes #9842
@samjbobb
Copy link
Contributor

@gr2m Is there anything I can do to unblock this?

@gr2m
Copy link
Collaborator

gr2m commented Nov 4, 2025

apologies, I'm on it

@gr2m
Copy link
Collaborator

gr2m commented Nov 4, 2025

This was blocked by the azure/playwright server outage last week :( Should be good now

@vercel-ai-sdk vercel-ai-sdk bot merged commit 9a999c4 into release-v5.0 Nov 4, 2025
18 checks passed
@vercel-ai-sdk vercel-ai-sdk bot deleted the backport-pr-9867-to-release-v5.0 branch November 4, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants