@ai-sdk/openai 2.0.75 → 2.0.77
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 +12 -0
- package/dist/index.d.mts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +36 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -19
- 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 +35 -18
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +35 -18
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -510,7 +510,7 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactor
|
|
|
510
510
|
/**
|
|
511
511
|
* The URL opened by the model.
|
|
512
512
|
*/
|
|
513
|
-
url
|
|
513
|
+
url?: string | null;
|
|
514
514
|
} | {
|
|
515
515
|
/**
|
|
516
516
|
* Action type "find": Searches for a pattern within a loaded page.
|
|
@@ -519,11 +519,11 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactor
|
|
|
519
519
|
/**
|
|
520
520
|
* The URL of the page searched for the pattern.
|
|
521
521
|
*/
|
|
522
|
-
url
|
|
522
|
+
url?: string | null;
|
|
523
523
|
/**
|
|
524
524
|
* The pattern or text to search for within the page.
|
|
525
525
|
*/
|
|
526
|
-
pattern
|
|
526
|
+
pattern?: string | null;
|
|
527
527
|
};
|
|
528
528
|
}, {
|
|
529
529
|
/**
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -510,7 +510,7 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactor
|
|
|
510
510
|
/**
|
|
511
511
|
* The URL opened by the model.
|
|
512
512
|
*/
|
|
513
|
-
url
|
|
513
|
+
url?: string | null;
|
|
514
514
|
} | {
|
|
515
515
|
/**
|
|
516
516
|
* Action type "find": Searches for a pattern within a loaded page.
|
|
@@ -519,11 +519,11 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactor
|
|
|
519
519
|
/**
|
|
520
520
|
* The URL of the page searched for the pattern.
|
|
521
521
|
*/
|
|
522
|
-
url
|
|
522
|
+
url?: string | null;
|
|
523
523
|
/**
|
|
524
524
|
* The pattern or text to search for within the page.
|
|
525
525
|
*/
|
|
526
|
-
pattern
|
|
526
|
+
pattern?: string | null;
|
|
527
527
|
};
|
|
528
528
|
}, {
|
|
529
529
|
/**
|
package/dist/internal/index.js
CHANGED
|
@@ -1674,12 +1674,26 @@ var import_v48 = require("zod/v4");
|
|
|
1674
1674
|
var openaiImageResponseSchema = (0, import_provider_utils12.lazyValidator)(
|
|
1675
1675
|
() => (0, import_provider_utils12.zodSchema)(
|
|
1676
1676
|
import_v48.z.object({
|
|
1677
|
+
created: import_v48.z.number().nullish(),
|
|
1677
1678
|
data: import_v48.z.array(
|
|
1678
1679
|
import_v48.z.object({
|
|
1679
1680
|
b64_json: import_v48.z.string(),
|
|
1680
1681
|
revised_prompt: import_v48.z.string().nullish()
|
|
1681
1682
|
})
|
|
1682
|
-
)
|
|
1683
|
+
),
|
|
1684
|
+
background: import_v48.z.string().nullish(),
|
|
1685
|
+
output_format: import_v48.z.string().nullish(),
|
|
1686
|
+
size: import_v48.z.string().nullish(),
|
|
1687
|
+
quality: import_v48.z.string().nullish(),
|
|
1688
|
+
usage: import_v48.z.object({
|
|
1689
|
+
input_tokens: import_v48.z.number().nullish(),
|
|
1690
|
+
output_tokens: import_v48.z.number().nullish(),
|
|
1691
|
+
total_tokens: import_v48.z.number().nullish(),
|
|
1692
|
+
input_tokens_details: import_v48.z.object({
|
|
1693
|
+
image_tokens: import_v48.z.number().nullish(),
|
|
1694
|
+
text_tokens: import_v48.z.number().nullish()
|
|
1695
|
+
}).nullish()
|
|
1696
|
+
}).nullish()
|
|
1683
1697
|
})
|
|
1684
1698
|
)
|
|
1685
1699
|
);
|
|
@@ -1764,11 +1778,14 @@ var OpenAIImageModel = class {
|
|
|
1764
1778
|
},
|
|
1765
1779
|
providerMetadata: {
|
|
1766
1780
|
openai: {
|
|
1767
|
-
images: response.data.map(
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
} :
|
|
1771
|
-
|
|
1781
|
+
images: response.data.map((item) => ({
|
|
1782
|
+
...item.revised_prompt ? { revisedPrompt: item.revised_prompt } : {},
|
|
1783
|
+
...response.created != null ? { created: response.created } : {},
|
|
1784
|
+
...response.size != null ? { size: response.size } : {},
|
|
1785
|
+
...response.quality != null ? { quality: response.quality } : {},
|
|
1786
|
+
...response.background != null ? { background: response.background } : {},
|
|
1787
|
+
...response.output_format != null ? { outputFormat: response.output_format } : {}
|
|
1788
|
+
}))
|
|
1772
1789
|
}
|
|
1773
1790
|
}
|
|
1774
1791
|
};
|
|
@@ -2614,12 +2631,12 @@ var openaiResponsesChunkSchema = (0, import_provider_utils21.lazyValidator)(
|
|
|
2614
2631
|
}),
|
|
2615
2632
|
import_v414.z.object({
|
|
2616
2633
|
type: import_v414.z.literal("open_page"),
|
|
2617
|
-
url: import_v414.z.string()
|
|
2634
|
+
url: import_v414.z.string().nullish()
|
|
2618
2635
|
}),
|
|
2619
2636
|
import_v414.z.object({
|
|
2620
2637
|
type: import_v414.z.literal("find"),
|
|
2621
|
-
url: import_v414.z.string(),
|
|
2622
|
-
pattern: import_v414.z.string()
|
|
2638
|
+
url: import_v414.z.string().nullish(),
|
|
2639
|
+
pattern: import_v414.z.string().nullish()
|
|
2623
2640
|
})
|
|
2624
2641
|
])
|
|
2625
2642
|
}),
|
|
@@ -2824,12 +2841,12 @@ var openaiResponsesResponseSchema = (0, import_provider_utils21.lazyValidator)(
|
|
|
2824
2841
|
}),
|
|
2825
2842
|
import_v414.z.object({
|
|
2826
2843
|
type: import_v414.z.literal("open_page"),
|
|
2827
|
-
url: import_v414.z.string()
|
|
2844
|
+
url: import_v414.z.string().nullish()
|
|
2828
2845
|
}),
|
|
2829
2846
|
import_v414.z.object({
|
|
2830
2847
|
type: import_v414.z.literal("find"),
|
|
2831
|
-
url: import_v414.z.string(),
|
|
2832
|
-
pattern: import_v414.z.string()
|
|
2848
|
+
url: import_v414.z.string().nullish(),
|
|
2849
|
+
pattern: import_v414.z.string().nullish()
|
|
2833
2850
|
})
|
|
2834
2851
|
])
|
|
2835
2852
|
}),
|
|
@@ -3172,12 +3189,12 @@ var webSearchOutputSchema = (0, import_provider_utils25.lazySchema)(
|
|
|
3172
3189
|
}),
|
|
3173
3190
|
import_v418.z.object({
|
|
3174
3191
|
type: import_v418.z.literal("openPage"),
|
|
3175
|
-
url: import_v418.z.string()
|
|
3192
|
+
url: import_v418.z.string().nullish()
|
|
3176
3193
|
}),
|
|
3177
3194
|
import_v418.z.object({
|
|
3178
3195
|
type: import_v418.z.literal("find"),
|
|
3179
|
-
url: import_v418.z.string(),
|
|
3180
|
-
pattern: import_v418.z.string()
|
|
3196
|
+
url: import_v418.z.string().nullish(),
|
|
3197
|
+
pattern: import_v418.z.string().nullish()
|
|
3181
3198
|
})
|
|
3182
3199
|
]),
|
|
3183
3200
|
sources: import_v418.z.array(
|
|
@@ -3226,12 +3243,12 @@ var webSearchPreviewOutputSchema = (0, import_provider_utils26.lazySchema)(
|
|
|
3226
3243
|
}),
|
|
3227
3244
|
import_v419.z.object({
|
|
3228
3245
|
type: import_v419.z.literal("openPage"),
|
|
3229
|
-
url: import_v419.z.string()
|
|
3246
|
+
url: import_v419.z.string().nullish()
|
|
3230
3247
|
}),
|
|
3231
3248
|
import_v419.z.object({
|
|
3232
3249
|
type: import_v419.z.literal("find"),
|
|
3233
|
-
url: import_v419.z.string(),
|
|
3234
|
-
pattern: import_v419.z.string()
|
|
3250
|
+
url: import_v419.z.string().nullish(),
|
|
3251
|
+
pattern: import_v419.z.string().nullish()
|
|
3235
3252
|
})
|
|
3236
3253
|
])
|
|
3237
3254
|
})
|