@ai-sdk/openai 3.0.0-beta.22 → 3.0.0-beta.24
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 +14 -0
- package/dist/index.js +654 -664
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -21
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +653 -663
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +20 -20
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/internal/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "@ai-sdk/provider-utils";
|
|
14
14
|
|
|
15
15
|
// src/openai-error.ts
|
|
16
|
-
import
|
|
16
|
+
import { z } from "zod/v4";
|
|
17
17
|
import { createJsonErrorResponseHandler } from "@ai-sdk/provider-utils";
|
|
18
18
|
var openaiErrorDataSchema = z.object({
|
|
19
19
|
error: z.object({
|
|
@@ -250,7 +250,7 @@ import {
|
|
|
250
250
|
lazyValidator,
|
|
251
251
|
zodSchema
|
|
252
252
|
} from "@ai-sdk/provider-utils";
|
|
253
|
-
import
|
|
253
|
+
import { z as z2 } from "zod/v4";
|
|
254
254
|
var openaiChatResponseSchema = lazyValidator(
|
|
255
255
|
() => zodSchema(
|
|
256
256
|
z2.object({
|
|
@@ -391,7 +391,7 @@ import {
|
|
|
391
391
|
lazyValidator as lazyValidator2,
|
|
392
392
|
zodSchema as zodSchema2
|
|
393
393
|
} from "@ai-sdk/provider-utils";
|
|
394
|
-
import
|
|
394
|
+
import { z as z3 } from "zod/v4";
|
|
395
395
|
var openaiChatLanguageModelOptions = lazyValidator2(
|
|
396
396
|
() => zodSchema2(
|
|
397
397
|
z3.object({
|
|
@@ -1209,7 +1209,7 @@ function mapOpenAIFinishReason2(finishReason) {
|
|
|
1209
1209
|
}
|
|
1210
1210
|
|
|
1211
1211
|
// src/completion/openai-completion-api.ts
|
|
1212
|
-
import
|
|
1212
|
+
import { z as z4 } from "zod/v4";
|
|
1213
1213
|
import {
|
|
1214
1214
|
lazyValidator as lazyValidator3,
|
|
1215
1215
|
zodSchema as zodSchema3
|
|
@@ -1274,7 +1274,7 @@ import {
|
|
|
1274
1274
|
lazyValidator as lazyValidator4,
|
|
1275
1275
|
zodSchema as zodSchema4
|
|
1276
1276
|
} from "@ai-sdk/provider-utils";
|
|
1277
|
-
import
|
|
1277
|
+
import { z as z5 } from "zod/v4";
|
|
1278
1278
|
var openaiCompletionProviderOptions = lazyValidator4(
|
|
1279
1279
|
() => zodSchema4(
|
|
1280
1280
|
z5.object({
|
|
@@ -1566,7 +1566,7 @@ import {
|
|
|
1566
1566
|
lazyValidator as lazyValidator5,
|
|
1567
1567
|
zodSchema as zodSchema5
|
|
1568
1568
|
} from "@ai-sdk/provider-utils";
|
|
1569
|
-
import
|
|
1569
|
+
import { z as z6 } from "zod/v4";
|
|
1570
1570
|
var openaiEmbeddingProviderOptions = lazyValidator5(
|
|
1571
1571
|
() => zodSchema5(
|
|
1572
1572
|
z6.object({
|
|
@@ -1586,7 +1586,7 @@ var openaiEmbeddingProviderOptions = lazyValidator5(
|
|
|
1586
1586
|
|
|
1587
1587
|
// src/embedding/openai-embedding-api.ts
|
|
1588
1588
|
import { lazyValidator as lazyValidator6, zodSchema as zodSchema6 } from "@ai-sdk/provider-utils";
|
|
1589
|
-
import
|
|
1589
|
+
import { z as z7 } from "zod/v4";
|
|
1590
1590
|
var openaiTextEmbeddingResponseSchema = lazyValidator6(
|
|
1591
1591
|
() => zodSchema6(
|
|
1592
1592
|
z7.object({
|
|
@@ -1669,7 +1669,7 @@ import {
|
|
|
1669
1669
|
|
|
1670
1670
|
// src/image/openai-image-api.ts
|
|
1671
1671
|
import { lazyValidator as lazyValidator7, zodSchema as zodSchema7 } from "@ai-sdk/provider-utils";
|
|
1672
|
-
import
|
|
1672
|
+
import { z as z8 } from "zod/v4";
|
|
1673
1673
|
var openaiImageResponseSchema = lazyValidator7(
|
|
1674
1674
|
() => zodSchema7(
|
|
1675
1675
|
z8.object({
|
|
@@ -1786,7 +1786,7 @@ import {
|
|
|
1786
1786
|
|
|
1787
1787
|
// src/transcription/openai-transcription-api.ts
|
|
1788
1788
|
import { lazyValidator as lazyValidator8, zodSchema as zodSchema8 } from "@ai-sdk/provider-utils";
|
|
1789
|
-
import
|
|
1789
|
+
import { z as z9 } from "zod/v4";
|
|
1790
1790
|
var openaiTranscriptionResponseSchema = lazyValidator8(
|
|
1791
1791
|
() => zodSchema8(
|
|
1792
1792
|
z9.object({
|
|
@@ -1823,7 +1823,7 @@ import {
|
|
|
1823
1823
|
lazyValidator as lazyValidator9,
|
|
1824
1824
|
zodSchema as zodSchema9
|
|
1825
1825
|
} from "@ai-sdk/provider-utils";
|
|
1826
|
-
import
|
|
1826
|
+
import { z as z10 } from "zod/v4";
|
|
1827
1827
|
var openAITranscriptionProviderOptions = lazyValidator9(
|
|
1828
1828
|
() => zodSchema9(
|
|
1829
1829
|
z10.object({
|
|
@@ -2033,7 +2033,7 @@ import {
|
|
|
2033
2033
|
lazyValidator as lazyValidator10,
|
|
2034
2034
|
zodSchema as zodSchema10
|
|
2035
2035
|
} from "@ai-sdk/provider-utils";
|
|
2036
|
-
import
|
|
2036
|
+
import { z as z11 } from "zod/v4";
|
|
2037
2037
|
var openaiSpeechProviderOptionsSchema = lazyValidator10(
|
|
2038
2038
|
() => zodSchema10(
|
|
2039
2039
|
z11.object({
|
|
@@ -2166,7 +2166,7 @@ import {
|
|
|
2166
2166
|
parseProviderOptions as parseProviderOptions6,
|
|
2167
2167
|
validateTypes
|
|
2168
2168
|
} from "@ai-sdk/provider-utils";
|
|
2169
|
-
import
|
|
2169
|
+
import { z as z13 } from "zod/v4";
|
|
2170
2170
|
|
|
2171
2171
|
// src/tool/local-shell.ts
|
|
2172
2172
|
import {
|
|
@@ -2174,7 +2174,7 @@ import {
|
|
|
2174
2174
|
lazySchema,
|
|
2175
2175
|
zodSchema as zodSchema11
|
|
2176
2176
|
} from "@ai-sdk/provider-utils";
|
|
2177
|
-
import
|
|
2177
|
+
import { z as z12 } from "zod/v4";
|
|
2178
2178
|
var localShellInputSchema = lazySchema(
|
|
2179
2179
|
() => zodSchema11(
|
|
2180
2180
|
z12.object({
|
|
@@ -2492,7 +2492,7 @@ import {
|
|
|
2492
2492
|
lazyValidator as lazyValidator11,
|
|
2493
2493
|
zodSchema as zodSchema12
|
|
2494
2494
|
} from "@ai-sdk/provider-utils";
|
|
2495
|
-
import
|
|
2495
|
+
import { z as z14 } from "zod/v4";
|
|
2496
2496
|
var openaiResponsesChunkSchema = lazyValidator11(
|
|
2497
2497
|
() => zodSchema12(
|
|
2498
2498
|
z14.union([
|
|
@@ -2917,7 +2917,7 @@ import {
|
|
|
2917
2917
|
lazyValidator as lazyValidator12,
|
|
2918
2918
|
zodSchema as zodSchema13
|
|
2919
2919
|
} from "@ai-sdk/provider-utils";
|
|
2920
|
-
import
|
|
2920
|
+
import { z as z15 } from "zod/v4";
|
|
2921
2921
|
var TOP_LOGPROBS_MAX = 20;
|
|
2922
2922
|
var openaiResponsesReasoningModelIds = [
|
|
2923
2923
|
"o1",
|
|
@@ -3033,7 +3033,7 @@ import {
|
|
|
3033
3033
|
lazySchema as lazySchema2,
|
|
3034
3034
|
zodSchema as zodSchema14
|
|
3035
3035
|
} from "@ai-sdk/provider-utils";
|
|
3036
|
-
import
|
|
3036
|
+
import { z as z16 } from "zod/v4";
|
|
3037
3037
|
var codeInterpreterInputSchema = lazySchema2(
|
|
3038
3038
|
() => zodSchema14(
|
|
3039
3039
|
z16.object({
|
|
@@ -3082,7 +3082,7 @@ import {
|
|
|
3082
3082
|
lazySchema as lazySchema3,
|
|
3083
3083
|
zodSchema as zodSchema15
|
|
3084
3084
|
} from "@ai-sdk/provider-utils";
|
|
3085
|
-
import
|
|
3085
|
+
import { z as z17 } from "zod/v4";
|
|
3086
3086
|
var comparisonFilterSchema = z17.object({
|
|
3087
3087
|
key: z17.string(),
|
|
3088
3088
|
type: z17.enum(["eq", "ne", "gt", "gte", "lt", "lte"]),
|
|
@@ -3136,7 +3136,7 @@ import {
|
|
|
3136
3136
|
lazySchema as lazySchema4,
|
|
3137
3137
|
zodSchema as zodSchema16
|
|
3138
3138
|
} from "@ai-sdk/provider-utils";
|
|
3139
|
-
import
|
|
3139
|
+
import { z as z18 } from "zod/v4";
|
|
3140
3140
|
var webSearchArgsSchema = lazySchema4(
|
|
3141
3141
|
() => zodSchema16(
|
|
3142
3142
|
z18.object({
|
|
@@ -3187,7 +3187,7 @@ import {
|
|
|
3187
3187
|
lazySchema as lazySchema5,
|
|
3188
3188
|
zodSchema as zodSchema17
|
|
3189
3189
|
} from "@ai-sdk/provider-utils";
|
|
3190
|
-
import
|
|
3190
|
+
import { z as z19 } from "zod/v4";
|
|
3191
3191
|
var webSearchPreviewArgsSchema = lazySchema5(
|
|
3192
3192
|
() => zodSchema17(
|
|
3193
3193
|
z19.object({
|
|
@@ -3259,7 +3259,7 @@ import {
|
|
|
3259
3259
|
lazySchema as lazySchema6,
|
|
3260
3260
|
zodSchema as zodSchema18
|
|
3261
3261
|
} from "@ai-sdk/provider-utils";
|
|
3262
|
-
import
|
|
3262
|
+
import { z as z20 } from "zod/v4";
|
|
3263
3263
|
var imageGenerationArgsSchema = lazySchema6(
|
|
3264
3264
|
() => zodSchema18(
|
|
3265
3265
|
z20.object({
|