@sunflower0305/claude-proxy 1.1.2 → 1.2.0
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/CHANGELOG.md +114 -0
- package/README.md +8 -2
- package/dist/proxy.d.ts +0 -1
- package/dist/proxy.js +4 -4
- package/package.json +4 -6
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [1.2.0] - 2026-05-01
|
|
6
|
+
|
|
7
|
+
Minor release of `@sunflower0305/claude-proxy`.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- `.env` loading now uses Node.js built-in `.env` file support instead of the external `dotenv` package
|
|
12
|
+
- minimum supported Node.js version is now 20.12
|
|
13
|
+
- CORS is no longer enabled by default
|
|
14
|
+
|
|
15
|
+
### Removed
|
|
16
|
+
|
|
17
|
+
- removed runtime dependency on `dotenv`
|
|
18
|
+
- removed unused `cors` and `@types/cors` dependencies
|
|
19
|
+
|
|
20
|
+
Detailed release notes: [docs/releases/1.2.0.md](docs/releases/1.2.0.md)
|
|
21
|
+
|
|
22
|
+
## [1.1.3] - 2026-04-24
|
|
23
|
+
|
|
24
|
+
Patch release of `@sunflower0305/claude-proxy`.
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- README Changelog section linking to release notes from the npm package page
|
|
29
|
+
- `CHANGELOG.md` is now included in the published npm package
|
|
30
|
+
|
|
31
|
+
Detailed release notes: [docs/releases/1.1.3.md](docs/releases/1.1.3.md)
|
|
32
|
+
|
|
33
|
+
## [1.1.2] - 2026-04-24
|
|
34
|
+
|
|
35
|
+
Patch release of `@sunflower0305/claude-proxy`.
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- README provider defaults table covering all supported providers and their default models
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- default provider changed from `qwen` to `deepseek`
|
|
44
|
+
- default DeepSeek model changed from `deepseek-chat` to `deepseek-v4-pro`
|
|
45
|
+
- README now focuses on installation, configuration, runtime usage, and development setup
|
|
46
|
+
|
|
47
|
+
Detailed release notes: [docs/releases/1.1.2.md](docs/releases/1.1.2.md)
|
|
48
|
+
|
|
49
|
+
## [1.1.1] - 2026-04-21
|
|
50
|
+
|
|
51
|
+
Patch release of `@sunflower0305/claude-proxy`.
|
|
52
|
+
|
|
53
|
+
### Added
|
|
54
|
+
|
|
55
|
+
- GitHub Actions CD workflow for tag-driven npm publishing and GitHub Release creation
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
|
|
59
|
+
- release documentation and README publishing guidance now reflect the new CD workflow
|
|
60
|
+
|
|
61
|
+
### Fixed
|
|
62
|
+
|
|
63
|
+
- Claude-facing model mappings now expose `claude-opus-4-7` instead of `claude-opus-4-6`
|
|
64
|
+
- local integration tests now validate the updated Claude model identifier
|
|
65
|
+
|
|
66
|
+
Detailed release notes: [docs/releases/1.1.1.md](/Users/joe/ai/claude-proxy/docs/releases/1.1.1.md)
|
|
67
|
+
|
|
68
|
+
## [1.1.0] - 2026-04-21
|
|
69
|
+
|
|
70
|
+
Second public npm release of `@sunflower0305/claude-proxy`.
|
|
71
|
+
|
|
72
|
+
### Added
|
|
73
|
+
|
|
74
|
+
- GitHub Actions CI workflow for build, local integration tests, and coverage reporting
|
|
75
|
+
- broader local integration coverage for `qwen`, `glm`, and `minimax`
|
|
76
|
+
|
|
77
|
+
### Changed
|
|
78
|
+
|
|
79
|
+
- proxy runtime state is now isolated per `createApp()` instance to support multiple app instances safely
|
|
80
|
+
- model and provider inference logic was refactored to better handle dynamic provider identification
|
|
81
|
+
- startup banner formatting and release documentation were polished
|
|
82
|
+
- Kimi documentation and default model references were updated to `kimi-k2.6`
|
|
83
|
+
|
|
84
|
+
### Fixed
|
|
85
|
+
|
|
86
|
+
- test cleanup now avoids duplicate resource shutdowns
|
|
87
|
+
- redundant proxy console logging was removed to reduce noise and overhead
|
|
88
|
+
|
|
89
|
+
Detailed release notes: [docs/releases/1.1.0.md](/Users/joe/ai/claude-proxy/docs/releases/1.1.0.md)
|
|
90
|
+
|
|
91
|
+
## [1.0.0] - 2026-04-15
|
|
92
|
+
|
|
93
|
+
First public npm release of `@sunflower0305/claude-proxy`.
|
|
94
|
+
|
|
95
|
+
### Added
|
|
96
|
+
|
|
97
|
+
- public scoped npm package: `@sunflower0305/claude-proxy`
|
|
98
|
+
- executable `claude-proxy` CLI entrypoint
|
|
99
|
+
- programmatic `createApp()` export for Express-based usage
|
|
100
|
+
- packaged TypeScript declarations in `dist/`
|
|
101
|
+
- bundled publish assets: `README.md`, `LICENSE`, and `.env.example`
|
|
102
|
+
- Anthropic-compatible proxy support for `qwen`, `deepseek`, `glm`, `minimax`, and `kimi`
|
|
103
|
+
- support for both non-streaming JSON and streaming SSE proxy responses
|
|
104
|
+
- runtime provider switching via `GET/POST /api/provider`
|
|
105
|
+
|
|
106
|
+
### Verified
|
|
107
|
+
|
|
108
|
+
- npm installation from the published registry artifact
|
|
109
|
+
- installed CLI startup from the published package
|
|
110
|
+
- `GET /health` and `GET /v1/models`
|
|
111
|
+
- end-to-end non-streaming and streaming proxying against a local mock upstream
|
|
112
|
+
- end-to-end non-streaming and streaming proxying against the real Qwen upstream
|
|
113
|
+
|
|
114
|
+
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,7 +4,7 @@
|
|
|
4
4
|
[](https://github.com/sunflower0305/claude-proxy/actions/workflows/cd.yml)
|
|
5
5
|
[](https://coveralls.io/github/sunflower0305/claude-proxy?branch=master)
|
|
6
6
|
[](https://www.npmjs.com/package/@sunflower0305/claude-proxy)
|
|
7
|
-
[](https://www.npmjs.com/package/@sunflower0305/claude-proxy)
|
|
8
8
|
[](https://github.com/sunflower0305/claude-proxy/stargazers)
|
|
9
9
|
[](https://github.com/sunflower0305/claude-proxy/blob/master/LICENSE)
|
|
10
10
|
|
|
@@ -14,6 +14,8 @@ It currently supports `qwen`, `deepseek`, `glm`, `minimax`, and `kimi`.
|
|
|
14
14
|
|
|
15
15
|
## Install
|
|
16
16
|
|
|
17
|
+
Requires Node.js 20.12 or newer.
|
|
18
|
+
|
|
17
19
|
Run without installing:
|
|
18
20
|
|
|
19
21
|
```bash
|
|
@@ -29,7 +31,7 @@ claude-proxy
|
|
|
29
31
|
|
|
30
32
|
## Configure
|
|
31
33
|
|
|
32
|
-
The 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`.
|
|
34
|
+
The 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.
|
|
33
35
|
|
|
34
36
|
Example `.env`:
|
|
35
37
|
|
|
@@ -141,6 +143,10 @@ npm install
|
|
|
141
143
|
npm run dev
|
|
142
144
|
```
|
|
143
145
|
|
|
146
|
+
## Changelog
|
|
147
|
+
|
|
148
|
+
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.
|
|
149
|
+
|
|
144
150
|
## License
|
|
145
151
|
|
|
146
152
|
MIT
|
package/dist/proxy.d.ts
CHANGED
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
* export ANTHROPIC_BASE_URL=http://localhost:8080
|
|
10
10
|
* export ANTHROPIC_API_KEY=any-key-works
|
|
11
11
|
*/
|
|
12
|
-
import "dotenv/config";
|
|
13
12
|
import express from "express";
|
|
14
13
|
export declare function createApp(): express.Express;
|
|
15
14
|
export declare const app: express.Express;
|
package/dist/proxy.js
CHANGED
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
* export ANTHROPIC_BASE_URL=http://localhost:8080
|
|
10
10
|
* export ANTHROPIC_API_KEY=any-key-works
|
|
11
11
|
*/
|
|
12
|
-
import "dotenv/config";
|
|
13
|
-
import cors from "cors";
|
|
14
12
|
import express from "express";
|
|
15
|
-
import { realpathSync } from "node:fs";
|
|
13
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
14
|
+
import { loadEnvFile } from "node:process";
|
|
16
15
|
import { Readable } from "node:stream";
|
|
17
16
|
import { fileURLToPath } from "node:url";
|
|
17
|
+
if (existsSync(".env"))
|
|
18
|
+
loadEnvFile(".env");
|
|
18
19
|
const DEFAULT_ANTHROPIC_VERSION = "2023-06-01";
|
|
19
20
|
const HOP_BY_HOP_RESPONSE_HEADERS = new Set([
|
|
20
21
|
"connection",
|
|
@@ -307,7 +308,6 @@ export function createApp() {
|
|
|
307
308
|
}
|
|
308
309
|
}
|
|
309
310
|
const app = express();
|
|
310
|
-
app.use(cors());
|
|
311
311
|
app.use(express.json({ limit: "50mb" }));
|
|
312
312
|
app.get("/", (_req, res) => {
|
|
313
313
|
const config = getConfig();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sunflower0305/claude-proxy",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
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,11 +18,12 @@
|
|
|
18
18
|
"files": [
|
|
19
19
|
"dist/",
|
|
20
20
|
"README.md",
|
|
21
|
+
"CHANGELOG.md",
|
|
21
22
|
"LICENSE",
|
|
22
23
|
".env.example"
|
|
23
24
|
],
|
|
24
25
|
"engines": {
|
|
25
|
-
"node": ">=
|
|
26
|
+
"node": ">=20.12"
|
|
26
27
|
},
|
|
27
28
|
"publishConfig": {
|
|
28
29
|
"access": "public"
|
|
@@ -54,20 +55,17 @@
|
|
|
54
55
|
"prepack": "npm run build",
|
|
55
56
|
"prepublishOnly": "npm run test:proxy-local",
|
|
56
57
|
"test": "vitest run",
|
|
57
|
-
"test:coverage": "vitest run tests/integration/proxy-local.test.ts --coverage --coverage.reporter=lcov --coverage.reporter=text --pool
|
|
58
|
+
"test:coverage": "vitest run tests/integration/proxy-local.test.ts --coverage --coverage.reporter=lcov --coverage.reporter=text --pool forks",
|
|
58
59
|
"test:proxy-local": "vitest run tests/integration/proxy-local.test.ts",
|
|
59
60
|
"test:provider-anthropic": "node --experimental-strip-types tests/integration/provider-anthropic.ts",
|
|
60
61
|
"test:provider-cli-e2e": "node --experimental-strip-types tests/integration/provider-cli-e2e.ts",
|
|
61
62
|
"report:provider-cli-e2e": "node --experimental-strip-types tests/integration/report-provider-cli-e2e.ts"
|
|
62
63
|
},
|
|
63
64
|
"dependencies": {
|
|
64
|
-
"cors": "^2.8.5",
|
|
65
|
-
"dotenv": "^16.4.5",
|
|
66
65
|
"express": "^4.21.0"
|
|
67
66
|
},
|
|
68
67
|
"devDependencies": {
|
|
69
68
|
"@vitest/coverage-v8": "^3.2.4",
|
|
70
|
-
"@types/cors": "^2.8.17",
|
|
71
69
|
"@types/express": "^4.17.21",
|
|
72
70
|
"@types/node": "^22.0.0",
|
|
73
71
|
"tsx": "^4.19.0",
|