@ai-sdk/openai 2.0.0-canary.16 → 2.0.0-canary.17
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 +8 -0
- package/dist/index.d.mts +1 -8
- package/dist/index.d.ts +1 -8
- package/dist/index.js +9 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -13
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +0 -2
- package/dist/internal/index.d.ts +0 -2
- package/dist/internal/index.js +6 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +6 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -83,7 +83,6 @@ type OpenAIProviderOptions = z.infer<typeof openaiProviderOptions>;
|
|
|
83
83
|
|
|
84
84
|
type OpenAIChatConfig = {
|
|
85
85
|
provider: string;
|
|
86
|
-
compatibility: 'strict' | 'compatible';
|
|
87
86
|
headers: () => Record<string, string | undefined>;
|
|
88
87
|
url: (options: {
|
|
89
88
|
modelId: string;
|
|
@@ -162,7 +161,6 @@ type OpenAICompletionProviderOptions = z.infer<typeof openaiCompletionProviderOp
|
|
|
162
161
|
|
|
163
162
|
type OpenAICompletionConfig = {
|
|
164
163
|
provider: string;
|
|
165
|
-
compatibility: 'strict' | 'compatible';
|
|
166
164
|
headers: () => Record<string, string | undefined>;
|
|
167
165
|
url: (options: {
|
|
168
166
|
modelId: string;
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -83,7 +83,6 @@ type OpenAIProviderOptions = z.infer<typeof openaiProviderOptions>;
|
|
|
83
83
|
|
|
84
84
|
type OpenAIChatConfig = {
|
|
85
85
|
provider: string;
|
|
86
|
-
compatibility: 'strict' | 'compatible';
|
|
87
86
|
headers: () => Record<string, string | undefined>;
|
|
88
87
|
url: (options: {
|
|
89
88
|
modelId: string;
|
|
@@ -162,7 +161,6 @@ type OpenAICompletionProviderOptions = z.infer<typeof openaiCompletionProviderOp
|
|
|
162
161
|
|
|
163
162
|
type OpenAICompletionConfig = {
|
|
164
163
|
provider: string;
|
|
165
|
-
compatibility: 'strict' | 'compatible';
|
|
166
164
|
headers: () => Record<string, string | undefined>;
|
|
167
165
|
url: (options: {
|
|
168
166
|
modelId: string;
|
package/dist/internal/index.js
CHANGED
|
@@ -625,8 +625,9 @@ var OpenAIChatLanguageModel = class {
|
|
|
625
625
|
const body = {
|
|
626
626
|
...args,
|
|
627
627
|
stream: true,
|
|
628
|
-
|
|
629
|
-
|
|
628
|
+
stream_options: {
|
|
629
|
+
include_usage: true
|
|
630
|
+
}
|
|
630
631
|
};
|
|
631
632
|
const { responseHeaders, value: response } = await (0, import_provider_utils3.postJsonToApi)({
|
|
632
633
|
url: this.config.url({
|
|
@@ -1202,8 +1203,9 @@ var OpenAICompletionLanguageModel = class {
|
|
|
1202
1203
|
const body = {
|
|
1203
1204
|
...args,
|
|
1204
1205
|
stream: true,
|
|
1205
|
-
|
|
1206
|
-
|
|
1206
|
+
stream_options: {
|
|
1207
|
+
include_usage: true
|
|
1208
|
+
}
|
|
1207
1209
|
};
|
|
1208
1210
|
const { responseHeaders, value: response } = await (0, import_provider_utils4.postJsonToApi)({
|
|
1209
1211
|
url: this.config.url({
|