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

dsv4-subagent-fix

v1.0.1

Published

Minimal zero-dependency proxy to fix DeepSeek V4 Claude Code subagent incompatibility

Readme

dsv4-subagent-fix

A minimal (~70 lines, zero dependencies) local proxy that fixes DeepSeek V4's subagent incompatibility with Claude Code ≥ 2.1.166.

Quick Start

npx dsv4-subagent-fix

Then add to Claude Code settings.json:

"ANTHROPIC_BASE_URL": "http://localhost:16890"

Restart Claude Code. Subagents work.

Python version:

python3 dsv4_subagent_fix.py &

Problem

Claude Code 2.1.166+ sends thinking: { type: "disabled" } for subagents (no need to show thinking chain to users). When combined with CLAUDE_CODE_EFFORT_LEVEL=max (recommended by DeepSeek), the API request includes output_config or reasoning_effort. DeepSeek's Anthropic-compatible endpoint rejects this combination:

thinking options type cannot be disabled when reasoning_effort is set

This breaks ALL Claude Code subagent/Workflow functionality.

Official DeepSeek issue #1397

Solution

A single-purpose local proxy on localhost:16890 that strips output_config and reasoning_effort from subagent requests only. Main agent requests (thinking.type=enabled/adaptive) pass through completely untouched.

Claude Code (subagent)
  → localhost:16890
    strip output_config / reasoning_effort
  → api.deepseek.com/anthropic (200 OK)

Claude Code (main agent)
  → localhost:16890
    (passthrough, unchanged)
  → api.deepseek.com/anthropic

Quick Start

# Start the proxy
python3 dsv4_subagent_fix.py &

# Configure Claude Code
# In settings.json:
#   "ANTHROPIC_BASE_URL": "http://localhost:16890"

Auto-start with systemd

sudo cp dsv4-subagent-fix.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now dsv4-subagent-fix

Why not dsv4-cc-proxy?

dsv4-cc-proxy is a more comprehensive proxy that fixes 3 API incompatibilities. However, its thinking normalization applies to ALL requests, which can affect main agent reasoning quality. This script takes a more conservative approach — only strip conflicting fields when thinking.type=disabled, leaving main agent requests completely untouched.

| | dsv4-cc-proxy | dsv4-subagent-fix | |---|---|---| | Lines of code | ~430 | ~70 | | Dependencies | httpx, starlette, socksio... | Python stdlib only | | Main agent impact | Side effects | None (passthrough) | | What it fixes | 3 issues | 1 focused fix |

License

MIT