fix(protocol): Grok 生图 - 让 response_format 开关生效 (#692)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user