Agent skill · AI & Agents

routerbase-model-gateway

Configure RouterBase as an OpenAI compatible model gateway for AI apps, with routing, fallback, media generation, and credential handling patterns.

Cosmic Stack3,294★ · 2 repos on radarProfile →
claude-codeMIT
Install
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.

Facts
Files in the skill folder: 1
SKILL.md size: 7 KB
Bundled scripts: none
Version: 1.0.0
Declared author: zenlee123
Path: categories/ai-ml/routerbase-model-gateway/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 364
Language: JavaScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. When To Use
  2. Implementation Principles
  3. 1. Keep The Gateway Server Side
  4. 2. Change Configuration Before Code Shape
  5. 3. Isolate Provider Choices
  6. Quick Start Example
  7. Routing Checklist
  8. Fallback Pattern
  9. Media Generation Flow
  10. Evaluation Rubric
  11. Common Mistakes
  12. Output Expectations
More from mercury-agent-skills
All skills →
About this skill
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.

Keep going