{"id":50524376,"url":"https://github.com/sunflower0305/claude-proxy","last_synced_at":"2026-06-03T07:01:05.600Z","repository":{"id":350799013,"uuid":"1204652464","full_name":"sunflower0305/claude-proxy","owner":"sunflower0305","description":"Claude Code / Claude Agent SDK proxy for DeepSeek, Qwen, GLM, MiniMax and Kimi via Anthropic Messages API","archived":false,"fork":false,"pushed_at":"2026-05-01T09:21:45.000Z","size":198,"stargazers_count":24,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-01T09:26:36.808Z","etag":null,"topics":["anthropic","claude","claude-agent-sdk","claude-code","llm-proxy"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunflower0305.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-08T07:48:23.000Z","updated_at":"2026-05-01T09:21:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sunflower0305/claude-proxy","commit_stats":null,"previous_names":["sunflower0305/claude-agent-proxy","sunflower0305/claude-proxy"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/sunflower0305/claude-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunflower0305%2Fclaude-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunflower0305%2Fclaude-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunflower0305%2Fclaude-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunflower0305%2Fclaude-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunflower0305","download_url":"https://codeload.github.com/sunflower0305/claude-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunflower0305%2Fclaude-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33852295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","claude","claude-agent-sdk","claude-code","llm-proxy"],"created_at":"2026-06-03T07:00:28.975Z","updated_at":"2026-06-03T07:01:05.582Z","avatar_url":"https://github.com/sunflower0305.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# claude-proxy\n\n[![CI](https://github.com/sunflower0305/claude-proxy/actions/workflows/ci.yml/badge.svg)](https://github.com/sunflower0305/claude-proxy/actions/workflows/ci.yml)\n[![CD](https://github.com/sunflower0305/claude-proxy/actions/workflows/cd.yml/badge.svg)](https://github.com/sunflower0305/claude-proxy/actions/workflows/cd.yml)\n[![Coverage Status](https://coveralls.io/repos/github/sunflower0305/claude-proxy/badge.svg?branch=master)](https://coveralls.io/github/sunflower0305/claude-proxy?branch=master)\n[![npm version](https://img.shields.io/npm/v/%40sunflower0305%2Fclaude-proxy)](https://www.npmjs.com/package/@sunflower0305/claude-proxy)\n[![npm downloads](https://img.shields.io/npm/dm/%40sunflower0305%2Fclaude-proxy?cacheSeconds=60)](https://www.npmjs.com/package/@sunflower0305/claude-proxy)\n[![GitHub stars](https://img.shields.io/github/stars/sunflower0305/claude-proxy?cacheSeconds=60)](https://github.com/sunflower0305/claude-proxy/stargazers)\n[![zread](https://img.shields.io/badge/Ask_Zread-_.svg?style=flat\u0026color=00b0aa\u0026labelColor=000000\u0026logoColor=ffffff)](https://zread.ai/sunflower0305/claude-proxy)\n\n`claude-proxy` is published on npm as `@sunflower0305/claude-proxy`. It is a lightweight Express proxy that lets Claude Code or the Claude Agent SDK talk to domestic Chinese LLM providers through Anthropic-compatible `/v1/messages` endpoints.\n\nIt currently supports `qwen`, `deepseek`, `glm`, `minimax`, `kimi`, and `mimo`.\n\n## Install\n\nRequires Node.js 20.12 or newer.\n\nRun without installing:\n\n```bash\nnpx @sunflower0305/claude-proxy\n```\n\nOr install globally:\n\n```bash\nnpm install -g @sunflower0305/claude-proxy\nclaude-proxy\n```\n\n## Configure\n\nThe proxy reads configuration from environment variables. You can export them in your shell or create a `.env` file in the directory where you run `claude-proxy`; `.env` loading uses Node.js built-in `.env` file support.\n\nExample `.env`:\n\n```dotenv\nPROVIDER=deepseek\nPROXY_PORT=8080\n# Optional: require clients to send this token to write endpoints.\n# PROXY_API_KEY=your-local-proxy-token\nDEEPSEEK_API_KEY=your-deepseek-api-key\nDEEPSEEK_MODEL=deepseek-v4-pro\n```\n\nAvailable variables:\n\n| Variable                                                                                                                                                               | Purpose                                                                      |\n| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |\n| `PROVIDER`                                                                                                                                                             | Active provider. Defaults to `deepseek`.                                     |\n| `PROXY_PORT`                                                                                                                                                           | Local server port. Defaults to `8080`.                                       |\n| `PROXY_API_KEY`                                                                                                                                                        | Optional local proxy token for `POST /v1/messages` and `POST /api/provider`. |\n| `QWEN_API_KEY`                                                                                                                                                         | API key for Qwen.                                                            |\n| `DEEPSEEK_API_KEY`                                                                                                                                                     | API key for DeepSeek.                                                        |\n| `GLM_API_KEY`                                                                                                                                                          | API key for GLM.                                                             |\n| `MINIMAX_API_KEY`                                                                                                                                                      | API key for MiniMax.                                                         |\n| `KIMI_API_KEY`                                                                                                                                                         | API key for Kimi.                                                            |\n| `MIMO_API_KEY`                                                                                                                                                         | API key for MIMO.                                                            |\n| `QWEN_ANTHROPIC_BASE_URL`, `DEEPSEEK_ANTHROPIC_BASE_URL`, `GLM_ANTHROPIC_BASE_URL`, `MINIMAX_ANTHROPIC_BASE_URL`, `KIMI_ANTHROPIC_BASE_URL`, `MIMO_ANTHROPIC_BASE_URL` | Override the upstream Anthropic-compatible base URL for a provider.          |\n| `QWEN_MODEL`, `DEEPSEEK_MODEL`, `GLM_MODEL`, `MINIMAX_MODEL`, `KIMI_MODEL`, `MIMO_MODEL`                                                                               | Override the default upstream model for a provider.                          |\n\nProvider defaults:\n\n| Provider                 | Model env        | Default model            |\n| ------------------------ | ---------------- | ------------------------ |\n| **`deepseek` (default)** | `DEEPSEEK_MODEL` | **`deepseek-v4-pro`**    |\n| `qwen`                   | `QWEN_MODEL`     | `qwen3.7-plus`           |\n| `glm`                    | `GLM_MODEL`      | `glm-5.1`                |\n| `minimax`                | `MINIMAX_MODEL`  | `minimax-m3`             |\n| `kimi`                   | `KIMI_MODEL`     | `kimi-k2.6`              |\n| `mimo`                   | `MIMO_MODEL`     | `mimo-v2.5-pro`          |\n\nYou can use the bundled example as a starting point:\n\n```bash\ncp node_modules/@sunflower0305/claude-proxy/.env.example .env\n```\n\nIf you installed globally, create `.env` manually or export the variables in your shell before starting the proxy.\n\n## Start The Proxy\n\n```bash\nclaude-proxy\n```\n\nWhen the server starts, it listens on `http://localhost:8080` by default.\n\nPoint Claude Code or the Claude Agent SDK at the proxy:\n\n```bash\nexport ANTHROPIC_BASE_URL=http://localhost:8080\nexport ANTHROPIC_API_KEY=any-string-works\n```\n\nIf you set `PROXY_API_KEY`, set the client `ANTHROPIC_API_KEY` to the same\nvalue. The proxy accepts it through either `x-api-key` or\n`Authorization: Bearer`. If `PROXY_API_KEY` is not set, the local proxy does not\nvalidate the client API key and any non-empty string can be used.\n\nExample SDK usage:\n\n```ts\nimport Anthropic from \"@anthropic-ai/sdk\";\n\nconst client = new Anthropic({\n  baseURL: \"http://localhost:8080\",\n  apiKey: process.env.PROXY_API_KEY || \"any-string\",\n});\n```\n\n## Runtime Endpoints\n\n| Method         | Path            | Description                                |\n| -------------- | --------------- | ------------------------------------------ |\n| `POST`         | `/v1/messages`  | Main Anthropic Messages API proxy endpoint |\n| `GET`          | `/v1/models`    | Lists supported Claude-facing model ids    |\n| `GET`          | `/health`       | Health check                               |\n| `GET` / `POST` | `/api/provider` | Read or switch the active provider         |\n\nHealth check:\n\n```bash\ncurl http://localhost:8080/health\n```\n\nSwitch provider at runtime:\n\n```bash\ncurl -X POST http://localhost:8080/api/provider \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"provider\":\"qwen\"}'\n```\n\n## Library Usage\n\nThe package also keeps the programmatic Express entrypoint:\n\n```ts\nimport { createApp } from \"@sunflower0305/claude-proxy\";\n\nconst app = createApp();\napp.listen(8080);\n```\n\n## Development\n\nFrom source:\n\n```bash\nnpm install\nnpm run dev\n```\n\n## Changelog\n\nSee [CHANGELOG.md](https://github.com/sunflower0305/claude-proxy/blob/master/CHANGELOG.md) and [GitHub Releases](https://github.com/sunflower0305/claude-proxy/releases) for release notes.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunflower0305%2Fclaude-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunflower0305%2Fclaude-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunflower0305%2Fclaude-proxy/lists"}