From f41711c14fce2b83a5c8610c2b02c5f6333e9153 Mon Sep 17 00:00:00 2001 From: erio Date: Mon, 9 Mar 2026 22:35:36 +0800 Subject: [PATCH] fix: restore OpenAI passthrough mode check lost during v0.1.94 merge The isModelSupportedByAccount function lost the OpenAI passthrough check during the upstream merge, causing GPT-5.4 and other models to be rejected for passthrough accounts. Co-Authored-By: Claude Opus 4.6 --- backend/internal/service/gateway_service.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/internal/service/gateway_service.go b/backend/internal/service/gateway_service.go index befdd9794e..c8f6aaa9e7 100644 --- a/backend/internal/service/gateway_service.go +++ b/backend/internal/service/gateway_service.go @@ -3591,6 +3591,10 @@ func (s *GatewayService) isModelSupportedByAccount(account *Account, requestedMo if account.Platform == PlatformSora { return s.isSoraModelSupportedByAccount(account, requestedModel) } + // OpenAI 透传模式:仅替换认证,允许所有模型 + if account.Platform == PlatformOpenAI && account.IsOpenAIPassthroughEnabled() { + return true + } // OAuth/SetupToken 账号使用 Anthropic 标准映射(短ID → 长ID) if account.Platform == PlatformAnthropic && account.Type != AccountTypeAPIKey { requestedModel = claude.NormalizeModelID(requestedModel)