| |
| |
| |
| |
| |
| |
| 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}` |
| } |
|
|