better-ccflare 1.1.30 → 1.2.2
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 +13 -0
- package/dist/better-ccflare +0 -0
- package/package.json +55 -55
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ https://github.com/user-attachments/assets/c859872f-ca5e-4f8b-b6a0-7cc7461fe62a
|
|
|
15
15
|
- **🚀 Zero Rate Limit Errors** - Automatically distribute requests across multiple accounts
|
|
16
16
|
- **🤖 Supports z.ai coder plan** - Setup Claude and z.ai coder accounts and prioritize in which order they are used
|
|
17
17
|
- **🔗 Custom API Endpoints** - Configure custom endpoints for Anthropic and Zai accounts for enterprise deployments
|
|
18
|
+
- **☁️ OpenAI-Compatible Support** - Use OpenAI-compatible providers like OpenRouter, Together AI, and more with Claude API format
|
|
18
19
|
- **🔄 Smart Auto-Fallback** - Automatically switch back to preferred accounts when their rate limits reset
|
|
19
20
|
- **⚡ Auto-Refresh** - Automatically start new usage windows when rate limits reset
|
|
20
21
|
- **📊 Request-Level Analytics** - Track latency, token usage, and costs in real-time with optimized batch processing
|
|
@@ -104,6 +105,9 @@ export ANTHROPIC_BASE_URL=http://localhost:8080
|
|
|
104
105
|
better-ccflare --add-account primary --mode max --tier 20 --priority 0
|
|
105
106
|
better-ccflare --add-account secondary --mode max --tier 20 --priority 10
|
|
106
107
|
|
|
108
|
+
# Add OpenAI-compatible provider (like OpenRouter)
|
|
109
|
+
better-ccflare --add-account openrouter --mode openai-compatible --priority 5
|
|
110
|
+
|
|
107
111
|
# Enable auto-fallback on your primary account (via API)
|
|
108
112
|
curl -X POST http://localhost:8080/api/accounts/$(curl -s http://localhost:8080/api/accounts | jq -r '.[0].id')/auto-fallback \
|
|
109
113
|
-H "Content-Type: application/json" \
|
|
@@ -144,6 +148,14 @@ curl -X POST http://localhost:8080/api/accounts/$(curl -s http://localhost:8080/
|
|
|
144
148
|
- Custom endpoint support for enterprise deployments
|
|
145
149
|
- Enhanced performance with request batching and caching
|
|
146
150
|
|
|
151
|
+
### ☁️ OpenAI-Compatible Support
|
|
152
|
+
- **Universal API Format** - Use OpenAI-compatible providers (OpenRouter, Together AI, etc.) with Claude API format
|
|
153
|
+
- **Automatic Format Conversion** - Seamless conversion between Anthropic and OpenAI request/response formats
|
|
154
|
+
- **Model Mapping** - Map Claude models (opus, sonnet, haiku) to equivalent OpenAI models
|
|
155
|
+
- **Streaming Support** - Full support for streaming responses from OpenAI-compatible providers
|
|
156
|
+
- **API Key Authentication** - Secure API key management for OpenAI-compatible providers
|
|
157
|
+
- **Cost Tracking** - Automatic cost calculation for usage monitoring and budgeting
|
|
158
|
+
|
|
147
159
|
## Documentation
|
|
148
160
|
|
|
149
161
|
Full documentation available in [`docs/`](docs/):
|
|
@@ -154,6 +166,7 @@ Full documentation available in [`docs/`](docs/):
|
|
|
154
166
|
- [Load Balancing Strategies](docs/load-balancing.md)
|
|
155
167
|
- [Auto-Fallback Guide](docs/auto-fallback.md)
|
|
156
168
|
- [Auto-Refresh Guide](docs/auto-refresh.md)
|
|
169
|
+
- [OpenAI-Compatible Providers](docs/providers.md)
|
|
157
170
|
|
|
158
171
|
## Screenshots
|
|
159
172
|
|
package/dist/better-ccflare
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
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
|
-
|
|
2
|
+
"name": "better-ccflare",
|
|
3
|
+
"version": "1.2.2",
|
|
4
|
+
"description": "Load balancer proxy for Claude API with intelligent distribution across multiple OAuth accounts to avoid rate limiting",
|
|
5
|
+
"author": "snipeship",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/tombii/better-ccflare.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/tombii/better-ccflare#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/tombii/better-ccflare/issues"
|
|
14
|
+
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"better-ccflare": "dist/better-ccflare"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"scripts": {
|
|
20
|
+
"dev": "bun run src/main.ts",
|
|
21
|
+
"build": "BETTER_CCFLARE_VERSION=$(node -p \"require('./package.json').version\") bun build src/main.ts --compile --outfile dist/better-ccflare --target=bun --minify --define process.env.BETTER_CCFLARE_VERSION='\"'$BETTER_CCFLARE_VERSION'\"'",
|
|
22
|
+
"prepublishOnly": "cp ../../README.md . && bun run build && jq 'del(.devDependencies[\"@better-ccflare/tui-core\", \"@better-ccflare/ui-common\", \"@better-ccflare/database\", \"@better-ccflare/core-di\", \"@better-ccflare/config\", \"@better-ccflare/logger\", \"@better-ccflare/server\"])' package.json > package.json.tmp && mv package.json.tmp package.json",
|
|
23
|
+
"postpublish": "chmod +x dist/better-ccflare"
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=18.0.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"ink": "^6.0.0",
|
|
30
|
+
"ink-select-input": "^6.0.0",
|
|
31
|
+
"ink-spinner": "^5.0.0",
|
|
32
|
+
"ink-text-input": "^6.0.0",
|
|
33
|
+
"react": "^19.0.0",
|
|
34
|
+
"@types/react": "^19.0.0",
|
|
35
|
+
"@types/node": "^20.0.0"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"README.md"
|
|
40
|
+
],
|
|
41
|
+
"keywords": [
|
|
42
|
+
"claude",
|
|
43
|
+
"anthropic",
|
|
44
|
+
"api",
|
|
45
|
+
"proxy",
|
|
46
|
+
"load-balancer",
|
|
47
|
+
"rate-limiting",
|
|
48
|
+
"oauth",
|
|
49
|
+
"cli",
|
|
50
|
+
"tui",
|
|
51
|
+
"analytics",
|
|
52
|
+
"monitoring"
|
|
53
|
+
],
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public"
|
|
56
|
+
}
|
|
57
57
|
}
|