ai 5.0.221 → 5.0.222
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 +8 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +19 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 5.0.222
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d38a1d5: Route the warning system information banner to stderr so it does not corrupt application output written to stdout.
|
|
8
|
+
- Updated dependencies [b408f1d]
|
|
9
|
+
- @ai-sdk/gateway@2.0.121
|
|
10
|
+
|
|
3
11
|
## 5.0.221
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -2075,8 +2075,8 @@ interface StreamTextResult<TOOLS extends ToolSet, PARTIAL_OUTPUT> {
|
|
|
2075
2075
|
readonly providerMetadata: Promise<ProviderMetadata | undefined>;
|
|
2076
2076
|
/**
|
|
2077
2077
|
A text stream that returns only the generated text deltas. You can use it
|
|
2078
|
-
as either an AsyncIterable or a ReadableStream.
|
|
2079
|
-
stream
|
|
2078
|
+
as either an AsyncIterable or a ReadableStream. Error parts are not surfaced
|
|
2079
|
+
in this stream. Use the `onError` callback or `fullStream` to observe them.
|
|
2080
2080
|
*/
|
|
2081
2081
|
readonly textStream: AsyncIterableStream<string>;
|
|
2082
2082
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -2075,8 +2075,8 @@ interface StreamTextResult<TOOLS extends ToolSet, PARTIAL_OUTPUT> {
|
|
|
2075
2075
|
readonly providerMetadata: Promise<ProviderMetadata | undefined>;
|
|
2076
2076
|
/**
|
|
2077
2077
|
A text stream that returns only the generated text deltas. You can use it
|
|
2078
|
-
as either an AsyncIterable or a ReadableStream.
|
|
2079
|
-
stream
|
|
2078
|
+
as either an AsyncIterable or a ReadableStream. Error parts are not surfaced
|
|
2079
|
+
in this stream. Use the `onError` callback or `fullStream` to observe them.
|
|
2080
2080
|
*/
|
|
2081
2081
|
readonly textStream: AsyncIterableStream<string>;
|
|
2082
2082
|
/**
|
package/dist/index.js
CHANGED
|
@@ -185,6 +185,16 @@ function formatWarning(warning) {
|
|
|
185
185
|
}
|
|
186
186
|
var FIRST_WARNING_INFO_MESSAGE = "AI SDK Warning System: To turn off warning logging, set the AI_SDK_LOG_WARNINGS global to false.";
|
|
187
187
|
var hasLoggedBefore = false;
|
|
188
|
+
function emitWarning({
|
|
189
|
+
message,
|
|
190
|
+
type
|
|
191
|
+
}) {
|
|
192
|
+
if (typeof process !== "undefined" && typeof process.emitWarning === "function") {
|
|
193
|
+
process.emitWarning(message, { type });
|
|
194
|
+
} else {
|
|
195
|
+
console.warn(message);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
188
198
|
var logWarnings = (warnings) => {
|
|
189
199
|
if (warnings.length === 0) {
|
|
190
200
|
return;
|
|
@@ -199,10 +209,16 @@ var logWarnings = (warnings) => {
|
|
|
199
209
|
}
|
|
200
210
|
if (!hasLoggedBefore) {
|
|
201
211
|
hasLoggedBefore = true;
|
|
202
|
-
|
|
212
|
+
emitWarning({
|
|
213
|
+
message: FIRST_WARNING_INFO_MESSAGE,
|
|
214
|
+
type: "Warning"
|
|
215
|
+
});
|
|
203
216
|
}
|
|
204
217
|
for (const warning of warnings) {
|
|
205
|
-
|
|
218
|
+
emitWarning({
|
|
219
|
+
message: formatWarning(warning),
|
|
220
|
+
type: "Warning"
|
|
221
|
+
});
|
|
206
222
|
}
|
|
207
223
|
};
|
|
208
224
|
|
|
@@ -800,7 +816,7 @@ function detectMediaType({
|
|
|
800
816
|
var import_provider_utils2 = require("@ai-sdk/provider-utils");
|
|
801
817
|
|
|
802
818
|
// src/version.ts
|
|
803
|
-
var VERSION = true ? "5.0.
|
|
819
|
+
var VERSION = true ? "5.0.222" : "0.0.0-test";
|
|
804
820
|
|
|
805
821
|
// src/util/download/download.ts
|
|
806
822
|
var download = async ({
|