Incorrect zod schema for google-generative-ai-language-model

### Description

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. 

The call:

```
const { text, providerMetadata, finishReason } = await generateText({
      model: vertex("gemini-2.5-flash"),
      tools: { url_context: vertex.tools.urlContext({}) as any },
      system: systemPrompt,
      prompt: `URL: ${url}\n\nPrompt: ${prompt}`,
      experimental_telemetry: { isEnabled: true },
    });
```


The error: 

```
[2025-10-27 17:10:30.185 -0600] ERROR: Error in gemin-web-fetch-tool
    url: "https://fowlerprecision.com/products/fowler-bowers-bluetooth-0-080-0-250-2-6mm-xth3-holematic-pistol-grip-set"
    prompt: "<redacted but it's pretty basic>"
    error: {
      "name": "AI_APICallError",
      "cause": {
        "name": "AI_TypeValidationError",
        "cause": {
          "name": "ZodError",
          "message": "[\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"candidates\",\n      0,\n      \"groundingMetadata\",\n      \"groundingChunks\",\n      0,\n      \"web\",\n      \"title\"\n    ],\n    \"message\": \"Invalid input: expected string, received undefined\"\n  }\n]"
        },
        "value": {
          "candidates": [
            {
              "content": {
                "role": "model",
                "parts": [
                  {
                    "text": "## Product Page Details\n\n*   **Manufacturer Name:** Fowler-Bowers\n*   **Manufacturer Part Number/Model (MPN/SKU):** 54567009BT\n*   **Product Title Confirmation:** The product title is \"Fowler-Bowers BLUETOOTH 0.080\" - 0.250\"/2 - 6mm XTH3 Holematic Pistol Grip Set\" and the SKU is \"54567009BT\", which matches the provided part number \"54567009BT\" or \"54-567-009-BT\"."
                  }
                ]
              },
              "finishReason": "STOP",
              "groundingMetadata": {
                "groundingChunks": [
                  {
                    "web": {
                      "uri": "https://fowlerprecision.com/products/fowler-bowers-bluetooth-0-080-0-250-2-6mm-xth3-holematic-pistol-grip-set"
                    }
                  }
                ],
                "groundingSupports": [
                  {
                    "segment": {
                      "startIndex": 25,
                      "endIndex": 65,
                      "text": "*   **Manufacturer Name:** Fowler-Bowers"
                    },
                    "groundingChunkIndices": [
                      0
                    ]
                  },
                  {
                    "segment": {
                      "startIndex": 66,
                      "endIndex": 126,
                      "text": "*   **Manufacturer Part Number/Model (MPN/SKU):** 54567009BT"
                    },
                    "groundingChunkIndices": [
                      0
                    ]
                  },
                  {
                    "segment": {
                      "startIndex": 127,
                      "endIndex": 365,
                      "text": "*   **Product Title Confirmation:** The product title is \"Fowler-Bowers BLUETOOTH 0.080\" - 0.250\"/2 - 6mm XTH3 Holematic Pistol Grip Set\" and the SKU is \"54567009BT\", which matches the provided part number \"54567009BT\" or \"54-567-009-BT\"."
                    },
                    "groundingChunkIndices": [
                      0
                    ]
                  }
                ]
              },
              "urlContextMetadata": {
                "urlMetadata": [
                  {
                    "retrievedUrl": "https://fowlerprecision.com/products/fowler-bowers-bluetooth-0-080-0-250-2-6mm-xth3-holematic-pistol-grip-set",
                    "urlRetrievalStatus": "URL_RETRIEVAL_STATUS_SUCCESS"
                  }
                ]
              }
            }
          ],
          "usageMetadata": {
            "promptTokenCount": 256,
            "candidatesTokenCount": 137,
            "totalTokenCount": 848,
            "trafficType": "ON_DEMAND",
            "promptTokensDetails": [
              {
                "modality": "TEXT",
                "tokenCount": 256
              }
            ],
            "candidatesTokensDetails": [
              {
                "modality": "TEXT",
                "tokenCount": 137
              }
            ],
            "toolUsePromptTokenCount": 106,
            "thoughtsTokenCount": 349
          },
          "modelVersion": "gemini-2.5-flash",
          "createTime": "2025-10-27T23:10:27.280423Z",
          "responseId": "<redacted>"
        }
      },
      "url": "https://aiplatform.googleapis.com/v1beta1/projects/<redacted>/locations/global/publishers/google/models/gemini-2.5-flash:generateContent",
      "requestBodyValues": {
        "generationConfig": {
          "maxOutputTokens": 20000
        },
        "contents": [
          {
            "role": "user",
            "parts": [
              {
                "text": "URL: https://fowlerprecision.com/products/fowler-bowers-bluetooth-0-080-0-250-2-6mm-xth3-holematic-pistol-grip-set\n\nPrompt: <redacted but it's a basic prompt to get some info from the page>"
              }
            ]
          }
        ],
        "systemInstruction": {
          "parts": [
            {
              "text": "<redacted but it's a pretty basic prompt to get some page content>"
            }
          ]
        },
        "tools": [
          {
            "urlContext": {}
          }
        ]
      },
      "statusCode": 200,
      "responseHeaders": {
        "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
        "content-encoding": "gzip",
        "content-type": "application/json; charset=UTF-8",
        "date": "Mon, 27 Oct 2025 23:10:30 GMT",
        "server": "scaffolding on HTTPServer2",
        "transfer-encoding": "chunked",
        "vary": "Origin, X-Origin, Referer",
        "x-content-type-options": "nosniff",
        "x-frame-options": "SAMEORIGIN",
        "x-xss-protection": "0"
      },
      "responseBody": "{\n  \"candidates\": [\n    {\n      \"content\": {\n        \"role\": \"model\",\n        \"parts\": [\n          {\n            \"text\": \"## Product Page Details\\n\\n*   **Manufacturer Name:** Fowler-Bowers\\n*   **Manufacturer Part Number/Model (MPN/SKU):** 54567009BT\\n*   **Product Title Confirmation:** The product title is \\\"Fowler-Bowers BLUETOOTH 0.080\\\" - 0.250\\\"/2 - 6mm XTH3 Holematic Pistol Grip Set\\\" and the SKU is \\\"54567009BT\\\", which matches the provided part number \\\"54567009BT\\\" or \\\"54-567-009-BT\\\".\"\n          }\n        ]\n      },\n      \"finishReason\": \"STOP\",\n      \"groundingMetadata\": {\n        \"groundingChunks\": [\n          {\n            \"web\": {\n              \"uri\": \"https://fowlerprecision.com/products/fowler-bowers-bluetooth-0-080-0-250-2-6mm-xth3-holematic-pistol-grip-set\"\n            }\n          }\n        ],\n        \"groundingSupports\": [\n          {\n            \"segment\": {\n              \"startIndex\": 25,\n              \"endIndex\": 65,\n              \"text\": \"*   **Manufacturer Name:** Fowler-Bowers\"\n            },\n            \"groundingChunkIndices\": [\n              0\n            ]\n          },\n          {\n            \"segment\": {\n              \"startIndex\": 66,\n              \"endIndex\": 126,\n              \"text\": \"*   **Manufacturer Part Number/Model (MPN/SKU):** 54567009BT\"\n            },\n            \"groundingChunkIndices\": [\n              0\n            ]\n          },\n          {\n            \"segment\": {\n              \"startIndex\": 127,\n              \"endIndex\": 365,\n              \"text\": \"*   **Product Title Confirmation:** The product title is \\\"Fowler-Bowers BLUETOOTH 0.080\\\" - 0.250\\\"/2 - 6mm XTH3 Holematic Pistol Grip Set\\\" and the SKU is \\\"54567009BT\\\", which matches the provided part number \\\"54567009BT\\\" or \\\"54-567-009-BT\\\".\"\n            },\n            \"groundingChunkIndices\": [\n              0\n            ]\n          }\n        ]\n      },\n      \"urlContextMetadata\": {\n        \"urlMetadata\": [\n          {\n            \"retrievedUrl\": \"https://fowlerprecision.com/products/fowler-bowers-bluetooth-0-080-0-250-2-6mm-xth3-holematic-pistol-grip-set\",\n            \"urlRetrievalStatus\": \"URL_RETRIEVAL_STATUS_SUCCESS\"\n          }\n        ]\n      }\n    }\n  ],\n  \"usageMetadata\": {\n    \"promptTokenCount\": 256,\n    \"candidatesTokenCount\": 137,\n    \"totalTokenCount\": 848,\n    \"trafficType\": \"ON_DEMAND\",\n    \"promptTokensDetails\": [\n      {\n        \"modality\": \"TEXT\",\n        \"tokenCount\": 256\n      }\n    ],\n    \"candidatesTokensDetails\": [\n      {\n        \"modality\": \"TEXT\",\n        \"tokenCount\": 137\n      }\n    ],\n    \"toolUsePromptTokenCount\": 106,\n    \"thoughtsTokenCount\": 349\n  },\n  \"modelVersion\": \"gemini-2.5-flash\",\n  \"createTime\": \"2025-10-27T23:10:27.280423Z\",\n  \"responseId\": \"<redacted>\"\n}\n",
      "isRetryable": false
    }
```


I believe [here](https://github.com/vercel/ai/blob/e8877a3f9c76fa78b971b9b530de74e9b07a0b77/packages/google/src/google-generative-ai-language-model.ts#L711) `optional()` should be added to `title`

### AI SDK Version

* "@ai-sdk/google": "^2.0.6"
* "@ai-sdk/google-vertex": "^3.0.48"
* "ai": "^5.0.60"

And it looks like the relevant code is on `main` right now

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Labels: bug, pull request welcome, ai/provider, provider/google
State: closed