fix(protocol): Grok 生图 - 让 response_format 开关生效 (#692)

This commit is contained in:
qihang ma authored and GitHub committed 2026-10-06 09:24:16 +08:00
1 parent ea51df2b58
commit 5976389ed4
3 files changed
+18 -1

No files matched your search

@@ -91,6 +91,14 @@ func protocolRequestFromInput(input canvasGenerationInput) protocol.GenerationRe
}
}
}
if input.Mode == "image" && input.Config.InterfaceType == string(model.ChannelInterfaceGrokImage) {
options := make(map[string]any)
for name, value := range request.ProviderOptions[input.Config.InterfaceType] {
options[name] = value
}
options["response_format"] = grokImageResponseFormat(input.ImageCapability)
request.ProviderOptions[input.Config.InterfaceType] = options
}
return request
}