natureco-cli 4.8.1 → 4.8.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "4.8.1",
3
+ "version": "4.8.3",
4
4
  "description": "OpenClaw'dan daha güvenli, daha hızlı, daha ucuz AI agent CLI. Multi-agent, self-evolving skills, audit log, maliyet optimizasyonu ve NatureCo platform-native.",
5
5
  "bin": {
6
6
  "natureco": "bin/natureco.js"
@@ -211,7 +211,9 @@ function apiRequest(providerUrl, providerApiKey, body, stream = false) {
211
211
  async function sendStreaming(providerUrl, providerApiKey, messages, model, onChunk, onToolCall) {
212
212
  const isMM = isMiniMax(providerUrl);
213
213
  const toolDefs = getToolDefs();
214
- const toolParam = isMM ? undefined : toOpenAIFormat(toolDefs);
214
+ // v4.8.2: MiniMax da tools destekliyor endpoint'te fark var,
215
+ // ama tools parametresi aynı
216
+ const toolParam = toOpenAIFormat(toolDefs);
215
217
 
216
218
  // v4.8.0: Tool calling + streaming + multi-turn tool execution
217
219
  let currentMessages = messages;
@@ -229,6 +231,7 @@ async function sendStreaming(providerUrl, providerApiKey, messages, model, onChu
229
231
  max_tokens: 2048,
230
232
  };
231
233
  if (toolParam) body.tools = toolParam;
234
+ if (isMM) body.tool_choice = 'auto'; // MiniMax için explicit
232
235
 
233
236
  if (!body.stream) {
234
237
  // MiniMax (non-stream) — tool_calls desteklemiyor varsayalım
@@ -250,8 +253,11 @@ async function sendStreaming(providerUrl, providerApiKey, messages, model, onChu
250
253
  break;
251
254
  }
252
255
 
253
- // OpenAI uyumlu streaming
254
- const endpoint = `${providerUrl.replace(/\/+$/, '')}/chat/completions`;
256
+ // OpenAI uyumlu streaming (veya MiniMax /v1/text/chatcompletion_v2)
257
+ // v4.8.2: MiniMax tool calling sadece özel endpoint'inde çalışıyor
258
+ const endpoint = isMM
259
+ ? `${providerUrl.replace(/\/+$/, '')}/v1/text/chatcompletion_v2`
260
+ : `${providerUrl.replace(/\/+$/, '')}/chat/completions`;
255
261
  const result = await new Promise((resolve, reject) => {
256
262
  const req = https.request(endpoint, {
257
263
  method: 'POST',