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

@magpie-community/middleware-think-tags

v0.1.0

Published

Take a model's <think>…</think> out of its reply's text, or put a Chat reply's reasoning_content into it (New API's thinking_to_content), as magpie gateway middleware

Readme

@magpie-community/middleware-think-tags

A model's thinking, where its reply's text is, as magpie gateway middleware. It either takes thinking out of the text, or puts it in (New API's thinking_to_content).

Install it from magpie's Plugins › Discover, or with magpie plugin add @magpie-community/middleware-think-tags. Set its options under Plugins › Installed › Options, or with magpie plugin options think-tags '<json>'.

Options

{ "mode": "strip" }

strip (the default). Some models (open reasoning models served by vLLM, Ollama and many relays) write their thinking into the reply as <think>…</think>. This mode takes that block out, so an agent doesn't keep it in its history and send it back every turn.

  • Only a block at the start of the text is taken out. A <think> the model writes later, in code for example, stays.
  • A tag split across streamed chunks is still found.
  • It works on Anthropic, Chat and Responses replies, streamed or whole.

to_content. A Chat reply's reasoning_content (or reasoning) is put into its text as <think>…</think>, for a client that shows only the text.

  • This mode works on Chat replies only. An Anthropic thinking block carries a signature, and turned into text it would fail the next turn.
  • It changes what the agent keeps and sends back, so it suits a chat client better than a coding agent.

中文:strip 去掉回复开头模型写出的 <think>…</think>;to_content 把 Chat 回复的 reasoning_content 放进正文(New API 的 thinking_to_content)。