jbai-cli 1.5.1 → 1.5.2
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/bin/jbai-opencode.js +6 -1
- package/package.json +1 -1
package/bin/jbai-opencode.js
CHANGED
|
@@ -73,10 +73,15 @@ opencodeConfig.provider[providerName] = {
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
// Add OpenAI models
|
|
76
|
+
// O-series models (o1, o3, o4) don't support max_tokens, they use max_completion_tokens
|
|
77
|
+
// For these models, we omit the output limit to prevent the SDK from sending max_tokens
|
|
76
78
|
config.MODELS.openai.available.forEach(model => {
|
|
79
|
+
const isOSeries = /^o[1-9]/.test(model);
|
|
77
80
|
opencodeConfig.provider[providerName].models[model] = {
|
|
78
81
|
name: model,
|
|
79
|
-
limit:
|
|
82
|
+
limit: isOSeries
|
|
83
|
+
? { context: 200000 } // O-series have larger context, no output limit
|
|
84
|
+
: { context: 128000, output: 8192 }
|
|
80
85
|
};
|
|
81
86
|
});
|
|
82
87
|
|