mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-09-24 16:05:44 +08:00
fix(lint): apply De Morgan's law to grok vision bridge gate (QF1001)
This commit is contained in:
@@ -258,7 +258,7 @@ func (s *OpenAIGatewayService) forwardGrokChatCompletionsViaResponses(
|
||||
// for non-composer models, so they would be silently dropped. Route them to
|
||||
// Responses even when no prompt-cache identity is available.
|
||||
hasImageInput := openAIJSONValueMayContainImageInput(gjson.GetBytes(body, "messages"))
|
||||
if !grokChatResponsesRuntimeEligible(upstreamModel, cacheIdentity) && !(hasImageInput && strings.TrimSpace(upstreamModel) == "grok-4.5") {
|
||||
if !grokChatResponsesRuntimeEligible(upstreamModel, cacheIdentity) && (!hasImageInput || strings.TrimSpace(upstreamModel) != "grok-4.5") {
|
||||
return s.forwardAsRawChatCompletions(ctx, c, account, body, defaultMappedModel)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user