ai 7.0.21 → 7.0.22

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.
@@ -85,7 +85,7 @@ import {
85
85
  } from "@ai-sdk/provider-utils";
86
86
 
87
87
  // src/version.ts
88
- var VERSION = true ? "7.0.21" : "0.0.0-test";
88
+ var VERSION = true ? "7.0.22" : "0.0.0-test";
89
89
 
90
90
  // src/util/download/download.ts
91
91
  var download = async ({
@@ -306,5 +306,6 @@ try {
306
306
  | [Google Vertex](/providers/ai-sdk-providers/google-vertex#transcription-models) | `chirp_3` |
307
307
  | [Google Vertex](/providers/ai-sdk-providers/google-vertex#transcription-models) | `telephony` |
308
308
  | [xAI](/providers/ai-sdk-providers/xai#transcription-models) | `default` |
309
+ | [Cartesia](/providers/ai-sdk-providers/cartesia#transcription-models) | `ink-whisper` |
309
310
 
310
311
  Above are a small subset of the transcription models supported by the AI SDK providers. For more, see the respective provider documentation.
@@ -168,5 +168,9 @@ try {
168
168
  | [Google Vertex](/providers/ai-sdk-providers/google-vertex#speech-models) | `gemini-2.5-flash-lite-preview-tts` |
169
169
  | [Google Vertex](/providers/ai-sdk-providers/google-vertex#speech-models) | `gemini-3.1-flash-tts-preview` |
170
170
  | [xAI](/providers/ai-sdk-providers/xai#speech-models) | `default` |
171
+ | [Cartesia](/providers/ai-sdk-providers/cartesia#speech-models) | `sonic-3.5` |
172
+ | [Cartesia](/providers/ai-sdk-providers/cartesia#speech-models) | `sonic-3` |
173
+ | [Cartesia](/providers/ai-sdk-providers/cartesia#speech-models) | `sonic-2` |
174
+ | [Cartesia](/providers/ai-sdk-providers/cartesia#speech-models) | `sonic-turbo` |
171
175
 
172
176
  Above are a small subset of the speech models supported by the AI SDK providers. For more, see the respective provider documentation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "7.0.21",
3
+ "version": "7.0.22",
4
4
  "type": "module",
5
5
  "description": "AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.",
6
6
  "license": "Apache-2.0",
@@ -94,7 +94,16 @@ export class BrowserRealtimeTransport {
94
94
 
95
95
  sendRaw(data: unknown): void {
96
96
  if (this.ws?.readyState === WebSocket.OPEN) {
97
- this.ws.send(JSON.stringify(data));
97
+ if (
98
+ typeof data === 'string' ||
99
+ data instanceof ArrayBuffer ||
100
+ ArrayBuffer.isView(data) ||
101
+ data instanceof Blob
102
+ ) {
103
+ this.ws.send(data);
104
+ } else {
105
+ this.ws.send(JSON.stringify(data));
106
+ }
98
107
  }
99
108
  }
100
109