From c1816f39f2a3e40c91a3eee29384f5c15f24d553 Mon Sep 17 00:00:00 2001 From: erio Date: Fri, 6 Mar 2026 14:30:44 +0800 Subject: [PATCH] revert: remove passthrough check from isModelSupportedByAccount MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 该函数不被 OpenAI 调度路径调用,透传短路应只加在 openai_account_scheduler.go 中。 --- backend/internal/service/gateway_service.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/backend/internal/service/gateway_service.go b/backend/internal/service/gateway_service.go index f6c993a89c..0fe2545ec0 100644 --- a/backend/internal/service/gateway_service.go +++ b/backend/internal/service/gateway_service.go @@ -3424,10 +3424,6 @@ 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)