fix: 修复非 priority 服务层级时错误传递 service_tier 参数
当 service_tier 不是 'priority' 时,从请求体中删除该字段,避免向 OpenAI API 发送无效参数。
This commit is contained in:
parent
cd5e185419
commit
76e8a81b3d
2 changed files with 8 additions and 2 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
||||||
2.10.8.2
|
2.10.8.3
|
||||||
|
|
|
||||||
|
|
@ -373,7 +373,7 @@ export class CodexApiService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 注意:requestBody 已经去除了 metadata
|
// 注意:requestBody 已经去除了 metadata
|
||||||
return {
|
const result = {
|
||||||
...cleanedBody,
|
...cleanedBody,
|
||||||
service_tier: cleanedBody.service_tier || defaultServiceTier,
|
service_tier: cleanedBody.service_tier || defaultServiceTier,
|
||||||
reasoning: {
|
reasoning: {
|
||||||
|
|
@ -383,6 +383,12 @@ export class CodexApiService {
|
||||||
stream,
|
stream,
|
||||||
prompt_cache_key: cache.id
|
prompt_cache_key: cache.id
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (result.service_tier !== 'priority') {
|
||||||
|
delete result.service_tier;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue