davepoon/routerbase-model-gateway
Integrate and route AI model requests through RouterBase. Use when migrating OpenAI-compatible clients, choosing model IDs, configuring fallbacks, or building chat, image, video, audio, speech, and embedding workflows.
npx skills add https://github.com/davepoon/buildwithclaude --skill routerbase-model-gateway
Use routerbase as an OpenAI-compatible model gateway for chat, image, video, audio, speech, and embedding workloads. This skill helps agents migrate existing SDK clients, keep credentials private, choose model IDs, and document safe fallback behavior.
https://routerbase.com/v1.ROUTERBASE_API_KEY as a server-side secret.Use routerbase-model-gateway to migrate this OpenAI chat integration to RouterBase.
Use routerbase-model-gateway to design a fallback model plan for low-latency support chat.
Use routerbase-model-gateway to add image and video generation with safe polling and storage.
Prefer the user's existing OpenAI-compatible SDK. Change the base URL, store the API key in environment configuration, and keep request payloads standard.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.ROUTERBASE_API_KEY,
baseURL: process.env.ROUTERBASE_BASE_URL || "https://routerbase.com/v1",
});
const response = await client.chat.completions.create({
model: "google/gemini-2.5-flash",
messages: [{ role: "user", content: "Write one sentence about model routing." }],
});
When recommending models, return a table like this:
| Use case | Primary model | Fallback model | Reason | Validation |
| --- | --- | --- | --- | --- |
| Support chat | model-id | model-id | Low latency and tool support | Run fixture prompts and compare output shape |
Treat model IDs, pricing, and availability as live data. If a live catalog check is not possible, mark examples clearly and tell the user what must be verified before production.
ROUTERBASE_API_KEY, wrong environment, or server-side secret not loaded./v1, wrong media endpoint, or client still pointing at another provider.response_format or no downstream schema validation.Return:
Take davepoon/routerbase-model-gateway from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.