opencode-pollinations-plugin 5.4.0 → 5.4.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.
@@ -365,22 +365,22 @@ export async function handleChatCompletion(req, res, bodyRaw) {
365
365
  const name = t.function?.name || t.name;
366
366
  return isFunc && name !== 'google_search';
367
367
  });
368
- // 2. Sanitize (Tools Config Removed for Safety)
368
+ // 2. Sanitize & RESTORE GROUNDING CONFIG (Essential for Vertex Auth)
369
369
  if (proxyBody.tools.length > 0) {
370
- // proxyBody.tools_config = { google_search_retrieval: { disable: true } };
370
+ // v5.4.1: MUST send tools_config to avoid 401 Unauthorized on Vertex
371
+ proxyBody.tools_config = { google_search_retrieval: { disable: true } };
371
372
  proxyBody.tools = sanitizeToolsForVertex(proxyBody.tools);
372
373
  }
373
374
  else {
374
375
  // 3. If no tools left (or only search was present), DELETE 'tools' entirely
375
- // Sending tools: [] or tools_config without tools causes 400 Bad Request
376
376
  delete proxyBody.tools;
377
377
  if (proxyBody.tools_config)
378
378
  delete proxyBody.tools_config;
379
379
  }
380
380
  }
381
- // 4. STOP SEQUENCES REMOVED (Validation Fix v5.4.0)
382
- // if (!proxyBody.stop) { ... }
383
- log(`[Proxy] Gemini Logic: Tools=${proxyBody.tools ? proxyBody.tools.length : 'REMOVED'}, Stops Injected.`);
381
+ // 4. STOP SEQUENCES REMOVED (Validation Fix v5.4.0/1)
382
+ // Do NOT inject stop sequences (User:/Model:) as they cause "JSON body validation failed".
383
+ log(`[Proxy] Gemini Logic: Tools=${proxyBody.tools ? proxyBody.tools.length : 'REMOVED'}, Stops NOT Injected.`);
384
384
  }
385
385
  }
386
386
  // C. GEMINI ID BACKTRACKING & SIGNATURE
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opencode-pollinations-plugin",
3
3
  "displayName": "Pollinations AI (V5.1)",
4
- "version": "5.4.0",
4
+ "version": "5.4.2",
5
5
  "description": "Native Pollinations.ai Provider Plugin for OpenCode",
6
6
  "publisher": "pollinations",
7
7
  "repository": {