@sunflower0305/claude-proxy 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env.example CHANGED
@@ -1,5 +1,5 @@
1
1
  # Choose your provider: qwen | deepseek | glm | minimax | kimi
2
- PROVIDER=qwen
2
+ PROVIDER=deepseek
3
3
 
4
4
  # Proxy server port (default: 8080)
5
5
  PROXY_PORT=8080
@@ -13,7 +13,7 @@ KIMI_API_KEY=your-kimi-key
13
13
 
14
14
  # Optional model overrides
15
15
  QWEN_MODEL=qwen-plus
16
- DEEPSEEK_MODEL=deepseek-chat
16
+ DEEPSEEK_MODEL=deepseek-v4-pro
17
17
  GLM_MODEL=glm-5.1
18
18
  MINIMAX_MODEL=MiniMax-M2.7-highspeed
19
19
  KIMI_MODEL=kimi-k2.6
package/CHANGELOG.md ADDED
@@ -0,0 +1,97 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [1.1.3] - 2026-04-24
6
+
7
+ Patch release of `@sunflower0305/claude-proxy`.
8
+
9
+ ### Added
10
+
11
+ - README Changelog section linking to release notes from the npm package page
12
+ - `CHANGELOG.md` is now included in the published npm package
13
+
14
+ Detailed release notes: [docs/releases/1.1.3.md](docs/releases/1.1.3.md)
15
+
16
+ ## [1.1.2] - 2026-04-24
17
+
18
+ Patch release of `@sunflower0305/claude-proxy`.
19
+
20
+ ### Added
21
+
22
+ - README provider defaults table covering all supported providers and their default models
23
+
24
+ ### Changed
25
+
26
+ - default provider changed from `qwen` to `deepseek`
27
+ - default DeepSeek model changed from `deepseek-chat` to `deepseek-v4-pro`
28
+ - README now focuses on installation, configuration, runtime usage, and development setup
29
+
30
+ Detailed release notes: [docs/releases/1.1.2.md](docs/releases/1.1.2.md)
31
+
32
+ ## [1.1.1] - 2026-04-21
33
+
34
+ Patch release of `@sunflower0305/claude-proxy`.
35
+
36
+ ### Added
37
+
38
+ - GitHub Actions CD workflow for tag-driven npm publishing and GitHub Release creation
39
+
40
+ ### Changed
41
+
42
+ - release documentation and README publishing guidance now reflect the new CD workflow
43
+
44
+ ### Fixed
45
+
46
+ - Claude-facing model mappings now expose `claude-opus-4-7` instead of `claude-opus-4-6`
47
+ - local integration tests now validate the updated Claude model identifier
48
+
49
+ Detailed release notes: [docs/releases/1.1.1.md](/Users/joe/ai/claude-proxy/docs/releases/1.1.1.md)
50
+
51
+ ## [1.1.0] - 2026-04-21
52
+
53
+ Second public npm release of `@sunflower0305/claude-proxy`.
54
+
55
+ ### Added
56
+
57
+ - GitHub Actions CI workflow for build, local integration tests, and coverage reporting
58
+ - broader local integration coverage for `qwen`, `glm`, and `minimax`
59
+
60
+ ### Changed
61
+
62
+ - proxy runtime state is now isolated per `createApp()` instance to support multiple app instances safely
63
+ - model and provider inference logic was refactored to better handle dynamic provider identification
64
+ - startup banner formatting and release documentation were polished
65
+ - Kimi documentation and default model references were updated to `kimi-k2.6`
66
+
67
+ ### Fixed
68
+
69
+ - test cleanup now avoids duplicate resource shutdowns
70
+ - redundant proxy console logging was removed to reduce noise and overhead
71
+
72
+ Detailed release notes: [docs/releases/1.1.0.md](/Users/joe/ai/claude-proxy/docs/releases/1.1.0.md)
73
+
74
+ ## [1.0.0] - 2026-04-15
75
+
76
+ First public npm release of `@sunflower0305/claude-proxy`.
77
+
78
+ ### Added
79
+
80
+ - public scoped npm package: `@sunflower0305/claude-proxy`
81
+ - executable `claude-proxy` CLI entrypoint
82
+ - programmatic `createApp()` export for Express-based usage
83
+ - packaged TypeScript declarations in `dist/`
84
+ - bundled publish assets: `README.md`, `LICENSE`, and `.env.example`
85
+ - Anthropic-compatible proxy support for `qwen`, `deepseek`, `glm`, `minimax`, and `kimi`
86
+ - support for both non-streaming JSON and streaming SSE proxy responses
87
+ - runtime provider switching via `GET/POST /api/provider`
88
+
89
+ ### Verified
90
+
91
+ - npm installation from the published registry artifact
92
+ - installed CLI startup from the published package
93
+ - `GET /health` and `GET /v1/models`
94
+ - end-to-end non-streaming and streaming proxying against a local mock upstream
95
+ - end-to-end non-streaming and streaming proxying against the real Qwen upstream
96
+
97
+ Detailed release notes: [docs/releases/1.0.0.md](/Users/joe/ai/claude-proxy/docs/releases/1.0.0.md)
package/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
  [![CD](https://github.com/sunflower0305/claude-proxy/actions/workflows/cd.yml/badge.svg)](https://github.com/sunflower0305/claude-proxy/actions/workflows/cd.yml)
5
5
  [![Coverage Status](https://coveralls.io/repos/github/sunflower0305/claude-proxy/badge.svg?branch=master)](https://coveralls.io/github/sunflower0305/claude-proxy?branch=master)
6
6
  [![npm version](https://img.shields.io/npm/v/%40sunflower0305%2Fclaude-proxy)](https://www.npmjs.com/package/@sunflower0305/claude-proxy)
7
+ [![npm downloads](https://img.shields.io/npm/dm/%40sunflower0305%2Fclaude-proxy)](https://www.npmjs.com/package/@sunflower0305/claude-proxy)
8
+ [![GitHub stars](https://img.shields.io/github/stars/sunflower0305/claude-proxy?cacheSeconds=60)](https://github.com/sunflower0305/claude-proxy/stargazers)
7
9
  [![License](https://img.shields.io/github/license/sunflower0305/claude-proxy)](https://github.com/sunflower0305/claude-proxy/blob/master/LICENSE)
8
10
 
9
11
  `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.
@@ -32,17 +34,17 @@ The proxy reads configuration from environment variables. You can export them in
32
34
  Example `.env`:
33
35
 
34
36
  ```dotenv
35
- PROVIDER=qwen
37
+ PROVIDER=deepseek
36
38
  PROXY_PORT=8080
37
- QWEN_API_KEY=your-qwen-api-key
38
- QWEN_MODEL=qwen-plus
39
+ DEEPSEEK_API_KEY=your-deepseek-api-key
40
+ DEEPSEEK_MODEL=deepseek-v4-pro
39
41
  ```
40
42
 
41
43
  Available variables:
42
44
 
43
45
  | Variable | Purpose |
44
46
  | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
45
- | `PROVIDER` | Active provider. Defaults to `qwen`. |
47
+ | `PROVIDER` | Active provider. Defaults to `deepseek`. |
46
48
  | `PROXY_PORT` | Local server port. Defaults to `8080`. |
47
49
  | `QWEN_API_KEY` | API key for Qwen. |
48
50
  | `DEEPSEEK_API_KEY` | API key for DeepSeek. |
@@ -52,6 +54,16 @@ Available variables:
52
54
  | `QWEN_ANTHROPIC_BASE_URL`, `DEEPSEEK_ANTHROPIC_BASE_URL`, `GLM_ANTHROPIC_BASE_URL`, `MINIMAX_ANTHROPIC_BASE_URL`, `KIMI_ANTHROPIC_BASE_URL` | Override the upstream Anthropic-compatible base URL for a provider. |
53
55
  | `QWEN_MODEL`, `DEEPSEEK_MODEL`, `GLM_MODEL`, `MINIMAX_MODEL`, `KIMI_MODEL` | Override the default upstream model for a provider. |
54
56
 
57
+ Provider defaults:
58
+
59
+ | Provider | Model env | Default model |
60
+ | --- | --- | --- |
61
+ | **`deepseek` (default)** | `DEEPSEEK_MODEL` | **`deepseek-v4-pro`** |
62
+ | `qwen` | `QWEN_MODEL` | `qwen-plus` |
63
+ | `glm` | `GLM_MODEL` | `glm-5.1` |
64
+ | `minimax` | `MINIMAX_MODEL` | `MiniMax-M2.7-highspeed` |
65
+ | `kimi` | `KIMI_MODEL` | `kimi-k2.6` |
66
+
55
67
  You can use the bundled example as a starting point:
56
68
 
57
69
  ```bash
@@ -106,7 +118,7 @@ Switch provider at runtime:
106
118
  ```bash
107
119
  curl -X POST http://localhost:8080/api/provider \
108
120
  -H "Content-Type: application/json" \
109
- -d '{"provider":"deepseek"}'
121
+ -d '{"provider":"qwen"}'
110
122
  ```
111
123
 
112
124
  ## Library Usage
@@ -120,25 +132,6 @@ const app = createApp();
120
132
  app.listen(8080);
121
133
  ```
122
134
 
123
- ## Release Verification
124
-
125
- `v1.1.0` was verified on April 21, 2026 after publishing `@sunflower0305/claude-proxy` to npm.
126
-
127
- Verified items:
128
-
129
- - `npm view @sunflower0305/claude-proxy version dist-tags --json` confirmed `version: 1.1.0` and `latest: 1.1.0`
130
- - `npm install @sunflower0305/claude-proxy` completed successfully in a clean temporary directory
131
- - the published `claude-proxy` CLI started correctly from the installed package
132
- - `GET /health` and `GET /v1/models` returned `200 OK`
133
- - local end-to-end proxying against a mock Anthropic-compatible upstream passed for both non-streaming and streaming `POST /v1/messages`
134
-
135
- Observed behavior during verification:
136
-
137
- - smoke-test startup succeeded with `PROVIDER=qwen`
138
- - the published artifact returned the expected `health` payload with `provider: qwen` and `model: qwen-plus`
139
- - the published artifact returned the expected Claude-facing model list from `GET /v1/models`
140
- - the published package included the expected CLI entrypoint, `dist/` build output, `README.md`, `LICENSE`, and `.env.example`
141
-
142
135
  ## Development
143
136
 
144
137
  From source:
@@ -148,49 +141,9 @@ npm install
148
141
  npm run dev
149
142
  ```
150
143
 
151
- ## CI And Releases
152
-
153
- GitHub Actions provides separate CI and CD workflows:
154
-
155
- - `CI` runs on branch pushes and pull requests
156
- - `CD` runs when you push a `vX.Y.Z` tag and can also be re-run manually with `workflow_dispatch`
157
-
158
- The `CD` workflow:
159
-
160
- - checks that the tag exactly matches `package.json.version`
161
- - requires `docs/releases/<version>.md` to exist before publishing
162
- - runs `npm run build`, `npm run test:proxy-local`, `npm run test:coverage`, and `npm pack --dry-run`
163
- - fails fast if the npm version already exists
164
- - publishes the package to npm using the `NPM_TOKEN` repository secret
165
- - creates or updates the GitHub Release from `docs/releases/<version>.md`
166
-
167
- Required repository secret:
168
-
169
- - `NPM_TOKEN`: npm automation token with permission to publish `@sunflower0305/claude-proxy`
170
-
171
- Release flow:
172
-
173
- 1. bump `package.json`, `CHANGELOG.md`, and `docs/releases/<version>.md`
174
- 2. commit the release prep
175
- 3. create and push the matching `vX.Y.Z` tag
176
- 4. let the `CD` workflow publish npm and GitHub Release
177
-
178
- The package still relies on `prepack` and `prepublishOnly` in `package.json` to build and verify the artifact before release.
179
-
180
- Build and local package verification:
181
-
182
- ```bash
183
- npm run build
184
- env npm_config_cache=/tmp/claude-proxy-npm-cache npm pack --dry-run
185
- ```
186
-
187
- Local integration test:
188
-
189
- ```bash
190
- npm run test:proxy-local
191
- ```
144
+ ## Changelog
192
145
 
193
- Release notes for `v1.1.0` are available in [docs/releases/1.1.0.md](docs/releases/1.1.0.md).
146
+ See [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.
194
147
 
195
148
  ## License
196
149
 
package/dist/proxy.js CHANGED
@@ -41,7 +41,7 @@ const PROVIDERS = {
41
41
  baseUrl: pickEnv("DEEPSEEK_ANTHROPIC_BASE_URL") ||
42
42
  "https://api.deepseek.com/anthropic",
43
43
  apiKey: process.env.DEEPSEEK_API_KEY || "",
44
- model: pickEnv("DEEPSEEK_MODEL") || "deepseek-chat",
44
+ model: pickEnv("DEEPSEEK_MODEL") || "deepseek-v4-pro",
45
45
  },
46
46
  qwen: {
47
47
  baseUrl: pickEnv("QWEN_ANTHROPIC_BASE_URL") ||
@@ -71,10 +71,10 @@ function isProviderKey(value) {
71
71
  return Boolean(value && value in PROVIDERS);
72
72
  }
73
73
  function getInitialProvider() {
74
- return isProviderKey(process.env.PROVIDER) ? process.env.PROVIDER : "qwen";
74
+ return isProviderKey(process.env.PROVIDER) ? process.env.PROVIDER : "deepseek";
75
75
  }
76
76
  function getProviderConfig(provider) {
77
- return PROVIDERS[provider] || PROVIDERS.qwen;
77
+ return PROVIDERS[provider] || PROVIDERS.deepseek;
78
78
  }
79
79
  function getHeaderValue(value) {
80
80
  if (Array.isArray(value))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunflower0305/claude-proxy",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "type": "module",
5
5
  "description": "A proxy that lets Claude Agent SDK use domestic Chinese LLMs (DeepSeek, Qwen, GLM, MiniMax) as backend",
6
6
  "license": "MIT",
@@ -18,6 +18,7 @@
18
18
  "files": [
19
19
  "dist/",
20
20
  "README.md",
21
+ "CHANGELOG.md",
21
22
  "LICENSE",
22
23
  ".env.example"
23
24
  ],