natureco-cli 5.9.5 → 5.9.6

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": "5.9.5",
3
+ "version": "5.9.6",
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"
@@ -246,7 +246,9 @@ function apiRequest(providerUrl, providerApiKey, body, stream = false) {
246
246
  const isMM = isMiniMax(providerUrl);
247
247
  const endpoint = isMM
248
248
  ? `${providerUrl.replace(/\/+$/, '')}/v1/text/chatcompletion_v2`
249
- : `${providerUrl.replace(/\/+$/, '')}/chat/completions`;
249
+ : isGemini(providerUrl)
250
+ ? `${providerUrl.replace(/\/+$/, '')}/openai/chat/completions`
251
+ : `${providerUrl.replace(/\/+$/, '')}/chat/completions`;
250
252
  const req = https.request(endpoint, {
251
253
  method: 'POST',
252
254
  headers: {
@@ -275,6 +277,7 @@ function apiRequest(providerUrl, providerApiKey, body, stream = false) {
275
277
 
276
278
  async function sendStreaming(providerUrl, providerApiKey, messages, model, onChunk, onToolCall) {
277
279
  const isMM = isMiniMax(providerUrl);
280
+ const isGM = isGemini(providerUrl);
278
281
  const toolDefs = getToolDefs();
279
282
  const toolParam = toOpenAIFormat(toolDefs);
280
283
  guardrails.reset();
@@ -315,7 +318,7 @@ async function sendStreaming(providerUrl, providerApiKey, messages, model, onChu
315
318
  iterations++;
316
319
  // v5.7.18: Preflight compress before each iteration to prevent context bloat
317
320
  currentMessages = preflightCompress(currentMessages);
318
- const shouldStream = !isMM; // MiniMax streaming endpoint doesn't support tool_calls
321
+ const shouldStream = !isMM && !isGM; // MiniMax + Gemini non-stream (tool_calls reliability)
319
322
  const body = {
320
323
  model,
321
324
  messages: currentMessages,
@@ -324,7 +327,7 @@ async function sendStreaming(providerUrl, providerApiKey, messages, model, onChu
324
327
  max_tokens: 2048,
325
328
  };
326
329
  if (toolParam) body.tools = toolParam;
327
- if (isMM) body.tool_choice = 'auto'; // MiniMax için explicit
330
+ if (isMM || isGM) body.tool_choice = 'auto'; // MiniMax + Gemini için explicit
328
331
 
329
332
  if (!shouldStream) {
330
333
  // MiniMax (non-stream) — tool_calls desteklemiyor varsayalım