@ai-sdk/google 3.0.15 → 3.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 3.0.17
4
+
5
+ ### Patch Changes
6
+
7
+ - 1524271: chore: add skill information to README files
8
+
9
+ ## 3.0.16
10
+
11
+ ### Patch Changes
12
+
13
+ - 97b3ebb: fix (provider/google): make `segment` optional in `groundingSupports` schema
14
+
15
+ The Google Generative AI API sometimes returns grounding supports without a `segment` field. This change makes the `segment` field optional to handle these responses correctly.
16
+
3
17
  ## 3.0.15
4
18
 
5
19
  ### Patch Changes
package/README.md CHANGED
@@ -10,6 +10,14 @@ The Google Generative AI provider is available in the `@ai-sdk/google` module. Y
10
10
  npm i @ai-sdk/google
11
11
  ```
12
12
 
13
+ ## Skill for Coding Agents
14
+
15
+ If you use coding agents such as Claude Code or Cursor, we highly recommend adding the AI SDK skill to your repository:
16
+
17
+ ```shell
18
+ npx skills add vercel/ai
19
+ ```
20
+
13
21
  ## Provider Instance
14
22
 
15
23
  You can import the default provider instance `google` from `@ai-sdk/google`:
package/dist/index.d.mts CHANGED
@@ -105,11 +105,11 @@ declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{
105
105
  } | null | undefined;
106
106
  }[] | null | undefined;
107
107
  groundingSupports?: {
108
- segment: {
108
+ segment?: {
109
109
  startIndex?: number | null | undefined;
110
110
  endIndex?: number | null | undefined;
111
111
  text?: string | null | undefined;
112
- };
112
+ } | null | undefined;
113
113
  segment_text?: string | null | undefined;
114
114
  groundingChunkIndices?: number[] | null | undefined;
115
115
  supportChunkIndices?: number[] | null | undefined;
package/dist/index.d.ts CHANGED
@@ -105,11 +105,11 @@ declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{
105
105
  } | null | undefined;
106
106
  }[] | null | undefined;
107
107
  groundingSupports?: {
108
- segment: {
108
+ segment?: {
109
109
  startIndex?: number | null | undefined;
110
110
  endIndex?: number | null | undefined;
111
111
  text?: string | null | undefined;
112
- };
112
+ } | null | undefined;
113
113
  segment_text?: string | null | undefined;
114
114
  groundingChunkIndices?: number[] | null | undefined;
115
115
  supportChunkIndices?: number[] | null | undefined;
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(src_exports);
30
30
  var import_provider_utils15 = require("@ai-sdk/provider-utils");
31
31
 
32
32
  // src/version.ts
33
- var VERSION = true ? "3.0.15" : "0.0.0-test";
33
+ var VERSION = true ? "3.0.17" : "0.0.0-test";
34
34
 
35
35
  // src/google-generative-ai-embedding-model.ts
36
36
  var import_provider = require("@ai-sdk/provider");
@@ -1502,7 +1502,7 @@ var getGroundingMetadataSchema = () => import_v45.z.object({
1502
1502
  startIndex: import_v45.z.number().nullish(),
1503
1503
  endIndex: import_v45.z.number().nullish(),
1504
1504
  text: import_v45.z.string().nullish()
1505
- }),
1505
+ }).nullish(),
1506
1506
  segment_text: import_v45.z.string().nullish(),
1507
1507
  groundingChunkIndices: import_v45.z.array(import_v45.z.number()).nullish(),
1508
1508
  supportChunkIndices: import_v45.z.array(import_v45.z.number()).nullish(),