better-ccflare 3.2.0 → 3.3.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/README.md +10 -5
- package/dist/better-ccflare +0 -0
- package/package.json +56 -56
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ https://github.com/user-attachments/assets/c859872f-ca5e-4f8b-b6a0-7cc7461fe62a
|
|
|
16
16
|
## Why better-ccflare?
|
|
17
17
|
|
|
18
18
|
- **🚀 Zero Rate Limit Errors** - Automatically distribute requests across multiple accounts
|
|
19
|
-
- **🤖 Multi-Provider Support** - Claude OAuth, Claude API console, Vertex AI, NanoGPT, z.ai, Minimax, Anthropic-compatible, and OpenAI-compatible providers
|
|
19
|
+
- **🤖 Multi-Provider Support** - Claude OAuth, Claude API console, Vertex AI, AWS Bedrock, NanoGPT, z.ai, Minimax, OpenRouter, Kilo, Anthropic-compatible, and OpenAI-compatible providers
|
|
20
20
|
- **🔒 OAuth Token Health** - Real-time monitoring of OAuth token status with automatic refresh and health indicators
|
|
21
21
|
- **🔗 Custom API Endpoints** - Configure custom endpoints for Anthropic accounts for enterprise deployments
|
|
22
22
|
- **☁️ OpenAI-Compatible Support** - Use OpenAI-compatible providers like OpenRouter, Together AI, and more with Claude API format
|
|
@@ -36,7 +36,7 @@ This project builds upon the excellent foundation of [snipeship/ccflare](https:/
|
|
|
36
36
|
**🎯 Core Improvements (v3.0.0):**
|
|
37
37
|
- **Enhanced Security** - Critical fixes for authentication bypass, command injection, and PKCE implementation
|
|
38
38
|
- **OAuth Token Health Monitoring** - Real-time status indicators and automatic token refresh with 30-minute buffer
|
|
39
|
-
- **Extended Provider Support** - NanoGPT (with dynamic pricing), Minimax, Anthropic-compatible, and OpenAI-compatible providers
|
|
39
|
+
- **Extended Provider Support** - AWS Bedrock, NanoGPT (with dynamic pricing), Minimax, OpenRouter, Kilo, Anthropic-compatible, and OpenAI-compatible providers
|
|
40
40
|
- **Simplified Load Balancing** - Removed tier system for O(1) priority-based selection
|
|
41
41
|
- **Real-time Analytics Dashboard** - Beautiful web UI with fixed request history (no disappearing requests)
|
|
42
42
|
- **Package Distribution** - Available via npm and bun for easy installation
|
|
@@ -46,7 +46,7 @@ This project builds upon the excellent foundation of [snipeship/ccflare](https:/
|
|
|
46
46
|
- **REST API** - Complete API for automation and integration
|
|
47
47
|
- **Cross-Platform Binary** - Pre-compiled binary works with Node.js or Bun
|
|
48
48
|
- **Comprehensive Logging** - Request/response tracking with searchable history
|
|
49
|
-
- **Database Integration** - SQLite for persistent storage and analytics
|
|
49
|
+
- **Database Integration** - SQLite (default) or PostgreSQL for persistent storage and analytics, supporting Kubernetes multi-pod deployments
|
|
50
50
|
|
|
51
51
|
**📦 Distribution & Updates:**
|
|
52
52
|
- **npm/bun Registry** - Install with `npm install -g better-ccflare` or `bun install -g better-ccflare`
|
|
@@ -59,6 +59,7 @@ This project builds upon the excellent foundation of [snipeship/ccflare](https:/
|
|
|
59
59
|
- **Performance Optimized** - <10ms overhead with request deduplication and caching
|
|
60
60
|
- **Reliability** - Automatic error recovery, circuit breakers, and health monitoring
|
|
61
61
|
- **Scalability** - Built for high-throughput production environments
|
|
62
|
+
- **PostgreSQL Support** - Set `DATABASE_URL=postgresql://...` to use PostgreSQL for Kubernetes multi-pod deployments where SQLite file-sharing is not feasible
|
|
62
63
|
|
|
63
64
|
## Quick Start
|
|
64
65
|
|
|
@@ -639,10 +640,14 @@ We recommend using one of the workarounds above until the npm bug is fixed.
|
|
|
639
640
|
### ☁️ Multi-Provider Support
|
|
640
641
|
- **Claude OAuth** - Anthropic OAuth accounts with 5-hour usage windows and session tracking (rate limit window based)
|
|
641
642
|
- **Claude Console API** - Anthropic API key accounts with pay-as-you-go model (no session tracking)
|
|
643
|
+
- **AWS Bedrock** - Native AWS Bedrock integration with SigV4 authentication, inference profile support (geographic/global/regional), and automatic credential chain resolution via AWS CLI profiles
|
|
644
|
+
- **Vertex AI** - Google Cloud Vertex AI integration with service account authentication
|
|
642
645
|
- **z.ai, Minimax** - API key based providers with pay-as-you-go model
|
|
646
|
+
- **OpenRouter** - OpenRouter integration with native API support and model mapping
|
|
647
|
+
- **Kilo** - Kilo API integration with usage tracking
|
|
643
648
|
- **Anthropic-Compatible** - Custom Anthropic-compatible providers with pay-as-you-go model
|
|
644
|
-
- **OpenAI-Compatible** - OpenAI-compatible providers (
|
|
645
|
-
- **Universal API Format** - Use OpenAI-compatible providers
|
|
649
|
+
- **OpenAI-Compatible** - OpenAI-compatible providers (Together AI, etc.) with Claude API format
|
|
650
|
+
- **Universal API Format** - Use OpenAI-compatible providers with Claude API format
|
|
646
651
|
- **Automatic Format Conversion** - Seamless conversion between Anthropic and OpenAI request/response formats
|
|
647
652
|
- **Model Mapping** - Map Claude models (Opus, Sonnet, Haiku) to equivalent OpenAI models
|
|
648
653
|
- **Streaming Support** - Full support for streaming responses from OpenAI-compatible providers
|
package/dist/better-ccflare
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
2
|
+
"name": "better-ccflare",
|
|
3
|
+
"version": "3.3.0",
|
|
4
|
+
"description": "Load balancer proxy for Claude API with intelligent distribution across multiple OAuth accounts to avoid rate limiting",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/tombii/better-ccflare.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/tombii/better-ccflare#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/tombii/better-ccflare/issues"
|
|
13
|
+
},
|
|
14
|
+
"bin": {
|
|
15
|
+
"better-ccflare": "dist/better-ccflare"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"dev": "bun run src/main.ts",
|
|
20
|
+
"build": "mkdir -p dist && bun -e \"const fs=require('fs'); if (!fs.existsSync('../../packages/proxy/src/embedded-tiktoken-wasm.ts')) { const wasm=fs.readFileSync('../../node_modules/@dqbd/tiktoken/lite/tiktoken_bg.wasm'); const wasmEncoded=wasm.toString('base64'); fs.writeFileSync('../../packages/proxy/src/embedded-tiktoken-wasm.ts', 'export const EMBEDDED_TIKTOKEN_WASM = \\\"' + wasmEncoded + '\\\";'); }\" && bun build ../../packages/proxy/src/post-processor.worker.ts --outfile dist/post-processor.worker.js --target=bun --minify && bun -e \"const fs=require('fs'); const code=fs.readFileSync('dist/post-processor.worker.js','utf8'); const encoded=Buffer.from(code).toString('base64'); fs.writeFileSync('../../packages/proxy/src/inline-worker.ts', 'export const EMBEDDED_WORKER_CODE = \\\"' + encoded + '\\\";');\" && rm -f dist/better-ccflare && bun build src/main.ts --compile --outfile dist/better-ccflare --target=bun --minify --define __BETTER_CCFLARE_VERSION__='\\\"'$(node -p \"require('./package.json').version\")'\\\"' && rm -f dist/post-processor.worker.js",
|
|
21
|
+
"build:multi": "bun run build-multi-arch.ts",
|
|
22
|
+
"build:linux-amd64": "bun run build && bun build src/main.ts --compile --outfile dist/better-ccflare-linux-amd64 --target=bun-linux-amd64 --minify",
|
|
23
|
+
"build:linux-arm64": "bun run build && bun build src/main.ts --compile --outfile dist/better-ccflare-linux-arm64 --target=bun-linux-arm64 --minify",
|
|
24
|
+
"build:macos-x86_64": "bun run build && bun build src/main.ts --compile --outfile dist/better-ccflare-macos-x86_64 --target=bun-darwin-x64 --minify",
|
|
25
|
+
"build:macos-arm64": "bun run build && bun build src/main.ts --compile --outfile dist/better-ccflare-macos-arm64 --target=bun-darwin-arm64 --minify",
|
|
26
|
+
"build:windows-x64": "bun run build && bun build src/main.ts --compile --outfile dist/better-ccflare-windows-x64.exe --target=bun-windows-x64 --minify",
|
|
27
|
+
"prepublishOnly": "cp ../../README.md . && bun run --cwd ../.. build:dashboard && bun run build && jq 'del(.dependencies[\"@better-ccflare/cli-commands\", \"@better-ccflare/config\", \"@better-ccflare/core\", \"@better-ccflare/core-di\", \"@better-ccflare/database\", \"@better-ccflare/logger\", \"@better-ccflare/server\"])' package.json > package.json.tmp && mv package.json.tmp package.json",
|
|
28
|
+
"postpublish": "chmod +x dist/better-ccflare"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=18.0.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^20.0.0"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"dotenv": "^17.2.3"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist/better-ccflare",
|
|
41
|
+
"README.md"
|
|
42
|
+
],
|
|
43
|
+
"keywords": [
|
|
44
|
+
"claude",
|
|
45
|
+
"anthropic",
|
|
46
|
+
"api",
|
|
47
|
+
"proxy",
|
|
48
|
+
"load-balancer",
|
|
49
|
+
"rate-limiting",
|
|
50
|
+
"oauth",
|
|
51
|
+
"cli",
|
|
52
|
+
"analytics",
|
|
53
|
+
"monitoring"
|
|
54
|
+
],
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public"
|
|
57
|
+
}
|
|
58
58
|
}
|