@ai-sdk/provider-utils 5.0.67 → 5.0.69

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider-utils",
3
- "version": "5.0.67",
3
+ "version": "5.0.69",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -42,7 +42,7 @@
42
42
  }
43
43
  },
44
44
  "dependencies": {
45
- "@ai-sdk/provider": "4.0.33",
45
+ "@ai-sdk/provider": "4.0.34",
46
46
  "@standard-schema/spec": "^1.1.0",
47
47
  "@workflow/serde": "4.1.0",
48
48
  "eventsource-parser": "^3.0.8",
@@ -10,6 +10,14 @@ export function convertBase64ToUint8Array(base64String: string) {
10
10
  }
11
11
 
12
12
  export function convertUint8ArrayToBase64(array: Uint8Array): string {
13
+ if (typeof globalThis.Buffer?.from === 'function') {
14
+ return globalThis.Buffer.from(
15
+ array.buffer,
16
+ array.byteOffset,
17
+ array.byteLength,
18
+ ).toString('base64');
19
+ }
20
+
13
21
  const chunks: string[] = [];
14
22
  const chunkSize = 4096;
15
23