@ai-sdk/openai 2.0.20 → 2.0.21
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 +13 -0
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +8 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +8 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 2.0.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d18856a: fix(provider/openai): support websearch tool results without query property
|
|
8
|
+
- 15271d6: fix(provider/openai): do not set `response_format` to `verbose_json` if model is `gpt-4o-transcribe` or `gpt-4o-mini-transcribe`
|
|
9
|
+
|
|
10
|
+
These two models do not support it:
|
|
11
|
+
https://platform.openai.com/docs/api-reference/audio/createTranscription#audio_createtranscription-response_format
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [1b5a3d3]
|
|
14
|
+
- @ai-sdk/provider-utils@3.0.6
|
|
15
|
+
|
|
3
16
|
## 2.0.20
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -440,7 +440,7 @@ var webSearchPreview = (0, import_provider_utils4.createProviderDefinedToolFacto
|
|
|
440
440
|
action: import_v44.z.discriminatedUnion("type", [
|
|
441
441
|
import_v44.z.object({
|
|
442
442
|
type: import_v44.z.literal("search"),
|
|
443
|
-
query: import_v44.z.string()
|
|
443
|
+
query: import_v44.z.string().nullish()
|
|
444
444
|
}),
|
|
445
445
|
import_v44.z.object({
|
|
446
446
|
type: import_v44.z.literal("open_page"),
|
|
@@ -2151,7 +2151,7 @@ var webSearchCallItem = import_v413.z.object({
|
|
|
2151
2151
|
action: import_v413.z.discriminatedUnion("type", [
|
|
2152
2152
|
import_v413.z.object({
|
|
2153
2153
|
type: import_v413.z.literal("search"),
|
|
2154
|
-
query: import_v413.z.string()
|
|
2154
|
+
query: import_v413.z.string().nullish()
|
|
2155
2155
|
}),
|
|
2156
2156
|
import_v413.z.object({
|
|
2157
2157
|
type: import_v413.z.literal("open_page"),
|
|
@@ -3486,8 +3486,12 @@ var OpenAITranscriptionModel = class {
|
|
|
3486
3486
|
include: openAIOptions.include,
|
|
3487
3487
|
language: openAIOptions.language,
|
|
3488
3488
|
prompt: openAIOptions.prompt,
|
|
3489
|
-
response_format
|
|
3490
|
-
//
|
|
3489
|
+
// https://platform.openai.com/docs/api-reference/audio/createTranscription#audio_createtranscription-response_format
|
|
3490
|
+
// prefer verbose_json to get segments for models that support it
|
|
3491
|
+
response_format: [
|
|
3492
|
+
"gpt-4o-transcribe",
|
|
3493
|
+
"gpt-4o-mini-transcribe"
|
|
3494
|
+
].includes(this.modelId) ? "json" : "verbose_json",
|
|
3491
3495
|
temperature: openAIOptions.temperature,
|
|
3492
3496
|
timestamp_granularities: openAIOptions.timestampGranularities
|
|
3493
3497
|
};
|