fix(converters): 仅在service_tier为priority时保留该字段
移除CodexConverter中service_tier字段的默认值设置,现在仅当明确指定为'priority'时才包含该字段。这修复了向Codex API发送不必要参数的问题,因为API只接受'priority'值,其他值会导致错误。
This commit is contained in:
parent
4715acf5db
commit
cd5e185419
2 changed files with 10 additions and 3 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
2.10.8.1
|
||||
2.10.8.2
|
||||
|
|
|
|||
|
|
@ -104,6 +104,9 @@ export class CodexConverter extends BaseConverter {
|
|||
codexRequest.parallel_tool_calls = true;
|
||||
codexRequest.include = ['reasoning.encrypted_content'];
|
||||
codexRequest.service_tier = responsesRequest.service_tier || 'default';
|
||||
if (codexRequest.service_tier !== 'priority') {
|
||||
delete codexRequest.service_tier;
|
||||
}
|
||||
|
||||
// 删除Codex不支持的字段
|
||||
delete codexRequest.max_output_tokens;
|
||||
|
|
@ -158,10 +161,14 @@ export class CodexConverter extends BaseConverter {
|
|||
summary: data.reasoning?.summary || 'auto'
|
||||
},
|
||||
parallel_tool_calls: true,
|
||||
include: ['reasoning.encrypted_content'],
|
||||
service_tier: data.service_tier || 'default'
|
||||
include: ['reasoning.encrypted_content']
|
||||
};
|
||||
|
||||
codexRequest.service_tier = data.service_tier || 'default';
|
||||
if (codexRequest.service_tier !== 'priority') {
|
||||
delete codexRequest.service_tier;
|
||||
}
|
||||
|
||||
// 处理 OpenAI Responses 特有的 instructions 和 input 字段(如果存在)
|
||||
if (data.instructions && !codexRequest.instructions) {
|
||||
codexRequest.instructions = data.instructions;
|
||||
|
|
|
|||
Loading…
Reference in a new issue