diff --git a/VERSION b/VERSION index f90a737..eea29b8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.10.8.3 +2.10.8.4 diff --git a/src/providers/openai/codex-core.js b/src/providers/openai/codex-core.js index c1e0f6a..82e5cb9 100644 --- a/src/providers/openai/codex-core.js +++ b/src/providers/openai/codex-core.js @@ -342,7 +342,9 @@ export class CodexApiService { const sessionId = metadata.session_id || metadata.conversation_id || metadata.user_id || 'default'; // 判断是否为 fast 模型并确定默认值 - const isFastModel = model.endsWith('-fast'); + const normalizedModel = String(model || '').trim(); + const isFastModel = /-fast$/i.test(normalizedModel); + const upstreamModel = isFastModel ? normalizedModel.replace(/-fast$/i, '') : normalizedModel; const defaultServiceTier = isFastModel ? 'priority' : 'default'; const defaultReasoningEffort = isFastModel ? 'xhigh' : 'medium'; @@ -351,7 +353,7 @@ export class CodexApiService { // 如果是 fast 模型,移除后缀再传给上游 if (isFastModel) { - cleanedBody.model = model.replace('-fast', ''); + cleanedBody.model = upstreamModel; } // 生成会话缓存键