mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-06-13 14:23:58 +00:00
fix(providers): allow dropping default OpenAI image params via null extraBody (#4167)
This commit is contained in:
parent
73353785a0
commit
a4cf0f9514
@ -996,6 +996,8 @@ class OpenAIImageGenerationClient(ImageGenerationProvider):
|
||||
body["size"] = size
|
||||
|
||||
body.update(self.extra_body)
|
||||
# Drop null-valued params so extraBody can opt out of defaults like response_format.
|
||||
body = {key: value for key, value in body.items() if value is not None}
|
||||
|
||||
logger.info("OpenAI Images API request: POST {}/images/generations body={}", self.api_base, body)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user