add gpt-5.1-codex-max support

This commit is contained in:
1eon
2025-12-05 21:11:53 +08:00
parent 93284c80ff
commit aa3bb3c65b
7 changed files with 23 additions and 10 deletions

View File

@@ -312,7 +312,7 @@ async function handleDirectResponses(req, res) {
if (reasoningLevel === 'auto') {
// Auto模式保持原始请求的reasoning字段不变
// 如果原始请求有reasoning字段就保留没有就不添加
} else if (reasoningLevel && ['low', 'medium', 'high'].includes(reasoningLevel)) {
} else if (reasoningLevel && ['low', 'medium', 'high', 'xhigh'].includes(reasoningLevel)) {
modifiedRequest.reasoning = {
effort: reasoningLevel,
summary: 'auto'
@@ -463,11 +463,12 @@ async function handleDirectMessages(req, res) {
if (reasoningLevel === 'auto') {
// Auto模式保持原始请求的thinking字段不变
// 如果原始请求有thinking字段就保留没有就不添加
} else if (reasoningLevel && ['low', 'medium', 'high'].includes(reasoningLevel)) {
} else if (reasoningLevel && ['low', 'medium', 'high', 'xhigh'].includes(reasoningLevel)) {
const budgetTokens = {
'low': 4096,
'medium': 12288,
'high': 24576
'high': 24576,
'xhigh': 40960
};
modifiedRequest.thinking = {