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

@reasoning-router/opencode

v0.1.9

Published

Adaptive per-step reasoning effort for OpenCode V2

Readme

@reasoning-router/opencode

English | 简体中文 | 日本語 | 한국어

An OpenCode V2 plugin that asks a classifier how much reasoning each step needs, then applies that effort to the outgoing model request without breaking the prompt cache. Every classifier in @reasoning-router/classifiers is available.

Alpha. OpenCode installs the plugin from npm by package name; list it under plugins as shown below.

Ported from opencode-jev-router.

Requirements

  • OpenCode V2 2.0.4 or newer (smoke-tested with 2.0.18).
  • Whatever the chosen classifier needs (a key, or a server you run); see classifiers.
  • A Responses API endpoint serving GPT-6 Astra, Luna, or Sol, or an Anthropic Messages endpoint with the mid-conversation output-config beta.

Usage

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": [{ "package": "@reasoning-router/opencode", "options": {
    "classifier": { "provider": "jev", "apiKey": "{env:REASONING_ROUTER_CLASSIFIER_API_KEY}" },
    "wrap": { "openai": ["openai/gpt-6-astra"] },
    "decisionsLogPath": "/tmp/reasoning-decisions.jsonl"
  }}],
  "model": "reasoning-router/gpt-6-astra"
}

The plugin registers reasoning-router/<profile> aliases only for the source models listed in wrap (openai and/or anthropic arrays of provider/model refs). Source models are left untouched. Each primary request to an alias gets one classification; if the classifier fails, the request continues at the fallback effort (high by default). With decisionsLogPath, each routed request appends a metadata-only ReasoningDecision event that records the deciding classifier.

For OpenAI Decisions (public beta), replace the classifier block with:

"classifier": { "provider": "openai-decisions", "apiKey": "{env:REASONING_ROUTER_CLASSIFIER_API_KEY}" }

See examples/opencode.jsonc for a full example.

Options

| Option | Default | Purpose | | --- | --- | --- | | classifier.provider | REASONING_ROUTER_CLASSIFIER env, then jev | Classifier provider name, such as jev (see classifiers). | | classifier.apiKey | REASONING_ROUTER_CLASSIFIER_API_KEY env | Classifier key, if the provider needs one (not needed when fixedEffort is set). | | classifier.baseUrl | REASONING_ROUTER_CLASSIFIER_BASE_URL env, then the provider default | Classifier endpoint; defaults to the provider's. | | classifier.accountId | REASONING_ROUTER_CLASSIFIER_ACCOUNT_ID env | Account ID, for providers that take one. | | classifier.model | REASONING_ROUTER_CLASSIFIER_MODEL env | Classifier model, for providers that take one. | | classifier.timeoutMs | 4000 | Total classification budget, including retries. | | wrap | none | Required nonempty object of openai/anthropic source refs. | | decisionsLogPath | off | Absolute path for ReasoningDecision JSONL. | | baseEffort | profile default | Request-level effort reported by responses. | | fixedEffort | none | Skip the classifier and always use this effort. | | maxRetries | 1 | Extra attempts after transient classifier errors. | | fallbackMode | fixed | fixed, previous, or error. | | fallbackEffort | high | Effort used when classification fails. | | maxRequestBytes | 33554432 | Largest request body. | | maxInFlight | 32 | Concurrent requests. | | upstreamHeaderTimeoutMs | 10000 | Wait for endpoint response headers. | | upstreamIdleTimeoutMs | 60000 | Longest gap between streamed chunks. |

Wire behavior, logging, and limits are documented in docs/behavior.md and docs/classification-policy.md.

License

MIT