@ai-sdk/openai 2.0.75 → 2.0.76
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 +6 -0
- package/dist/index.js +24 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -7
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +23 -6
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +23 -6
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1678,12 +1678,26 @@ import { z as z8 } from "zod/v4";
|
|
|
1678
1678
|
var openaiImageResponseSchema = lazyValidator7(
|
|
1679
1679
|
() => zodSchema7(
|
|
1680
1680
|
z8.object({
|
|
1681
|
+
created: z8.number().nullish(),
|
|
1681
1682
|
data: z8.array(
|
|
1682
1683
|
z8.object({
|
|
1683
1684
|
b64_json: z8.string(),
|
|
1684
1685
|
revised_prompt: z8.string().nullish()
|
|
1685
1686
|
})
|
|
1686
|
-
)
|
|
1687
|
+
),
|
|
1688
|
+
background: z8.string().nullish(),
|
|
1689
|
+
output_format: z8.string().nullish(),
|
|
1690
|
+
size: z8.string().nullish(),
|
|
1691
|
+
quality: z8.string().nullish(),
|
|
1692
|
+
usage: z8.object({
|
|
1693
|
+
input_tokens: z8.number().nullish(),
|
|
1694
|
+
output_tokens: z8.number().nullish(),
|
|
1695
|
+
total_tokens: z8.number().nullish(),
|
|
1696
|
+
input_tokens_details: z8.object({
|
|
1697
|
+
image_tokens: z8.number().nullish(),
|
|
1698
|
+
text_tokens: z8.number().nullish()
|
|
1699
|
+
}).nullish()
|
|
1700
|
+
}).nullish()
|
|
1687
1701
|
})
|
|
1688
1702
|
)
|
|
1689
1703
|
);
|
|
@@ -1768,11 +1782,14 @@ var OpenAIImageModel = class {
|
|
|
1768
1782
|
},
|
|
1769
1783
|
providerMetadata: {
|
|
1770
1784
|
openai: {
|
|
1771
|
-
images: response.data.map(
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
} :
|
|
1775
|
-
|
|
1785
|
+
images: response.data.map((item) => ({
|
|
1786
|
+
...item.revised_prompt ? { revisedPrompt: item.revised_prompt } : {},
|
|
1787
|
+
...response.created != null ? { created: response.created } : {},
|
|
1788
|
+
...response.size != null ? { size: response.size } : {},
|
|
1789
|
+
...response.quality != null ? { quality: response.quality } : {},
|
|
1790
|
+
...response.background != null ? { background: response.background } : {},
|
|
1791
|
+
...response.output_format != null ? { outputFormat: response.output_format } : {}
|
|
1792
|
+
}))
|
|
1776
1793
|
}
|
|
1777
1794
|
}
|
|
1778
1795
|
};
|
|
@@ -4656,7 +4673,7 @@ var OpenAITranscriptionModel = class {
|
|
|
4656
4673
|
};
|
|
4657
4674
|
|
|
4658
4675
|
// src/version.ts
|
|
4659
|
-
var VERSION = true ? "2.0.
|
|
4676
|
+
var VERSION = true ? "2.0.76" : "0.0.0-test";
|
|
4660
4677
|
|
|
4661
4678
|
// src/openai-provider.ts
|
|
4662
4679
|
function createOpenAI(options = {}) {
|