opencode-pollinations-plugin 5.4.16 → 5.4.17
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 +5 -5
- package/dist/index.js +5 -1
- package/dist/server/generate-config.js +5 -5
- package/dist/test-require.js +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 🌸 Pollinations AI Plugin for OpenCode (v5.4.
|
|
1
|
+
# 🌸 Pollinations AI Plugin for OpenCode (v5.4.16)
|
|
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
|
-

|
|
14
14
|

|
|
15
15
|

|
|
16
16
|
|
|
@@ -46,14 +46,14 @@ Pollinations.ai is an open-source platform built by and for the community. We pr
|
|
|
46
46
|
</p>
|
|
47
47
|
|
|
48
48
|
<p align="center">
|
|
49
|
-
<img src="docs/images/free_add.png" alt="Free Chat Example" width="800">
|
|
49
|
+
<img src="https://github.com/fkom13/opencode-pollinations-plugin/raw/main/docs/images/free_add.png" alt="Free Chat Example" width="800">
|
|
50
50
|
<br>
|
|
51
51
|
<em>Free Universe Chat (Supported by Pollinations Ads)</em>
|
|
52
52
|
</p>
|
|
53
53
|
|
|
54
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">
|
|
55
|
+
<img src="https://github.com/fkom13/opencode-pollinations-plugin/raw/main/docs/images/plan_1.png" alt="Plan Build Step 1" width="400">
|
|
56
|
+
<img src="https://github.com/fkom13/opencode-pollinations-plugin/raw/main/docs/images/plan_2.png" alt="Plan Build Step 2" width="400">
|
|
57
57
|
<br>
|
|
58
58
|
<em>Integrated Plan Building Workflow</em>
|
|
59
59
|
</p>
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,8 @@ import { handleChatCompletion } from './server/proxy.js';
|
|
|
6
6
|
import { createToastHooks, setGlobalClient } from './server/toast.js';
|
|
7
7
|
import { createStatusHooks } from './server/status.js';
|
|
8
8
|
import { createCommandHooks } from './server/commands.js';
|
|
9
|
+
import { createRequire } from 'module';
|
|
10
|
+
const require = createRequire(import.meta.url);
|
|
9
11
|
const LOG_FILE = '/tmp/opencode_pollinations_v4.log';
|
|
10
12
|
function log(msg) {
|
|
11
13
|
try {
|
|
@@ -94,9 +96,11 @@ export const PollinationsPlugin = async (ctx) => {
|
|
|
94
96
|
}
|
|
95
97
|
if (!config.provider)
|
|
96
98
|
config.provider = {};
|
|
99
|
+
// Dynamic Provider Name
|
|
100
|
+
const version = require('../package.json').version;
|
|
97
101
|
config.provider['pollinations'] = {
|
|
98
102
|
id: 'pollinations',
|
|
99
|
-
name:
|
|
103
|
+
name: `Pollinations AI (v${version})`,
|
|
100
104
|
options: { baseURL: localBaseUrl },
|
|
101
105
|
models: modelsObj
|
|
102
106
|
};
|
|
@@ -85,11 +85,11 @@ export async function generatePollinationsConfig(forceApiKey, forceStrict = fals
|
|
|
85
85
|
log(`[ConfigGen] Force-injecting free/gemini.`);
|
|
86
86
|
modelsOutput.push({ id: "free/gemini", name: "[Free] Gemini Flash (Force)", object: "model", variants: {} });
|
|
87
87
|
}
|
|
88
|
-
// ALIAS for
|
|
89
|
-
const hasGeminiAlias = modelsOutput.find(m => m.id === 'pollinations/free/gemini');
|
|
90
|
-
if (!hasGeminiAlias) {
|
|
91
|
-
|
|
92
|
-
}
|
|
88
|
+
// ALIAS Removed for Clean Config
|
|
89
|
+
// const hasGeminiAlias = modelsOutput.find(m => m.id === 'pollinations/free/gemini');
|
|
90
|
+
// if (!hasGeminiAlias) {
|
|
91
|
+
// modelsOutput.push({ id: "pollinations/free/gemini", name: "[Free] Gemini Flash (Alias)", object: "model", variants: {} });
|
|
92
|
+
// }
|
|
93
93
|
// 2. ENTERPRISE UNIVERSE
|
|
94
94
|
if (effectiveKey && effectiveKey.length > 5 && effectiveKey !== 'dummy') {
|
|
95
95
|
try {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRequire } from 'module';
|
|
2
|
+
const require = createRequire(import.meta.url);
|
|
3
|
+
try {
|
|
4
|
+
const pkg = require('../package.json');
|
|
5
|
+
console.log("SUCCESS: Loaded version " + pkg.version);
|
|
6
|
+
} catch (e) {
|
|
7
|
+
console.error("FAILURE:", e.message);
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
package/package.json
CHANGED