fix: 修复非 priority 服务层级时错误传递 service_tier 参数

当 service_tier 不是 'priority' 时,从请求体中删除该字段,避免向 OpenAI API 发送无效参数。
This commit is contained in:
hex2077 2026-03-08 21:10:43 +08:00
parent cd5e185419
commit 76e8a81b3d
2 changed files with 8 additions and 2 deletions

View file

@ -1 +1 @@
2.10.8.2
2.10.8.3

View file

@ -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;
}
/**