mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-20 15:06:36 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
87dd98d5c8
commit
f41711c14f
1 file changed
+4
@@ -3591,6 +3591,10 @@ func (s *GatewayService) isModelSupportedByAccount(account *Account, requestedMo
|
|||||||
if account.Platform == PlatformSora {
|
if account.Platform == PlatformSora {
|
||||||
return s.isSoraModelSupportedByAccount(account, requestedModel)
|
return s.isSoraModelSupportedByAccount(account, requestedModel)
|
||||||
}
|
}
|
||||||
|
// OpenAI 透传模式:仅替换认证,允许所有模型
|
||||||
|
if account.Platform == PlatformOpenAI && account.IsOpenAIPassthroughEnabled() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
// OAuth/SetupToken 账号使用 Anthropic 标准映射(短ID → 长ID)
|
// OAuth/SetupToken 账号使用 Anthropic 标准映射(短ID → 长ID)
|
||||||
if account.Platform == PlatformAnthropic && account.Type != AccountTypeAPIKey {
|
if account.Platform == PlatformAnthropic && account.Type != AccountTypeAPIKey {
|
||||||
requestedModel = claude.NormalizeModelID(requestedModel)
|
requestedModel = claude.NormalizeModelID(requestedModel)
|
||||||
|
|||||||
Reference in new issue
Block a user