fix: 修复测试规则保护头部解析

This commit is contained in:
hemo94931
2026-02-03 00:08:49 +08:00
parent f1656c4960
commit a80ddea93c
3 changed files with 6 additions and 6 deletions

View File

@@ -678,8 +678,8 @@ class ChatAdapterBase(ApiAdapter):
# 应用请求头规则(在请求头构建后应用)
if header_rules:
# 获取认证头名称,防止被规则覆盖
from src.core.api_format import get_auth_config
auth_header, _ = get_auth_config(cls._get_api_format())
from src.core.api_format import get_auth_config_for_endpoint
auth_header, _ = get_auth_config_for_endpoint(cls.FORMAT_ID)
protected_keys = {auth_header.lower(), "content-type"}
header_builder = HeaderBuilder()

View File

@@ -660,8 +660,8 @@ class CliAdapterBase(ApiAdapter):
# 应用请求头规则(在请求头构建后应用)
if header_rules:
# 获取认证头名称,防止被规则覆盖
from src.core.api_format import get_auth_config
auth_header, _ = get_auth_config(cls._get_api_format())
from src.core.api_format import get_auth_config_for_endpoint
auth_header, _ = get_auth_config_for_endpoint(cls.FORMAT_ID)
protected_keys = {auth_header.lower(), "content-type"}
header_builder = HeaderBuilder()

View File

@@ -291,8 +291,8 @@ class GeminiChatAdapter(ChatAdapterBase):
# 应用请求头规则(在请求头构建后应用)
if header_rules:
# 获取认证头名称,防止被规则覆盖
from src.core.api_format import get_auth_config
auth_header, _ = get_auth_config(cls._get_api_format())
from src.core.api_format import get_auth_config_for_endpoint
auth_header, _ = get_auth_config_for_endpoint(cls.FORMAT_ID)
protected_keys = {auth_header.lower(), "content-type"}
header_builder = HeaderBuilder()