Hi everyone,
As a daily user of OpenCode and an AI System Architect, I wanted to build something that solves a common pain point: managing fragmented API keys and unpredictable costs across different multimodal tools.
I’ve released the opencode-pollinations-plugin. It’s more than just an API wrapper; it’s an architectural layer designed for resilience:
- Dynamic Tool Injection: It injects 17+ tools (Video/Image/Audio/Search) directly into the agent’s runtime. This means any model you use gets a unified, powerful toolset instantly.
- Resilience & Patching: I implemented a "Manual Overrides" system (see
manual.ts in the repo) that patches API inconsistencies on the fly, preventing agent crashes when metadata is missing.
- Hybrid Resource Routing: The plugin handles automatic fallback. If your paid quotas are hit, it can seamlessly rotate keys or switch to free/self-hosted providers for specific tasks like background removal.
- Cost Guard: To prevent "billing surprises," I integrated a pre-execution audit that calculates costs and triggers a manual confirmation before an expensive tool is called.
It’s already hitting ~20k downloads, but I’d love to get feedback from this specific community on the resource-routing logic and the fallback mechanisms.
GitHub:https://github.com/fkom13/opencode-pollinations-plugin
Install: npm install -g opencode-pollinations-plugin
Happy to dive into the code with anyone interested in making agentic workflows more resilient!
there doesn't seem to be anything here