@ai-sdk/openai 2.1.0-beta.0 → 2.1.0-beta.2
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.mts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +21 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -13
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +4 -4
- package/dist/internal/index.d.ts +4 -4
- package/dist/internal/index.js +3 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +3 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +4 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LanguageModelV2,
|
|
1
|
+
import { LanguageModelV2, EmbeddingModelV3, ImageModelV2, TranscriptionModelV2CallOptions, TranscriptionModelV2, SpeechModelV2 } from '@ai-sdk/provider';
|
|
2
2
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
3
|
import { z } from 'zod/v4';
|
|
4
4
|
|
|
@@ -117,15 +117,15 @@ declare const openaiEmbeddingProviderOptions: z.ZodObject<{
|
|
|
117
117
|
}, z.core.$strip>;
|
|
118
118
|
type OpenAIEmbeddingProviderOptions = z.infer<typeof openaiEmbeddingProviderOptions>;
|
|
119
119
|
|
|
120
|
-
declare class OpenAIEmbeddingModel implements
|
|
121
|
-
readonly specificationVersion = "
|
|
120
|
+
declare class OpenAIEmbeddingModel implements EmbeddingModelV3<string> {
|
|
121
|
+
readonly specificationVersion = "v3";
|
|
122
122
|
readonly modelId: OpenAIEmbeddingModelId;
|
|
123
123
|
readonly maxEmbeddingsPerCall = 2048;
|
|
124
124
|
readonly supportsParallelCalls = true;
|
|
125
125
|
private readonly config;
|
|
126
126
|
get provider(): string;
|
|
127
127
|
constructor(modelId: OpenAIEmbeddingModelId, config: OpenAIConfig);
|
|
128
|
-
doEmbed({ values, headers, abortSignal, providerOptions, }: Parameters<
|
|
128
|
+
doEmbed({ values, headers, abortSignal, providerOptions, }: Parameters<EmbeddingModelV3<string>['doEmbed']>[0]): Promise<Awaited<ReturnType<EmbeddingModelV3<string>['doEmbed']>>>;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
type OpenAIImageModelId = 'gpt-image-1' | 'dall-e-3' | 'dall-e-2' | (string & {});
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LanguageModelV2,
|
|
1
|
+
import { LanguageModelV2, EmbeddingModelV3, ImageModelV2, TranscriptionModelV2CallOptions, TranscriptionModelV2, SpeechModelV2 } from '@ai-sdk/provider';
|
|
2
2
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
3
|
import { z } from 'zod/v4';
|
|
4
4
|
|
|
@@ -117,15 +117,15 @@ declare const openaiEmbeddingProviderOptions: z.ZodObject<{
|
|
|
117
117
|
}, z.core.$strip>;
|
|
118
118
|
type OpenAIEmbeddingProviderOptions = z.infer<typeof openaiEmbeddingProviderOptions>;
|
|
119
119
|
|
|
120
|
-
declare class OpenAIEmbeddingModel implements
|
|
121
|
-
readonly specificationVersion = "
|
|
120
|
+
declare class OpenAIEmbeddingModel implements EmbeddingModelV3<string> {
|
|
121
|
+
readonly specificationVersion = "v3";
|
|
122
122
|
readonly modelId: OpenAIEmbeddingModelId;
|
|
123
123
|
readonly maxEmbeddingsPerCall = 2048;
|
|
124
124
|
readonly supportsParallelCalls = true;
|
|
125
125
|
private readonly config;
|
|
126
126
|
get provider(): string;
|
|
127
127
|
constructor(modelId: OpenAIEmbeddingModelId, config: OpenAIConfig);
|
|
128
|
-
doEmbed({ values, headers, abortSignal, providerOptions, }: Parameters<
|
|
128
|
+
doEmbed({ values, headers, abortSignal, providerOptions, }: Parameters<EmbeddingModelV3<string>['doEmbed']>[0]): Promise<Awaited<ReturnType<EmbeddingModelV3<string>['doEmbed']>>>;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
type OpenAIImageModelId = 'gpt-image-1' | 'dall-e-3' | 'dall-e-2' | (string & {});
|
package/dist/internal/index.js
CHANGED
|
@@ -1524,7 +1524,7 @@ var openaiEmbeddingProviderOptions = import_v46.z.object({
|
|
|
1524
1524
|
// src/embedding/openai-embedding-model.ts
|
|
1525
1525
|
var OpenAIEmbeddingModel = class {
|
|
1526
1526
|
constructor(modelId, config) {
|
|
1527
|
-
this.specificationVersion = "
|
|
1527
|
+
this.specificationVersion = "v3";
|
|
1528
1528
|
this.maxEmbeddingsPerCall = 2048;
|
|
1529
1529
|
this.supportsParallelCalls = true;
|
|
1530
1530
|
this.modelId = modelId;
|
|
@@ -2137,6 +2137,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2137
2137
|
});
|
|
2138
2138
|
break;
|
|
2139
2139
|
}
|
|
2140
|
+
// assistant tool result parts are from provider-executed tools:
|
|
2140
2141
|
case "tool-result": {
|
|
2141
2142
|
if (store) {
|
|
2142
2143
|
input.push({ type: "item_reference", id: part.toolCallId });
|
|
@@ -2925,7 +2926,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2925
2926
|
])
|
|
2926
2927
|
),
|
|
2927
2928
|
service_tier: import_v418.z.string().nullish(),
|
|
2928
|
-
incomplete_details: import_v418.z.object({ reason: import_v418.z.string() }).
|
|
2929
|
+
incomplete_details: import_v418.z.object({ reason: import_v418.z.string() }).nullish(),
|
|
2929
2930
|
usage: usageSchema2
|
|
2930
2931
|
})
|
|
2931
2932
|
),
|