feat: 添加 Anthropic 缓存 TTL 注入开关

This commit is contained in:
shaw
2026-04-30 13:38:22 +08:00
parent 094e1171ef
commit 73b872998e
12 changed files with 394 additions and 54 deletions

View File

@@ -5019,6 +5019,8 @@ export default {
metadataPassthroughHint: 'Pass through client\'s original metadata.user_id without rewriting. May improve upstream cache hit rates.',
cchSigning: 'CCH Signing',
cchSigningHint: 'Sign the billing header in forwarded requests with CCH hash. When disabled, the placeholder is preserved.',
anthropicCacheTTL1hInjection: 'Anthropic Cache TTL Injection',
anthropicCacheTTL1hInjectionHint: 'When enabled, existing ephemeral cache_control blocks in Anthropic OAuth/Setup Token request bodies are forced to 1h; response usage is billed back as 5m by default, with account-level TTL billing override taking priority.',
},
webSearchEmulation: {
title: 'Web Search Emulation',

View File

@@ -5178,6 +5178,8 @@ export default {
metadataPassthroughHint: '透传客户端原始 metadata.user_id不进行重写。可能提高上游缓存命中率。',
cchSigning: 'CCH 签名',
cchSigningHint: '对转发请求的 billing header 进行 CCH 哈希签名。关闭时保留原始占位符。',
anthropicCacheTTL1hInjection: 'Anthropic 缓存 TTL 注入',
anthropicCacheTTL1hInjectionHint: '开启后,对 Anthropic OAuth/Setup Token 请求体中已有的 ephemeral 缓存块强制写入 1h响应 usage 默认按 5m 回写计费,账号级 TTL 计费设置优先。',
},
webSearchEmulation: {
title: 'Web Search 模拟',