CPA上启用cch
- 内容介绍
- 文章标签
- 相关推荐
翻了下代码,发现有相关的实现,相关pr:
feat: add opt-in experimental Claude cch signing (#2473)
main ← edlsh:feat/experimental-claude-cch-signing
已打开 05:04PM - 01 Apr 26 UTC
edlsh
+298
-138
## Summary - add an opt-in `experimental-cch-signing` Claude credential flag - k…eep legacy behavior unchanged by default so seed changes upstream do not break existing CLIProxyAPI users - sign the final outbound `/v1/messages` body with seeded xxHash64 only when the flag is enabled - scope replacement to the billing header so user content containing `cch=00000` is left untouched ## Motivation This makes it possible to experiment with a Claude Code-style `cch` signing path without turning it into a hard dependency for every Anthropic request. The safe default is deliberate: if Anthropic changes the seed or signing scheme, CLIProxyAPI continues to operate exactly as it does today unless an operator explicitly opts in. ## Reference Original implementation idea and reverse-engineering discussion: - https://github.com/paoloanzn/free-code/pull/9 ## Tests - `go test ./internal/config` - `go test ./internal/runtime/executor -run 'TestClaudeExecutor_ExperimentalCCHSigning|TestCheckSystemInstructionsWithMode_|TestApplyClaudeHeaders_DisableDeviceProfileStabilization|TestClaudeExecutor_ReusesUserIDAcrossModelsWhenCacheEnabled|TestClaudeExecutor_ExecuteStream_AcceptEncodingOverrideCannotBypassIdentity|TestDecodeResponseBody_MagicByteZstdNoHeader'`
启用方法:
claude-api-key:
- api-key: "sk-"
experimental-cch-signing: true
各位佬可以试试
网友解答:--【壹】--:
感谢大佬
翻了下代码,发现有相关的实现,相关pr:
feat: add opt-in experimental Claude cch signing (#2473)
main ← edlsh:feat/experimental-claude-cch-signing
已打开 05:04PM - 01 Apr 26 UTC
edlsh
+298
-138
## Summary - add an opt-in `experimental-cch-signing` Claude credential flag - k…eep legacy behavior unchanged by default so seed changes upstream do not break existing CLIProxyAPI users - sign the final outbound `/v1/messages` body with seeded xxHash64 only when the flag is enabled - scope replacement to the billing header so user content containing `cch=00000` is left untouched ## Motivation This makes it possible to experiment with a Claude Code-style `cch` signing path without turning it into a hard dependency for every Anthropic request. The safe default is deliberate: if Anthropic changes the seed or signing scheme, CLIProxyAPI continues to operate exactly as it does today unless an operator explicitly opts in. ## Reference Original implementation idea and reverse-engineering discussion: - https://github.com/paoloanzn/free-code/pull/9 ## Tests - `go test ./internal/config` - `go test ./internal/runtime/executor -run 'TestClaudeExecutor_ExperimentalCCHSigning|TestCheckSystemInstructionsWithMode_|TestApplyClaudeHeaders_DisableDeviceProfileStabilization|TestClaudeExecutor_ReusesUserIDAcrossModelsWhenCacheEnabled|TestClaudeExecutor_ExecuteStream_AcceptEncodingOverrideCannotBypassIdentity|TestDecodeResponseBody_MagicByteZstdNoHeader'`
启用方法:
claude-api-key:
- api-key: "sk-"
experimental-cch-signing: true
各位佬可以试试
网友解答:--【壹】--:
感谢大佬

