refactor(claude-code): 移除 TLS 指纹模拟配置,简化上下文构建逻辑

移除 enable_tls_fingerprint 配置项、TLS_PROFILE_CLAUDE_CODE 常量及
resolve_claude_code_tls_profile 函数,TLS profile 改为仅由 fingerprint
的 impersonate 字段决定,简化 build_and_set_claude_code_request_context
返回值为单一 context 对象。
This commit is contained in:
fawney19
2026-03-15 00:23:19 +08:00
parent 693e37d2df
commit 920a383136
6 changed files with 12 additions and 39 deletions

View File

@@ -93,7 +93,7 @@ def test_claude_code_prepare_context_prefers_fingerprint_tls_profile() -> None:
set_current_fingerprint(fp)
tls_profile = claude_code_envelope.prepare_context(
provider_config={"claude_code_advanced": {"enable_tls_fingerprint": True}},
provider_config={},
key_id="key-fingerprint-2",
is_stream=False,
provider_id="provider-1",