opencode-pollinations-plugin 5.6.0-beta.1 → 5.6.0-beta.2

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
@@ -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: 'Pollinations V5.2 (Native)',
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 Full ID matching (Fix ProviderModelNotFoundError) - ALWAYS CHECK SEPARATELY
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
- }
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 {
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.6.0-beta.1",
4
+ "version": "5.6.0-beta.2",
5
5
  "description": "Native Pollinations.ai Provider Plugin for OpenCode",
6
6
  "publisher": "pollinations",
7
7
  "repository": {