opencode-pollinations-plugin 6.1.0-beta.10 β 6.1.0-beta.12
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 +278 -156
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,172 +1,294 @@
|
|
|
1
|
-
# πΈ Pollinations AI Plugin for OpenCode
|
|
1
|
+
# πΈ Pollinations AI Plugin for OpenCode
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
|
-
<img src="https://avatars.githubusercontent.com/u/88394740?s=400&v=4" alt="Pollinations.ai Logo" width="
|
|
5
|
-
<br>
|
|
6
|
-
<b>The
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-

|
|
4
|
+
<img src="https://avatars.githubusercontent.com/u/88394740?s=400&v=4" alt="Pollinations.ai Logo" width="180">
|
|
5
|
+
<br><br>
|
|
6
|
+
<b>The most complete bridge between OpenCode and the Pollinations.ai ecosystem.</b><br>
|
|
7
|
+
Free AI models, multimodal generation, and smart quota management β directly in your editor.
|
|
8
|
+
<br><br>
|
|
9
|
+
|
|
10
|
+

|
|
11
|
+

|
|
14
12
|

|
|
15
13
|

|
|
14
|
+

|
|
16
15
|
|
|
17
16
|
</div>
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
---
|
|
20
19
|
|
|
21
20
|
> **"No closed doors, no corporate hoops β just good tools and good people."**
|
|
21
|
+
>
|
|
22
|
+
> Pollinations.ai is an open-source platform built by and for the creative community. This plugin brings it entirely inside OpenCode: text, image, audio, video, music, diagrams, and more β with a transparent fallback system that means you're *never* blocked.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## β¨ What's New in v6.1-beta
|
|
27
|
+
|
|
28
|
+
The jump from v5.9 to v6.1 is not incremental. The plugin has grown from a smart proxy into a **full multimodal agent toolkit**:
|
|
29
|
+
|
|
30
|
+
- **15+ native tools** for generation, design, and media processing β usable directly in OpenCode's agent mode
|
|
31
|
+
- **Ledger quota system**: local `~/.pollinations/usage_history.json` tracking for 100% accurate usage with zero lag
|
|
32
|
+
- **Stealth notifications**: status toasts now only fire in relevant contexts, no more noise
|
|
33
|
+
- **Background removal** with multi-key rotation and automatic fallback to free provider
|
|
34
|
+
- **Video, music, audio generation** via the Pollinations API
|
|
35
|
+
- **Web search + scraping** integrated as agent tools
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## π Quick Start
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Install globally
|
|
43
|
+
npm install -g opencode-pollinations-plugin
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Then in OpenCode:
|
|
47
|
+
```
|
|
48
|
+
/connect
|
|
49
|
+
```
|
|
50
|
+
Select **pollinations** β Enter your API key from [enter.pollinations.ai](https://enter.pollinations.ai), or leave blank to use the free tier.
|
|
51
|
+
|
|
52
|
+
Select any `pollinations/*` model and start chatting. **No key required to get started.**
|
|
53
|
+
|
|
54
|
+
> β οΈ After connecting a new key, restart OpenCode once for the model list to update.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## π Free Universe β No Key Required
|
|
59
|
+
|
|
60
|
+
Access a wide range of models with **zero setup**, supported by Pollinations' ad model:
|
|
61
|
+
|
|
62
|
+
| Model | Speed | Context | Notes |
|
|
63
|
+
|-------|:-----:|:-------:|-------|
|
|
64
|
+
| `openai` / `openai-large` | Fast | 128k | GPT-4o class |
|
|
65
|
+
| `gemini` / `gemini-search` | Fast | 1M | Google Gemini |
|
|
66
|
+
| `mistral` / `qwen-coder` | Fast | 32k | Code-focused |
|
|
67
|
+
| `nova-fast` / `grok` | Very Fast | 32k | Quick tasks |
|
|
68
|
+
| `deepseek` / `kimi` | Medium | 128k | Reasoning |
|
|
69
|
+
|
|
70
|
+
> π‘ Using Gemini with tool calls? The plugin auto-detects incompatibilities and transparently falls back to OpenAI β your workflow never breaks.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## π Pro Mode β Unlock Premium Models
|
|
75
|
+
|
|
76
|
+
Connect your [Pollinations API key](https://enter.pollinations.ai) to access enterprise-grade models charged in **Pollen** (the unified credit, ~$1 = 1 Pollen):
|
|
77
|
+
|
|
78
|
+
| Model | Provider | Notes |
|
|
79
|
+
|-------|----------|-------|
|
|
80
|
+
| `claude` / `claude-large` | Anthropic | Requires wallet credits |
|
|
81
|
+
| `gemini-large` | Google | Requires wallet credits |
|
|
82
|
+
| `gpt-4o` / `openai-large` | OpenAI | Daily grant available |
|
|
83
|
+
| `deepseek-coder` | DeepSeek | Daily grant available |
|
|
84
|
+
|
|
85
|
+
### π‘οΈ Safety Net β You're Never Blocked
|
|
86
|
+
|
|
87
|
+
If your quota or wallet runs low mid-session, the plugin switches automatically to a free model, injects a visible warning in the response stream, and continues. No errors. No broken sessions.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## π§ Agent Tools (v6.1 β New)
|
|
92
|
+
|
|
93
|
+
When OpenCode uses the plugin in agent mode, it gets access to a rich toolbox organized in three categories:
|
|
94
|
+
|
|
95
|
+
### π¨ Pollinations Generation Tools
|
|
96
|
+
|
|
97
|
+
These tools call the Pollinations APIs directly, enabling the AI to generate media as part of its reasoning:
|
|
98
|
+
|
|
99
|
+
| Tool | Description |
|
|
100
|
+
|------|-------------|
|
|
101
|
+
| `gen_image` | Generate images from a text prompt (Flux, SDXL, etc.) |
|
|
102
|
+
| `gen_audio` | Generate speech or sound effects |
|
|
103
|
+
| `gen_music` | Generate music from a description |
|
|
104
|
+
| `gen_video` | Generate short video clips |
|
|
105
|
+
| `transcribe_audio` | Transcribe an audio file to text |
|
|
106
|
+
| `deepsearch` | Multi-step AI-powered research |
|
|
107
|
+
| `search_crawl_scrape` | Web search with full page scraping |
|
|
108
|
+
|
|
109
|
+
### ποΈ Design Tools
|
|
110
|
+
|
|
111
|
+
| Tool | Description |
|
|
112
|
+
|------|-------------|
|
|
113
|
+
| `gen_diagram` | Generate diagrams (flowcharts, architecture, etc.) |
|
|
114
|
+
| `gen_palette` | Create color palettes from a description or image |
|
|
115
|
+
| `gen_qrcode` | Generate styled QR codes |
|
|
116
|
+
|
|
117
|
+
### β‘ Power Tools
|
|
118
|
+
|
|
119
|
+
| Tool | Description |
|
|
120
|
+
|------|-------------|
|
|
121
|
+
| `remove_background` | Remove image backgrounds (free or BackgroundCut HD) |
|
|
122
|
+
| `rmbg_keys` | Manage BackgroundCut API keys with rotation |
|
|
123
|
+
| `extract_audio` | Extract the audio track from a video file |
|
|
124
|
+
| `extract_frames` | Extract frames from a video at a given interval |
|
|
125
|
+
| `file_to_url` | Upload a local file and return a public URL |
|
|
22
126
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
##
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
|
90
|
-
|
|
91
|
-
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
127
|
+
> **Background Removal** supports multi-key rotation: if one BackgroundCut key is exhausted or rate-limited, the plugin automatically rotates to the next available key, then falls back to the free provider if all keys fail.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## ποΈ Vision Support
|
|
132
|
+
|
|
133
|
+
Paste images directly into the chat or use an image URL. The plugin handles encoding automatically.
|
|
134
|
+
|
|
135
|
+
| Model | Vision | Reasoning | Tools |
|
|
136
|
+
|-------|:------:|:---------:|:-----:|
|
|
137
|
+
| `openai` / `openai-large` | β
| β | β
|
|
|
138
|
+
| `gemini` / `gemini-search` | β
| β | β
|
|
|
139
|
+
| `claude` / `claude-large` | β
| β | β
|
|
|
140
|
+
| `kimi` | β
| β
| β |
|
|
141
|
+
| `openai-audio` | β
| β | β
|
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## π° Understanding Pollen & Tiers
|
|
146
|
+
|
|
147
|
+
**Pollen** is Pollinations' unified credit system. **$1 β 1 Pollen.**
|
|
148
|
+
|
|
149
|
+
Every registered user receives a **daily Pollen grant** based on their tier:
|
|
150
|
+
|
|
151
|
+
| Tier | Daily Grant | Requirement |
|
|
152
|
+
|:-----|:------------|:------------|
|
|
153
|
+
| π¦ **Microbe** | 0.1 Pollen | Flagged accounts |
|
|
154
|
+
| π± **Spore** | 1 Pollen | Sign up |
|
|
155
|
+
| πΏ **Seed** | 3 Pollen | Active GitHub dev (8+ points) |
|
|
156
|
+
| πΈ **Flower** | 10 Pollen | Published app |
|
|
157
|
+
| π― **Nectar** | 20 Pollen | Major contributor |
|
|
158
|
+
|
|
159
|
+
> πΈ Publishing this plugin to the OpenCode ecosystem earned its author **Flower** tier (10 Pollen/day). [Register here to claim yours.](https://enter.pollinations.ai)
|
|
160
|
+
|
|
161
|
+
Certain models (`claude-large`, `gemini-large`, `veo`, `seedream-pro`) are **Paid-Only**: they require wallet credits on top of (or instead of) daily grants.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## π Commands
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
/pollinations usage # View Pollen balance + tier status
|
|
169
|
+
/pollinations usage full # Detailed per-model breakdown
|
|
170
|
+
/pollinations mode [manual|alwaysfree|pro] # Change routing mode
|
|
171
|
+
/pollinations status # Plugin health check
|
|
172
|
+
/pollinations config [key] [value] # Read or write config values
|
|
173
|
+
/pollinations fallback <main> [agent] # Configure fallback models
|
|
174
|
+
/pollinations help # Full command reference
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Aliases: `/poll` works as a shorthand for all commands.
|
|
178
|
+
|
|
179
|
+
### Config Keys
|
|
180
|
+
|
|
181
|
+
| Key | Values | Description |
|
|
182
|
+
|-----|--------|-------------|
|
|
183
|
+
| `status_gui` | `none` / `alert` / `all` | Toast verbosity |
|
|
184
|
+
| `logs_gui` | `none` / `error` / `verbose` | Technical log verbosity |
|
|
185
|
+
| `threshold_tier` | `0-100` | Alert threshold for tier (%) |
|
|
186
|
+
| `threshold_wallet` | `0-100` | Safety Net trigger ($) |
|
|
187
|
+
| `status_bar` | `true` / `false` | Status bar widget |
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## π API Key Types
|
|
192
|
+
|
|
193
|
+
| Type | Access |
|
|
194
|
+
|------|--------|
|
|
195
|
+
| **Standard (`pk_...`)** | Full access: models, usage dashboard, quota |
|
|
196
|
+
| **Limited** | Generation only. Dashboard shows a restriction alert. The plugin auto-switches to Manual mode to avoid quota errors. |
|
|
197
|
+
| **Legacy (`sk_...`)** | Accepted for backward compatibility |
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## π οΈ Routing Modes
|
|
202
|
+
|
|
203
|
+
| Mode | Behavior |
|
|
204
|
+
|------|----------|
|
|
205
|
+
| `manual` | You choose the model, no automatic switching |
|
|
206
|
+
| `alwaysfree` | Only free models, never charges Pollen |
|
|
207
|
+
| `pro` | Enterprise models with automatic free fallback when quota/wallet is low |
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## ποΈ Architecture (Summary)
|
|
212
|
+
|
|
213
|
+
The plugin runs a **local HTTP proxy** on a dynamically assigned port (system port 0 β no conflicts, cross-platform). OpenCode points its `pollinations` provider at this proxy. The proxy reads your config, checks quota, applies model-specific sanitizations, and forwards requests to the correct Pollinations endpoint.
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
OpenCode TUI
|
|
217
|
+
β POST /v1/chat/completions
|
|
218
|
+
βΌ
|
|
219
|
+
Local Proxy (Dynamic Port)
|
|
220
|
+
βββ Safety Net Logic (quota check, fallback)
|
|
221
|
+
βββ Model Sanitization (Azure/Vertex/Gemini/Kimi)
|
|
222
|
+
βββ Route to:
|
|
223
|
+
βββ text.pollinations.ai (Free Universe)
|
|
224
|
+
βββ gen.pollinations.ai (Enterprise Universe)
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Config is read from (highest priority first):
|
|
228
|
+
1. `~/.pollinations/config.json`
|
|
229
|
+
2. `~/.local/share/opencode/auth.json`
|
|
230
|
+
3. `~/.config/opencode/opencode.json`
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## πΊοΈ Roadmap
|
|
235
|
+
|
|
236
|
+
### β
Shipped (v5.x β v6.1-beta)
|
|
237
|
+
- Free + Enterprise proxy with transparent fallback (Safety Net)
|
|
238
|
+
- Dynamic port allocation β cross-platform (no more `fuser`, no port conflicts)
|
|
239
|
+
- Pollen/tier quota tracking with local Ledger
|
|
240
|
+
- Agent tools: image, audio, music, video generation
|
|
241
|
+
- Agent tools: web search, scraping, deep research
|
|
242
|
+
- Design tools: diagrams, palettes, QR codes
|
|
243
|
+
- Power tools: background removal with key rotation, frame/audio extraction
|
|
244
|
+
- Stealth notification mode (toasts only in relevant sessions)
|
|
245
|
+
- Limited-key support with automatic mode switching
|
|
246
|
+
- Gemini tools auto-fallback to OpenAI
|
|
247
|
+
- Enterprise schema sanitization (Azure, Vertex, Bedrock, Kimi)
|
|
248
|
+
|
|
249
|
+
### π Next (v6.2 β v6.5, 2026)
|
|
250
|
+
- **Config file watcher** β hot-reload without restarting OpenCode
|
|
251
|
+
- **Signature map rotation** β LRU eviction to prevent unbounded memory growth
|
|
252
|
+
- **Unit tests** β coverage for `proxy.ts`, `quota.ts`, `tools/`
|
|
253
|
+
- **`/poll status` one-liner** β faster than opening the dashboard
|
|
254
|
+
- **Structured logging** β JSON format, configurable log levels, log rotation
|
|
255
|
+
- **Model search** β `/poll models <query>` to filter the model list
|
|
256
|
+
|
|
257
|
+
### π Longer Term (v7.0+, 2027)
|
|
258
|
+
- **Smart Router** β cost-aware and latency-aware model selection
|
|
259
|
+
- **Multi-provider failover** β fallback to OpenRouter if Pollinations is unreachable
|
|
260
|
+
- **Web Dashboard** β browser UI for monitoring, config, and analytics
|
|
261
|
+
- **Team features** β shared quotas and API keys
|
|
262
|
+
- **Persistent memory** β vector DB integration for long-running agents
|
|
263
|
+
|
|
264
|
+
> Community ideas with the most votes: API usage alerts, conversation export (Markdown/JSON), model comparison mode. Open an issue to vote!
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## π€ Contributing
|
|
269
|
+
|
|
270
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for setup instructions, code guidelines, and priority areas (testing, docs, i18n, DevOps).
|
|
271
|
+
|
|
272
|
+
### Areas Where Help Is Needed
|
|
273
|
+
- π§ͺ **Testing** β Unit + integration tests for the proxy and tools
|
|
274
|
+
- π **Docs** β User guides, tool examples
|
|
275
|
+
- π **i18n** β French/English consistency, German and Spanish translations
|
|
276
|
+
- π¨ **UX** β Command output formatting improvements
|
|
277
|
+
|
|
278
|
+
---
|
|
163
279
|
|
|
164
280
|
## π Links
|
|
165
281
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
282
|
+
| Resource | Link |
|
|
283
|
+
|----------|------|
|
|
284
|
+
| Sign up for Pollinations (free tiers + paid models) | [enter.pollinations.ai](https://enter.pollinations.ai) |
|
|
285
|
+
| Pollinations website | [pollinations.ai](https://pollinations.ai) |
|
|
286
|
+
| Pollinations GitHub | [github.com/pollinations/pollinations](https://github.com/pollinations/pollinations) |
|
|
287
|
+
| Discord community | [Join us!](https://discord.gg/pollinations-ai-885844321461485618) |
|
|
288
|
+
| OpenCode ecosystem | [opencode.ai/docs/ecosystem](https://opencode.ai/docs/ecosystem#plugins) |
|
|
289
|
+
| Plugin author | [@fkom13](https://github.com/fkom13) |
|
|
290
|
+
|
|
291
|
+
---
|
|
170
292
|
|
|
171
293
|
## π License
|
|
172
294
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-pollinations-plugin",
|
|
3
3
|
"displayName": "Pollinations AI (V5.9)",
|
|
4
|
-
"version": "6.1.0-beta.
|
|
4
|
+
"version": "6.1.0-beta.12",
|
|
5
5
|
"description": "Native Pollinations.ai Provider Plugin for OpenCode",
|
|
6
6
|
"publisher": "pollinations",
|
|
7
7
|
"repository": {
|