When generating an image with gpt-image-1.5, at least through LiteLLM, an error is generated due to the use of the unsupported response_format argument:
|
let request = ImageGenerationRequest( |
|
model: model, |
|
prompt: prompt, |
|
numberOfImages: 1, |
|
responseFormat: "b64_json" |
|
) |
The usage of response_format is apparently only valid for DALL-E models, not GPT models.
response_format: optional "url" or "b64_json" or null
The format in which generated images with dall-e-2 and dall-e-3 are returned. Must be one of url or b64_json. URLs are only valid for 60 minutes after the image has been generated. This parameter isn’t supported for the GPT image models, which always return base64-encoded images.
Source: developers.openai.com
On OpenClient version 1.7.10 (115), the following request is generated when prompting for an image.
POST /images/generations HTTP/1.1
Connection: close
Host: REDACTED
X-Real-IP: REDACTED
X-Forwarded-For: REDACTED
X-Forwarded-Proto: https
Content-Length: 76
Content-Type: application/json
User-Agent: openclient-llm/115 CFNetwork/3896.100.1.2.1 Darwin/27.0.0
Accept: */*
Accept-Language: en-GB,en;q=0.9
Accept-Encoding: gzip, deflate, br
Authorization: Bearer REDACTED
{"response_format":"b64_json","prompt":"REDACTED","model":"gpt-image-1.5","n":1}
When used against LiteLLM v1.100.1, the following response is generated.
HTTP/1.1 400 Bad Request
date: REDACTED
server: uvicorn
content-length: 298
content-type: application/json
x-frame-options: DENY
content-security-policy: frame-ancestors 'none'
x-content-type-options: nosniff
Connection: close
{"error":{"message":"litellm.UnsupportedParamsError: Setting `response_format` is not supported by openai, gpt-image-1.5. To drop it from the call, set `litellm.drop_params = True`.. Received Model Group=gpt-image-1.5\nAvailable Model Group Fallbacks=None","type":"None","param":null,"code":"400"}}
When generating an image with
gpt-image-1.5, at least through LiteLLM, an error is generated due to the use of the unsupportedresponse_formatargument:openclient-llm/openclient-llm/Shared/Features/ImageGeneration/Repositories/ImageGenerationRepository.swift
Lines 70 to 75 in 60557f2
The usage of
response_formatis apparently only valid for DALL-E models, not GPT models.On OpenClient version 1.7.10 (115), the following request is generated when prompting for an image.
When used against LiteLLM v1.100.1, the following response is generated.