claude-proxy
Health Warn
- No license — Repository has no license file
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 13 GitHub stars
Code Fail
- process.env — Environment variable access in src/proxy.ts
- network request — Outbound network request in src/proxy.ts
- network request — Outbound network request in tests/integration/lib/anthropic-compat.ts
- process.env — Environment variable access in tests/integration/lib/providers.ts
- process.env — Environment variable access in tests/integration/provider-cli-e2e.ts
- network request — Outbound network request in tests/integration/provider-cli-e2e.ts
- Hardcoded secret — Potential hardcoded credential in tests/integration/provider-cli-e2e.ts
- process.env — Environment variable access in tests/integration/proxy-local.test.ts
- network request — Outbound network request in tests/integration/proxy-local.test.ts
Permissions Pass
- Permissions — No dangerous permissions requested
This tool acts as a lightweight local proxy that translates requests from Claude Code or the Agent SDK, allowing you to use domestic Chinese LLMs (like DeepSeek, Qwen, or GLM) as backend models instead of Anthropic's.
Security Assessment
The proxy does exactly what it claims to do: it reads environment variables for provider API keys and makes outbound network requests to the respective LLM APIs. However, the automated scan flagged a critical failure for a potential hardcoded credential located in an end-to-end test file (`tests/integration/provider-cli-e2e.ts`). While this likely poses no threat to your production environment (since it's just a test), hardcoded credentials are a bad practice and should be avoided. There is no evidence of dangerous permission requests, hidden shell command executions, or unauthorized data harvesting. Overall risk is rated Medium due to the credential finding.
Quality Assessment
The project is very new and actively maintained, with its last push occurring today. It has a small but growing community footprint with 13 GitHub stars. The main drawback is the complete absence of an open-source license. Without a formal license file, the legal terms of use, modification, and distribution are technically undefined, which may restrict its suitability for enterprise or commercial projects.
Verdict
Use with caution. It is safe to run locally as a development utility, but you should verify the hardcoded test credentials and note the licensing ambiguities before adopting it.
A proxy that lets Claude Code and Agent SDK use domestic Chinese LLMs (DeepSeek, Qwen, GLM, MiniMax, Kimi) as backend
claude-proxy
A lightweight proxy that lets you use Claude code or Claude Agent SDK with domestic Chinese LLMs as the backend — no Anthropic API key required.
It accepts Claude Messages API requests and forwards them to provider-native Anthropic-compatible /v1/messages endpoints for DeepSeek, Qwen, GLM, MiniMax, or Kimi.
Why
Claude Code and Agent SDK provides powerful tool-use and agent loop capabilities, but requires Anthropic API access. This proxy intercepts requests so you can use the same Claude Code and SDK with domestic models that are faster, cheaper, or more accessible in China.
Supported Providers
| Provider | API key | Models |
|---|---|---|
qwen |
QWEN_API_KEY |
qwen3-max or qwen-plus (faster, cheaper) |
deepseek |
DEEPSEEK_API_KEY |
deepseek-chat |
glm |
GLM_API_KEY |
glm-5 |
minimax |
MINIMAX_API_KEY |
MiniMax-M2.7-highspeed |
kimi |
KIMI_API_KEY |
kimi-k2.5 |
Quick Start
# 1. Clone and install
git clone https://github.com/sunflower0305/claude-proxy
cd claude-proxy
npm install
# 2. Configure
cp .env.example .env
# Edit .env: set PROVIDER and the corresponding API key
# 3. Start the proxy
npm run dev
Configure your app
Point your Claude Code or Agent SDK at the proxy:
export ANTHROPIC_BASE_URL=http://localhost:8080
export ANTHROPIC_API_KEY=any-string-works
Or in code:
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "http://localhost:8080",
apiKey: "any-string",
});
Switch provider at runtime
# Switch to DeepSeek
curl -X POST http://localhost:8080/api/provider \
-H "Content-Type: application/json" \
-d '{"provider": "deepseek"}'
End-to-end CLI verification
This repo also includes a real end-to-end check that starts the local proxy, switches providers with curl, and verifies a local claude CLI call through the proxy:
npm run test:provider-cli-e2e
The runner:
- starts
src/proxy.tson a random local port - switches
deepseek,qwen,glm,minimax, andkimiviaPOST /api/provider - runs
claude --bare -p "3+9=?"against the proxy - passes when the normalized output contains
12 - uses a per-command timeout, overridable with
PROVIDER_CLI_E2E_COMMAND_TIMEOUT_MS
Prerequisites:
curlandclaudemust be available inPATH- the provider API keys you want to verify must be configured in
.env - skipped providers are reported as
SKIPwhen their API key is missing
The script returns exit code 1 if any runnable provider fails, and 0 when all runnable providers pass or every provider is skipped.
Endpoints
| Method | Path | Description |
|---|---|---|
POST |
/v1/messages |
Claude Messages API (streaming + non-streaming) |
GET |
/health |
Health check |
GET |
/v1/models |
List available models |
GET/POST |
/api/provider |
Get or switch current provider |
Features
- Anthropic tool use passthrough for Anthropic-compatible
/v1/messagesproviders - Streaming and non-streaming responses
- Minimal request normalization with upstream model remapping
- Anthropic thinking and metadata fields passed through unchanged
- Runtime provider switching
License
MIT
Contact
If you have questions, ideas, or want to collaborate:
| [email protected] | |
| 📱 Phone / WeChat | 18550207121 |
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found