@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.
@@ -1670,12 +1670,26 @@ import { z as z8 } from "zod/v4";
1670
1670
  var openaiImageResponseSchema = lazyValidator7(
1671
1671
  () => zodSchema7(
1672
1672
  z8.object({
1673
+ created: z8.number().nullish(),
1673
1674
  data: z8.array(
1674
1675
  z8.object({
1675
1676
  b64_json: z8.string(),
1676
1677
  revised_prompt: z8.string().nullish()
1677
1678
  })
1678
- )
1679
+ ),
1680
+ background: z8.string().nullish(),
1681
+ output_format: z8.string().nullish(),
1682
+ size: z8.string().nullish(),
1683
+ quality: z8.string().nullish(),
1684
+ usage: z8.object({
1685
+ input_tokens: z8.number().nullish(),
1686
+ output_tokens: z8.number().nullish(),
1687
+ total_tokens: z8.number().nullish(),
1688
+ input_tokens_details: z8.object({
1689
+ image_tokens: z8.number().nullish(),
1690
+ text_tokens: z8.number().nullish()
1691
+ }).nullish()
1692
+ }).nullish()
1679
1693
  })
1680
1694
  )
1681
1695
  );
@@ -1760,11 +1774,14 @@ var OpenAIImageModel = class {
1760
1774
  },
1761
1775
  providerMetadata: {
1762
1776
  openai: {
1763
- images: response.data.map(
1764
- (item) => item.revised_prompt ? {
1765
- revisedPrompt: item.revised_prompt
1766
- } : null
1767
- )
1777
+ images: response.data.map((item) => ({
1778
+ ...item.revised_prompt ? { revisedPrompt: item.revised_prompt } : {},
1779
+ ...response.created != null ? { created: response.created } : {},
1780
+ ...response.size != null ? { size: response.size } : {},
1781
+ ...response.quality != null ? { quality: response.quality } : {},
1782
+ ...response.background != null ? { background: response.background } : {},
1783
+ ...response.output_format != null ? { outputFormat: response.output_format } : {}
1784
+ }))
1768
1785
  }
1769
1786
  }
1770
1787
  };