@ai-sdk/openai 4.0.103 → 4.0.104
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 +20 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -46
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +14 -4
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +67 -42
- package/dist/internal/index.js.map +1 -1
- package/docs/03-openai.mdx +10 -6
- package/package.json +2 -2
- package/src/chat/openai-chat-language-model-options.ts +1 -0
- package/src/normalize-openai-json-schema.ts +2 -1
- package/src/openai-batch.ts +2 -4
- package/src/openai-language-model-capabilities.ts +8 -5
- package/src/responses/openai-responses-language-model-options.ts +2 -0
- package/src/responses/openai-responses-language-model.ts +17 -8
- package/src/transcription/openai-transcription-model-options.ts +5 -6
- package/src/transcription/openai-transcription-model.ts +89 -48
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 4.0.104
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 01d7a03: feat(openai): add GPT-6.1 Terra model support
|
|
8
|
+
- 599a97f: fix(openai): read transcription duration from `usage` for duration-billed `json` responses
|
|
9
|
+
|
|
10
|
+
`durationInSeconds` now falls back to `usage.seconds` when `usage.type` is `duration` and the response has no top-level `duration` (e.g. `gpt-transcribe` with the default `json` response format).
|
|
11
|
+
|
|
12
|
+
- 8375141: Support streaming transcription with `gpt-live-transcribe` and `gpt-transcribe`. For these models the `language` provider option is sent as a single-entry `languages` list. `gpt-transcribe` warns about and omits `streaming.delay`, which it does not support. `gpt-live-transcribe` rejects non-streaming transcription, since it has no REST endpoint.
|
|
13
|
+
- 7eac057: fix(openai): strip `propertyNames` schemas that omit `type: 'string'` (e.g. Zod 3 records with constrained keys) instead of throwing an unsupported functionality error
|
|
14
|
+
- 436374e: fix(openai): report unfinished web searches as tool errors
|
|
15
|
+
- 9026c7d: fix(openai): only send transcription response format and timestamp defaults when needed
|
|
16
|
+
|
|
17
|
+
Transcription requests no longer send `response_format=verbose_json` or `timestamp_granularities[]=segment` unless the caller sets them or the model needs them. Previously, any `providerOptions.openai` value (such as a `prompt`) caused `verbose_json` to be sent for models like `gpt-transcribe`, which rejected the request.
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [57086ff]
|
|
20
|
+
- Updated dependencies [95348b3]
|
|
21
|
+
- @ai-sdk/provider-utils@5.0.70
|
|
22
|
+
|
|
3
23
|
## 4.0.103
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ type OpenAIConfig = {
|
|
|
45
45
|
type OpenAIDecisionModelId = 'gpt-6-luna' | (string & {});
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region src/chat/openai-chat-language-model-options.d.ts
|
|
48
|
-
type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'o4-mini' | 'o4-mini-2025-04-16' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5.1' | 'gpt-5.1-2025-11-13' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.3-chat-latest' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-mini' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05' | 'gpt-5.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.6' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-6-astra' | 'gpt-6.1-sol' | 'gpt-6-luna' | 'gpt-6-sol' | (string & {});
|
|
48
|
+
type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'o4-mini' | 'o4-mini-2025-04-16' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5.1' | 'gpt-5.1-2025-11-13' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.3-chat-latest' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-mini' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05' | 'gpt-5.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.6' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-6-astra' | 'gpt-6.1-sol' | 'gpt-6.1-terra' | 'gpt-6-luna' | 'gpt-6-sol' | (string & {});
|
|
49
49
|
declare const openaiLanguageModelChatOptions: import("@ai-sdk/provider-utils").LazySchema<{
|
|
50
50
|
logitBias?: Record<number, number> | undefined;
|
|
51
51
|
logprobs?: number | boolean | undefined;
|
|
@@ -177,7 +177,7 @@ declare const customToolFactory: import("@ai-sdk/provider-utils").ProviderDefine
|
|
|
177
177
|
}, {}>;
|
|
178
178
|
//#endregion
|
|
179
179
|
//#region src/responses/openai-responses-language-model-options.d.ts
|
|
180
|
-
type OpenAIResponsesModelId = 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-5.1' | 'gpt-5.1-2025-11-13' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.2-codex' | 'gpt-5.3-chat-latest' | 'gpt-5.3-codex' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-mini' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05' | 'gpt-5.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.6' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-6-astra' | 'gpt-6.1-sol' | 'gpt-6-luna' | 'gpt-6-sol' | 'gpt-5-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5-codex' | 'gpt-5-mini-2025-08-07' | 'gpt-5-mini' | 'gpt-5-nano-2025-08-07' | 'gpt-5-nano' | 'gpt-5-pro-2025-10-06' | 'gpt-5-pro' | 'gpt-5' | 'o1-2024-12-17' | 'o1' | 'o3-2025-04-16' | 'o3-mini-2025-01-31' | 'o3-mini' | 'o3' | 'o4-mini' | 'o4-mini-2025-04-16' | (string & {});
|
|
180
|
+
type OpenAIResponsesModelId = 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-5.1' | 'gpt-5.1-2025-11-13' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.2-codex' | 'gpt-5.3-chat-latest' | 'gpt-5.3-codex' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-mini' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05' | 'gpt-5.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.6' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-6-astra' | 'gpt-6.1-sol' | 'gpt-6.1-terra' | 'gpt-6-luna' | 'gpt-6-sol' | 'gpt-5-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5-codex' | 'gpt-5-mini-2025-08-07' | 'gpt-5-mini' | 'gpt-5-nano-2025-08-07' | 'gpt-5-nano' | 'gpt-5-pro-2025-10-06' | 'gpt-5-pro' | 'gpt-5' | 'o1-2024-12-17' | 'o1' | 'o3-2025-04-16' | 'o3-mini-2025-01-31' | 'o3-mini' | 'o3' | 'o4-mini' | 'o4-mini-2025-04-16' | (string & {});
|
|
181
181
|
declare const openaiLanguageModelResponsesOptionsSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
182
182
|
conversation?: string | null | undefined;
|
|
183
183
|
include?: ("reasoning.encrypted_content" | "file_search_call.results" | "web_search_call.results" | "message.output_text.logprobs")[] | null | undefined;
|
|
@@ -1636,7 +1636,7 @@ declare const openaiSpeechModelOptionsSchema: import("@ai-sdk/provider-utils").L
|
|
|
1636
1636
|
type OpenAISpeechModelOptions = InferSchema<typeof openaiSpeechModelOptionsSchema>;
|
|
1637
1637
|
//#endregion
|
|
1638
1638
|
//#region src/transcription/openai-transcription-model-options.d.ts
|
|
1639
|
-
type OpenAITranscriptionModelId = 'whisper-1' | 'gpt-4o-mini-transcribe' | 'gpt-4o-mini-transcribe-2025-03-20' | 'gpt-4o-mini-transcribe-2025-12-15' | 'gpt-4o-transcribe' | 'gpt-4o-transcribe-diarize' | 'gpt-realtime-whisper' | (string & {});
|
|
1639
|
+
type OpenAITranscriptionModelId = 'whisper-1' | 'gpt-4o-mini-transcribe' | 'gpt-4o-mini-transcribe-2025-03-20' | 'gpt-4o-mini-transcribe-2025-12-15' | 'gpt-4o-transcribe' | 'gpt-4o-transcribe-diarize' | 'gpt-live-transcribe' | 'gpt-realtime-whisper' | 'gpt-transcribe' | (string & {});
|
|
1640
1640
|
declare const openAITranscriptionModelOptions: import("@ai-sdk/provider-utils").LazySchema<{
|
|
1641
1641
|
include?: string[] | undefined;
|
|
1642
1642
|
language?: string | undefined;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["_$__tool_apply_patch0.ApplyPatchOperation","_$__tool_custom0.customToolFactory","_$_0.OpenAIComputerAction","_$_0.OpenAIComputerSafetyCheck","_$__responses_openai_responses_api0.OpenAIResponsesFileSearchToolComparisonFilter","_$__responses_openai_responses_api0.OpenAIResponsesFileSearchToolCompoundFilter","_$__tool_web_search0.webSearchToolFactory","RealtimeModelV4ClientSecretOptions","RealtimeModelV4ClientSecretResult","RealtimeModelV4ServerEvent","RealtimeModelV4ClientEvent","RealtimeModelV4SessionConfig","RealtimeModelV4","RealtimeModelV4SessionConfig","RealtimeModelV4ClientEvent","RealtimeModelV4","RealtimeModelV4","RealtimeFactoryV4","DecisionModelV4","SpeechTranslationModelV4","BatchV4","SpeechTranslationModelV4StreamOptions","SpeechTranslationModelV4"],"sources":["../src/openai-config.ts","../src/openai-decision-model.ts","../src/chat/openai-chat-language-model-options.ts","../src/completion/openai-completion-language-model-options.ts","../src/embedding/openai-embedding-model-options.ts","../src/image/openai-image-model-options.ts","../src/tool/apply-patch.ts","../src/tool/custom.ts","../src/responses/openai-responses-language-model-options.ts","../src/responses/openai-responses-api.ts","../src/tool/web-search.ts","../src/openai-tools.ts","../src/live/openai-realtime-model-live-options.ts","../src/realtime/openai-realtime-model.ts","../src/live/openai-realtime-model-live.ts","../src/realtime/openai-realtime-factory.ts","../src/speech/openai-speech-model-options.ts","../src/transcription/openai-transcription-model-options.ts","../src/speech-translation/openai-speech-translation-model-options.ts","../src/openai-provider.ts","../src/responses/openai-responses-prepare-tools.ts","../src/speech-translation/openai-speech-translation-model.ts","../src/files/openai-files-options.ts","../src/tool/computer.ts","../src/responses/openai-responses-provider-metadata.ts","../src/version.ts","../src/openai-decision-model-options.ts"],"mappings":";;;;KAKK,gBAAgB;KAMT;EACV;;EAEA;EACA;EACA,MAAM;IAAW;IAAiB;;EAClC,gBAAgB;EAChB,QAAQ;EACR,YAAY;EACZ;;;;;;;EAOA;;;;;;;EAOA;;;;;;;;;EASA;;;;KCdU;;;KCrBA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["_$__tool_apply_patch0.ApplyPatchOperation","_$__tool_custom0.customToolFactory","_$_0.OpenAIComputerAction","_$_0.OpenAIComputerSafetyCheck","_$__responses_openai_responses_api0.OpenAIResponsesFileSearchToolComparisonFilter","_$__responses_openai_responses_api0.OpenAIResponsesFileSearchToolCompoundFilter","_$__tool_web_search0.webSearchToolFactory","RealtimeModelV4ClientSecretOptions","RealtimeModelV4ClientSecretResult","RealtimeModelV4ServerEvent","RealtimeModelV4ClientEvent","RealtimeModelV4SessionConfig","RealtimeModelV4","RealtimeModelV4SessionConfig","RealtimeModelV4ClientEvent","RealtimeModelV4","RealtimeModelV4","RealtimeFactoryV4","DecisionModelV4","SpeechTranslationModelV4","BatchV4","SpeechTranslationModelV4StreamOptions","SpeechTranslationModelV4"],"sources":["../src/openai-config.ts","../src/openai-decision-model.ts","../src/chat/openai-chat-language-model-options.ts","../src/completion/openai-completion-language-model-options.ts","../src/embedding/openai-embedding-model-options.ts","../src/image/openai-image-model-options.ts","../src/tool/apply-patch.ts","../src/tool/custom.ts","../src/responses/openai-responses-language-model-options.ts","../src/responses/openai-responses-api.ts","../src/tool/web-search.ts","../src/openai-tools.ts","../src/live/openai-realtime-model-live-options.ts","../src/realtime/openai-realtime-model.ts","../src/live/openai-realtime-model-live.ts","../src/realtime/openai-realtime-factory.ts","../src/speech/openai-speech-model-options.ts","../src/transcription/openai-transcription-model-options.ts","../src/speech-translation/openai-speech-translation-model-options.ts","../src/openai-provider.ts","../src/responses/openai-responses-prepare-tools.ts","../src/speech-translation/openai-speech-translation-model.ts","../src/files/openai-files-options.ts","../src/tool/computer.ts","../src/responses/openai-responses-provider-metadata.ts","../src/version.ts","../src/openai-decision-model-options.ts"],"mappings":";;;;KAKK,gBAAgB;KAMT;EACV;;EAEA;EACA;EACA,MAAM;IAAW;IAAiB;;EAClC,gBAAgB;EAChB,QAAQ;EACR,YAAY;EACZ;;;;;;;EAOA;;;;;;;EAOA;;;;;;;;;EASA;;;;KCdU;;;KCrBA;cAuEC,iEAA8B;;;;;;;;;;;;;;;;;;;;;;;KAwJ/B,iCAAiC,mBACpC;;;KChOG;cAKC,uEAAoC;;cAApC;;;;;KAiDD,uCAAuC,mBAC1C;;;KCxDG;cAMC,8DAA2B;;;;KAkB5B,8BAA8B,mBACjC;;;KCzBG;cAkFC,0DAAuB;;;;;;;KAIxB,0BAA0B,mBAC7B;cAGI,oEAAiC;;;;;;;;;KAmBlC,oCAAoC,mBACvC;cAGI,8DAA2B;;;;;;;;KAW5B,8BAA8B,mBACjC;;;;;;KC1EG;EAEN;;;;EAIA;;;;EAIA;;EAGA;;;;EAIA;;EAGA;;;;EAIA;;;;EAIA;;;;cCxDO,oDAAiB;;;;EAMZ;;;;;EAMN;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;;KAGE;EACV,QAAQ;;KAGE;EACV;EACA;EACA;EACA;IACM;;IAEA;IACA;;;KAII;EACV,QAAQ;;KAGE;EACV;EACA;EACA;;KAGU;EACV,QAAQ;;KAGE;EACV;EACA;EACA,cAAc,MAAM;;KAGV;EACV,QAAQ;;KAGE;EAEN;EACA;;EAGA;EACA;EACA;;EAGA;EACA;EACA;;EAGA;EACA;EACA;;KAGM;EACV,QAAQ;;;;qBCzFG;;;cCKA,6DAA0B;EAAA;;KAS3B,6BAA6B,mBAChC"}
|
package/dist/index.js
CHANGED
|
@@ -268,17 +268,17 @@ function getOpenAILanguageModelCapabilities(modelId) {
|
|
|
268
268
|
const isGptChatModel = gptVersion?.minor == null && (gptVersion?.variant?.startsWith("chat") ?? false);
|
|
269
269
|
const isGptNanoModel = gptVersion?.variant?.startsWith("nano") ?? false;
|
|
270
270
|
const isGpt6OrLaterModel = gptVersion != null && gptVersion.major >= 6;
|
|
271
|
-
const
|
|
271
|
+
const isGpt6OrLaterModelWithNoneEffort = modelId === "gpt-6-sol" || modelId === "gpt-6-luna" || modelId === "gpt-6.1-terra";
|
|
272
272
|
const supportsFlexProcessing = oSeriesVersion != null && oSeriesVersion >= 3 || gptVersion != null && gptVersion.major >= 5 && !isGptChatModel;
|
|
273
273
|
const supportsPriorityProcessing = modelId.startsWith("gpt-4") || gptVersion != null && gptVersion.major >= 5 && !isGptNanoModel && !isGptChatModel || oSeriesVersion != null && oSeriesVersion >= 3;
|
|
274
274
|
const isReasoningModel = oSeriesVersion != null || gptVersion != null && gptVersion.major >= 5 && !isGptChatModel;
|
|
275
|
-
const supportsNonReasoningParameters =
|
|
275
|
+
const supportsNonReasoningParameters = isGpt6OrLaterModelWithNoneEffort || !isGpt6OrLaterModel && gptVersion != null && (gptVersion.major > 5 || gptVersion.major === 5 && (gptVersion.minor ?? 0) >= 1);
|
|
276
276
|
return {
|
|
277
277
|
supportsFlexProcessing,
|
|
278
278
|
supportsPriorityProcessing,
|
|
279
279
|
supportsConfigurationUpdate: isGpt6OrLaterModel,
|
|
280
280
|
supportsAsyncToolCalling: isGpt6OrLaterModel,
|
|
281
|
-
supportedReasoningEfforts:
|
|
281
|
+
supportedReasoningEfforts: isGpt6OrLaterModelWithNoneEffort ? [
|
|
282
282
|
"none",
|
|
283
283
|
"low",
|
|
284
284
|
"medium",
|
|
@@ -1004,7 +1004,7 @@ function normalizeOpenAIJsonSchema(schema) {
|
|
|
1004
1004
|
function normalizeSchema(schema, isRoot = false) {
|
|
1005
1005
|
const propertyNames = schema.propertyNames;
|
|
1006
1006
|
if (propertyNames != null) {
|
|
1007
|
-
if (typeof propertyNames === "boolean" || propertyNames.type !== "string") throw new UnsupportedFunctionalityError({ functionality: "JSON Schema propertyNames that does not use a string schema" });
|
|
1007
|
+
if (typeof propertyNames === "boolean" || propertyNames.type != null && propertyNames.type !== "string") throw new UnsupportedFunctionalityError({ functionality: "JSON Schema propertyNames that does not use a string schema" });
|
|
1008
1008
|
removedPropertyNames = true;
|
|
1009
1009
|
}
|
|
1010
1010
|
const normalizedSchema = { ...schema };
|
|
@@ -6791,10 +6791,7 @@ var OpenAIResponsesLanguageModel = class OpenAIResponsesLanguageModel {
|
|
|
6791
6791
|
type: "tool-result",
|
|
6792
6792
|
toolCallId: part.id,
|
|
6793
6793
|
toolName: toolNameMapping.toCustomToolName(webSearchToolName ?? "web_search"),
|
|
6794
|
-
...part
|
|
6795
|
-
isError: true,
|
|
6796
|
-
result: { status: part.status }
|
|
6797
|
-
} : { result: mapWebSearchOutput(part.action) }
|
|
6794
|
+
...mapWebSearchResult(part)
|
|
6798
6795
|
});
|
|
6799
6796
|
if (part.action?.type === "search") {
|
|
6800
6797
|
for (const source of part.action.sources ?? []) if (source.type === "url") content.push({
|
|
@@ -7405,10 +7402,7 @@ var OpenAIResponsesLanguageModel = class OpenAIResponsesLanguageModel {
|
|
|
7405
7402
|
type: "tool-result",
|
|
7406
7403
|
toolCallId: value.item.id,
|
|
7407
7404
|
toolName: toolNameMapping.toCustomToolName(webSearchToolName ?? "web_search"),
|
|
7408
|
-
...value.item
|
|
7409
|
-
isError: true,
|
|
7410
|
-
result: { status: value.item.status }
|
|
7411
|
-
} : { result: mapWebSearchOutput(value.item.action) }
|
|
7405
|
+
...mapWebSearchResult(value.item)
|
|
7412
7406
|
});
|
|
7413
7407
|
if (value.item.action?.type === "search") {
|
|
7414
7408
|
for (const source of value.item.action.sources ?? []) if (source.type === "url") {
|
|
@@ -8024,6 +8018,12 @@ function isResponseInProgressChunk(chunk) {
|
|
|
8024
8018
|
function isResponseOutputChunk(chunk) {
|
|
8025
8019
|
return !(chunk.type === "response.created" || chunk.type === "response.in_progress" || chunk.type === "response.failed" || chunk.type === "error" || chunk.type === "unknown_chunk");
|
|
8026
8020
|
}
|
|
8021
|
+
function mapWebSearchResult({ action, status }) {
|
|
8022
|
+
return status === "completed" ? { result: mapWebSearchOutput(action) } : {
|
|
8023
|
+
isError: true,
|
|
8024
|
+
result: { status }
|
|
8025
|
+
};
|
|
8026
|
+
}
|
|
8027
8027
|
function mapWebSearchOutput(action) {
|
|
8028
8028
|
if (action == null) return {};
|
|
8029
8029
|
switch (action.type) {
|
|
@@ -8536,10 +8536,7 @@ async function convertOpenAIBatchResult(body) {
|
|
|
8536
8536
|
type: "tool-result",
|
|
8537
8537
|
toolCallId: part.id,
|
|
8538
8538
|
toolName: "web_search",
|
|
8539
|
-
...part
|
|
8540
|
-
isError: true,
|
|
8541
|
-
result: { status: part.status }
|
|
8542
|
-
} : { result: mapWebSearchOutput(part.action) },
|
|
8539
|
+
...mapWebSearchResult(part),
|
|
8543
8540
|
dynamic: true
|
|
8544
8541
|
});
|
|
8545
8542
|
break;
|
|
@@ -9545,9 +9542,9 @@ const openAITranscriptionModelOptions = lazySchema(() => zodSchema(z.object({
|
|
|
9545
9542
|
temperature: z.number().min(0).max(1).default(0).optional(),
|
|
9546
9543
|
/**
|
|
9547
9544
|
* The timestamp granularities to populate for this transcription.
|
|
9548
|
-
*
|
|
9545
|
+
* Defaults to ['segment'] when the response format is verbose_json.
|
|
9549
9546
|
*/
|
|
9550
|
-
timestampGranularities: z.array(z.enum(["word", "segment"])).
|
|
9547
|
+
timestampGranularities: z.array(z.enum(["word", "segment"])).optional(),
|
|
9551
9548
|
/**
|
|
9552
9549
|
* The format of the transcription response.
|
|
9553
9550
|
*/
|
|
@@ -9566,7 +9563,7 @@ const openAITranscriptionModelOptions = lazySchema(() => zodSchema(z.object({
|
|
|
9566
9563
|
silenceDurationMs: z.number().int().min(0).optional()
|
|
9567
9564
|
})]).optional(),
|
|
9568
9565
|
/**
|
|
9569
|
-
* Options for streaming transcription models such as `gpt-
|
|
9566
|
+
* Options for streaming transcription models such as `gpt-live-transcribe`.
|
|
9570
9567
|
*/
|
|
9571
9568
|
streaming: z.object({
|
|
9572
9569
|
/**
|
|
@@ -9588,12 +9585,32 @@ const openAITranscriptionModelOptions = lazySchema(() => zodSchema(z.object({
|
|
|
9588
9585
|
//#endregion
|
|
9589
9586
|
//#region src/transcription/openai-transcription-model.ts
|
|
9590
9587
|
/**
|
|
9591
|
-
*
|
|
9592
|
-
*
|
|
9593
|
-
|
|
9588
|
+
* Whether `modelId` is `base` or one of its dated snapshots
|
|
9589
|
+
* (e.g. `gpt-realtime-whisper-2026-01-01`).
|
|
9590
|
+
*/
|
|
9591
|
+
function isModelOrSnapshot(modelId, base) {
|
|
9592
|
+
return modelId === base || modelId.startsWith(`${base}-`);
|
|
9593
|
+
}
|
|
9594
|
+
/**
|
|
9595
|
+
* Model IDs that stream over the realtime transcription WebSocket and do not
|
|
9596
|
+
* support the REST transcription endpoint.
|
|
9594
9597
|
*/
|
|
9595
9598
|
function isRealtimeTranscriptionModelId(modelId) {
|
|
9596
|
-
return modelId
|
|
9599
|
+
return isModelOrSnapshot(modelId, "gpt-realtime-whisper") || isModelOrSnapshot(modelId, "gpt-live-transcribe");
|
|
9600
|
+
}
|
|
9601
|
+
/**
|
|
9602
|
+
* Model IDs that support streaming transcription. `gpt-transcribe` also
|
|
9603
|
+
* supports the REST transcription endpoint.
|
|
9604
|
+
*/
|
|
9605
|
+
function supportsStreamingTranscription(modelId) {
|
|
9606
|
+
return isRealtimeTranscriptionModelId(modelId) || isModelOrSnapshot(modelId, "gpt-transcribe");
|
|
9607
|
+
}
|
|
9608
|
+
/**
|
|
9609
|
+
* Models whose realtime transcription session takes a `languages` list
|
|
9610
|
+
* instead of the singular `language` field.
|
|
9611
|
+
*/
|
|
9612
|
+
function usesLanguagesList(modelId) {
|
|
9613
|
+
return isModelOrSnapshot(modelId, "gpt-live-transcribe") || isModelOrSnapshot(modelId, "gpt-transcribe");
|
|
9597
9614
|
}
|
|
9598
9615
|
const languageMap = {
|
|
9599
9616
|
afrikaans: "af",
|
|
@@ -9687,24 +9704,22 @@ var OpenAITranscriptionModel = class OpenAITranscriptionModel {
|
|
|
9687
9704
|
formData.append("model", this.modelId);
|
|
9688
9705
|
const fileExtension = mediaTypeToExtension(mediaType);
|
|
9689
9706
|
formData.append("file", new File([blob], "audio", { type: mediaType }), `audio.${fileExtension}`);
|
|
9690
|
-
if (this.modelId === "whisper-1") formData.append("response_format", "verbose_json");
|
|
9691
9707
|
const isDiarizationModel = this.modelId === "gpt-4o-transcribe-diarize";
|
|
9708
|
+
const responseFormat = openAIOptions?.responseFormat ?? (isDiarizationModel ? "diarized_json" : this.modelId === "whisper-1" ? "verbose_json" : void 0);
|
|
9709
|
+
const timestampGranularities = openAIOptions?.timestampGranularities ?? (responseFormat === "verbose_json" ? ["segment"] : void 0);
|
|
9692
9710
|
const chunkingStrategy = openAIOptions?.chunkingStrategy ?? (isDiarizationModel ? "auto" : void 0);
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
};
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
else formData.append(key, String(value));
|
|
9706
|
-
}
|
|
9707
|
-
} else if (isDiarizationModel) formData.append("response_format", "diarized_json");
|
|
9711
|
+
const transcriptionModelOptions = {
|
|
9712
|
+
response_format: responseFormat,
|
|
9713
|
+
include: openAIOptions?.include,
|
|
9714
|
+
language: openAIOptions?.language,
|
|
9715
|
+
prompt: openAIOptions?.prompt,
|
|
9716
|
+
temperature: openAIOptions?.temperature,
|
|
9717
|
+
timestamp_granularities: timestampGranularities
|
|
9718
|
+
};
|
|
9719
|
+
for (const [key, value] of Object.entries(transcriptionModelOptions)) if (value != null) {
|
|
9720
|
+
if (Array.isArray(value)) for (const item of value) formData.append(`${key}[]`, String(item));
|
|
9721
|
+
else formData.append(key, String(value));
|
|
9722
|
+
}
|
|
9708
9723
|
if (chunkingStrategy != null) formData.append("chunking_strategy", typeof chunkingStrategy === "string" ? chunkingStrategy : JSON.stringify({
|
|
9709
9724
|
type: chunkingStrategy.type,
|
|
9710
9725
|
...chunkingStrategy.threshold != null && { threshold: chunkingStrategy.threshold },
|
|
@@ -9751,7 +9766,7 @@ var OpenAITranscriptionModel = class OpenAITranscriptionModel {
|
|
|
9751
9766
|
endSecond: word.end
|
|
9752
9767
|
})) ?? [],
|
|
9753
9768
|
language,
|
|
9754
|
-
durationInSeconds: response.duration ?? void 0,
|
|
9769
|
+
durationInSeconds: response.duration ?? (response.usage?.type === "duration" && typeof response.usage.seconds === "number" ? response.usage.seconds : void 0),
|
|
9755
9770
|
warnings,
|
|
9756
9771
|
...response.usage != null && { usage: response.usage },
|
|
9757
9772
|
response: {
|
|
@@ -9767,7 +9782,7 @@ var OpenAITranscriptionModel = class OpenAITranscriptionModel {
|
|
|
9767
9782
|
};
|
|
9768
9783
|
}
|
|
9769
9784
|
async doStream(options) {
|
|
9770
|
-
if (!
|
|
9785
|
+
if (!supportsStreamingTranscription(this.modelId)) throw new UnsupportedFunctionalityError({ functionality: `streaming transcription with ${this.modelId}` });
|
|
9771
9786
|
const currentDate = this.config._internal?.currentDate?.() ?? /* @__PURE__ */ new Date();
|
|
9772
9787
|
const openAIOptions = await parseProviderOptions({
|
|
9773
9788
|
provider: "openai",
|
|
@@ -9786,11 +9801,18 @@ var OpenAITranscriptionModel = class OpenAITranscriptionModel {
|
|
|
9786
9801
|
feature: `providerOptions.openai.${option}`,
|
|
9787
9802
|
details: `OpenAI streaming transcription does not support ${option}.`
|
|
9788
9803
|
});
|
|
9804
|
+
const supportsDelay = !isModelOrSnapshot(this.modelId, "gpt-transcribe");
|
|
9805
|
+
if (!supportsDelay && openAIOptions?.streaming?.delay != null) warnings.push({
|
|
9806
|
+
type: "unsupported",
|
|
9807
|
+
feature: "providerOptions.openai.streaming.delay",
|
|
9808
|
+
details: `OpenAI streaming transcription with ${this.modelId} does not support delay.`
|
|
9809
|
+
});
|
|
9789
9810
|
const headers = combineHeaders(this.config.headers?.(), options.headers);
|
|
9790
9811
|
const sessionUpdate = buildOpenAIRealtimeTranscriptionSession({
|
|
9791
9812
|
modelId: this.modelId,
|
|
9792
9813
|
inputAudioFormat: options.inputAudioFormat,
|
|
9793
|
-
providerOptions: openAIOptions
|
|
9814
|
+
providerOptions: openAIOptions,
|
|
9815
|
+
supportsDelay
|
|
9794
9816
|
});
|
|
9795
9817
|
return {
|
|
9796
9818
|
request: { body: sessionUpdate },
|
|
@@ -9925,7 +9947,7 @@ function createOpenAIRealtimeTranscriptionStream({ webSocket, url, headers, sess
|
|
|
9925
9947
|
}
|
|
9926
9948
|
});
|
|
9927
9949
|
}
|
|
9928
|
-
function buildOpenAIRealtimeTranscriptionSession({ modelId, inputAudioFormat, providerOptions }) {
|
|
9950
|
+
function buildOpenAIRealtimeTranscriptionSession({ modelId, inputAudioFormat, providerOptions, supportsDelay }) {
|
|
9929
9951
|
return {
|
|
9930
9952
|
type: "session.update",
|
|
9931
9953
|
session: {
|
|
@@ -9937,8 +9959,8 @@ function buildOpenAIRealtimeTranscriptionSession({ modelId, inputAudioFormat, pr
|
|
|
9937
9959
|
},
|
|
9938
9960
|
transcription: {
|
|
9939
9961
|
model: modelId,
|
|
9940
|
-
...providerOptions?.language != null ? { language: providerOptions.language } : {},
|
|
9941
|
-
...providerOptions?.streaming?.delay != null ? { delay: providerOptions.streaming.delay } : {}
|
|
9962
|
+
...providerOptions?.language != null ? usesLanguagesList(modelId) ? { languages: [providerOptions.language] } : { language: providerOptions.language } : {},
|
|
9963
|
+
...supportsDelay && providerOptions?.streaming?.delay != null ? { delay: providerOptions.streaming.delay } : {}
|
|
9942
9964
|
},
|
|
9943
9965
|
turn_detection: null
|
|
9944
9966
|
} },
|
|
@@ -10252,7 +10274,7 @@ var OpenAISkills = class {
|
|
|
10252
10274
|
};
|
|
10253
10275
|
//#endregion
|
|
10254
10276
|
//#region src/version.ts
|
|
10255
|
-
const VERSION = "4.0.
|
|
10277
|
+
const VERSION = "4.0.104";
|
|
10256
10278
|
//#endregion
|
|
10257
10279
|
//#region src/openai-provider.ts
|
|
10258
10280
|
/**
|