opencode-pollinations-plugin 5.4.8-debug.5 → 5.4.8

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # 🌸 Pollinations AI Plugin for OpenCode (v5.4.6)
1
+ # 🌸 Pollinations AI Plugin for OpenCode (v5.4.8)
2
2
 
3
3
  <div align="center">
4
4
  <img src="https://avatars.githubusercontent.com/u/88394740?s=400&v=4" alt="Pollinations.ai Logo" width="200">
@@ -10,7 +10,7 @@
10
10
 
11
11
  <div align="center">
12
12
 
13
- ![Version](https://img.shields.io/badge/version-5.4.6-blue.svg)
13
+ ![Version](https://img.shields.io/badge/version-5.4.8-blue.svg)
14
14
  ![License](https://img.shields.io/badge/license-MIT-green.svg)
15
15
  ![Status](https://img.shields.io/badge/status-Stable-success.svg)
16
16
 
@@ -45,6 +45,19 @@ Pollinations.ai is an open-source platform built by and for the community. We pr
45
45
  <em>Wide Range of Models (Mistral, OpenAI, Gemini, Claude)</em>
46
46
  </p>
47
47
 
48
+ <p align="center">
49
+ <img src="docs/images/free_add.png" alt="Free Chat Example" width="800">
50
+ <br>
51
+ <em>Free Universe Chat (Supported by Pollinations Ads)</em>
52
+ </p>
53
+
54
+ <p align="center">
55
+ <img src="docs/images/plan_1.png" alt="Plan Build Step 1" width="400">
56
+ <img src="docs/images/plan_2.png" alt="Plan Build Step 2" width="400">
57
+ <br>
58
+ <em>Integrated Plan Building Workflow</em>
59
+ </p>
60
+
48
61
  ## ✨ Features
49
62
 
50
63
  - **🌍 Free Universe**: Access generic models (`openai`, `mistral`, `gemini`) for **FREE**, unlimited time, no API key required.
@@ -25,7 +25,7 @@ const DEFAULT_CONFIG_V5 = {
25
25
  thresholds: { tier: 10, wallet: 5 },
26
26
  fallbacks: {
27
27
  free: { main: 'free/mistral', agent: 'free/openai-fast' },
28
- enter: { agent: 'free/gemini' }
28
+ enter: { agent: 'free/openai-fast' }
29
29
  },
30
30
  enablePaidTools: false,
31
31
  statusBar: true
@@ -316,12 +316,6 @@ export async function handleChatCompletion(req, res, bodyRaw) {
316
316
  // =========================================================
317
317
  // LOGIC BLOCK: MODEL SPECIFIC ADAPTATIONS
318
318
  // =========================================================
319
- // Compatibility Fix: Gemini Enterprise rejects tools on some keys/plans (403 Forbidden).
320
- // We strip tools here to ensure the chat works, restoring previous behavior.
321
- if (isEnterprise && actualModel.includes('gemini')) {
322
- delete proxyBody.tools;
323
- delete proxyBody.tools_config;
324
- }
325
319
  if (proxyBody.tools && Array.isArray(proxyBody.tools) && proxyBody.tools.length > 0) {
326
320
  // B0. KIMI / MOONSHOT SURGICAL FIX (Restored for Debug)
327
321
  // Tools are ENABLED. We rely on penalties and strict stops to fight loops.
@@ -375,9 +369,14 @@ export async function handleChatCompletion(req, res, bodyRaw) {
375
369
  });
376
370
  // 2. Sanitize & RESTORE GROUNDING CONFIG (Essential for Vertex Auth)
377
371
  if (proxyBody.tools.length > 0) {
378
- // v5.4.1: MUST send tools_config to avoid 401 Unauthorized on Vertex
379
- proxyBody.tools_config = { google_search_retrieval: { disable: true } };
380
- proxyBody.tools = sanitizeToolsForVertex(proxyBody.tools);
372
+ if (hasFunctions) {
373
+ proxyBody.tools = sanitizeToolsForVertex(proxyBody.tools);
374
+ // ONLY for Free/Vertex: Add tools_config to disable search grounding (required for free tier).
375
+ // For Enterprise, adding this causes 403 Forbidden on some keys.
376
+ if (!isEnterprise) {
377
+ proxyBody.tools_config = { google_search_retrieval: { disable: true } };
378
+ }
379
+ }
381
380
  }
382
381
  else {
383
382
  // 3. If no tools left (or only search was present), DELETE 'tools' entirely
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.8-debug.5",
4
+ "version": "5.4.8",
5
5
  "description": "Native Pollinations.ai Provider Plugin for OpenCode",
6
6
  "publisher": "pollinations",
7
7
  "repository": {