fix(providers): allow dropping default OpenAI image params via null extraBody (#4167)

This commit is contained in:
04cb 2026-06-05 23:29:09 +08:00 committed by Xubin Ren
parent 73353785a0
commit a4cf0f9514

View File

@ -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)