New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ai-sdk/openai

Package Overview
Dependencies
Maintainers
2
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/openai - npm Package Compare versions

Comparing version 1.0.16 to 1.0.17

7

CHANGELOG.md
# @ai-sdk/openai
## 1.0.17
### Patch Changes
- ba62cf2: feat (provider/openai): automatically map maxTokens to max_completion_tokens for reasoning models
- 3c3fae8: fix (provider/openai): add o1-mini-2024-09-12 and o1-preview-2024-09-12 configurations
## 1.0.16

@@ -4,0 +11,0 @@

@@ -458,2 +458,3 @@ "use strict";

// openai specific settings:
// TODO remove in next major version; we auto-map maxTokens now
max_completion_tokens: (_b = providerMetadata == null ? void 0 : providerMetadata.openai) == null ? void 0 : _b.maxCompletionTokens,

@@ -525,2 +526,8 @@ store: (_c = providerMetadata == null ? void 0 : providerMetadata.openai) == null ? void 0 : _c.store,

}
if (baseArgs.max_tokens != null) {
if (baseArgs.max_completion_tokens == null) {
baseArgs.max_completion_tokens = baseArgs.max_tokens;
}
baseArgs.max_tokens = void 0;
}
}

@@ -1048,5 +1055,13 @@ switch (type) {

},
"o1-mini-2024-09-12": {
systemMessageMode: "remove",
simulateStreamingByDefault: false
},
"o1-preview": {
systemMessageMode: "remove",
simulateStreamingByDefault: false
},
"o1-preview-2024-09-12": {
systemMessageMode: "remove",
simulateStreamingByDefault: false
}

@@ -1053,0 +1068,0 @@ };

@@ -456,2 +456,3 @@ "use strict";

// openai specific settings:
// TODO remove in next major version; we auto-map maxTokens now
max_completion_tokens: (_b = providerMetadata == null ? void 0 : providerMetadata.openai) == null ? void 0 : _b.maxCompletionTokens,

@@ -523,2 +524,8 @@ store: (_c = providerMetadata == null ? void 0 : providerMetadata.openai) == null ? void 0 : _c.store,

}
if (baseArgs.max_tokens != null) {
if (baseArgs.max_completion_tokens == null) {
baseArgs.max_completion_tokens = baseArgs.max_tokens;
}
baseArgs.max_tokens = void 0;
}
}

@@ -1046,5 +1053,13 @@ switch (type) {

},
"o1-mini-2024-09-12": {
systemMessageMode: "remove",
simulateStreamingByDefault: false
},
"o1-preview": {
systemMessageMode: "remove",
simulateStreamingByDefault: false
},
"o1-preview-2024-09-12": {
systemMessageMode: "remove",
simulateStreamingByDefault: false
}

@@ -1051,0 +1066,0 @@ };

2

package.json
{
"name": "@ai-sdk/openai",
"version": "1.0.16",
"version": "1.0.17",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "sideEffects": false,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc