mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-03-30 09:57:12 +00:00
fix(openai): remove misplaced passthrough check from isModelSupportedByAccount
isModelSupportedByAccount 不被 OpenAI 调度路径调用, OpenAI /responses 和 /chat/completions 走的是 openai_account_scheduler.go,透传短路已在 PR #806 的 第二个 commit 中正确添加到该文件。 此处的检查是多余的死代码,因为 OpenAI 账号不会走到 isModelSupportedByAccount 的这个分支。
This commit is contained in:
@@ -3320,10 +3320,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)
|
||||
|
||||
Reference in New Issue
Block a user