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

ccr-open

v0.1.0

Published

Open provider & agent router extension for claude-code-router

Readme

ccr-open

Open provider & agent router extension for claude-code-router.

Two features, zero CCR source modification:

  1. OpenAI ChatGPT Plus/Pro OAuth — use your ChatGPT subscription as a CCR provider
  2. Agent Router — route OMC / GSD subagent requests to different models by agent role

Install

# Global install (recommended — CCR can resolve global packages)
npm install -g ccr-open

# Or install into CCR's package directory
cd $(dirname $(which ccr))/.. && npm install ccr-open

Quick Start

1. OpenAI OAuth (optional)

Login with your ChatGPT Plus/Pro subscription:

npx ccr-open login            # browser flow
npx ccr-open login --headless  # device code flow (SSH, containers)
npx ccr-open status

Token is stored at ~/.local/share/opencode/auth.json — shared with opencode. If you already logged in via opencode connect, the token is reused automatically.

2. Configure CCR

Edit ~/.claude-code-router/config.json:

{
  // Agent-level model routing
  "CUSTOM_ROUTER_PATH": "ccr-open/agent-router",

  // Load OAuth transformer
  "transformers": [
    { "path": "ccr-open" }
  ],

  "Providers": [
    // ChatGPT Plus/Pro via OAuth
    {
      "name": "openai-plus",
      "api_base_url": "https://chatgpt.com/backend-api/codex/responses",
      "api_key": "oauth-managed",
      "models": ["gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-mini-fast"],
      "transformer": { "use": ["openai-chatgpt-oauth"] }
    },
    // Your other providers...
  ],

  // Agent-level routing table
  "AgentRouter": {
    // OMC agents
    "omc:architect": { "route": "openai-plus,gpt-5.4", "reasoning_effort": "high" },
    "omc:executor":  "claude-sonnet-4-6",
    "omc:explore":   "your-cheap-provider,cheap-model",

    // GSD agents
    "gsd-planner":   "claude-opus-4-6",
    "gsd-executor":  "claude-sonnet-4-6",

    // Tier fallbacks
    "_fallback_opus":   "claude-opus-4-6",
    "_fallback_sonnet": "claude-sonnet-4-6",
    "_fallback_haiku":  "your-cheap-provider,cheap-model"
  }
}

3. Restart CCR

ccr restart

Agent Router

Routes subagent requests based on agent identity detected from the system prompt. Supports all OMC (19 agents) and GSD (31 agents) agents.

How It Works

flowchart LR
    A["Claude Code<br/>spawns subagent"] --> B["CCR receives<br/>request"]
    B --> C["agent-router scans<br/>system prompt"]
    C --> D{"Agent<br/>found?"}
    D -->|Yes| E["Look up<br/>AgentRouter table"]
    D -->|No| F["Tier fallback<br/>or built-in"]
    E --> G["Return provider,model<br/>+ param overrides"]
    G --> H["CCR forwards<br/>to provider"]
    F --> H

    style C fill:#2563eb,color:#fff
    style E fill:#7c3aed,color:#fff

Route Formats

Simple route:

"gsd-executor": "anthropic,claude-sonnet-4"

Route with parameter overrides:

"omc:architect": {
  "route": "openai-plus,gpt-5.4",
  "reasoning_effort": "high",
  "temperature": 0.2
}

Supported overrides: reasoning_effort, temperature, max_tokens.

Routing Priority

  1. Agent name match → AgentRouter[agent] + parameter overrides
  2. Model tier fallback → _fallback_opus / _fallback_sonnet / _fallback_haiku
  3. No match → CCR built-in scenario routing (background / think / longContext / webSearch / default)

Agent routing and request signals (thinking, web_search, longContext) are independent dimensions. A gsd-planner with thinking: true still routes to its configured model — thinking parameters are transparently forwarded to the target provider.

Agent Detection

| System | Detection Method | Example | | --- | --- | --- | | GSD | name: gsd-xxx in YAML frontmatter | gsd-executor | | OMC | oh-my-claudecode:xxx in prompt | omc:architect |

Full Agent List

| Agent | Default Tier | Suggested Route | | --- | --- | --- | | omc:explore | haiku | cheap model | | omc:analyst | opus | strong reasoning | | omc:planner | opus | strong reasoning | | omc:architect | opus | strong reasoning + high effort | | omc:debugger | sonnet | standard | | omc:executor | sonnet | standard | | omc:verifier | sonnet | standard | | omc:tracer | sonnet | standard | | omc:security-reviewer | opus | strong reasoning + high effort | | omc:code-reviewer | opus | strong reasoning + high effort | | omc:test-engineer | sonnet | standard | | omc:designer | sonnet | visual-capable | | omc:writer | haiku | cheap model | | omc:qa-tester | sonnet | standard | | omc:scientist | sonnet | standard | | omc:git-master | sonnet | cheap model | | omc:document-specialist | sonnet | cheap model | | omc:code-simplifier | opus | strong reasoning | | omc:critic | opus | strong reasoning + high effort |

| Agent | Default Tier | Suggested Route | | --- | --- | --- | | gsd-planner | opus | strong reasoning | | gsd-roadmapper | opus/sonnet | strong reasoning | | gsd-plan-checker | sonnet | reasoning + high effort | | gsd-assumptions-analyzer | sonnet | standard | | gsd-phase-researcher | sonnet | standard | | gsd-project-researcher | sonnet | standard | | gsd-research-synthesizer | haiku | cheap model | | gsd-domain-researcher | sonnet | standard | | gsd-executor | sonnet | standard | | gsd-code-fixer | sonnet | standard | | gsd-debugger | sonnet | standard | | gsd-debug-session-manager | sonnet | standard | | gsd-verifier | sonnet | standard | | gsd-integration-checker | sonnet | standard | | gsd-nyquist-auditor | haiku | cheap model | | gsd-code-reviewer | opus | strong reasoning + high effort | | gsd-security-auditor | opus | strong reasoning + high effort | | gsd-eval-auditor | sonnet | standard | | gsd-eval-planner | opus | strong reasoning + high effort | | gsd-ui-researcher | sonnet | visual-capable | | gsd-ui-checker | sonnet | standard | | gsd-ui-auditor | sonnet | standard | | gsd-framework-selector | sonnet | standard | | gsd-doc-writer | sonnet | standard or cheap | | gsd-doc-verifier | haiku | cheap model | | gsd-codebase-mapper | haiku | cheap model | | gsd-pattern-mapper | haiku | cheap model | | gsd-intel-updater | haiku | cheap model | | gsd-user-profiler | haiku | cheap model | | gsd-advisor-researcher | haiku | cheap model | | gsd-ai-researcher | sonnet | standard |

OAuth Details

Token Compatibility

Uses the exact same auth.json format and location as opencode:

  • Linux: ~/.local/share/opencode/auth.json
  • macOS: ~/Library/Application Support/opencode/auth.json

Bidirectional: login via ccr-open works in opencode, and vice versa.

Supported Models

All ChatGPT Plus/Pro Codex models, including:

gpt-5.5 · gpt-5.5-fast · gpt-5.4 · gpt-5.4-fast · gpt-5.4-mini · gpt-5.4-mini-fast · gpt-5.3-codex · gpt-5.2-codex · gpt-5.1-codex

Models with version ≥ 5.4 are auto-allowed (no manual whitelist update needed).

Upstream Sync

OAuth protocol constants are isolated in src/upstream.ts, mirroring opencode's codex.ts. When upstream changes the OAuth flow, update this single file.

CLI

ccr-open login [--headless] [--port N] [--timeout N]
ccr-open status [--json]
ccr-open logout
ccr-open refresh

Architecture

flowchart TD
    CC[Claude Code] -->|/v1/messages| CCR

    subgraph CCR["claude-code-router"]
        AR["agent-router.js<br/>(detect agent → pick provider)"]
        OT["OAuth transformer<br/>(inject Bearer token + rewrite URL)"]
        BR["Built-in Router<br/>(fallback for non-agent requests)"]
    end

    CCR -->|opus agents| Anthropic["Anthropic"]
    CCR -->|reasoning agents| OAIP["OpenAI Plus<br/>(ChatGPT OAuth)"]
    CCR -->|cheap agents| OCGO["OpenCode Go"]
    CCR -->|default| Anthropic

    style AR fill:#2563eb,color:#fff
    style OT fill:#ea580c,color:#fff
    style BR fill:#6b7280,color:#fff

No CCR source code modification. Loaded via existing transformers[].path and CUSTOM_ROUTER_PATH config mechanisms.

License

MIT