opencode-pollinations-plugin 5.8.4-beta.2 → 5.8.4-beta.4
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.
|
@@ -7,15 +7,8 @@ const HOMEDIR = os.homedir();
|
|
|
7
7
|
const CONFIG_DIR_POLLI = path.join(HOMEDIR, '.pollinations');
|
|
8
8
|
const CACHE_FILE = path.join(CONFIG_DIR_POLLI, 'models-cache.json');
|
|
9
9
|
// --- CONSTANTS ---
|
|
10
|
-
// Seed from
|
|
11
|
-
|
|
12
|
-
{ "name": "gemini", "description": "Gemini 2.5 Flash Lite", "tier": "anonymous", "tools": true, "input_modalities": ["text", "image"], "output_modalities": ["text"], "vision": true },
|
|
13
|
-
{ "name": "mistral", "description": "Mistral Small 3.2 24B", "tier": "anonymous", "tools": true, "input_modalities": ["text"], "output_modalities": ["text"], "vision": false },
|
|
14
|
-
{ "name": "openai-fast", "description": "GPT-OSS 20B Reasoning LLM (OVH)", "tier": "anonymous", "tools": true, "input_modalities": ["text"], "output_modalities": ["text"], "vision": false, "reasoning": true },
|
|
15
|
-
{ "name": "bidara", "description": "BIDARA (Biomimetic Designer)", "tier": "anonymous", "community": true, "input_modalities": ["text", "image"], "output_modalities": ["text"], "vision": true },
|
|
16
|
-
{ "name": "chickytutor", "description": "ChickyTutor AI Language Tutor", "tier": "anonymous", "community": true, "input_modalities": ["text"], "output_modalities": ["text"] },
|
|
17
|
-
{ "name": "midijourney", "description": "MIDIjourney", "tier": "anonymous", "community": true, "input_modalities": ["text"], "output_modalities": ["text"] }
|
|
18
|
-
];
|
|
10
|
+
// Seed from models-seed.ts
|
|
11
|
+
import { FREE_MODELS_SEED } from './models-seed.js';
|
|
19
12
|
// --- LOGGING ---
|
|
20
13
|
const LOG_FILE = '/tmp/opencode_pollinations_config.log';
|
|
21
14
|
function log(msg) {
|
|
@@ -157,7 +150,7 @@ export async function generatePollinationsConfig(forceApiKey, forceStrict = fals
|
|
|
157
150
|
}
|
|
158
151
|
else {
|
|
159
152
|
log('Using DEFAULT SEED models (Offline + No Cache).');
|
|
160
|
-
freeModelsList =
|
|
153
|
+
freeModelsList = FREE_MODELS_SEED;
|
|
161
154
|
}
|
|
162
155
|
}
|
|
163
156
|
}
|
|
@@ -183,6 +176,18 @@ export async function generatePollinationsConfig(forceApiKey, forceStrict = fals
|
|
|
183
176
|
enterList.forEach((m) => {
|
|
184
177
|
if (m.tools === false)
|
|
185
178
|
return;
|
|
179
|
+
// FIX: ChickyTutor (Bedrock) crashes with tools due to missing toolConfig.
|
|
180
|
+
// Force disable tools to match Free behavior and ensure stability.
|
|
181
|
+
if ((m.id || m.name).includes('chickytutor')) {
|
|
182
|
+
// m.tools = false; // We can't mutate m effectively if we want to filter?
|
|
183
|
+
// No, simply map it but strip tools capability in mapModel?
|
|
184
|
+
// mapModel reads raw.tools to set capability icon.
|
|
185
|
+
// But OpenCode decides to send tools based on ???
|
|
186
|
+
// OpenCode reads the 'modalities' or expects 'tools' option?
|
|
187
|
+
// Let's just NOT push it here if we filter by tools, but wait, we want CHAT.
|
|
188
|
+
// So we allow it, but we hack mapModel to NOT advertise tools?
|
|
189
|
+
m.tools = false;
|
|
190
|
+
}
|
|
186
191
|
const mapped = mapModel(m, 'enter/', '[Enter] ');
|
|
187
192
|
modelsOutput.push(mapped);
|
|
188
193
|
});
|
|
@@ -192,7 +197,7 @@ export async function generatePollinationsConfig(forceApiKey, forceStrict = fals
|
|
|
192
197
|
log(`Error fetching Enterprise models: ${e}`);
|
|
193
198
|
if (forceStrict)
|
|
194
199
|
throw e;
|
|
195
|
-
|
|
200
|
+
// STRICT: No Fallback for Enterprise. If API is down, we have 0 Enter models.
|
|
196
201
|
}
|
|
197
202
|
}
|
|
198
203
|
return modelsOutput;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface PollinationsModel {
|
|
2
|
+
name: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
tools?: boolean;
|
|
6
|
+
reasoning?: boolean;
|
|
7
|
+
context?: number;
|
|
8
|
+
context_window?: number;
|
|
9
|
+
input_modalities?: string[];
|
|
10
|
+
output_modalities?: string[];
|
|
11
|
+
paid_only?: boolean;
|
|
12
|
+
vision?: boolean;
|
|
13
|
+
audio?: boolean;
|
|
14
|
+
community?: boolean;
|
|
15
|
+
censored?: boolean;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
export declare const FREE_MODELS_SEED: PollinationsModel[];
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export const FREE_MODELS_SEED = [
|
|
2
|
+
{
|
|
3
|
+
"name": "gemini",
|
|
4
|
+
"description": "Gemini 2.5 Flash Lite",
|
|
5
|
+
"tier": "anonymous",
|
|
6
|
+
"tools": true,
|
|
7
|
+
"input_modalities": ["text", "image"],
|
|
8
|
+
"output_modalities": ["text"],
|
|
9
|
+
"vision": true
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "mistral",
|
|
13
|
+
"description": "Mistral Small 3.2 24B",
|
|
14
|
+
"tier": "anonymous",
|
|
15
|
+
"tools": true,
|
|
16
|
+
"input_modalities": ["text"],
|
|
17
|
+
"output_modalities": ["text"],
|
|
18
|
+
"vision": false
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "openai-fast",
|
|
22
|
+
"description": "GPT-OSS 20B Reasoning LLM (OVH)",
|
|
23
|
+
"tier": "anonymous",
|
|
24
|
+
"tools": true,
|
|
25
|
+
"input_modalities": ["text"],
|
|
26
|
+
"output_modalities": ["text"],
|
|
27
|
+
"vision": false,
|
|
28
|
+
"reasoning": true
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "bidara",
|
|
32
|
+
"description": "BIDARA (Biomimetic Designer)",
|
|
33
|
+
"tier": "anonymous",
|
|
34
|
+
"community": true,
|
|
35
|
+
"input_modalities": ["text", "image"],
|
|
36
|
+
"output_modalities": ["text"],
|
|
37
|
+
"vision": true
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "chickytutor",
|
|
41
|
+
"description": "ChickyTutor AI Language Tutor",
|
|
42
|
+
"tier": "anonymous",
|
|
43
|
+
"community": true,
|
|
44
|
+
"input_modalities": ["text"],
|
|
45
|
+
"output_modalities": ["text"]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "midijourney",
|
|
49
|
+
"description": "MIDIjourney",
|
|
50
|
+
"tier": "anonymous",
|
|
51
|
+
"community": true,
|
|
52
|
+
"input_modalities": ["text"],
|
|
53
|
+
"output_modalities": ["text"]
|
|
54
|
+
}
|
|
55
|
+
];
|
package/dist/server/proxy.js
CHANGED
|
@@ -418,7 +418,8 @@ export async function handleChatCompletion(req, res, bodyRaw) {
|
|
|
418
418
|
// Handles: "tools" vs "grounding" conflicts, and "infinite loops" via Stop Sequences.
|
|
419
419
|
// B. GEMINI UNIFIED FIX (Free, Fast, Pro, Enterprise, Legacy)
|
|
420
420
|
// Fixes "Multiple tools" error (Vertex) and "JSON body validation failed" (v5.3.5 regression)
|
|
421
|
-
|
|
421
|
+
// Added ChickyTutor (Claude/Gemini based) to fix "toolConfig must be defined" error.
|
|
422
|
+
else if (actualModel.includes("gemini") || actualModel.includes("chickytutor")) {
|
|
422
423
|
let hasFunctions = false;
|
|
423
424
|
if (proxyBody.tools && Array.isArray(proxyBody.tools)) {
|
|
424
425
|
hasFunctions = proxyBody.tools.some((t) => t.type === 'function' || t.function);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-pollinations-plugin",
|
|
3
3
|
"displayName": "Pollinations AI (V5.6)",
|
|
4
|
-
"version": "5.8.4-beta.
|
|
4
|
+
"version": "5.8.4-beta.4",
|
|
5
5
|
"description": "Native Pollinations.ai Provider Plugin for OpenCode",
|
|
6
6
|
"publisher": "pollinations",
|
|
7
7
|
"repository": {
|
|
@@ -55,4 +55,4 @@
|
|
|
55
55
|
"@types/node": "^20.0.0",
|
|
56
56
|
"typescript": "^5.0.0"
|
|
57
57
|
}
|
|
58
|
-
}
|
|
58
|
+
}
|