opencode-pollinations-plugin 5.8.4-beta.6 → 5.8.4-beta.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/dist/index.js
CHANGED
|
@@ -100,11 +100,13 @@ export const PollinationsPlugin = async (ctx) => {
|
|
|
100
100
|
const version = require('../package.json').version;
|
|
101
101
|
config.provider['pollinations'] = {
|
|
102
102
|
id: 'pollinations',
|
|
103
|
+
npm: require('../package.json').name,
|
|
103
104
|
name: `Pollinations AI (v${version})`,
|
|
104
105
|
options: { baseURL: localBaseUrl },
|
|
105
106
|
models: modelsObj
|
|
106
107
|
};
|
|
107
108
|
log(`[Hook] Registered ${Object.keys(modelsObj).length} models.`);
|
|
109
|
+
log(`[Hook] Keys: ${Object.keys(modelsObj).join(', ')}`);
|
|
108
110
|
},
|
|
109
111
|
...toastHooks,
|
|
110
112
|
...createStatusHooks(ctx.client),
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
interface OpenCodeModel {
|
|
2
2
|
id: string;
|
|
3
3
|
name: string;
|
|
4
|
-
object: string;
|
|
5
|
-
variants?: any;
|
|
6
4
|
options?: any;
|
|
7
5
|
limit?: {
|
|
8
6
|
context?: number;
|
|
@@ -12,6 +10,7 @@ interface OpenCodeModel {
|
|
|
12
10
|
input?: string[];
|
|
13
11
|
output?: string[];
|
|
14
12
|
};
|
|
13
|
+
tool_call?: boolean;
|
|
15
14
|
}
|
|
16
15
|
export declare function generatePollinationsConfig(forceApiKey?: string, forceStrict?: boolean): Promise<OpenCodeModel[]>;
|
|
17
16
|
export {};
|
|
@@ -98,7 +98,7 @@ function saveCache(models, etag) {
|
|
|
98
98
|
export async function generatePollinationsConfig(forceApiKey, forceStrict = false) {
|
|
99
99
|
const config = loadConfig();
|
|
100
100
|
const modelsOutput = [];
|
|
101
|
-
log(`Starting Configuration (v5.8.4-
|
|
101
|
+
log(`Starting Configuration (v5.8.4-Debug-Tools)...`);
|
|
102
102
|
const effectiveKey = forceApiKey || config.apiKey;
|
|
103
103
|
// 1. FREE UNIVERSE (Smart Cache System)
|
|
104
104
|
let freeModelsList = [];
|
|
@@ -180,6 +180,7 @@ export async function generatePollinationsConfig(forceApiKey, forceStrict = fals
|
|
|
180
180
|
modelsOutput.push(mapped);
|
|
181
181
|
});
|
|
182
182
|
log(`Total models (Free+Pro): ${modelsOutput.length}`);
|
|
183
|
+
log(`Generated IDs: ${modelsOutput.map(m => m.id).join(', ')}`);
|
|
183
184
|
}
|
|
184
185
|
catch (e) {
|
|
185
186
|
log(`Error fetching Enterprise models: ${e}`);
|
|
@@ -233,14 +234,16 @@ function mapModel(raw, prefix, namePrefix, nameSuffix = '') {
|
|
|
233
234
|
const modelObj = {
|
|
234
235
|
id: fullId,
|
|
235
236
|
name: finalName,
|
|
236
|
-
object: 'model',
|
|
237
|
-
variants: {},
|
|
237
|
+
// object: 'model',
|
|
238
|
+
// variants: {}, // POTENTIAL SCHEMA VIOLATION
|
|
238
239
|
modalities: {
|
|
239
240
|
input: raw.input_modalities || ['text'],
|
|
240
241
|
output: raw.output_modalities || ['text']
|
|
241
|
-
}
|
|
242
|
+
},
|
|
243
|
+
tool_call: false // FORCE DEBUG DISABLE
|
|
242
244
|
};
|
|
243
245
|
// Enrichissements
|
|
246
|
+
/*
|
|
244
247
|
if (raw.reasoning === true || rawId.includes('thinking') || rawId.includes('reasoning')) {
|
|
245
248
|
modelObj.variants = { ...modelObj.variants, high_reasoning: { options: { reasoningEffort: "high", budgetTokens: 16000 } } };
|
|
246
249
|
}
|
|
@@ -252,6 +255,7 @@ function mapModel(raw, prefix, namePrefix, nameSuffix = '') {
|
|
|
252
255
|
if (rawId.includes('claude') || rawId.includes('mistral') || rawId.includes('llama')) {
|
|
253
256
|
modelObj.variants.safe_tokens = { options: { maxTokens: 8000 } };
|
|
254
257
|
}
|
|
258
|
+
*/
|
|
255
259
|
if (rawId.includes('nova')) {
|
|
256
260
|
modelObj.limit = { output: 8000, context: 128000 };
|
|
257
261
|
}
|
|
@@ -261,10 +265,12 @@ function mapModel(raw, prefix, namePrefix, nameSuffix = '') {
|
|
|
261
265
|
if (rawId.includes('chicky')) {
|
|
262
266
|
modelObj.limit = { output: 8192, context: 8192 };
|
|
263
267
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}
|
|
268
|
+
/*
|
|
269
|
+
if (rawId.includes('fast') || rawId.includes('flash')) {
|
|
270
|
+
if (!rawId.includes('gemini')) {
|
|
271
|
+
modelObj.variants.speed = { options: { thinking: { disabled: true } } };
|
|
268
272
|
}
|
|
273
|
+
}
|
|
274
|
+
*/
|
|
269
275
|
return modelObj;
|
|
270
276
|
}
|
package/package.json
CHANGED