mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-01 17:00:21 +08:00
refactor(body-rules): 移除 protected_body_keys 机制,允许 body_rules 自由修改所有请求体字段
删除 get_cache_sensitive_protected_body_keys 函数及相关常量、_is_protected_path 辅助函数,从 apply_body_rules、RequestBuilder、ProviderRequestResult 等处移除 protected_body_keys 参数,更新所有调用点和测试用例。
This commit is contained in:
@@ -333,7 +333,6 @@ def test_codex_passthrough_builder_preserves_real_codex_headers() -> None:
|
||||
|
||||
|
||||
def test_codex_passthrough_builder_applies_prompt_body_rules() -> None:
|
||||
from src.api.handlers.base.request_builder import get_cache_sensitive_protected_body_keys
|
||||
from src.core.api_format.metadata import CODEX_DEFAULT_BODY_RULES
|
||||
|
||||
builder = PassthroughRequestBuilder()
|
||||
@@ -351,10 +350,6 @@ def test_codex_passthrough_builder_applies_prompt_body_rules() -> None:
|
||||
endpoint,
|
||||
key,
|
||||
pre_computed_auth=("Authorization", "Bearer upstream-token"),
|
||||
protected_body_keys=get_cache_sensitive_protected_body_keys(
|
||||
"openai:cli",
|
||||
provider_type="codex",
|
||||
),
|
||||
provider_api_format="openai:cli",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user