npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kevin0181/ccrouter

v0.2.6

Published

9Router-based local AI router with selectable active combo models

Readme

CCRouter (Personal Fork)

A personal local AI router based on 9Router.

This fork is tuned for my own Codex/AI-coding workflow:

  • Keep clients pointed at one local OpenAI-compatible endpoint: http://localhost:20128/v1
  • Keep the client model name stable, such as codex-default
  • Switch the real active upstream model from the dashboard
  • Try the selected active model first, then fall back through the combo order when it fails or runs out of quota

License / Fork Note

  • This project keeps the original MIT license.
  • This is a personal fork/customization of 9Router.
  • The README and behavior are simplified for my local/private workflow.
  • Keeping the MIT license is fine; the README can be changed to match this fork as long as the license notice itself is preserved.

What This Project Does

CCRouter runs locally and acts as a routing layer between AI coding clients and multiple upstream providers.

Codex / CLI tool
      |
      | OpenAI-compatible API
      v
http://localhost:20128/v1
      |
      v
CCRouter
  - provider/account selection
  - combo routing
  - active model first
  - fallback handling
  - request/response format translation
      |
      v
Upstream providers

Run From Source

CLI command:

ccrouter

Stop a running instance:

ccrouter stop

Stop a specific port:

ccrouter stop --port 20128

Development mode:

cp .env.example .env
npm install
PORT=20128 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run dev

Production mode:

npm run build
PORT=20128 HOSTNAME=0.0.0.0 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run start

Default URLs:

  • Dashboard: http://localhost:20128/dashboard
  • OpenAI-compatible endpoint: http://localhost:20128/v1

Codex Desktop Setup (Manual)

The old ccrouter setup codex helper command has been removed.

Configure Codex manually instead.

Example ~/.codex/config.toml:

model = "codex-default"
model_provider = "ccrouter"

[model_providers.ccrouter]
name = "CCrouter"
base_url = "http://localhost:20128/v1"
wire_api = "responses"

If the client requires an API key, use a dummy key:

setx OPENAI_API_KEY dummy

Restart Codex Desktop after changing the config.


Combo Workflow

Use Dashboard -> Combos to create a stable model alias such as codex-default.

Example:

codex-default
1. gh/claude-opus-4.6      active
2. gh/gpt-5.3-codex        fallback
3. cx/gpt-5.5              fallback

Rules:

  • The combo name is what the client uses.
  • The selected activeModel is tried first.
  • If the active model fails, CCRouter tries the remaining models in order.
  • Clicking Use first changes the active model without editing the client config.

Local Data

By default, CCRouter stores local data under the app data directory.

On Windows:

%APPDATA%\ccrouter

This can be overridden with:

DATA_DIR=/path/to/data

Notes

  • This fork is maintained mainly for personal use.
  • Upstream 9Router changes may be merged manually when needed.
  • The documentation intentionally focuses on my local setup instead of public onboarding.