better-ccflare 3.5.12 → 3.5.14

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 CHANGED
@@ -17,6 +17,7 @@ https://github.com/user-attachments/assets/c859872f-ca5e-4f8b-b6a0-7cc7461fe62a
17
17
  - **🔒 OAuth Token Health** - Real-time monitoring of OAuth token status with automatic refresh and health indicators
18
18
  - **🔗 Custom API Endpoints** - Configure custom endpoints for Anthropic accounts for enterprise deployments
19
19
  - **☁️ OpenAI-Compatible Support** - Use OpenAI-compatible providers like OpenRouter, Together AI, and more with Claude API format
20
+ - **🧩 Codex / Responses API Compatibility** - `POST /v1/responses` and `POST /v1/responses/compact` are translated to Anthropic `/v1/messages`
20
21
  - **🔄 Smart Auto-Fallback** - Automatically switch back to preferred accounts when their rate limits reset
21
22
  - **⚡ Auto-Refresh** - Automatically start new usage windows when rate limits reset with 30-minute buffer
22
23
  - **📊 Request-Level Analytics** - Track latency, token usage, and costs in real-time with optimized batch processing
@@ -397,6 +398,32 @@ claude
397
398
  - **Using only API keys in better-ccflare?** Use Option 2 (logout + API key)
398
399
  - **Getting auth conflict warnings?** You have both methods active - choose one and follow its steps above
399
400
 
401
+ ### Codex CLI as a Client
402
+
403
+ better-ccflare supports [Codex CLI](https://github.com/openai/codex) as a client. Codex speaks the OpenAI Responses API; better-ccflare intercepts requests to `/v1/responses` and `/v1/responses/compact` and translates them to Anthropic `POST /v1/messages` internally, routing through your configured account pool.
404
+
405
+ This is separate from the `codex` *provider* (which routes requests to OpenAI's Codex endpoint). You can use Codex CLI to talk to Anthropic accounts, Codex accounts, or any other provider in your pool.
406
+
407
+ Configure Codex CLI to point at better-ccflare in `~/.codex/config.toml`:
408
+
409
+ ```toml
410
+ [api]
411
+ base_url = "http://localhost:8080"
412
+ api_key = "dummy-key" # or your real better-ccflare API key if API auth is enabled
413
+ ```
414
+
415
+ Equivalent environment variables:
416
+
417
+ ```bash
418
+ export OPENAI_BASE_URL=http://localhost:8080
419
+ export OPENAI_API_KEY=dummy-key
420
+ ```
421
+
422
+ Known limitations:
423
+
424
+ - `previous_response_id` is accepted but ignored — Codex uses this only over WebSocket; for regular HTTP requests it always sends the full conversation history in `input`
425
+ - Built-in tool types (`web_search_preview`, `code_interpreter`, `file_search`) are silently skipped; only `type: "function"` tools are forwarded to Anthropic
426
+
400
427
  ### SSL/HTTPS Configuration
401
428
 
402
429
  To enable HTTPS with better-ccflare, you'll need SSL certificates. Here are your options:
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-ccflare",
3
- "version": "3.5.12",
3
+ "version": "3.5.14",
4
4
  "description": "Load balancer proxy for Claude API with intelligent distribution across multiple OAuth accounts to avoid rate limiting",
5
5
  "license": "MIT",
6
6
  "repository": {