routerbase-model-gateway
Configure RouterBase as an OpenAI compatible model gateway for AI apps, with routing, fallback, media generation, and credential handling patterns.
npx skills add cosmicstack-labs/mercury-agent-skills --skill routerbase-model-gateway --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# RouterBase Model Gateway Use [routerbase](https://routerbase.com/) when an application needs an OpenAI compatible gateway for chat, embeddings, image, video, audio, speech, model routing, or fallback behavior. The goal is not to rewrite the whole AI layer. The goal is to move provider selection behind a clean server side boundary, keep credentials private, and make model choices reversible. ## When To Use Use this skill when the user asks to: - Migrate an OpenAI compatible client to RouterBase. - Add RouterBase to a backend API, worker, command line tool, or agent runtime. - Route requests across multiple model providers through one API surface. - Choose primary and fallback models for latency, quality, price, or availability. - Add image, video, audio, speech, or embedding generation through a gateway. - Debug RouterBase base URLs, model IDs, streaming, JSON output, or media job polling. Do not use this skill for: - General API gateway design unrelated to AI models. - Direct provider SDK features that are not exposed through the OpenAI compatible API. - Frontend only integrations that would expose API keys to users. - Production security review of the whole application. ## Imple
- When To Use
- Implementation Principles
- 1. Keep The Gateway Server Side
- 2. Change Configuration Before Code Shape
- 3. Isolate Provider Choices
- Quick Start Example
- Routing Checklist
- Fallback Pattern
- Media Generation Flow
- Evaluation Rubric
- Common Mistakes
- Output Expectations
What does the routerbase-model-gateway skill do?
Configure RouterBase as an OpenAI compatible model gateway for AI apps, with routing, fallback, media generation, and credential handling patterns.
How do I install it?
Run `npx skills add cosmicstack-labs/mercury-agent-skills --skill routerbase-model-gateway --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From cosmicstack-labs/mercury-agent-skills, a repository with 364 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.