better-ccflare 3.5.77 → 3.5.79
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 +44 -3
- package/dist/better-ccflare +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -377,6 +377,8 @@ claude
|
|
|
377
377
|
|
|
378
378
|
### Codex CLI as a Client
|
|
379
379
|
|
|
380
|
+
The Codex VS Code extension uses the same provider configuration. See the [VS Code setup and compatibility guide](docs/codex-vscode.md).
|
|
381
|
+
|
|
380
382
|
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.
|
|
381
383
|
|
|
382
384
|
Configure Codex CLI to point at better-ccflare in `~/.codex/config.toml`:
|
|
@@ -399,7 +401,7 @@ Codex CLI requires an API key to start — use `dummy-key` if better-ccflare API
|
|
|
399
401
|
Known limitations:
|
|
400
402
|
|
|
401
403
|
- Regular HTTP does not trust an arbitrary caller-supplied `previous_response_id`. On the authenticated, native outbound Codex route, an operator-controlled gateway request can enable gateway-managed continuation: better-ccflare retains only the last upstream response ID and cryptographic input/configuration digests, resumes only after an exact ordered-prefix match, and otherwise sends the full input without a response ID. This bounded state is in memory, so a restart safely cold-starts. WebSocket transport is not implemented.
|
|
402
|
-
- Built-in tool types (`web_search_preview`, `code_interpreter`, `file_search`) are preserved on the native outbound Codex route. Routes translated to Anthropic skip built-in tools and
|
|
404
|
+
- Built-in tool types (`web_search_preview`, `code_interpreter`, `file_search`) are preserved on the native outbound Codex route. Routes translated to Anthropic skip built-in tools, forward function tools, and bridge freeform custom tools such as Codex's `apply_patch` through a string input schema. Custom tool grammars are described to the model but cannot be enforced by the Anthropic API.
|
|
403
405
|
- `/v1/responses` rejects unknown top-level request fields with `400 invalid_request_error` instead of silently dropping them. The canonical ChatGPT subscription endpoint also rejects an explicitly supplied `max_output_tokens`; omit it and let the served model choose its output limit. Custom OpenAI-compatible endpoints may accept it.
|
|
404
406
|
- Claude OAuth accounts (Claude Pro/Team, `provider=anthropic` with OAuth tokens) are automatically excluded from Codex CLI traffic — Anthropic bans these when used outside Claude CLI. Anthropic API key accounts are fine and will be used normally.
|
|
405
407
|
|
|
@@ -819,8 +821,8 @@ Inspired by [snipeship/ccflare](https://github.com/snipeship/ccflare) - thanks f
|
|
|
819
821
|
- [@vansh2408](https://github.com/vansh2408) — [#359](https://github.com/tombii/better-ccflare/pull/359)
|
|
820
822
|
- [@aaapl](https://github.com/aaapl) — [#433](https://github.com/tombii/better-ccflare/pull/433), [#435](https://github.com/tombii/better-ccflare/pull/435)
|
|
821
823
|
- [@mjonuschat](https://github.com/mjonuschat) — [#436](https://github.com/tombii/better-ccflare/pull/436)
|
|
822
|
-
- [@anony253](https://github.com/anony253) — [#452](https://github.com/tombii/better-ccflare/pull/452)
|
|
823
|
-
- [@valentinyanakiev](https://github.com/valentinyanakiev) — [#450](https://github.com/tombii/better-ccflare/pull/450), [#454](https://github.com/tombii/better-ccflare/pull/454)
|
|
824
|
+
- [@anony253](https://github.com/anony253) — [#452](https://github.com/tombii/better-ccflare/pull/452), [#460](https://github.com/tombii/better-ccflare/pull/460)
|
|
825
|
+
- [@valentinyanakiev](https://github.com/valentinyanakiev) — [#450](https://github.com/tombii/better-ccflare/pull/450), [#454](https://github.com/tombii/better-ccflare/pull/454), [#459](https://github.com/tombii/better-ccflare/pull/459)
|
|
824
826
|
|
|
825
827
|
## Contributing
|
|
826
828
|
|
|
@@ -841,3 +843,42 @@ MIT - See [LICENSE](LICENSE) for details
|
|
|
841
843
|
<p align="center">
|
|
842
844
|
Built with ❤️ for developers who ship
|
|
843
845
|
</p>
|
|
846
|
+
|
|
847
|
+
### Claude Messages continuation on Codex (opt-in)
|
|
848
|
+
|
|
849
|
+
Set `CCFLARE_CODEX_MESSAGES_CONTINUATION=1` to let the Codex provider retain
|
|
850
|
+
server-owned Responses continuation while serving `/v1/messages` clients. It
|
|
851
|
+
requires an authenticated API key, a selected account, and a nonempty prompt
|
|
852
|
+
cache key (normally derived from Claude session metadata on OpenAI endpoints).
|
|
853
|
+
The first request sends the full translated history, implicit GPT cache options
|
|
854
|
+
with a 30-minute TTL, and a developer-prefix breakpoint. Subsequent exact
|
|
855
|
+
history/configuration matches send only new input and the stored response ID.
|
|
856
|
+
Claude cache markers and signatures never become GPT input artifacts.
|
|
857
|
+
|
|
858
|
+
State is separated by account, model, authenticated caller, session, and client
|
|
859
|
+
protocol. Changed history/tools, expiration, process restart, unknown output,
|
|
860
|
+
failed or ambiguous terminal events, and cancellation cannot create a reusable
|
|
861
|
+
checkpoint. Streaming remains incremental, but checkpoint promotion requires
|
|
862
|
+
clean upstream EOF. Opaque GPT reasoning remains upstream; the proxy retains
|
|
863
|
+
only bounded in-memory response IDs and replay digests. Public responses remain
|
|
864
|
+
Claude-compatible and cache telemetry continues to label this ingress `legacy`.
|
|
865
|
+
|
|
866
|
+
This switch does not change model selection or fallback policy. It defaults off;
|
|
867
|
+
disabling it restores the prior Messages request format. It does not transfer
|
|
868
|
+
Anthropic caches or guarantee a cache-hit percentage. Custom endpoints must
|
|
869
|
+
support these Responses controls when this bridge is enabled; authenticated
|
|
870
|
+
Messages requests may then derive cache keys from ordinary session metadata.
|
|
871
|
+
Caller-provided native input, identity, and response IDs remain untrusted.
|
|
872
|
+
|
|
873
|
+
HTTP continuation requires the endpoint to retain the referenced response. If it
|
|
874
|
+
returns `previous_response_not_found` (or a typed invalid previous-response ID),
|
|
875
|
+
the bridge retries the original full history once on the same account and model,
|
|
876
|
+
then suspends continuation for that chain for 30 minutes. GPT cache controls
|
|
877
|
+
remain active. This does not change `store:false` or enable provider-side
|
|
878
|
+
retention. Backend retention and actual cache reuse need endpoint-specific
|
|
879
|
+
validation; local response-ID existence is not proof of backend availability.
|
|
880
|
+
|
|
881
|
+
Optionally set `CCFLARE_CODEX_MESSAGES_CONTINUATION_MODELS` to a comma-separated
|
|
882
|
+
list of exact resolved model names to limit this feature to validated models.
|
|
883
|
+
Unset means all models when enabled; an empty list enables none. This scope
|
|
884
|
+
controls adapter features, not model selection or fallback routes.
|
package/dist/better-ccflare
CHANGED
|
Binary file
|
package/package.json
CHANGED