@iservu-inc/adf-cli 0.4.30 → 0.4.31
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 +27 -0
- package/lib/ai/ai-client.js +6 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,33 @@ All notable changes to `@iservu-inc/adf-cli` will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.31] - 2025-10-04
|
|
9
|
+
|
|
10
|
+
### 🐛 Fix: OpenAI o-series Model Support (o3, o3-mini, o3-pro)
|
|
11
|
+
|
|
12
|
+
**Fixed: o3 Models Failing with Parameter Error**
|
|
13
|
+
- **Problem:** o3 models failed with `Unsupported parameter: 'max_tokens' is not supported with this model`
|
|
14
|
+
- **Root Cause:** Only checking for `o1` models, not all o-series models (o1, o3, etc.)
|
|
15
|
+
- **Solution:** Updated regex to detect ANY o-series model (`/^o\d/`)
|
|
16
|
+
|
|
17
|
+
**Code Change (ai-client.js:118):**
|
|
18
|
+
```javascript
|
|
19
|
+
// ❌ BEFORE - Only o1 models
|
|
20
|
+
const isO1Model = this.model.startsWith('o1');
|
|
21
|
+
|
|
22
|
+
// ✅ AFTER - All o-series models (o1, o3, o5, etc.)
|
|
23
|
+
const isOSeriesModel = /^o\d/.test(this.model);
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Impact:**
|
|
27
|
+
- ✅ o1, o1-mini, o1-preview now work
|
|
28
|
+
- ✅ o3, o3-mini, o3-pro now work
|
|
29
|
+
- ✅ Future o-series models automatically supported
|
|
30
|
+
- Uses `max_completion_tokens` parameter (as required by OpenAI API)
|
|
31
|
+
- Removes `temperature` parameter (not supported by o-series)
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
8
35
|
## [0.4.30] - 2025-10-04
|
|
9
36
|
|
|
10
37
|
### 🔒 Security: Auto .gitignore Protection
|
package/lib/ai/ai-client.js
CHANGED
|
@@ -113,8 +113,9 @@ class AIClient {
|
|
|
113
113
|
* OpenAI GPT request
|
|
114
114
|
*/
|
|
115
115
|
async openaiRequest(prompt, maxTokens, temperature) {
|
|
116
|
-
//
|
|
117
|
-
|
|
116
|
+
// o-series models (o1, o3, etc.) use max_completion_tokens instead of max_tokens
|
|
117
|
+
// Check for any model starting with 'o' followed by a digit
|
|
118
|
+
const isOSeriesModel = /^o\d/.test(this.model);
|
|
118
119
|
|
|
119
120
|
const requestParams = {
|
|
120
121
|
model: this.model,
|
|
@@ -126,10 +127,10 @@ class AIClient {
|
|
|
126
127
|
]
|
|
127
128
|
};
|
|
128
129
|
|
|
129
|
-
//
|
|
130
|
-
if (
|
|
130
|
+
// o-series models use different parameter names
|
|
131
|
+
if (isOSeriesModel) {
|
|
131
132
|
requestParams.max_completion_tokens = maxTokens;
|
|
132
|
-
//
|
|
133
|
+
// o-series models don't support temperature parameter
|
|
133
134
|
} else {
|
|
134
135
|
requestParams.max_tokens = maxTokens;
|
|
135
136
|
requestParams.temperature = temperature;
|