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

opencode-adaptive-thinking

v0.1.2

Published

Adaptive Thinking Plugin for OpenCode

Readme

Overview

opencode-adaptive-thinking is an OpenCode plugin that lets agents actively adjust model reasoning effort during a session.

The plugin injects adaptive-thinking guidance into the system prompt and exposes a tool for switching to one of the current model's valid reasoning-effort variants.

Requirements

  • OpenCode with plugin support compatible with @opencode-ai/plugin ^1.14.24.
  • A selected model that exposes reasoning-effort variants such as none, low, medium, high, or xhigh.

Installation

Add the package to your OpenCode config plugin list:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-adaptive-thinking"]
}

To customize behavior, use the tuple form shown in the configuration example below.

Configuration

The plugin accepts these optional settings:

  • enabled: enable or disable the plugin without removing it from config. Defaults to true.
  • quiet: suppress toast notifications for configuration errors. Defaults to false.
  • toolName: name of the reasoning-effort tool exposed to agents. Defaults to set_reasoning_effort.
  • toolDescription: description for the reasoning-effort tool. Defaults to Set your reasoning effort.
  • systemPrompt: custom adaptive-thinking guidance injected into the system prompt.

Example

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    [
      "opencode-adaptive-thinking",
      {
        "enabled": true,
        "quiet": false,
        "toolName": "set_reasoning_effort",
        "toolDescription": "Set your reasoning effort",
        "systemPrompt": "Actively choose the lowest reasoning effort that can safely complete the task. Raise effort for ambiguity, debugging, risky changes, or multi-step synthesis."
      }
    ]
  ]
}

Behavior

Agents receive system guidance to actively choose the lowest reasoning effort that can safely complete the task. The plugin also exposes the configured tool, set_reasoning_effort by default, with these arguments:

  • level: one of the valid reasoning-effort variants for the current model.
  • persist: when true, keep the selected effort for the session. When false or omitted, apply it temporarily and reset to the previous effort after session.idle.

Example temporary change:

{
  "level": "high",
  "persist": false
}

Example persisted change:

{
  "level": "low",
  "persist": true
}

The system prompt lists the valid levels for the current session. Cached session state is only used when it is still valid for the current model, so switching models will not advertise or reuse an invalid effort level.

Troubleshooting

If the tool returns no valid reasoning effort levels are available for this session, check that the active model exposes variants in OpenCode. Some providers or models may not support reasoning-effort levels.

If the tool returns Invalid reasoning effort level, use one of the levels listed in the system prompt for the current session.

If configuration errors appear, check the plugin options against the documented keys and value types. Set quiet to true to suppress configuration error toasts while still writing details to the OpenCode logs.

Development

pnpm install
pnpm format:check
pnpm lint
pnpm test
pnpm typecheck
pnpm build