[Tracker]
Update Summary: Models supporting image generation are not detected
Short Description: Models supporting image generation are not detected
Check-in Date: 12/16/2025
Metadata is used by the AI Tracker. Docs and additional fields here.
[/Tracker]
In my LLM instance, when using model/info we can see several keys indicating the operation supported by the models
"mode": "image_generation",
"supports_system_messages": null,
"supports_response_schema": null,
"supports_vision": null,
"supports_function_calling": null,
"supports_tool_choice": null,
"supports_assistant_prefill": null,
"supports_prompt_caching": null,
"supports_audio_input": null,
"supports_audio_output": null,
"supports_pdf_input": null,
"supports_embedding_image_input": null,
"supports_native_streaming": null,
"supports_web_search": null,
"supports_url_context": null,
"supports_reasoning": null,
"supports_computer_use": null,
Actual code detects imageInput and imageOutput differently than than the output of the API
public static function createFromResponse(\stdClass $response): self {
$model_info = $response->model_info;
return new self(
$response->model_name,
$model_info->supports_image_input ?? FALSE,
$model_info->supports_image_output ?? FALSE,
$model_info->supports_audio_input ?? FALSE,
$model_info->supports_audio_output ?? FALSE,
$model_info->supports_video_output ?? FALSE,
($model_info->mode ?? NULL) === 'embedding',
($model_info->mode ?? NULL) === 'chat',
$model_info->supports_moderation ?? FALSE,
$model_info->supported_openai_params ?? [],
);
}
- supports_image_input is under supports_vision
- supports_image_output is under mode: "image_generation"
Issue fork ai_provider_litellm-3560830
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
heyyo commentedComment #4
heyyo commentedComment #5
nikro commentedI'll pick this up and will test against our providers - I wonder if this fix will auto-magically work through-out everywhere.
Comment #6
nikro commentedComment #7
nikro commentedThis works well (I know it's a small change, but I never tested LiteLLM with image generation).
I proxied
openai/gpt-image-1-minias:It worked well.
Comment #8
dan2k3k4 commentedI did a refactor in the `ai_provider_amazeeio` which uses LiteLLM under the hood, so the code for `ai_provider_litellm` can use the same code
https://git.drupalcode.org/project/ai_provider_amazeeio/-/blob/fd79f50e4...
Comment #9
dan2k3k4 commentedCreated a different MR
https://git.drupalcode.org/project/ai_provider_litellm/-/merge_requests/17
Comment #10
nikro commentedI'll check the 17th MR, it's a bit wider scope but I totally welcome larger scope :)
Comment #11
credevator commentedI reviewed the MR !16 and it fixes the issue of missing models in Text-to-Image. We should go ahead with changes in MR !16, It will unblock the image generation capability for users who use this provider.
MR!17 has lot many changes but using that change, I still do not get the model listed in Text-To-Image.
Comment #12
dan2k3k4 commentedMerged MR 16
We can do MR 17 in a follow-up
Comment #15
dan2k3k4 commented