@ai-sdk/openai 3.0.101 → 3.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.
@@ -1,6 +1,6 @@
1
1
  import { LanguageModelV3, LanguageModelV3CallOptions, LanguageModelV3GenerateResult, LanguageModelV3StreamResult, EmbeddingModelV3, ImageModelV3, TranscriptionModelV3CallOptions, TranscriptionModelV3, SpeechModelV3, JSONValue } from '@ai-sdk/provider';
2
2
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
3
- import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
3
+ import { InferSchema, FetchFunction, EXPERIMENTAL_EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL } from '@ai-sdk/provider-utils';
4
4
 
5
5
  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' | (string & {});
6
6
  declare const openaiLanguageModelChatOptions: _ai_sdk_provider_utils.LazySchema<{
@@ -114,6 +114,7 @@ declare class OpenAIEmbeddingModel implements EmbeddingModelV3 {
114
114
  readonly specificationVersion = "v3";
115
115
  readonly modelId: OpenAIEmbeddingModelId;
116
116
  readonly maxEmbeddingsPerCall = 2048;
117
+ readonly [EXPERIMENTAL_EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL] = 300000;
117
118
  readonly supportsParallelCalls = true;
118
119
  private readonly config;
119
120
  get provider(): string;
@@ -361,6 +362,18 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
361
362
  type: "response.output_item.added";
362
363
  output_index: number;
363
364
  item: {
365
+ type: "local_shell_call";
366
+ id: string;
367
+ call_id: string;
368
+ action: {
369
+ type: "exec";
370
+ command: string[];
371
+ timeout_ms?: number | undefined;
372
+ user?: string | undefined;
373
+ working_directory?: string | undefined;
374
+ env?: Record<string, string> | undefined;
375
+ };
376
+ } | {
364
377
  type: "message";
365
378
  id: string;
366
379
  phase?: "commentary" | "final_answer" | null | undefined;
@@ -478,6 +491,18 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
478
491
  type: "response.output_item.done";
479
492
  output_index: number;
480
493
  item: {
494
+ type: "local_shell_call";
495
+ id: string;
496
+ call_id: string;
497
+ action: {
498
+ type: "exec";
499
+ command: string[];
500
+ timeout_ms?: number | undefined;
501
+ user?: string | undefined;
502
+ working_directory?: string | undefined;
503
+ env?: Record<string, string> | undefined;
504
+ };
505
+ } | {
481
506
  type: "message";
482
507
  id: string;
483
508
  phase?: "commentary" | "final_answer" | null | undefined;
@@ -550,18 +575,6 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
550
575
  score: number;
551
576
  text: string;
552
577
  }[] | null | undefined;
553
- } | {
554
- type: "local_shell_call";
555
- id: string;
556
- call_id: string;
557
- action: {
558
- type: "exec";
559
- command: string[];
560
- timeout_ms?: number | undefined;
561
- user?: string | undefined;
562
- working_directory?: string | undefined;
563
- env?: Record<string, string> | undefined;
564
- };
565
578
  } | {
566
579
  type: "computer_call";
567
580
  id: string;
@@ -664,6 +677,11 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
664
677
  item_id: string;
665
678
  output_index: number;
666
679
  delta: string;
680
+ } | {
681
+ type: "response.function_call_arguments.done";
682
+ item_id: string;
683
+ output_index: number;
684
+ arguments: string;
667
685
  } | {
668
686
  type: "response.custom_tool_call_input.delta";
669
687
  item_id: string;
@@ -1,6 +1,6 @@
1
1
  import { LanguageModelV3, LanguageModelV3CallOptions, LanguageModelV3GenerateResult, LanguageModelV3StreamResult, EmbeddingModelV3, ImageModelV3, TranscriptionModelV3CallOptions, TranscriptionModelV3, SpeechModelV3, JSONValue } from '@ai-sdk/provider';
2
2
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
3
- import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
3
+ import { InferSchema, FetchFunction, EXPERIMENTAL_EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL } from '@ai-sdk/provider-utils';
4
4
 
5
5
  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' | (string & {});
6
6
  declare const openaiLanguageModelChatOptions: _ai_sdk_provider_utils.LazySchema<{
@@ -114,6 +114,7 @@ declare class OpenAIEmbeddingModel implements EmbeddingModelV3 {
114
114
  readonly specificationVersion = "v3";
115
115
  readonly modelId: OpenAIEmbeddingModelId;
116
116
  readonly maxEmbeddingsPerCall = 2048;
117
+ readonly [EXPERIMENTAL_EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL] = 300000;
117
118
  readonly supportsParallelCalls = true;
118
119
  private readonly config;
119
120
  get provider(): string;
@@ -361,6 +362,18 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
361
362
  type: "response.output_item.added";
362
363
  output_index: number;
363
364
  item: {
365
+ type: "local_shell_call";
366
+ id: string;
367
+ call_id: string;
368
+ action: {
369
+ type: "exec";
370
+ command: string[];
371
+ timeout_ms?: number | undefined;
372
+ user?: string | undefined;
373
+ working_directory?: string | undefined;
374
+ env?: Record<string, string> | undefined;
375
+ };
376
+ } | {
364
377
  type: "message";
365
378
  id: string;
366
379
  phase?: "commentary" | "final_answer" | null | undefined;
@@ -478,6 +491,18 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
478
491
  type: "response.output_item.done";
479
492
  output_index: number;
480
493
  item: {
494
+ type: "local_shell_call";
495
+ id: string;
496
+ call_id: string;
497
+ action: {
498
+ type: "exec";
499
+ command: string[];
500
+ timeout_ms?: number | undefined;
501
+ user?: string | undefined;
502
+ working_directory?: string | undefined;
503
+ env?: Record<string, string> | undefined;
504
+ };
505
+ } | {
481
506
  type: "message";
482
507
  id: string;
483
508
  phase?: "commentary" | "final_answer" | null | undefined;
@@ -550,18 +575,6 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
550
575
  score: number;
551
576
  text: string;
552
577
  }[] | null | undefined;
553
- } | {
554
- type: "local_shell_call";
555
- id: string;
556
- call_id: string;
557
- action: {
558
- type: "exec";
559
- command: string[];
560
- timeout_ms?: number | undefined;
561
- user?: string | undefined;
562
- working_directory?: string | undefined;
563
- env?: Record<string, string> | undefined;
564
- };
565
578
  } | {
566
579
  type: "computer_call";
567
580
  id: string;
@@ -664,6 +677,11 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
664
677
  item_id: string;
665
678
  output_index: number;
666
679
  delta: string;
680
+ } | {
681
+ type: "response.function_call_arguments.done";
682
+ item_id: string;
683
+ output_index: number;
684
+ arguments: string;
667
685
  } | {
668
686
  type: "response.custom_tool_call_input.delta";
669
687
  item_id: string;