@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.
@@ -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;
@@ -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;
@@ -625,8 +625,9 @@ var OpenAIChatLanguageModel = class {
625
625
  const body = {
626
626
  ...args,
627
627
  stream: true,
628
- // only include stream_options when in strict compatibility mode:
629
- stream_options: this.config.compatibility === "strict" ? { include_usage: true } : void 0
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
- // only include stream_options when in strict compatibility mode:
1206
- stream_options: this.config.compatibility === "strict" ? { include_usage: true } : void 0
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({