balagnanas/localmachineaisetup/add-model-9router-copilot
Claude Code and agent skill by balagnanas/localmachineaisetup
- community
Checking that the SKILL.md file is still in the repository.
Add a specific model under a specific 9router provider alias (e.g. oc, ocg, cl, glm) so 9router lists and routes it, and register the same model in the Copilot App's BYOK 9router provider (~/.copilot/data.db). Use when the user wants to add a new model to 9router and Copilot, expose an upstream model via a 9router alias, or wire a model into Copilot Sessions through the 9router BYOK provider.
Install
npx vskill@latest install balagnanas/localmachineaisetup/add-model-9router-copilotSKILL.md
The same SKILL.md was published earlier as balagnanas/localmachineaisetup/add-model-9router-copilot.
Add one model to 9router (custom-model pin + provider connection if missing) and to the Copilot App DB under the 9router BYOK provider, end to end.
What it does
- Checks 9router is up (
GET /v1/models, defaulthttp://127.0.0.1:20128). - Backs up
~/.9router/db/data.sqliteand~/.copilot/data.db(*.bak-<timestamp>) before any write. - 9router (
~/.9router/db/data.sqlite, WAL-safe, live — no restart):
- Inserts a
providerConnectionsrow for the provider if none exists (authTypenone, isActive 1, minimal data — matches the row created foropencode; needed so the provider's models are exposed in/v1/models). - Upserts a
customModelskv pin: keyalias|model|llm, value{"providerAlias":"<alias>","id":"<model>","type":"llm","name":"<display>"}.
- Verifies
<alias>/<model>now appears inGET /v1/models. - Copilot (
~/.copilot/data.db): upserts aprovider_modelsrow for the 9router BYOK provider (4e5a4e55-0c50-4791-ab9b-9df1df31ce82) withmodel_id = <alias>/<model>; optional context/output limits via flags. --testsends a tiny chat completion to prove routing end to end (upstream 5xx is reported as a warning, not a failure — 9router routing is still verified).
Known aliases
oc (OpenCode Free → provider opencode), ocg (OpenCode Go → opencode-go), cl (Cline → cline), cx (Codex → codex), glm (Z.ai), gemini, groq, cerebras, mistral, nvidia, ollama-local (→ ollama). Unknown aliases need --provider-id <registry id> (the id field in 9router's AI_PROVIDERS registry) and a display name.
How to run
Options: --display NAME, --context N, --max-output N, --port N (9router port, default 20128), --provider-id ID, --copilot-provider-id ID, --api-key KEY (for --test; defaults to the single key found in the 9router DB), --dry-run, --test.
After running
Tell the user to quit and reopen the Copilot App — it caches the model list; the model appears under the 9router provider.
Safety
- Timestamped backups before every write; idempotent upserts (safe to re-run).
- To roll back: restore the
.bak-<ts>files. - Does not touch API keys, settings, or existing connections/models.
- If the upstream provider rejects the model (e.g. "Model ... is not supported"), the add still succeeds locally — the model simply can't serve traffic until upstream supports it (seen with brand-new OpenCode models).
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/global/add-model-9router-copilot/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/balagnanas/localmachineaisetup/add-model-9router-copilot)