@ai-sdk/openai 4.0.89 → 4.0.90
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 +6 -0
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +4 -2
- package/dist/internal/index.js.map +1 -1
- package/package.json +1 -1
- package/src/chat/openai-chat-language-model.ts +1 -1
- package/src/openai-language-model-capabilities.ts +7 -5
- package/src/responses/openai-responses-language-model.ts +10 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 4.0.90
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6c59fb1: fix(openai): preserve sampling parameters for GPT-6 Sol and Luna when reasoning is disabled, accounting for reasoning effort updates in Responses requests
|
|
8
|
+
|
|
3
9
|
## 4.0.89
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -259,7 +259,7 @@ function getOpenAILanguageModelCapabilities(modelId) {
|
|
|
259
259
|
const supportsFlexProcessing = oSeriesVersion != null && oSeriesVersion >= 3 || gptVersion != null && gptVersion.major >= 5 && !isGptChatModel;
|
|
260
260
|
const supportsPriorityProcessing = modelId.startsWith("gpt-4") || gptVersion != null && gptVersion.major >= 5 && !isGptNanoModel && !isGptChatModel || oSeriesVersion != null && oSeriesVersion >= 3;
|
|
261
261
|
const isReasoningModel = oSeriesVersion != null || gptVersion != null && gptVersion.major >= 5 && !isGptChatModel;
|
|
262
|
-
const supportsNonReasoningParameters = !isGpt6OrLaterModel && gptVersion != null && (gptVersion.major > 5 || gptVersion.major === 5 && (gptVersion.minor ?? 0) >= 1);
|
|
262
|
+
const supportsNonReasoningParameters = isGpt6SolOrLuna || !isGpt6OrLaterModel && gptVersion != null && (gptVersion.major > 5 || gptVersion.major === 5 && (gptVersion.minor ?? 0) >= 1);
|
|
263
263
|
return {
|
|
264
264
|
supportsFlexProcessing,
|
|
265
265
|
supportsPriorityProcessing,
|
|
@@ -6285,7 +6285,9 @@ var OpenAIResponsesLanguageModel = class OpenAIResponsesLanguageModel {
|
|
|
6285
6285
|
});
|
|
6286
6286
|
}
|
|
6287
6287
|
if (isReasoningModel) {
|
|
6288
|
-
|
|
6288
|
+
let effectiveReasoningEffort = resolvedReasoningEffort;
|
|
6289
|
+
for (const item of input) if (item.type === "configuration_update") effectiveReasoningEffort = item.reasoning.effort;
|
|
6290
|
+
if (!(effectiveReasoningEffort === "none" && modelCapabilities.supportsNonReasoningParameters)) {
|
|
6289
6291
|
if (baseArgs.temperature != null) {
|
|
6290
6292
|
baseArgs.temperature = void 0;
|
|
6291
6293
|
warnings.push({
|
|
@@ -10073,7 +10075,7 @@ var OpenAISkills = class {
|
|
|
10073
10075
|
};
|
|
10074
10076
|
//#endregion
|
|
10075
10077
|
//#region src/version.ts
|
|
10076
|
-
const VERSION = "4.0.
|
|
10078
|
+
const VERSION = "4.0.90";
|
|
10077
10079
|
//#endregion
|
|
10078
10080
|
//#region src/openai-provider.ts
|
|
10079
10081
|
/**
|