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

claude-proxy-berrypi

v1.0.2

Published

Claude Code (Anthropic) → BerryPi tokenapi 透传代理,直接转发 Claude Messages API 请求,零格式转换

Readme

claude-proxy-berrypi

Claude Code (Anthropic) → BerryPi tokenapi 透传代理

零格式转换,直接透传 Claude Messages API 请求到 tokenapi /v1/messages 端点。

claude-to-openai-proxy 的区别

| 特性 | claude-to-openai-proxy | claude-proxy-berrypi | |------|----------------------|---------------------| | 格式转换 | Claude ↔ OpenAI | ❌ 无,直接透传 | | 请求路径 | /v1/chat/completions | /v1/messages | | 流式支持 | 强制 stream:false | ✅ 原生透传 SSE | | 依赖 | 无 | 无(纯 Node.js 内置模块) |

安装

npm install -g claude-proxy-berrypi

配置 & 启动

环境变量

| 变量 | 默认值 | 说明 | |------|--------|------| | TOKENAPI_KEY | 必填 | BerryPi tokenapi 的 API Key | | TOKENAPI_MODEL | BerryPi-text-01 | 指定请求的模型名称 | | PROXY_PORT | 8181 | 代理监听端口 | | TOKENAPI_HOST | token.android-doc.com | tokenapi 地址 | | TOKENAPI_PORT | 443 | tokenapi 端口 | | TOKENAPI_USE_SSL | true | 是否使用 HTTPS | | TOKENAPI_PATH | /api/token/v1/messages | tokenapi 路径 |

启动

# 设置 API Key 后启动
TOKENAPI_KEY=*** npx claude-proxy-berrypi

# 指定模型
TOKENAPI_KEY=*** TOKENAPI_MODEL=mimo-v2.5-pro npx claude-proxy-berrypi

# 或全局安装后
TOKENAPI_KEY=*** claude-proxy-berrypi

Claude Code 配置

export ANTHROPIC_BASE_URL=http://localhost:8181
export ANTHROPIC_AUTH_TOKEN=***

# 验证
claude "say hi in 3 words"

永久生效加到 ~/.bashrc~/.zshrc

工作原理

Claude Code
    ↓ (Claude Messages API, ANTHROPIC_BASE_URL=http://localhost:8181)
claude-proxy-berrypi (localhost:8181)
    ↓ (直接透传, 添加 x-api-key, 无格式转换)
tokenapi /api/token/v1/messages (支持 Claude 格式)
    ↓
MiniMax / DeepSeek / 智谱 等国产模型
  1. Claude Code 发请求到 http://localhost:8181/v1/messages(Claude Messages API 格式)
  2. 本代理不做任何格式转换,添加 x-api-key 后直接转发
  3. tokenapi /v1/messages 端点上支持 Claude 格式,直接透传给模型
  4. 响应原路返回,流式或非流式均原生透传

License

MIT