Download src/constants/claudeCodeCompatibility.ts from chenbhao/codev: direct link, hf CLI and curl.
- Browser
- Download file 850 Bytes
-
https://huggingface.co/chenbhao/codev/resolve/main/src/constants/claudeCodeCompatibility.ts
- Command line
-
hf download hf://chenbhao/codev/src/constants/claudeCodeCompatibility.ts
-
curl -L -o claudeCodeCompatibility.ts https://huggingface.co/chenbhao/codev/resolve/main/src/constants/claudeCodeCompatibility.ts
850 Bytes
| /** | |
| * Claude Code billing compatibility values based on sub2api. | |
| * Reference: https://github.com/Wei-Shaw/sub2api | |
| * License: LGPL-3.0-or-later, Copyright (c) 2026 Wesley Liddick. | |
| */ | |
| // Keep in sync with the Claude Code version accepted by upstream billing validation. | |
| export const CLAUDE_CODE_COMPAT_VERSION = '2.1.92' | |
| export const CLAUDE_CODE_BILLING_HEADER_PREFIX = 'x-anthropic-billing-header:' | |
| export function formatClaudeCodeBillingHeader(options: { | |
| fingerprint: string | |
| entrypoint?: string | |
| workload?: string | null | |
| }): string { | |
| const entrypoint = options.entrypoint ?? 'unknown' | |
| const workloadPair = options.workload ? ` cc_workload=${options.workload};` : '' | |
| return `${CLAUDE_CODE_BILLING_HEADER_PREFIX} cc_version=${CLAUDE_CODE_COMPAT_VERSION}.${options.fingerprint}; cc_entrypoint=${entrypoint}; cch=00000;${workloadPair}` | |
| } | |