@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.
@@ -1674,12 +1674,26 @@ var import_v48 = require("zod/v4");
1674
1674
  var openaiImageResponseSchema = (0, import_provider_utils12.lazyValidator)(
1675
1675
  () => (0, import_provider_utils12.zodSchema)(
1676
1676
  import_v48.z.object({
1677
+ created: import_v48.z.number().nullish(),
1677
1678
  data: import_v48.z.array(
1678
1679
  import_v48.z.object({
1679
1680
  b64_json: import_v48.z.string(),
1680
1681
  revised_prompt: import_v48.z.string().nullish()
1681
1682
  })
1682
- )
1683
+ ),
1684
+ background: import_v48.z.string().nullish(),
1685
+ output_format: import_v48.z.string().nullish(),
1686
+ size: import_v48.z.string().nullish(),
1687
+ quality: import_v48.z.string().nullish(),
1688
+ usage: import_v48.z.object({
1689
+ input_tokens: import_v48.z.number().nullish(),
1690
+ output_tokens: import_v48.z.number().nullish(),
1691
+ total_tokens: import_v48.z.number().nullish(),
1692
+ input_tokens_details: import_v48.z.object({
1693
+ image_tokens: import_v48.z.number().nullish(),
1694
+ text_tokens: import_v48.z.number().nullish()
1695
+ }).nullish()
1696
+ }).nullish()
1683
1697
  })
1684
1698
  )
1685
1699
  );
@@ -1764,11 +1778,14 @@ var OpenAIImageModel = class {
1764
1778
  },
1765
1779
  providerMetadata: {
1766
1780
  openai: {
1767
- images: response.data.map(
1768
- (item) => item.revised_prompt ? {
1769
- revisedPrompt: item.revised_prompt
1770
- } : null
1771
- )
1781
+ images: response.data.map((item) => ({
1782
+ ...item.revised_prompt ? { revisedPrompt: item.revised_prompt } : {},
1783
+ ...response.created != null ? { created: response.created } : {},
1784
+ ...response.size != null ? { size: response.size } : {},
1785
+ ...response.quality != null ? { quality: response.quality } : {},
1786
+ ...response.background != null ? { background: response.background } : {},
1787
+ ...response.output_format != null ? { outputFormat: response.output_format } : {}
1788
+ }))
1772
1789
  }
1773
1790
  }
1774
1791
  };