@depup/ai-sdk__google 4.0.65-depup.0 → 4.0.67-depup.0

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,22 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 4.0.67
4
+
5
+ ### Patch Changes
6
+
7
+ - ab6e9f9: feat(google): add batch cancellation and listing
8
+ - Updated dependencies [9942196]
9
+ - @ai-sdk/provider@4.0.13
10
+ - @ai-sdk/provider-utils@5.0.39
11
+
12
+ ## 4.0.66
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [912fb01]
17
+ - @ai-sdk/provider@4.0.12
18
+ - @ai-sdk/provider-utils@5.0.38
19
+
3
20
  ## 4.0.65
4
21
 
5
22
  ### Patch Changes
package/README.md CHANGED
@@ -13,8 +13,8 @@ npm install @depup/ai-sdk__google
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [@ai-sdk/google](https://www.npmjs.com/package/@ai-sdk/google) @ 4.0.65 |
17
- | Processed | 2026-09-09 |
16
+ | Original | [@ai-sdk/google](https://www.npmjs.com/package/@ai-sdk/google) @ 4.0.67 |
17
+ | Processed | 2026-09-10 |
18
18
  | Smoke test | failed |
19
19
  | Deps updated | 0 |
20
20
 
package/changes.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "bumped": {},
3
- "timestamp": "2026-09-09T00:32:20.646Z",
3
+ "timestamp": "2026-09-10T00:30:13.877Z",
4
4
  "totalUpdated": 0
5
5
  }
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  } from "@ai-sdk/provider-utils";
8
8
 
9
9
  // src/version.ts
10
- var VERSION = true ? "4.0.65" : "0.0.0-test";
10
+ var VERSION = true ? "4.0.67" : "0.0.0-test";
11
11
 
12
12
  // src/google-embedding-model.ts
13
13
  import {
@@ -3095,22 +3095,32 @@ var googleBatchOutputSchema = z6.object({
3095
3095
  )
3096
3096
  }).nullish()
3097
3097
  });
3098
+ var googleBatchOperationZodSchema = () => z6.object({
3099
+ name: z6.string(),
3100
+ metadata: z6.object({
3101
+ state: z6.string().nullish(),
3102
+ createTime: z6.string().nullish(),
3103
+ batchStats: googleBatchStatsSchema.nullish(),
3104
+ output: googleBatchOutputSchema.nullish()
3105
+ }).nullish(),
3106
+ done: z6.boolean().nullish(),
3107
+ error: googleRpcStatusSchema.nullish(),
3108
+ response: googleBatchOutputSchema.nullish()
3109
+ });
3098
3110
  var googleBatchOperationSchema = lazySchema6(
3111
+ () => zodSchema6(googleBatchOperationZodSchema())
3112
+ );
3113
+ var googleBatchListResponseSchema = lazySchema6(
3099
3114
  () => zodSchema6(
3100
3115
  z6.object({
3101
- name: z6.string(),
3102
- metadata: z6.object({
3103
- state: z6.string().nullish(),
3104
- createTime: z6.string().nullish(),
3105
- batchStats: googleBatchStatsSchema.nullish(),
3106
- output: googleBatchOutputSchema.nullish()
3107
- }).nullish(),
3108
- done: z6.boolean().nullish(),
3109
- error: googleRpcStatusSchema.nullish(),
3110
- response: googleBatchOutputSchema.nullish()
3116
+ operations: z6.array(googleBatchOperationZodSchema()).nullish(),
3117
+ nextPageToken: z6.string().nullish()
3111
3118
  })
3112
3119
  )
3113
3120
  );
3121
+ var googleBatchCancelResponseSchema = lazySchema6(
3122
+ () => zodSchema6(z6.object({}))
3123
+ );
3114
3124
  var googleFileUploadResponseSchema = lazySchema6(
3115
3125
  () => zodSchema6(
3116
3126
  z6.object({
@@ -3326,6 +3336,48 @@ var GoogleBatch = class {
3326
3336
  async doGetBatchStatus(options) {
3327
3337
  return convertGoogleBatchStatus(await this.retrieveBatch(options));
3328
3338
  }
3339
+ async doCancelBatch(options) {
3340
+ await postJsonToApi3({
3341
+ url: `${this.batchConfig.baseURL}/${options.batchId}:cancel`,
3342
+ headers: await this.getHeaders(options.headers),
3343
+ body: {},
3344
+ failedResponseHandler: googleFailedResponseHandler,
3345
+ successfulResponseHandler: createJsonResponseHandler3(
3346
+ googleBatchCancelResponseSchema
3347
+ ),
3348
+ abortSignal: options.abortSignal,
3349
+ fetch: this.batchConfig.fetch
3350
+ });
3351
+ return {};
3352
+ }
3353
+ async doListBatches(options) {
3354
+ var _a;
3355
+ const url = new URL(`${this.batchConfig.baseURL}/batches`);
3356
+ if (options.limit != null) {
3357
+ url.searchParams.set("pageSize", String(options.limit));
3358
+ }
3359
+ if (options.cursor != null) {
3360
+ url.searchParams.set("pageToken", options.cursor);
3361
+ }
3362
+ const { value: page } = await getFromApi({
3363
+ url: url.toString(),
3364
+ headers: await this.getHeaders(options.headers),
3365
+ failedResponseHandler: googleFailedResponseHandler,
3366
+ successfulResponseHandler: createJsonResponseHandler3(
3367
+ googleBatchListResponseSchema
3368
+ ),
3369
+ abortSignal: options.abortSignal,
3370
+ fetch: this.batchConfig.fetch,
3371
+ validateUrl: false
3372
+ });
3373
+ return {
3374
+ batches: ((_a = page.operations) != null ? _a : []).map((operation) => ({
3375
+ batchId: operation.name,
3376
+ ...convertGoogleBatchStatus(operation)
3377
+ })),
3378
+ ...page.nextPageToken != null ? { nextCursor: page.nextPageToken } : {}
3379
+ };
3380
+ }
3329
3381
  async doGetBatchResults(options) {
3330
3382
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
3331
3383
  const operation = await this.retrieveBatch(options);