@ai-sdk/openai 4.0.82 → 4.0.83

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/openai",
3
- "version": "4.0.82",
3
+ "version": "4.0.83",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -35,8 +35,8 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@ai-sdk/provider": "4.0.20",
39
- "@ai-sdk/provider-utils": "5.0.52"
38
+ "@ai-sdk/provider": "4.0.21",
39
+ "@ai-sdk/provider-utils": "5.0.53"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@ai-sdk/test-server": "2.0.3",
@@ -42,6 +42,7 @@ export const openaiTranscriptionResponseSchema = lazySchema(() =>
42
42
  ]),
43
43
  )
44
44
  .nullish(),
45
+ usage: z.record(z.string(), z.json()).nullish(),
45
46
  }),
46
47
  ),
47
48
  );
@@ -333,6 +333,7 @@ export class OpenAITranscriptionModel implements TranscriptionModelV4 {
333
333
  language,
334
334
  durationInSeconds: response.duration ?? undefined,
335
335
  warnings,
336
+ ...(response.usage != null && { usage: response.usage }),
336
337
  response: {
337
338
  timestamp: currentDate,
338
339
  modelId: this.modelId,