add-router-model

Guides adding a new router model to OpenRouter through enum, plugin, seed, and UI steps.

7|12|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/OpenRouterTeam/docs --skill add-router-model-openrouterteam
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: add-router-model
Source: https://github.com/OpenRouterTeam/docs/tree/main/.agents/skills/add-router-model
Command: npx skills add https://github.com/OpenRouterTeam/docs --skill add-router-model-openrouterteam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding a new router model to OpenRouter touches many disconnected parts of the monorepo — the RouterModel enum, a new router plugin, plugin registration, production model rows, seed CSV verification, settings UI, and tests — and missing any step causes subtle routing failures. ## Core Features & Use Cases - Step-by-step checklist: Covers RouterModel enum entry, plugin scaffolding with required patterns (guard clause, placeholder endpoint, resolveEndpoints, routerRequest threading, metadata logging), and init-plugins registration. - Production and seed workflow: Explains creating the model row in prod Mission Control, verifying it lands in postgres/seeds/models_rows.csv, and local DB fallback insertion. - UI, docs, and testing guidance: Details plugin settings UI wiring, PostHog events, docs updates, unit/pipeline tests, and local e2e verification with curl. - Use Case: When adding a router like openrouter/pareto-code, follow the checklist to implement the plugin, register it, seed the model, and verify routing end to end. ## Quick Start Ask the AI to add a new router model with a given slug, enum key, plugin directory, and plugin class name, and have it follow this checklist.

Frequently Asked Questions about add-router-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new router model to OpenRouter?▼

Add an entry to the RouterModel enum in packages/models/id/router.ts, create a plugin under packages/router/plugins, register it in init-plugins.ts, create the model row in prod Mission Control, verify the seed CSV, and add tests plus optional settings UI.

What patterns must an OpenRouter router plugin follow?▼

Every router plugin needs a guard clause returning early for non-matching models, a placeholder endpoint via createRouterModelPlaceholderEndpoint, endpoint resolution in resolveEndpoints, routerRequest threading of the resolved model, and routing metadata logging.

Do router models need endpoint rows or endpoint seeds?▼

No. Router models resolve to other models' endpoints at request time through the plugin, which creates placeholder endpoints. You should not add endpoint rows or endpoint seed data for router models.

How do I verify a new router model locally?▼

Run bun run dev:up, wait for the api resources with tilt wait, then POST a chat completion to localhost:8787 with your router slug. Check services/dev-fs-logs/.logs for the generation folder and routing metadata in router/transaction-attempt.log.

Why is my new router model missing from the seed CSV?▼

The seed CSV syncs from prod via the Refresh Models and Endpoints workflow, which runs daily at 13:00 UTC. Trigger it manually with gh workflow run, or insert the model row directly into your local database as a temporary workaround.