@ai-sdk/openai 2.0.47 → 2.0.48
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 +7 -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 +2 -2
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({
|
|
@@ -246,7 +246,7 @@ import {
|
|
|
246
246
|
lazyValidator,
|
|
247
247
|
zodSchema
|
|
248
248
|
} from "@ai-sdk/provider-utils";
|
|
249
|
-
import
|
|
249
|
+
import { z as z2 } from "zod/v4";
|
|
250
250
|
var openaiChatResponseSchema = lazyValidator(
|
|
251
251
|
() => zodSchema(
|
|
252
252
|
z2.object({
|
|
@@ -387,7 +387,7 @@ import {
|
|
|
387
387
|
lazyValidator as lazyValidator2,
|
|
388
388
|
zodSchema as zodSchema2
|
|
389
389
|
} from "@ai-sdk/provider-utils";
|
|
390
|
-
import
|
|
390
|
+
import { z as z3 } from "zod/v4";
|
|
391
391
|
var openaiChatLanguageModelOptions = lazyValidator2(
|
|
392
392
|
() => zodSchema2(
|
|
393
393
|
z3.object({
|
|
@@ -1205,7 +1205,7 @@ function mapOpenAIFinishReason2(finishReason) {
|
|
|
1205
1205
|
}
|
|
1206
1206
|
|
|
1207
1207
|
// src/completion/openai-completion-api.ts
|
|
1208
|
-
import
|
|
1208
|
+
import { z as z4 } from "zod/v4";
|
|
1209
1209
|
import {
|
|
1210
1210
|
lazyValidator as lazyValidator3,
|
|
1211
1211
|
zodSchema as zodSchema3
|
|
@@ -1270,7 +1270,7 @@ import {
|
|
|
1270
1270
|
lazyValidator as lazyValidator4,
|
|
1271
1271
|
zodSchema as zodSchema4
|
|
1272
1272
|
} from "@ai-sdk/provider-utils";
|
|
1273
|
-
import
|
|
1273
|
+
import { z as z5 } from "zod/v4";
|
|
1274
1274
|
var openaiCompletionProviderOptions = lazyValidator4(
|
|
1275
1275
|
() => zodSchema4(
|
|
1276
1276
|
z5.object({
|
|
@@ -1562,7 +1562,7 @@ import {
|
|
|
1562
1562
|
lazyValidator as lazyValidator5,
|
|
1563
1563
|
zodSchema as zodSchema5
|
|
1564
1564
|
} from "@ai-sdk/provider-utils";
|
|
1565
|
-
import
|
|
1565
|
+
import { z as z6 } from "zod/v4";
|
|
1566
1566
|
var openaiEmbeddingProviderOptions = lazyValidator5(
|
|
1567
1567
|
() => zodSchema5(
|
|
1568
1568
|
z6.object({
|
|
@@ -1582,7 +1582,7 @@ var openaiEmbeddingProviderOptions = lazyValidator5(
|
|
|
1582
1582
|
|
|
1583
1583
|
// src/embedding/openai-embedding-api.ts
|
|
1584
1584
|
import { lazyValidator as lazyValidator6, zodSchema as zodSchema6 } from "@ai-sdk/provider-utils";
|
|
1585
|
-
import
|
|
1585
|
+
import { z as z7 } from "zod/v4";
|
|
1586
1586
|
var openaiTextEmbeddingResponseSchema = lazyValidator6(
|
|
1587
1587
|
() => zodSchema6(
|
|
1588
1588
|
z7.object({
|
|
@@ -1665,7 +1665,7 @@ import {
|
|
|
1665
1665
|
|
|
1666
1666
|
// src/image/openai-image-api.ts
|
|
1667
1667
|
import { lazyValidator as lazyValidator7, zodSchema as zodSchema7 } from "@ai-sdk/provider-utils";
|
|
1668
|
-
import
|
|
1668
|
+
import { z as z8 } from "zod/v4";
|
|
1669
1669
|
var openaiImageResponseSchema = lazyValidator7(
|
|
1670
1670
|
() => zodSchema7(
|
|
1671
1671
|
z8.object({
|
|
@@ -1782,7 +1782,7 @@ import {
|
|
|
1782
1782
|
|
|
1783
1783
|
// src/transcription/openai-transcription-api.ts
|
|
1784
1784
|
import { lazyValidator as lazyValidator8, zodSchema as zodSchema8 } from "@ai-sdk/provider-utils";
|
|
1785
|
-
import
|
|
1785
|
+
import { z as z9 } from "zod/v4";
|
|
1786
1786
|
var openaiTranscriptionResponseSchema = lazyValidator8(
|
|
1787
1787
|
() => zodSchema8(
|
|
1788
1788
|
z9.object({
|
|
@@ -1819,7 +1819,7 @@ import {
|
|
|
1819
1819
|
lazyValidator as lazyValidator9,
|
|
1820
1820
|
zodSchema as zodSchema9
|
|
1821
1821
|
} from "@ai-sdk/provider-utils";
|
|
1822
|
-
import
|
|
1822
|
+
import { z as z10 } from "zod/v4";
|
|
1823
1823
|
var openAITranscriptionProviderOptions = lazyValidator9(
|
|
1824
1824
|
() => zodSchema9(
|
|
1825
1825
|
z10.object({
|
|
@@ -2029,7 +2029,7 @@ import {
|
|
|
2029
2029
|
lazyValidator as lazyValidator10,
|
|
2030
2030
|
zodSchema as zodSchema10
|
|
2031
2031
|
} from "@ai-sdk/provider-utils";
|
|
2032
|
-
import
|
|
2032
|
+
import { z as z11 } from "zod/v4";
|
|
2033
2033
|
var openaiSpeechProviderOptionsSchema = lazyValidator10(
|
|
2034
2034
|
() => zodSchema10(
|
|
2035
2035
|
z11.object({
|
|
@@ -2162,7 +2162,7 @@ import {
|
|
|
2162
2162
|
parseProviderOptions as parseProviderOptions6,
|
|
2163
2163
|
validateTypes
|
|
2164
2164
|
} from "@ai-sdk/provider-utils";
|
|
2165
|
-
import
|
|
2165
|
+
import { z as z13 } from "zod/v4";
|
|
2166
2166
|
|
|
2167
2167
|
// src/tool/local-shell.ts
|
|
2168
2168
|
import {
|
|
@@ -2170,7 +2170,7 @@ import {
|
|
|
2170
2170
|
lazySchema,
|
|
2171
2171
|
zodSchema as zodSchema11
|
|
2172
2172
|
} from "@ai-sdk/provider-utils";
|
|
2173
|
-
import
|
|
2173
|
+
import { z as z12 } from "zod/v4";
|
|
2174
2174
|
var localShellInputSchema = lazySchema(
|
|
2175
2175
|
() => zodSchema11(
|
|
2176
2176
|
z12.object({
|
|
@@ -2485,7 +2485,7 @@ import {
|
|
|
2485
2485
|
lazyValidator as lazyValidator11,
|
|
2486
2486
|
zodSchema as zodSchema12
|
|
2487
2487
|
} from "@ai-sdk/provider-utils";
|
|
2488
|
-
import
|
|
2488
|
+
import { z as z14 } from "zod/v4";
|
|
2489
2489
|
var openaiResponsesChunkSchema = lazyValidator11(
|
|
2490
2490
|
() => zodSchema12(
|
|
2491
2491
|
z14.union([
|
|
@@ -2910,7 +2910,7 @@ import {
|
|
|
2910
2910
|
lazyValidator as lazyValidator12,
|
|
2911
2911
|
zodSchema as zodSchema13
|
|
2912
2912
|
} from "@ai-sdk/provider-utils";
|
|
2913
|
-
import
|
|
2913
|
+
import { z as z15 } from "zod/v4";
|
|
2914
2914
|
var TOP_LOGPROBS_MAX = 20;
|
|
2915
2915
|
var openaiResponsesReasoningModelIds = [
|
|
2916
2916
|
"o1",
|
|
@@ -3026,7 +3026,7 @@ import {
|
|
|
3026
3026
|
lazySchema as lazySchema2,
|
|
3027
3027
|
zodSchema as zodSchema14
|
|
3028
3028
|
} from "@ai-sdk/provider-utils";
|
|
3029
|
-
import
|
|
3029
|
+
import { z as z16 } from "zod/v4";
|
|
3030
3030
|
var codeInterpreterInputSchema = lazySchema2(
|
|
3031
3031
|
() => zodSchema14(
|
|
3032
3032
|
z16.object({
|
|
@@ -3075,7 +3075,7 @@ import {
|
|
|
3075
3075
|
lazySchema as lazySchema3,
|
|
3076
3076
|
zodSchema as zodSchema15
|
|
3077
3077
|
} from "@ai-sdk/provider-utils";
|
|
3078
|
-
import
|
|
3078
|
+
import { z as z17 } from "zod/v4";
|
|
3079
3079
|
var comparisonFilterSchema = z17.object({
|
|
3080
3080
|
key: z17.string(),
|
|
3081
3081
|
type: z17.enum(["eq", "ne", "gt", "gte", "lt", "lte"]),
|
|
@@ -3129,7 +3129,7 @@ import {
|
|
|
3129
3129
|
lazySchema as lazySchema4,
|
|
3130
3130
|
zodSchema as zodSchema16
|
|
3131
3131
|
} from "@ai-sdk/provider-utils";
|
|
3132
|
-
import
|
|
3132
|
+
import { z as z18 } from "zod/v4";
|
|
3133
3133
|
var webSearchArgsSchema = lazySchema4(
|
|
3134
3134
|
() => zodSchema16(
|
|
3135
3135
|
z18.object({
|
|
@@ -3180,7 +3180,7 @@ import {
|
|
|
3180
3180
|
lazySchema as lazySchema5,
|
|
3181
3181
|
zodSchema as zodSchema17
|
|
3182
3182
|
} from "@ai-sdk/provider-utils";
|
|
3183
|
-
import
|
|
3183
|
+
import { z as z19 } from "zod/v4";
|
|
3184
3184
|
var webSearchPreviewArgsSchema = lazySchema5(
|
|
3185
3185
|
() => zodSchema17(
|
|
3186
3186
|
z19.object({
|
|
@@ -3252,7 +3252,7 @@ import {
|
|
|
3252
3252
|
lazySchema as lazySchema6,
|
|
3253
3253
|
zodSchema as zodSchema18
|
|
3254
3254
|
} from "@ai-sdk/provider-utils";
|
|
3255
|
-
import
|
|
3255
|
+
import { z as z20 } from "zod/v4";
|
|
3256
3256
|
var imageGenerationArgsSchema = lazySchema6(
|
|
3257
3257
|
() => zodSchema18(
|
|
3258
3258
|
z20.object({
|