opencode-pollinations-plugin 6.4.8 → 6.4.10
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.de.md +17 -14
- package/README.es.md +17 -14
- package/README.fr.md +17 -14
- package/README.it.md +17 -14
- package/README.md +33 -34
- package/README.zh.md +17 -14
- package/bin/setup.js +139 -0
- package/dist/index.js +4 -6
- package/dist/locales/de.json +10 -4
- package/dist/locales/en.json +11 -4
- package/dist/locales/es.json +10 -4
- package/dist/locales/fr.json +11 -4
- package/dist/locales/it.json +10 -4
- package/dist/locales/zh.json +11 -4
- package/dist/server/commands.js +12 -71
- package/dist/server/config.js +1 -1
- package/dist/server/generate-config.js +2 -2
- package/dist/server/models/cache.js +3 -0
- package/dist/server/models/fetcher.d.ts +3 -2
- package/dist/server/models/fetcher.js +26 -4
- package/dist/server/models/types.d.ts +3 -1
- package/dist/server/proxy.js +8 -27
- package/dist/server/quota.d.ts +24 -0
- package/dist/server/quota.js +8 -2
- package/dist/server/scripts/pollinations_pricing.js +6 -3
- package/package.json +63 -62
package/dist/locales/en.json
CHANGED
|
@@ -104,18 +104,22 @@
|
|
|
104
104
|
"image": "Images",
|
|
105
105
|
"video": "Videos",
|
|
106
106
|
"audio": "Audio",
|
|
107
|
-
"text": "Text & Chat"
|
|
107
|
+
"text": "Text & Chat",
|
|
108
|
+
"3d": "3D",
|
|
109
|
+
"embedding": "Embeddings",
|
|
110
|
+
"realtime": "Realtime"
|
|
108
111
|
},
|
|
109
112
|
"cat_title": "### {emoji} {label} ({count})",
|
|
110
113
|
"enter_headers1": "| Name | ID | Description | Flags | In | Out Cost |",
|
|
111
114
|
"enter_headers2": "|------|----|-------------|-------|----|----------|",
|
|
112
115
|
"capabilities": "\n**Capabilities :** `💎` Paid-only `💬` Chat/Reasoning `👁️` Vision/Images `🎙️` Audio `🔍` Search `💻` Code",
|
|
113
|
-
"other": "**Input :** `📝` Text `🖼️` Image `🎤` Audio"
|
|
116
|
+
"other": "**Input :** `📝` Text `🖼️` Image `🎤` Audio",
|
|
117
|
+
"enter_error": "⚠️ Error retrieving Enter models."
|
|
114
118
|
},
|
|
115
119
|
"infos": {
|
|
116
120
|
"title": "## 🍯💚 POLLINATIONS OPENCODE PLUGIN 💚🍯\n\nWelcome **{name}** to the Pollinations OpenCode plugin!\n\nThis plugin empowers you to generate code, images, analyze videos, and interact with top-tier AI models seamlessly within your dev environment. Access state-of-the-art LLMs via chat, refactoring, or terminal.",
|
|
117
121
|
"features_title": "**What this plugin brings to you! :**",
|
|
118
|
-
"features_free": "**🛠️ Integrated Free Tools (Always Available):**\n- `gen_qrcode` / `gen_diagram` / `gen_palette` : Visuals and dev utilities.\n- `remove_background` :
|
|
122
|
+
"features_free": "**🛠️ Integrated Free Tools (Always Available):**\n- `gen_qrcode` / `gen_diagram` / `gen_palette` : Visuals and dev utilities.\n- `remove_background` : AI background removal (rmbg / bgeraser — free).\n- `extract_frames` / `extract_audio` : Fast media extraction.\n- `file_to_url` : Instant online hosting of local files.\n- `gen_edit_image_free` : Free image gen & edit (~20/day).\n- `gen_video_free` : Free video gen (~5/day).\n- `object_remover` : Remove objects by prompt (free, direct).\n- `image_upscaler` : Upscale 2x/4x (free, direct).\n- `image_enhancer` : AI image enhancement (free, direct).",
|
|
119
123
|
"features_pro": "**💎 Pollinations Tools (Premium - Automated with Key) :**\n- `polli_gen_image` : Image gen (Flux, Seedream, Gemini) + Image-to-Image.\n- `polli_gen_video` : Text-to-video / Image-to-video (Veo, Wan, LTX...).\n- `polli_gen_audio`/`polli_stt` : Whisper STT, ElevenLabs TTS.\n- `polli_gen_music` : Generative music engine.\n- `polli_web_search` : Connected web search.",
|
|
120
124
|
"features_config": "- **Granular configuration**, mode and token management, tool cost protections...",
|
|
121
125
|
"tiers_title": "> **Your Quest Pollen refill:** {emoji} {tier}",
|
|
@@ -468,7 +472,7 @@
|
|
|
468
472
|
"resources": "### 📚 Resources\n* **Dashboard:** enter.pollinations.ai\n* **Discord:** Join the Community\n* **Plugin:** github.com/fkom13/opencode-pollinations-plugin",
|
|
469
473
|
"free_models_success": "Available free models: {models}",
|
|
470
474
|
"free_models_error": "⚠️ Couldn't fetch free models.",
|
|
471
|
-
"onboarding": "## 🌸 Welcome to the Pollinations Plugin\n\n**Immediate free access — no key required**\nThis plugin provides a complete environment for chat, code generation, and media manipulation (Image, Video, Audio Generation, Extraction Tools...).\n\nSelect a `pollinations/free/*` model from the list and start chatting.\n{freeText}\n\n**🆓 Bonus free tools (no key needed):** `gen_edit_image_free`
|
|
475
|
+
"onboarding": "## 🌸 Welcome to the Pollinations Plugin\n\n**Immediate free access — no key required**\nThis plugin provides a complete environment for chat, code generation, and media manipulation (Image, Video, Audio Generation, Extraction Tools...).\n\nSelect a `pollinations/free/*` model from the list and start chatting.\n{freeText}\n\n**🆓 Bonus free tools (no key needed):** `gen_edit_image_free`, `gen_video_free`, `object_remover`, `image_upscaler`, `image_enhancer`, `remove_background` — image/video free tiers + local processing tools.\n\n---\n\n## 🚀 Multimedia Agents and Tools for Developers\n\nClaude Opus, GPT-5, Gemini 3, Veo & Wan Video Gen, ElevenLabs Music... unlock the full power of the Pollinations API!\n\nThis plugin uses a **BYOK** (Bring Your Own Key) model: with your own API key, the OpenCode Agent can interact directly with Premium tools, creating your media files in your Workspace.\n\n**Step 1 — Create a free account**\n👉 **https://enter.pollinations.ai**\n\n**Step 2 — Generate your API key**\nIn the **API Keys** section on `enter.pollinations.ai`, create a **Secret** key (`sk_...`).\n\n**Step 3 — Connect the key**\n```bash\n`/poll login` (recommended) or `/poll connect` sk_your_key_here\n```\n*(The key is immediately registered in your OpenCode environment, unlocking Pro models!)*\n\n---\n\n## 💰 Pollen, Tiers & Quests\nYour **tier** gives you an hourly free Pollen grant (e.g. 🌸 Flower ≈ 0.4/h). On top of that, **Quests** reward you with free Pollen — and simply using this plugin completes several of them retroactively! Check `/poll quests`.\n\nOnce free Pollen runs out, you spend from your wallet ($1 ≈ 1 Pollen, no subscription, no expiration).\n\n**Need help?** Type `/poll help`. Official Discord: https://discord.gg/pollinations-ai-885844321461485618"
|
|
472
476
|
},
|
|
473
477
|
"cost_guard": {
|
|
474
478
|
"cost_validated_max": "💰 Cost validated (Max theoretical: {maxCost})",
|
|
@@ -484,7 +488,10 @@
|
|
|
484
488
|
"condition": {
|
|
485
489
|
"signup": "Just register",
|
|
486
490
|
"auto_verify": "Automatic verification",
|
|
491
|
+
"under_review": "Account under review",
|
|
492
|
+
"default": "New account (default)",
|
|
487
493
|
"community": "Active community member",
|
|
494
|
+
"quests": "Complete Quests & contribute",
|
|
488
495
|
"publish_app": "Publish an app",
|
|
489
496
|
"top_contributor": "Top contributor",
|
|
490
497
|
"special": "Special / invite-only"
|
package/dist/locales/es.json
CHANGED
|
@@ -104,19 +104,22 @@
|
|
|
104
104
|
"image": "Imágenes",
|
|
105
105
|
"video": "Videos",
|
|
106
106
|
"audio": "Audio",
|
|
107
|
-
"text": "Texto & Chat"
|
|
107
|
+
"text": "Texto & Chat",
|
|
108
|
+
"3d": "3D",
|
|
109
|
+
"embedding": "Embeddings",
|
|
110
|
+
"realtime": "Tiempo real"
|
|
108
111
|
},
|
|
109
112
|
"cat_title": "### {emoji} {label} ({count})",
|
|
110
113
|
"enter_headers1": "| Nombre | ID | Descripción | Flags | In | Costo Out |",
|
|
111
114
|
"enter_headers2": "|--------|----|-------------|-------|----|-----------|",
|
|
112
115
|
"capabilities": "\n**Capabilities :** `💎` Paid-only `💬` Chat/Reasoning `👁️` Vision/Images `🎙️` Audio `🔍` Search `💻` Code",
|
|
113
116
|
"other": "**Input :** `📝` Text `🖼️` Image `🎤` Audio",
|
|
114
|
-
"enter_error": "⚠️ Error al
|
|
117
|
+
"enter_error": "⚠️ Error al recuperar los modelos Enter."
|
|
115
118
|
},
|
|
116
119
|
"infos": {
|
|
117
120
|
"title": "## 🍯💚 PLUGIN POLLINATIONS OPENCODE 💚🍯\n\n¡Bienvenido **{name}** al plugin Pollinations OpenCode!\n\nEste plugin te permite generar código, imágenes, analizar videos e interactuar con los mejores modelos de IA sin problemas desde tu entorno de desarrollo. Accede a LLMs avanzados a través del chat, reestructuración o terminal.",
|
|
118
121
|
"features_title": "**¡Lo que este plugin trae para ti!:**",
|
|
119
|
-
"features_free": "**🛠️ Herramientas Gratuitas (Siempre Disponibles):**\n- `gen_qrcode` / `gen_diagram` / `gen_palette` : Visuales y utilidades.\n- `remove_background` :
|
|
122
|
+
"features_free": "**🛠️ Herramientas Gratuitas (Siempre Disponibles):**\n- `gen_qrcode` / `gen_diagram` / `gen_palette` : Visuales y utilidades.\n- `remove_background` : Eliminación de fondo IA (rmbg / bgeraser — gratis).\n- `extract_frames` / `extract_audio` : Extraccion rapida de medios.\n- `file_to_url` : Alojamiento online instantaneo.\n- `gen_edit_image_free` : Gen y edicion de imagenes gratis (~20/dia).\n- `gen_video_free` : Gen de video gratis (~5/dia).\n- `object_remover` : Eliminación de objetos por prompt (gratis, directo).\n- `image_upscaler` : Ampliación 2x/4x (gratis, directo).\n- `image_enhancer` : Mejora de imagen con IA (gratis, directo).",
|
|
120
123
|
"features_pro": "**💎 Herramientas Pollinations (Premium - Automatizado con Clave):**\n- `polli_gen_image` : Gen de imágenes (Flux, Gemini) + Image-to-Image.\n- `polli_gen_video` : Text-to-video / Image-to-video (Veo, Wan...).\n- `polli_gen_audio`/`polli_stt` : Whisper STT, ElevenLabs TTS.\n- `polli_gen_music` : Motor de música generativa.\n- `polli_web_search` : Búsqueda web contectada.",
|
|
121
124
|
"features_config": "- **Configuración granular**, gestión de modos y tokens, protección de costos...",
|
|
122
125
|
"tiers_title": "> **Tu refill Quest Pollen:** {emoji} {tier}",
|
|
@@ -469,7 +472,7 @@
|
|
|
469
472
|
"resources": "### 📚 Recursos\n* **Dashboard:** enter.pollinations.ai\n* **Discord:** Unete a la comunidad\n* **Plugin:** github.com/fkom13/opencode-pollinations-plugin",
|
|
470
473
|
"free_models_success": "Modelos gratuitos disponibles: {models}",
|
|
471
474
|
"free_models_error": "⚠️ No se pudieron obtener los modelos gratuitos.",
|
|
472
|
-
"onboarding": "## 🌸 Bienvenido al plugin Pollinations\n\n**Acceso gratis inmediato — sin clave**\nEste plugin ofrece un entorno completo para chat, generación de código y manipulación de medios (generación de imágenes, vídeos, audio, herramientas de extracción...).\n\nSelecciona un modelo `pollinations/free/*` de la lista y empieza a chatear.\n{freeText}\n\n**🆓 Herramientas gratis bonus (sin clave):** `gen_edit_image_free
|
|
475
|
+
"onboarding": "## 🌸 Bienvenido al plugin Pollinations\n\n**Acceso gratis inmediato — sin clave**\nEste plugin ofrece un entorno completo para chat, generación de código y manipulación de medios (generación de imágenes, vídeos, audio, herramientas de extracción...).\n\nSelecciona un modelo `pollinations/free/*` de la lista y empieza a chatear.\n{freeText}\n\n**🆓 Herramientas gratis bonus (sin clave):** `gen_edit_image_free`, `gen_video_free`, `object_remover`, `image_upscaler`, `image_enhancer`, `remove_background` — imagen/vídeo gratis + procesamiento local.\n\n---\n\n## 🚀 Agentes y herramientas multimedia para desarrolladores\n\nClaude Opus, GPT-5, Gemini 3, generación de vídeo Veo y Wan, música ElevenLabs... ¡desbloquea todo el poder de la API de Pollinations!\n\nEste plugin usa un modelo **BYOK** (Bring Your Own Key): con tu propia clave API, el agente OpenCode puede interactuar directamente con las herramientas Premium y crear tus archivos en tu Workspace.\n\n**Paso 1 — Crea una cuenta gratis**\n👉 **https://enter.pollinations.ai**\n\n**Paso 2 — Genera tu clave API**\nEn la sección **API Keys** en `enter.pollinations.ai`, crea una clave **Secret** (`sk_...`).\n\n**Paso 3 — Conecta la clave**\n```bash\n/poll connect sk_tu_clave_aqui\n```\n*(¡La clave se registra de inmediato en tu entorno OpenCode, desbloqueando modelos Pro!)*\n\n---\n\n## 💰 Pollen, Niveles y Misiones\nTu **nivel** te da una recarga horaria de Pollen gratis (p. ej. 🌸 Flower ≈ 0.4/h). Además, las **Misiones** te recompensan con Pollen gratis — ¡y usar este plugin completa varias retroactivamente! Consulta `/poll quests`.\n\nCuando se agota el Pollen gratis, gastas de tu monedero ($1 ≈ 1 Pollen, sin suscripción, sin caducidad).\n\n**¿Necesitas ayuda?** Escribe `/poll help`. Discord oficial: https://discord.gg/pollinations-ai-885844321461485618"
|
|
473
476
|
},
|
|
474
477
|
"cost_guard": {
|
|
475
478
|
"cost_validated_max": "💰 Costo validado (Máx teórico: {maxCost})",
|
|
@@ -485,7 +488,10 @@
|
|
|
485
488
|
"condition": {
|
|
486
489
|
"signup": "¡Solo regístrate!",
|
|
487
490
|
"auto_verify": "Verificación automática",
|
|
491
|
+
"under_review": "Cuenta en revisión",
|
|
492
|
+
"default": "Cuenta nueva (predeterminado)",
|
|
488
493
|
"community": "Miembro activo de la comunidad",
|
|
494
|
+
"quests": "Completa Misiones y contribuye",
|
|
489
495
|
"publish_app": "Publica una app",
|
|
490
496
|
"top_contributor": "Principal contribuidor",
|
|
491
497
|
"special": "Especial / solo por invitación"
|
package/dist/locales/fr.json
CHANGED
|
@@ -104,18 +104,22 @@
|
|
|
104
104
|
"image": "Images",
|
|
105
105
|
"video": "Vidéos",
|
|
106
106
|
"audio": "Audio",
|
|
107
|
-
"text": "Texte & Chat"
|
|
107
|
+
"text": "Texte & Chat",
|
|
108
|
+
"3d": "3D",
|
|
109
|
+
"embedding": "Embeddings",
|
|
110
|
+
"realtime": "Temps réel"
|
|
108
111
|
},
|
|
109
112
|
"cat_title": "### {emoji} {label} ({count})",
|
|
110
113
|
"enter_headers1": "| Nom | ID | Description | Flags | In | Coût Out |",
|
|
111
114
|
"enter_headers2": "|-----|----|-------------|-------|----|----------|",
|
|
112
115
|
"capabilities": "\n**Capacités :** `💎` Payant uniq. `💬` Chat/Reasoning `👁️` Vision/Images `🎙️` Audio `🔍` WebSearch `💻` Code",
|
|
113
|
-
"other": "**Entrée :** `📝` Texte `🖼️` Image `🎤` Audio"
|
|
116
|
+
"other": "**Entrée :** `📝` Texte `🖼️` Image `🎤` Audio",
|
|
117
|
+
"enter_error": "⚠️ Erreur lors de la récupération des modèles Enter."
|
|
114
118
|
},
|
|
115
119
|
"infos": {
|
|
116
120
|
"title": "## 🍯💚 POLLINATIONS OPENCODE PLUGIN 💚🍯\n\nBienvenue **{name}** sur le plugin Pollinations pour OpenCode !\n\nCe plugin vous permet de générer du code, des images, d'analyser des vidéos et d'interagir avec les meilleurs modèles d'Intelligence Artificielle de manière totalement transparente et intégrée à votre environnement de travail. Accédez aux capacités des LLMs de pointe, que ce soit via des requêtes de chat, la refonte de votre base de code, ou directement dans le terminal.",
|
|
117
121
|
"features_title": "**Ce Que ce plugin vous apporte en plus ! :**",
|
|
118
|
-
"features_free": "**🛠️ Outils Gratuits Intégrés (Toujours disponibles) :**\n- `gen_qrcode` / `gen_diagram` / `gen_palette` : Outils visuels et dev.\n- `remove_background` : Détourage
|
|
122
|
+
"features_free": "**🛠️ Outils Gratuits Intégrés (Toujours disponibles) :**\n- `gen_qrcode` / `gen_diagram` / `gen_palette` : Outils visuels et dev.\n- `remove_background` : Détourage IA (rmbg / bgeraser — gratuit).\n- `extract_frames` / `extract_audio` : Extraction rapide de contenu média.\n- `file_to_url` : Hébergement instantané de vos fichiers locaux en ligne.\n- `gen_edit_image_free` : Génération & édition d'images gratuite (~20/jour).\n- `gen_video_free` : Génération vidéo gratuite (~5/jour).\n- `object_remover` : Suppression d'objets par prompt (gratuit, direct).\n- `image_upscaler` : Agrandissement 2x/4x (gratuit, direct).\n- `image_enhancer` : Amélioration IA d'image (gratuit, direct).",
|
|
119
123
|
"features_pro": "**💎 Outils Pollinations (Premium - Automatisés avec votre Clé) :**\n- `polli_gen_image` : Génération d'images (Flux, Seedream, Gemini) + support Image-to-Image.\n- `polli_gen_video` : Génération vidéo text-to-video / image-to-video (Veo, Wan, LTX...).\n- `polli_gen_audio`/`polli_stt` : Transcription Whisper, Text-to-Speech ElevenLabs.\n- `polli_gen_music` : Moteur de musique générative.\n- `polli_web_search` : Recherche connectée pour étendre la base de contexte de l'agent.",
|
|
120
124
|
"features_config": "- **Une configuration granulaire**, des modes de gestions de vos tokens et de vos outils, de la sécurisation des coûts des outils consommant du pollen...",
|
|
121
125
|
"tiers_title": "> **Votre refill Quest Pollen :** {emoji} {tier}",
|
|
@@ -468,7 +472,7 @@
|
|
|
468
472
|
"resources": "### 📚 Ressources\n* **Dashboard:** enter.pollinations.ai\n* **Discord:** Rejoindre la communauté\n* **Plugin:** github.com/fkom13/opencode-pollinations-plugin",
|
|
469
473
|
"free_models_success": "Modèles gratuits disponibles : {models}",
|
|
470
474
|
"free_models_error": "⚠️ Impossible de récupérer la liste des modèles gratuits.",
|
|
471
|
-
"onboarding": "## 🌸 Bienvenue sur le plugin Pollinations\n\n**Accès gratuit immédiat — aucune clé requise**\nCe plugin offre un environnement complet pour le chat, la génération de code et la manipulation média (génération d'images, vidéos, audio, outils d'extraction...).\n\nSélectionnez un modèle `pollinations/free/*` dans la liste et commencez à discuter.\n{freeText}\n\n**🆓 Outils gratuits bonus (sans clé) :** `gen_edit_image_free
|
|
475
|
+
"onboarding": "## 🌸 Bienvenue sur le plugin Pollinations\n\n**Accès gratuit immédiat — aucune clé requise**\nCe plugin offre un environnement complet pour le chat, la génération de code et la manipulation média (génération d'images, vidéos, audio, outils d'extraction...).\n\nSélectionnez un modèle `pollinations/free/*` dans la liste et commencez à discuter.\n{freeText}\n\n**🆓 Outils gratuits bonus (sans clé) :** `gen_edit_image_free`, `gen_video_free`, `object_remover`, `image_upscaler`, `image_enhancer`, `remove_background` — image/vidéo gratuits + traitement local.\n\n---\n\n## 🚀 Agents et outils multimédias pour développeurs\n\nClaude Opus, GPT-5, Gemini 3, génération vidéo Veo & Wan, musique ElevenLabs... libérez toute la puissance de l'API Pollinations !\n\nCe plugin adopte un modèle **BYOK** (Bring Your Own Key) : avec votre propre clé API, l'agent OpenCode peut interagir directement avec les outils Premium et créer vos fichiers média dans votre Workspace.\n\n**Étape 1 — Créez un compte gratuit**\n👉 **https://enter.pollinations.ai**\n\n**Étape 2 — Générez votre clé API**\nDans la section **API Keys** sur `enter.pollinations.ai`, créez une clé **Secret** (`sk_...`).\n\n**Étape 3 — Connectez la clé**\n```bash\n/poll connect sk_votre_cle_ici\n```\n*(La clé est immédiatement enregistrée dans votre environnement OpenCode, débloquant les modèles Pro !)*\n\n---\n\n## 💰 Pollen, Paliers & Quêtes\nVotre **palier** vous donne une recharge horaire de Pollen gratuit (ex. 🌸 Flower ≈ 0,4/h). En plus, les **Quêtes** vous récompensent en Pollen gratuit — et utiliser simplement ce plugin en complète plusieurs rétroactivement ! Consultez `/poll quests`.\n\nUne fois le Pollen gratuit épuisé, vous puisez dans votre wallet (1 $ ≈ 1 Pollen, sans abonnement, sans expiration).\n\n**Besoin d'aide ?** Tapez `/poll help`. Discord officiel : https://discord.gg/pollinations-ai-885844321461485618"
|
|
472
476
|
},
|
|
473
477
|
"cost_guard": {
|
|
474
478
|
"cost_validated_max": "💰 Coût validé (Max théorique: {maxCost})",
|
|
@@ -484,7 +488,10 @@
|
|
|
484
488
|
"condition": {
|
|
485
489
|
"signup": "Inscrivez-vous, c'est tout !",
|
|
486
490
|
"auto_verify": "Vérification automatique",
|
|
491
|
+
"under_review": "Compte en cours d'examen",
|
|
492
|
+
"default": "Nouveau compte (par défaut)",
|
|
487
493
|
"community": "Membre actif de la communauté",
|
|
494
|
+
"quests": "Compléter des Quêtes et contribuer",
|
|
488
495
|
"publish_app": "Publier une app",
|
|
489
496
|
"top_contributor": "Contributeur de premier plan",
|
|
490
497
|
"special": "Spécial / sur invitation"
|
package/dist/locales/it.json
CHANGED
|
@@ -104,19 +104,22 @@
|
|
|
104
104
|
"image": "Immagini",
|
|
105
105
|
"video": "Video",
|
|
106
106
|
"audio": "Audio",
|
|
107
|
-
"text": "Testo e Chat"
|
|
107
|
+
"text": "Testo e Chat",
|
|
108
|
+
"3d": "3D",
|
|
109
|
+
"embedding": "Embeddings",
|
|
110
|
+
"realtime": "Realtime"
|
|
108
111
|
},
|
|
109
112
|
"cat_title": "### {emoji} {label} ({count})",
|
|
110
113
|
"enter_headers1": "| Nome | ID | Descrizione | Flags | In | Costo Out |",
|
|
111
114
|
"enter_headers2": "|------|----|-------------|-------|----|-----------|",
|
|
112
115
|
"capabilities": "\n**Capabilities :** `💎` Paid-only `💬` Chat/Reasoning `👁️` Vision/Images `🎙️` Audio `🔍` Search `💻` Code",
|
|
113
116
|
"other": "**Input :** `📝` Text `🖼️` Image `🎤` Audio",
|
|
114
|
-
"enter_error": "⚠️ Errore
|
|
117
|
+
"enter_error": "⚠️ Errore nel recupero dei modelli Enter."
|
|
115
118
|
},
|
|
116
119
|
"infos": {
|
|
117
120
|
"title": "## 🍯💚 PLUGIN POLLINATIONS OPENCODE 💚🍯\n\nBenvenuto **{name}** nel plugin OpenCode di Pollinations!\n\nQuesto plugin ti consente di generare codice, immagini, analizzare video e interagire senza problemi con i migliori modelli di IA. Accedi agli LLM più avanzati tramite chat, refactoring o terminale.",
|
|
118
121
|
"features_title": "**Cosa ti offre questo plugin! :**",
|
|
119
|
-
"features_free": "**🛠️ Strumenti Gratuiti (Sempre Disponibili):**\n- `gen_qrcode` / `gen_diagram` / `gen_palette` : Visual e dev.\n- `remove_background` : Rimozione sfondo
|
|
122
|
+
"features_free": "**🛠️ Strumenti Gratuiti (Sempre Disponibili):**\n- `gen_qrcode` / `gen_diagram` / `gen_palette` : Visual e dev.\n- `remove_background` : Rimozione sfondo IA (rmbg / bgeraser — gratuito).\n- `extract_frames` / `extract_audio` : Estrazione media rapida.\n- `file_to_url` : Hosting online istantaneo.\n- `gen_edit_image_free` : Gen e modifica immagini gratis (~20/giorno).\n- `gen_video_free` : Gen video gratis (~5/giorno).\n- `object_remover` : Rimozione oggetti tramite prompt (gratuito, diretto).\n- `image_upscaler` : Upscale 2x/4x (gratuito, diretto).\n- `image_enhancer` : Miglioramento immagini IA (gratuito, diretto).",
|
|
120
123
|
"features_pro": "**💎 Strumenti Pollinations (Premium - Automatizzato con Chiave):**\n- `polli_gen_image` : Gen immagine (Flux, Gemini) + Image-to-Image.\n- `polli_gen_video` : Text-to-Video / Image-to-Video (Veo, Wan...).\n- `polli_gen_audio`/`polli_stt` : Whisper STT, ElevenLabs TTS.\n- `polli_gen_music` : Motore di musica generativa.\n- `polli_web_search` : Ricerca web connessa.",
|
|
121
124
|
"features_config": "- **Configurazione granulare**, gestione di modalità/token, protezioni costi...",
|
|
122
125
|
"tiers_title": "> **Il tuo refill Quest Pollen:** {emoji} {tier}",
|
|
@@ -469,7 +472,7 @@
|
|
|
469
472
|
"resources": "### 📚 Risorse\n* **Dashboard:** enter.pollinations.ai\n* **Discord:** Unisciti alla community\n* **Plugin:** github.com/fkom13/opencode-pollinations-plugin",
|
|
470
473
|
"free_models_success": "Modelli disponibili: {models}",
|
|
471
474
|
"free_models_error": "⚠️ Impossibile recuperare i modelli gratuiti.",
|
|
472
|
-
"onboarding": "## 🌸 Benvenuto nel plugin Pollinations\n\n**Accesso gratuito immediato — nessuna chiave richiesta**\nQuesto plugin offre un ambiente completo per chat, generazione di codice e manipolazione multimediale (generazione di immagini, video, audio, strumenti di estrazione...).\n\nSeleziona un modello `pollinations/free/*` dall'elenco e inizia a chattare.\n{freeText}\n\n**🆓 Strumenti gratuiti bonus (senza chiave):** `gen_edit_image_free`
|
|
475
|
+
"onboarding": "## 🌸 Benvenuto nel plugin Pollinations\n\n**Accesso gratuito immediato — nessuna chiave richiesta**\nQuesto plugin offre un ambiente completo per chat, generazione di codice e manipolazione multimediale (generazione di immagini, video, audio, strumenti di estrazione...).\n\nSeleziona un modello `pollinations/free/*` dall'elenco e inizia a chattare.\n{freeText}\n\n**🆓 Strumenti gratuiti bonus (senza chiave):** `gen_edit_image_free`, `gen_video_free`, `object_remover`, `image_upscaler`, `image_enhancer`, `remove_background` — immagine/video gratis + elaborazione locale.\n\n---\n\n## 🚀 Agenti e strumenti multimediali per sviluppatori\n\nClaude Opus, GPT-5, Gemini 3, generazione video Veo e Wan, musica ElevenLabs... sblocca tutta la potenza dell'API Pollinations!\n\nQuesto plugin usa un modello **BYOK** (Bring Your Own Key): con la tua chiave API, l'agente OpenCode può interagire direttamente con gli strumenti Premium e creare i tuoi file multimediali nel tuo Workspace.\n\n**Passo 1 — Crea un account gratuito**\n👉 **https://enter.pollinations.ai**\n\n**Passo 2 — Genera la tua chiave API**\nNella sezione **API Keys** su `enter.pollinations.ai`, crea una chiave **Secret** (`sk_...`).\n\n**Passo 3 — Connetti la chiave**\n```bash\n/poll connect sk_la_tua_chiave\n```\n*(La chiave viene registrata subito nel tuo ambiente OpenCode, sbloccando i modelli Pro!)*\n\n---\n\n## 💰 Pollen, Livelli e Quest\nIl tuo **livello** ti dà una ricarica oraria di Pollen gratuito (es. 🌸 Flower ≈ 0,4/h). Inoltre, le **Quest** ti premiano con Pollen gratuito — e usare semplicemente questo plugin ne completa diverse retroattivamente! Controlla `/poll quests`.\n\nUna volta esaurito il Pollen gratuito, spendi dal tuo wallet ($1 ≈ 1 Pollen, senza abbonamento, senza scadenza).\n\n**Serve aiuto?** Digita `/poll help`. Discord ufficiale: https://discord.gg/pollinations-ai-885844321461485618"
|
|
473
476
|
},
|
|
474
477
|
"cost_guard": {
|
|
475
478
|
"cost_validated_max": "💰 Costo convalidato (Max teorico: {maxCost})",
|
|
@@ -485,7 +488,10 @@
|
|
|
485
488
|
"condition": {
|
|
486
489
|
"signup": "Basta registrarsi!",
|
|
487
490
|
"auto_verify": "Verifica automatica",
|
|
491
|
+
"under_review": "Account in revisione",
|
|
492
|
+
"default": "Nuovo account (predefinito)",
|
|
488
493
|
"community": "Membro attivo della community",
|
|
494
|
+
"quests": "Completa le Missioni e contribuisci",
|
|
489
495
|
"publish_app": "Pubblica un'app",
|
|
490
496
|
"top_contributor": "Contributore di punta",
|
|
491
497
|
"special": "Speciale / solo su invito"
|
package/dist/locales/zh.json
CHANGED
|
@@ -104,18 +104,22 @@
|
|
|
104
104
|
"image": "图像",
|
|
105
105
|
"video": "视频",
|
|
106
106
|
"audio": "音频",
|
|
107
|
-
"text": "文本与聊天"
|
|
107
|
+
"text": "文本与聊天",
|
|
108
|
+
"3d": "3D",
|
|
109
|
+
"embedding": "嵌入",
|
|
110
|
+
"realtime": "实时"
|
|
108
111
|
},
|
|
109
112
|
"cat_title": "### {emoji} {label} ({count})",
|
|
110
113
|
"enter_headers1": "| 名称 | ID | 描述 | 标志 | 输入 | 输出费用 |",
|
|
111
114
|
"enter_headers2": "|------|----|-------------|-------|----|----------|",
|
|
112
115
|
"capabilities": "\n**能力:** `💎` 仅付费 `💬` 聊天/推理 `👁️` 视觉/图像 `🎙️` 音频 `🔍` 搜索 `💻` 代码",
|
|
113
|
-
"other": "**输入:** `📝` 文本 `🖼️` 图像 `🎤` 音频"
|
|
116
|
+
"other": "**输入:** `📝` 文本 `🖼️` 图像 `🎤` 音频",
|
|
117
|
+
"enter_error": "⚠️ 获取 Enter 模型时出错。"
|
|
114
118
|
},
|
|
115
119
|
"infos": {
|
|
116
120
|
"title": "## 🍯💚 POLLINATIONS OPENCODE 插件 💚🍯\n\n欢迎 **{name}** 使用 Pollinations OpenCode 插件!\n\n本插件让你能够在开发环境中无缝生成代码、图像、分析视频,并与顶级 AI 模型交互。通过聊天、重构或终端访问最先进的 LLM。",
|
|
117
121
|
"features_title": "**本插件为你带来的功能:**",
|
|
118
|
-
"features_free": "**🛠️ 免费工具 (始终可用):**\n- `gen_qrcode` / `gen_diagram` / `gen_palette` : 视觉和开发工具.\n- `remove_background` :
|
|
122
|
+
"features_free": "**🛠️ 免费工具 (始终可用):**\n- `gen_qrcode` / `gen_diagram` / `gen_palette` : 视觉和开发工具.\n- `remove_background` : AI 背景移除(rmbg / bgeraser — 免费)。\n- `extract_frames` / `extract_audio` : 快速媒体提取.\n- `file_to_url` : 即时在线托管.\n- `gen_edit_image_free` : 免费图像生成和编辑 (~20/天).\n- `gen_video_free` : 免费视频生成 (~5/天).\n- `object_remover` : 按提示词移除对象(免费,直连)。\n- `image_upscaler` : 放大 2x/4x(免费,直连)。\n- `image_enhancer` : AI 图像增强(免费,直连)。",
|
|
119
123
|
"features_pro": "**💎 Pollinations 工具 (高级 - 使用密钥自动化):**\n- `polli_gen_image`:图像生成 (Flux, Seedream, Gemini) + 图生图。\n- `polli_gen_video`:文生视频 / 图生视频 (Veo, Wan, LTX...)。\n- `polli_gen_audio`/`polli_stt`:Whisper 语音转文字, ElevenLabs 文字转语音。\n- `polli_gen_music`:生成式音乐引擎。\n- `polli_web_search`:联网搜索。",
|
|
120
124
|
"features_config": "- **精细化配置**、模式与令牌管理、工具费用保护...",
|
|
121
125
|
"tiers_title": "> **你的 Quest Pollen 补充:** {emoji} {tier}",
|
|
@@ -468,7 +472,7 @@
|
|
|
468
472
|
"resources": "### 📚 资源\n* **Dashboard:** enter.pollinations.ai\n* **Discord:** 加入社区\n* **Plugin:** github.com/fkom13/opencode-pollinations-plugin",
|
|
469
473
|
"free_models_success": "可用免费模型:{models}",
|
|
470
474
|
"free_models_error": "⚠️ 无法获取免费模型。",
|
|
471
|
-
"onboarding": "## 🌸 欢迎使用 Pollinations 插件\n\n**即时免费访问 — 无需密钥**\n本插件提供完整的聊天、代码生成和媒体处理环境 (图像、视频、音频生成、提取工具...)。\n\n从列表中选择一个 `pollinations/free/*` 模型并开始聊天。\n{freeText}\n\n---\n\n## 🚀 为开发者集成的多媒体代理和工具\n\nClaude Opus, GPT-5, Gemini 3, Veo 和 Wan 视频生成, ElevenLabs 音乐... 释放 Pollinations API 的全部威力!\n\n本插件采用 **BYOK** (自带密钥) 模式:通过使用你自己的 API 密钥,OpenCode 代理获得直接与高级工具交互的能力,在你的工作区创建多媒体文件。\n\n**第 1 步 — 创建账户,获赠 $10!**\n通过此链接支持本插件:\n👉 **https://enter.pollinations.ai/authorize?redirect_url=https://github.com/fkom13/opencode-pollinations-plugin**\n\n**第 2 步 — 生成你的 API 密钥**\n在 `enter.pollinations.ai` 的 **API Keys** 部分,创建一个 **Secret** 密钥 (`sk_...`)。\n\n**第 3 步 — 连接密钥**\n```bash\n/poll connect sk_your_key_here\n```\n*(密钥会立即注册到你的 OpenCode 环境,解锁 Pro 模型!)*\n\n---\n\n## 💰 Pollen 系统与任务\n现在 Pollen 主要通过完成**任务**来赚取 — 仅仅使用本插件就能追溯性地完成多个任务。在[仪表盘](https://enter.pollinations.ai)查看并领取你的免费 Pollen。\n\n你的等级提供每小时免费的 Pollen 充值额度,用于这些高级服务。免费额度耗尽后,你将从钱包消费 Pollen ($1 ≈ 1 Pollen,无订阅,无过期)。\n\n**需要帮助?**\n- 输入 `/poll help` 查看命令列表。\n- 官方 Discord:https://discord.gg/pollinations-ai-885844321461485618"
|
|
475
|
+
"onboarding": "## 🌸 欢迎使用 Pollinations 插件\n\n**即时免费访问 — 无需密钥**\n本插件提供完整的聊天、代码生成和媒体处理环境 (图像、视频、音频生成、提取工具...)。\n\n从列表中选择一个 `pollinations/free/*` 模型并开始聊天。\n{freeText}\n\n**🆓 额外免费工具(无需密钥):** `gen_edit_image_free`、`gen_video_free`、`object_remover`、`image_upscaler`、`image_enhancer`、`remove_background` — 免费图像/视频 + 本地处理工具。\n\n---\n\n## 🚀 为开发者集成的多媒体代理和工具\n\nClaude Opus, GPT-5, Gemini 3, Veo 和 Wan 视频生成, ElevenLabs 音乐... 释放 Pollinations API 的全部威力!\n\n本插件采用 **BYOK** (自带密钥) 模式:通过使用你自己的 API 密钥,OpenCode 代理获得直接与高级工具交互的能力,在你的工作区创建多媒体文件。\n\n**第 1 步 — 创建账户,获赠 $10!**\n通过此链接支持本插件:\n👉 **https://enter.pollinations.ai/authorize?redirect_url=https://github.com/fkom13/opencode-pollinations-plugin**\n\n**第 2 步 — 生成你的 API 密钥**\n在 `enter.pollinations.ai` 的 **API Keys** 部分,创建一个 **Secret** 密钥 (`sk_...`)。\n\n**第 3 步 — 连接密钥**\n```bash\n/poll connect sk_your_key_here\n```\n*(密钥会立即注册到你的 OpenCode 环境,解锁 Pro 模型!)*\n\n---\n\n## 💰 Pollen 系统与任务\n现在 Pollen 主要通过完成**任务**来赚取 — 仅仅使用本插件就能追溯性地完成多个任务。在[仪表盘](https://enter.pollinations.ai)查看并领取你的免费 Pollen。\n\n你的等级提供每小时免费的 Pollen 充值额度,用于这些高级服务。免费额度耗尽后,你将从钱包消费 Pollen ($1 ≈ 1 Pollen,无订阅,无过期)。\n\n**需要帮助?**\n- 输入 `/poll help` 查看命令列表。\n- 官方 Discord:https://discord.gg/pollinations-ai-885844321461485618"
|
|
472
476
|
},
|
|
473
477
|
"cost_guard": {
|
|
474
478
|
"cost_validated_max": "💰 费用已验证 (理论最大值:{maxCost})",
|
|
@@ -484,7 +488,10 @@
|
|
|
484
488
|
"condition": {
|
|
485
489
|
"signup": "只需注册",
|
|
486
490
|
"auto_verify": "自动验证",
|
|
491
|
+
"under_review": "账户审核中",
|
|
492
|
+
"default": "新账户(默认)",
|
|
487
493
|
"community": "活跃的社区成员",
|
|
494
|
+
"quests": "完成任务并贡献",
|
|
488
495
|
"publish_app": "发布一个应用",
|
|
489
496
|
"top_contributor": "顶级贡献者",
|
|
490
497
|
"special": "特殊 / 仅限邀请"
|
package/dist/server/commands.js
CHANGED
|
@@ -7,27 +7,6 @@ import { ModelRegistry } from './models/index.js';
|
|
|
7
7
|
import { t } from '../locales/index.js';
|
|
8
8
|
import { formatTierTable } from './tier-info.js';
|
|
9
9
|
import { buildQuestsReport } from '../tools/pollinations/polli_quests.js';
|
|
10
|
-
// GET helper for /account/* JSON endpoints (used for quest-reward reconstruction).
|
|
11
|
-
function fetchAccountJson(path, apiKey) {
|
|
12
|
-
return new Promise((resolve, reject) => {
|
|
13
|
-
const req = https.request({
|
|
14
|
-
hostname: 'gen.pollinations.ai', path, method: 'GET',
|
|
15
|
-
headers: { 'Authorization': `Bearer ${apiKey}`, 'User-Agent': 'opencode-pollinations-plugin' },
|
|
16
|
-
}, (res) => {
|
|
17
|
-
let data = '';
|
|
18
|
-
res.on('data', c => data += c);
|
|
19
|
-
res.on('end', () => { try {
|
|
20
|
-
resolve(JSON.parse(data));
|
|
21
|
-
}
|
|
22
|
-
catch (e) {
|
|
23
|
-
reject(e);
|
|
24
|
-
} });
|
|
25
|
-
});
|
|
26
|
-
req.on('error', reject);
|
|
27
|
-
req.setTimeout(10000, () => { req.destroy(); reject(new Error('Timeout')); });
|
|
28
|
-
req.end();
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
10
|
function checkEndpoint(ep, key) {
|
|
32
11
|
return new Promise((resolve) => {
|
|
33
12
|
const req = https.request({
|
|
@@ -262,43 +241,9 @@ export async function handleUsageCommand(args) {
|
|
|
262
241
|
response += t('commands.usage.tier', { emoji: quota.tierEmoji, tier: quota.tier.toUpperCase(), limit: quota.tierLimit });
|
|
263
242
|
response += t('commands.usage.quota', { remaining: formatPollen(quota.tierLimit - quota.tierRemaining), limit: formatPollen(quota.tierLimit) });
|
|
264
243
|
response += t('commands.usage.usage_bar', { bar: progressBar(quota.tierLimit - quota.tierRemaining, quota.tierLimit) });
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
// • current-hour floor remaining (≤ tierLimit) ← quota (the only fuzzy term, ignored)
|
|
269
|
-
// Quest remaining ≈ claimedQuestTier − tierConsumedSinceClaim (+ floor); Paid = Total − Quest.
|
|
270
|
-
const total = quota.tierRemaining + quota.walletBalance; // true balance
|
|
271
|
-
let claimedQuestTier = 0;
|
|
272
|
-
let firstClaimMs = Infinity;
|
|
273
|
-
let tierConsumedSinceClaim = 0;
|
|
274
|
-
if (config.apiKey && config.keyHasAccessToProfile !== false) {
|
|
275
|
-
try {
|
|
276
|
-
const qres = await fetchAccountJson('/account/quests', config.apiKey);
|
|
277
|
-
for (const q of (qres?.quests || [])) {
|
|
278
|
-
const r = q.reward;
|
|
279
|
-
if (r && r.claimedAt && r.balanceBucket === 'tier') {
|
|
280
|
-
claimedQuestTier += (r.pollenAmount || 0);
|
|
281
|
-
const cms = new Date(r.claimedAt).getTime();
|
|
282
|
-
if (!isNaN(cms) && cms < firstClaimMs)
|
|
283
|
-
firstClaimMs = cms;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
// Sum tier-metered spend since the first claim (what actually ate the Quest stash).
|
|
287
|
-
if (claimedQuestTier > 0 && isFinite(firstClaimMs)) {
|
|
288
|
-
const ures = await fetchAccountJson('/account/usage?limit=100', config.apiKey);
|
|
289
|
-
for (const e of (ures?.usage || [])) {
|
|
290
|
-
const ts = new Date(String(e.timestamp).replace(' ', 'T') + (String(e.timestamp).includes('Z') ? '' : 'Z')).getTime();
|
|
291
|
-
if (e.meter_source === 'tier' && !isNaN(ts) && ts >= firstClaimMs) {
|
|
292
|
-
tierConsumedSinceClaim += (e.cost_usd || 0);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
catch { /* fall back gracefully if unreachable */ }
|
|
298
|
-
}
|
|
299
|
-
// Quest stash = claimed − consumed, plus the current hourly floor still available.
|
|
300
|
-
const questPollen = Math.max(0, claimedQuestTier - tierConsumedSinceClaim) + quota.tierRemaining;
|
|
301
|
-
const paidPollen = Math.max(0, total - questPollen);
|
|
244
|
+
const total = quota.tierRemaining + quota.questStash + quota.walletBalance;
|
|
245
|
+
const questPollen = quota.tierRemaining + quota.questStash;
|
|
246
|
+
const paidPollen = quota.walletBalance;
|
|
302
247
|
response += t('commands.usage.split', {
|
|
303
248
|
quest: questPollen.toFixed(2),
|
|
304
249
|
paid: paidPollen.toFixed(2),
|
|
@@ -810,12 +755,16 @@ ${t('commands.help.models_pricing')}
|
|
|
810
755
|
}
|
|
811
756
|
// === MODELS & PRICING COMMANDS ===
|
|
812
757
|
function parseNameDesc(m) {
|
|
758
|
+
const displayName = m.title || m.description || m.name;
|
|
813
759
|
const fullDesc = m.description || m.name;
|
|
814
|
-
|
|
760
|
+
if (m.title && m.description) {
|
|
761
|
+
return { nom: m.title, desc: m.description };
|
|
762
|
+
}
|
|
763
|
+
const parts = displayName.split(" - ");
|
|
815
764
|
if (parts.length > 1) {
|
|
816
765
|
return { nom: parts[0].trim(), desc: parts.slice(1).join(" - ").trim() };
|
|
817
766
|
}
|
|
818
|
-
return { nom:
|
|
767
|
+
return { nom: displayName, desc: "" };
|
|
819
768
|
}
|
|
820
769
|
export async function handleModelsCommand(args) {
|
|
821
770
|
const filter = args[0]; // optional: image, video, audio, text
|
|
@@ -854,6 +803,9 @@ export async function handleModelsCommand(args) {
|
|
|
854
803
|
{ cat: 'video', emoji: '🎬', label: t('commands.models.cats.video') },
|
|
855
804
|
{ cat: 'audio', emoji: '🔊', label: t('commands.models.cats.audio') },
|
|
856
805
|
{ cat: 'text', emoji: '📝', label: t('commands.models.cats.text') },
|
|
806
|
+
{ cat: '3d', emoji: '🧊', label: t('commands.models.cats.3d') },
|
|
807
|
+
{ cat: 'embedding', emoji: '🔢', label: t('commands.models.cats.embedding') },
|
|
808
|
+
{ cat: 'realtime', emoji: '⚡', label: t('commands.models.cats.realtime') },
|
|
857
809
|
];
|
|
858
810
|
for (const { cat, emoji, label } of categories) {
|
|
859
811
|
if (filter && filter !== cat)
|
|
@@ -953,17 +905,7 @@ function buildOutputCost(m) {
|
|
|
953
905
|
export async function handleInfosCommand() {
|
|
954
906
|
const config = loadConfig();
|
|
955
907
|
let name = "Developer";
|
|
956
|
-
let tier = "anonymous";
|
|
957
|
-
let tierEmoji = '👤';
|
|
958
908
|
if (config.apiKey) {
|
|
959
|
-
try {
|
|
960
|
-
const quota = await getQuotaStatus(true);
|
|
961
|
-
tier = quota.tier || 'anonymous';
|
|
962
|
-
tierEmoji = quota.tierEmoji || '👤';
|
|
963
|
-
}
|
|
964
|
-
catch (e) {
|
|
965
|
-
// Ignorer l'erreur réseau et garder les valeurs par défaut
|
|
966
|
-
}
|
|
967
909
|
try {
|
|
968
910
|
const res = await fetch('https://gen.pollinations.ai/account/profile', {
|
|
969
911
|
headers: { 'Authorization': `Bearer ${config.apiKey}` }
|
|
@@ -989,7 +931,6 @@ ${t('commands.infos.features_pro')}
|
|
|
989
931
|
|
|
990
932
|
${t('commands.infos.features_config')}
|
|
991
933
|
|
|
992
|
-
${t('commands.infos.tiers_title', { emoji: tierEmoji, tier: tier.toUpperCase() })}
|
|
993
934
|
${t('commands.infos.get_started')}
|
|
994
935
|
|
|
995
936
|
${t('commands.infos.about')}
|
package/dist/server/config.js
CHANGED
|
@@ -73,7 +73,7 @@ const DEFAULT_CONFIG_V5 = {
|
|
|
73
73
|
gui: { status: 'alert', logs: 'none' },
|
|
74
74
|
thresholds: { tier: 10, wallet: 5 },
|
|
75
75
|
fallbacks: {
|
|
76
|
-
free: { main: 'free/
|
|
76
|
+
free: { main: 'free/openai-fast', agent: 'free/openai-fast' },
|
|
77
77
|
enter: { agent: 'free/openai-fast' }
|
|
78
78
|
},
|
|
79
79
|
enablePaidTools: false,
|
|
@@ -71,7 +71,7 @@ export async function generatePollinationsConfig(forceApiKey, forceStrict = fals
|
|
|
71
71
|
catch (e) {
|
|
72
72
|
log(`Error fetching Free models: ${e}`);
|
|
73
73
|
// Fallback Robust (Offline support)
|
|
74
|
-
modelsOutput.push({ id: "free/
|
|
74
|
+
modelsOutput.push({ id: "free/openai-fast", name: "GPT-5 Nano (Fallback)", object: "model", variants: {} });
|
|
75
75
|
modelsOutput.push({ id: "free/openai", name: "OpenAI (Fallback)", object: "model", variants: {} });
|
|
76
76
|
modelsOutput.push({ id: "free/gemini", name: "Gemini Flash (Fallback)", object: "model", variants: {} });
|
|
77
77
|
}
|
|
@@ -152,7 +152,7 @@ function getCapabilityIcons(raw) {
|
|
|
152
152
|
function mapModel(raw, prefix, namePrefix) {
|
|
153
153
|
const rawId = raw.id || raw.name;
|
|
154
154
|
const fullId = prefix + rawId; // ex: "free/gemini" or "enter/nomnom" (prefix passed is "enter/")
|
|
155
|
-
let baseName = raw.description;
|
|
155
|
+
let baseName = raw.title || raw.description;
|
|
156
156
|
if (!baseName || baseName === rawId) {
|
|
157
157
|
baseName = formatName(rawId, raw.censored !== false);
|
|
158
158
|
}
|
|
@@ -153,6 +153,9 @@ class ModelRegistryImpl {
|
|
|
153
153
|
video: this.list('video').length,
|
|
154
154
|
audio: this.list('audio').length,
|
|
155
155
|
text: this.list('text').length,
|
|
156
|
+
'3d': this.list('3d').length,
|
|
157
|
+
embedding: this.list('embedding').length,
|
|
158
|
+
realtime: this.list('realtime').length,
|
|
156
159
|
};
|
|
157
160
|
}
|
|
158
161
|
}
|
|
@@ -9,8 +9,9 @@ import type { PollinationsModel } from './types.js';
|
|
|
9
9
|
/**
|
|
10
10
|
* Fetch all models from the Pollinations API.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* -
|
|
12
|
+
* Primary: unified /models (all categories including 3d / embedding / realtime).
|
|
13
|
+
* Fallback per-modality endpoints if unified is empty/unavailable.
|
|
14
|
+
* Enriched with /v1/models structural fields + model-stats averages.
|
|
14
15
|
*
|
|
15
16
|
* @param apiKey - Bearer token for authenticated endpoints
|
|
16
17
|
* @returns Array of unified PollinationsModel objects
|
|
@@ -38,17 +38,31 @@ function fetchJson(url, headers = {}) {
|
|
|
38
38
|
}
|
|
39
39
|
// ─── Category Detection ──────────────────────────────────────────────────
|
|
40
40
|
function detectCategory(raw) {
|
|
41
|
+
// Prefer explicit type/category from unified /models endpoint
|
|
42
|
+
const explicit = String(raw.type || raw.category || raw.output_modality || '').toLowerCase();
|
|
43
|
+
if (explicit === 'video' || explicit === 'image' || explicit === 'audio' || explicit === 'text'
|
|
44
|
+
|| explicit === '3d' || explicit === 'embedding' || explicit === 'realtime') {
|
|
45
|
+
return explicit;
|
|
46
|
+
}
|
|
41
47
|
const outputs = raw.output_modalities || [];
|
|
42
48
|
if (outputs.includes('video'))
|
|
43
49
|
return 'video';
|
|
50
|
+
if (outputs.includes('3d') || outputs.includes('mesh'))
|
|
51
|
+
return '3d';
|
|
52
|
+
if (outputs.includes('embedding') || outputs.includes('embeddings'))
|
|
53
|
+
return 'embedding';
|
|
44
54
|
if (outputs.includes('image'))
|
|
45
55
|
return 'image';
|
|
46
56
|
if (outputs.includes('audio'))
|
|
47
57
|
return 'audio';
|
|
48
|
-
|
|
58
|
+
if (outputs.includes('realtime'))
|
|
59
|
+
return 'realtime';
|
|
60
|
+
// Force STT models into audio even when output is text
|
|
49
61
|
const nameStr = (raw.name || raw.id || '').toLowerCase();
|
|
50
62
|
if (nameStr.includes('whisper') || nameStr.includes('scribe'))
|
|
51
63
|
return 'audio';
|
|
64
|
+
if (nameStr.includes('embed'))
|
|
65
|
+
return 'embedding';
|
|
52
66
|
return 'text';
|
|
53
67
|
}
|
|
54
68
|
function detectOutputType(raw) {
|
|
@@ -65,6 +79,8 @@ function mapRawToModel(raw, fallbackCategory, averageCost) {
|
|
|
65
79
|
};
|
|
66
80
|
const model = {
|
|
67
81
|
name: raw.name || raw.id || 'unknown',
|
|
82
|
+
title: raw.title || undefined,
|
|
83
|
+
brand: raw.brand || undefined,
|
|
68
84
|
description: raw.description || raw.name || '',
|
|
69
85
|
category,
|
|
70
86
|
aliases: raw.aliases || [],
|
|
@@ -92,8 +108,9 @@ function mapRawToModel(raw, fallbackCategory, averageCost) {
|
|
|
92
108
|
/**
|
|
93
109
|
* Fetch all models from the Pollinations API.
|
|
94
110
|
*
|
|
95
|
-
*
|
|
96
|
-
* -
|
|
111
|
+
* Primary: unified /models (all categories including 3d / embedding / realtime).
|
|
112
|
+
* Fallback per-modality endpoints if unified is empty/unavailable.
|
|
113
|
+
* Enriched with /v1/models structural fields + model-stats averages.
|
|
97
114
|
*
|
|
98
115
|
* @param apiKey - Bearer token for authenticated endpoints
|
|
99
116
|
* @returns Array of unified PollinationsModel objects
|
|
@@ -106,9 +123,13 @@ export async function fetchAllModels(apiKey) {
|
|
|
106
123
|
const results = [];
|
|
107
124
|
const seen = new Set();
|
|
108
125
|
const endpoints = [
|
|
126
|
+
{ url: `https://${API_BASE}/models`, fallbackCategory: 'text' },
|
|
109
127
|
{ url: `https://${API_BASE}/image/models`, fallbackCategory: 'image' },
|
|
128
|
+
{ url: `https://${API_BASE}/video/models`, fallbackCategory: 'video' },
|
|
110
129
|
{ url: `https://${API_BASE}/audio/models`, fallbackCategory: 'audio' },
|
|
111
130
|
{ url: `https://${API_BASE}/text/models`, fallbackCategory: 'text' },
|
|
131
|
+
{ url: `https://${API_BASE}/3d/models`, fallbackCategory: '3d' },
|
|
132
|
+
{ url: `https://${API_BASE}/embeddings/models`, fallbackCategory: 'embedding' },
|
|
112
133
|
];
|
|
113
134
|
const statsPromise = fetchJson('https://enter.pollinations.ai/api/model-stats', headers).catch(() => ({ data: [] }));
|
|
114
135
|
const openapiPromise = fetchJson('https://enter.pollinations.ai/api/docs/open-api/generate-schema', headers).catch(() => ({}));
|
|
@@ -168,7 +189,8 @@ export async function fetchAllModels(apiKey) {
|
|
|
168
189
|
}
|
|
169
190
|
log(`[ModelFetcher] Parsed ${list.length} models from ${res.url}`);
|
|
170
191
|
}
|
|
171
|
-
|
|
192
|
+
const count = (c) => results.filter(m => m.category === c).length;
|
|
193
|
+
log(`[ModelFetcher] Total: ${results.length} models (image=${count('image')} video=${count('video')} audio=${count('audio')} text=${count('text')} 3d=${count('3d')} emb=${count('embedding')} rt=${count('realtime')})`);
|
|
172
194
|
// --- ENRICH MODELS WITH OPENAPI CONSTRAINTS ---
|
|
173
195
|
try {
|
|
174
196
|
const videoParams = openapiRaw?.paths?.['/video/{prompt}']?.get?.parameters || [];
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Single source of truth for all Pollinations model metadata.
|
|
5
5
|
* Replaces the fragmented hardcoded constants in shared.ts.
|
|
6
6
|
*/
|
|
7
|
-
export type ModelCategory = 'image' | 'video' | 'audio' | 'text';
|
|
7
|
+
export type ModelCategory = 'image' | 'video' | 'audio' | 'text' | '3d' | 'embedding' | 'realtime';
|
|
8
8
|
export interface ModelPricing {
|
|
9
9
|
currency: string;
|
|
10
10
|
completionImageTokens?: number;
|
|
@@ -21,6 +21,8 @@ export interface ModelPricing {
|
|
|
21
21
|
}
|
|
22
22
|
export interface PollinationsModel {
|
|
23
23
|
name: string;
|
|
24
|
+
title?: string;
|
|
25
|
+
brand?: string;
|
|
24
26
|
description: string;
|
|
25
27
|
category: ModelCategory;
|
|
26
28
|
aliases: string[];
|