opencode-pollinations-plugin 5.4.2 → 5.4.3

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.
@@ -73,6 +73,13 @@ export async function generatePollinationsConfig(forceApiKey) {
73
73
  modelsOutput.push({ id: "free/openai", name: "[Free] OpenAI (Fallback)", object: "model", variants: {} });
74
74
  modelsOutput.push({ id: "free/gemini", name: "[Free] Gemini Flash (Fallback)", object: "model", variants: {} });
75
75
  }
76
+ // 1.5 FORCE ENSURE CRITICAL MODELS
77
+ // Sometimes the API list changes or is cached weirdly. We force vital models.
78
+ const hasGemini = modelsOutput.find(m => m.id === 'free/gemini');
79
+ if (!hasGemini) {
80
+ log(`[ConfigGen] Force-injecting free/gemini.`);
81
+ modelsOutput.push({ id: "free/gemini", name: "[Free] Gemini Flash (Force)", object: "model", variants: {} });
82
+ }
76
83
  // 2. ENTERPRISE UNIVERSE
77
84
  if (effectiveKey && effectiveKey.length > 5 && effectiveKey !== 'dummy') {
78
85
  try {
@@ -126,7 +126,9 @@ async function fetchWithRetry(url, options, retries = MAX_RETRIES) {
126
126
  // Don't retry client errors (except rate limit)
127
127
  return response;
128
128
  }
129
- if (retries > 0 && (response.status === 429 || response.status >= 500)) {
129
+ if (retries > 0 && (response.status === 429 || response.status >= 500 || response.status === 520)) {
130
+ // Check for specific "Queue" message in 520/429 body if possible (async read?)
131
+ // For now, just retry blindly on 520/5xx
130
132
  log(`[Retry] Upstream Error ${response.status}. Retrying in ${RETRY_DELAY_MS}ms... (${retries} left)`);
131
133
  await sleep(RETRY_DELAY_MS);
132
134
  return fetchWithRetry(url, options, retries - 1);
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.4.2",
4
+ "version": "5.4.3",
5
5
  "description": "Native Pollinations.ai Provider Plugin for OpenCode",
6
6
  "publisher": "pollinations",
7
7
  "repository": {