Goose
Use Router9 as a custom provider in Goose
Goose is an open-source, on-machine AI agent — desktop app, CLI, and API — governed by the Agentic AI Foundation (AAIF) at the Linux Foundation. It speaks to any OpenAI-compatible endpoint, so you can add Router9 as a custom provider without any code changes.
Setup
Goose reads custom providers from JSON files under ~/.config/goose/custom_providers/ (on Windows, %APPDATA%\Block\goose\config\custom_providers\). Create router9.json there:
{
"name": "router9",
"engine": "openai",
"display_name": "Router9",
"description": "Router9 flat-rate LLM gateway",
"api_key_env": "ROUTER9_API_KEY",
"base_url": "https://api.router9.com/v1/chat/completions",
"models": [
{ "name": "auto", "context_limit": 200000 },
{ "name": "claude-sonnet-4-20250514", "context_limit": 200000 }
],
"supports_streaming": true,
"requires_auth": true
}You can also run goose configure, choose Custom Providers → Add A Custom Provider, pick API Type OpenAI Compatible, and enter https://api.router9.com/v1/chat/completions as the API URL.
API Key
Provide your Router9 key through the environment variable named in api_key_env:
export ROUTER9_API_KEY=sk-r9k-your-key-hereThen start a session on the provider:
goose session start --provider router9Choosing Models
The models array lists the ids Router9 routes on — select one at session start or via goose configure. Use auto to let Router9 pick the best model for your plan, or pin any model Router9 supports:
{ "name": "gpt-4o", "context_limit": 128000 }Add Skills via MCP
Goose is built around extensions (MCP servers). Add Router9's hosted MCP server as a remote extension to expose Router9 Skills as tools — see Install MCP Server.
Tips
- Router9's flat monthly pricing suits Goose's long, autonomous sessions — no per-token surprises.
- Keep
ROUTER9_API_KEYin your shell environment rather than committing it to the provider JSON.