ai 6.0.0-beta.118 → 6.0.0-beta.119
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 +6 -0
- package/dist/index.d.mts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -4
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +3 -3
- package/dist/internal/index.d.ts +3 -3
- package/dist/internal/index.js +9 -3
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +12 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -783,7 +783,7 @@ import {
|
|
|
783
783
|
} from "@ai-sdk/provider-utils";
|
|
784
784
|
|
|
785
785
|
// src/version.ts
|
|
786
|
-
var VERSION = true ? "6.0.0-beta.
|
|
786
|
+
var VERSION = true ? "6.0.0-beta.119" : "0.0.0-test";
|
|
787
787
|
|
|
788
788
|
// src/util/download/download.ts
|
|
789
789
|
var download = async ({ url }) => {
|
|
@@ -930,7 +930,13 @@ async function convertToLanguageModelPrompt({
|
|
|
930
930
|
supportedUrls
|
|
931
931
|
);
|
|
932
932
|
const messages = [
|
|
933
|
-
...prompt.system != null ? [{ role: "system", content: prompt.system }] : [
|
|
933
|
+
...prompt.system != null ? typeof prompt.system === "string" ? [{ role: "system", content: prompt.system }] : [
|
|
934
|
+
{
|
|
935
|
+
role: "system",
|
|
936
|
+
content: prompt.system.content,
|
|
937
|
+
providerOptions: prompt.system.providerOptions
|
|
938
|
+
}
|
|
939
|
+
] : [],
|
|
934
940
|
...prompt.messages.map(
|
|
935
941
|
(message) => convertToLanguageModelMessage({ message, downloadedAssets })
|
|
936
942
|
)
|
|
@@ -1359,7 +1365,9 @@ async function prepareToolsAndToolChoice({
|
|
|
1359
1365
|
|
|
1360
1366
|
// src/prompt/standardize-prompt.ts
|
|
1361
1367
|
import { InvalidPromptError as InvalidPromptError2 } from "@ai-sdk/provider";
|
|
1362
|
-
import {
|
|
1368
|
+
import {
|
|
1369
|
+
safeValidateTypes
|
|
1370
|
+
} from "@ai-sdk/provider-utils";
|
|
1363
1371
|
import { z as z6 } from "zod/v4";
|
|
1364
1372
|
|
|
1365
1373
|
// src/prompt/message.ts
|
|
@@ -1587,7 +1595,7 @@ async function standardizePrompt(prompt) {
|
|
|
1587
1595
|
message: "prompt and messages cannot be defined at the same time"
|
|
1588
1596
|
});
|
|
1589
1597
|
}
|
|
1590
|
-
if (prompt.system != null && typeof prompt.system !== "string") {
|
|
1598
|
+
if (prompt.system != null && typeof prompt.system !== "string" && "role" in prompt.system && prompt.system.role !== "system") {
|
|
1591
1599
|
throw new InvalidPromptError2({
|
|
1592
1600
|
prompt,
|
|
1593
1601
|
message: "system must be a string"
|