@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/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1652,12 +1652,26 @@ var import_v48 = require("zod/v4");
|
|
|
1652
1652
|
var openaiImageResponseSchema = (0, import_provider_utils12.lazyValidator)(
|
|
1653
1653
|
() => (0, import_provider_utils12.zodSchema)(
|
|
1654
1654
|
import_v48.z.object({
|
|
1655
|
+
created: import_v48.z.number().nullish(),
|
|
1655
1656
|
data: import_v48.z.array(
|
|
1656
1657
|
import_v48.z.object({
|
|
1657
1658
|
b64_json: import_v48.z.string(),
|
|
1658
1659
|
revised_prompt: import_v48.z.string().nullish()
|
|
1659
1660
|
})
|
|
1660
|
-
)
|
|
1661
|
+
),
|
|
1662
|
+
background: import_v48.z.string().nullish(),
|
|
1663
|
+
output_format: import_v48.z.string().nullish(),
|
|
1664
|
+
size: import_v48.z.string().nullish(),
|
|
1665
|
+
quality: import_v48.z.string().nullish(),
|
|
1666
|
+
usage: import_v48.z.object({
|
|
1667
|
+
input_tokens: import_v48.z.number().nullish(),
|
|
1668
|
+
output_tokens: import_v48.z.number().nullish(),
|
|
1669
|
+
total_tokens: import_v48.z.number().nullish(),
|
|
1670
|
+
input_tokens_details: import_v48.z.object({
|
|
1671
|
+
image_tokens: import_v48.z.number().nullish(),
|
|
1672
|
+
text_tokens: import_v48.z.number().nullish()
|
|
1673
|
+
}).nullish()
|
|
1674
|
+
}).nullish()
|
|
1661
1675
|
})
|
|
1662
1676
|
)
|
|
1663
1677
|
);
|
|
@@ -1742,11 +1756,14 @@ var OpenAIImageModel = class {
|
|
|
1742
1756
|
},
|
|
1743
1757
|
providerMetadata: {
|
|
1744
1758
|
openai: {
|
|
1745
|
-
images: response.data.map(
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
} :
|
|
1749
|
-
|
|
1759
|
+
images: response.data.map((item) => ({
|
|
1760
|
+
...item.revised_prompt ? { revisedPrompt: item.revised_prompt } : {},
|
|
1761
|
+
...response.created != null ? { created: response.created } : {},
|
|
1762
|
+
...response.size != null ? { size: response.size } : {},
|
|
1763
|
+
...response.quality != null ? { quality: response.quality } : {},
|
|
1764
|
+
...response.background != null ? { background: response.background } : {},
|
|
1765
|
+
...response.output_format != null ? { outputFormat: response.output_format } : {}
|
|
1766
|
+
}))
|
|
1750
1767
|
}
|
|
1751
1768
|
}
|
|
1752
1769
|
};
|
|
@@ -4565,7 +4582,7 @@ var OpenAITranscriptionModel = class {
|
|
|
4565
4582
|
};
|
|
4566
4583
|
|
|
4567
4584
|
// src/version.ts
|
|
4568
|
-
var VERSION = true ? "2.0.
|
|
4585
|
+
var VERSION = true ? "2.0.76" : "0.0.0-test";
|
|
4569
4586
|
|
|
4570
4587
|
// src/openai-provider.ts
|
|
4571
4588
|
function createOpenAI(options = {}) {
|