From 76e8a81b3da34896e1b3c1adb8f1d5c614a606cf Mon Sep 17 00:00:00 2001 From: hex2077 Date: Sun, 8 Mar 2026 21:10:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=9D=9E=20priority?= =?UTF-8?q?=20=E6=9C=8D=E5=8A=A1=E5=B1=82=E7=BA=A7=E6=97=B6=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BC=A0=E9=80=92=20service=5Ftier=20=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当 service_tier 不是 'priority' 时,从请求体中删除该字段,避免向 OpenAI API 发送无效参数。 --- VERSION | 2 +- src/providers/openai/codex-core.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index d85e10b..f90a737 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.10.8.2 +2.10.8.3 diff --git a/src/providers/openai/codex-core.js b/src/providers/openai/codex-core.js index bdf9c88..c1e0f6a 100644 --- a/src/providers/openai/codex-core.js +++ b/src/providers/openai/codex-core.js @@ -373,7 +373,7 @@ export class CodexApiService { } // 注意:requestBody 已经去除了 metadata - return { + const result = { ...cleanedBody, service_tier: cleanedBody.service_tier || defaultServiceTier, reasoning: { @@ -383,6 +383,12 @@ export class CodexApiService { stream, prompt_cache_key: cache.id }; + + if (result.service_tier !== 'priority') { + delete result.service_tier; + } + + return result; } /**