fix(codex): 取消对 openai:compact 端点的 body_rules 修改

Codex 的请求体规则(drop max_output_tokens/temperature/top_p, set store=false 等)
只应作用于 openai:cli, 不应影响 openai:compact 端点。
This commit is contained in:
fawney19
2026-03-03 03:39:14 +08:00
parent a03368a3fe
commit f787b1b02a
3 changed files with 5 additions and 6 deletions

View File

@@ -152,7 +152,6 @@ _ENDPOINT_DEFINITIONS: dict[tuple[ApiFamily, EndpointKind], EndpointDefinition]
# compact endpoint is non-streaming by design.
stream_in_body=False,
data_format_id="openai_responses",
default_body_rules=_CODEX_DEFAULT_BODY_RULES,
),
(ApiFamily.OPENAI, EndpointKind.VIDEO): EndpointDefinition(
api_family=ApiFamily.OPENAI,

View File

@@ -40,7 +40,7 @@ def maybe_patch_request_for_codex(
"""
if (provider_type or "").lower() != ProviderType.CODEX:
return request_body
if (provider_api_format or "").lower() not in {"openai:cli", "openai:compact"}:
if (provider_api_format or "").lower() not in {"openai:cli"}:
return request_body
if not isinstance(request_body, dict):
return request_body