{"record":{"id":"8aa9a117f371d823","repo":"conductor-oss/conductor","slug":"image-generation-not-supported-by-the-model-yet-8aa9a1","errorCode":null,"errorMessage":"Image generation not supported by the model yet","messagePattern":"Image generation not supported by the model yet","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"ai/src/main/java/org/conductoross/conductor/ai/providers/litellm/LiteLLM.java","lineNumber":99,"sourceCode":"                .maxTokens(input.getMaxTokens())\n                .stopSequences(input.getStopWords())\n                .frequencyPenalty(input.getFrequencyPenalty())\n                .presencePenalty(input.getPresencePenalty())\n                .topK(input.getTopK())\n                .toolCallbacks(toolCallbacks)\n                .toolNames(toolNames)\n                .internalToolExecutionEnabled(false)\n                .build();\n    }\n\n    @Override\n    public ChatModel getChatModel() {\n        return this.chatModel;\n    }\n\n    @Override\n    public ImageModel getImageModel() {\n        throw new UnsupportedOperationException(\"Image generation not supported by the model yet\");\n    }\n}\n","sourceCodeStart":81,"sourceCodeEnd":102,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/ai/src/main/java/org/conductoross/conductor/ai/providers/litellm/LiteLLM.java#L81-L102","documentation":"LiteLLM.java throws UnsupportedOperationException from getImageModel() because the LiteLLM provider only wires a chat model (ToolCallingChatOptions) with no image-generation adapter. AIModel.getImageModel() is abstract (line 141); LiteLLM overrides it to throw.","triggerScenarios":"An image-generation Conductor task is configured with llmProvider=\"litellm\" or alias \"LiteLLM\". LLMHelper.generateImage() calls llm.getImageModel() and the provider throws before any HTTP request.","commonSituations":"Using LiteLLM as a multi-model proxy and assuming image generation is routed through it; conflating LiteLLM's upstream image-model passthrough with Conductor's provider-level image support.","solutions":["Switch the image task to a provider with a real ImageModel: openai, gemini, azureopenai, stabilityai, bedrock, or cohere.","Implement a LiteLLM image adapter if your LiteLLM gateway proxies an image endpoint.","Keep LiteLLM for chat-only tasks."],"exampleFix":"// before\n{\"llmProvider\": \"litellm\", \"prompt\": \"a cat\"}\n// after\n{\"llmProvider\": \"openai\", \"model\": \"dall-e-3\", \"prompt\": \"a cat\"}","handlingStrategy":"validation","validationCode":"// Same IMAGE_CAPABLE set\nprivate static final Set<String> IMAGE_CAPABLE = Set.of(\n    \"openai\", \"gemini\", \"azureopenai\", \"bedrock\", \"stabilityai\", \"cohere\");\n\nif (!IMAGE_CAPABLE.contains(request.getLlmProvider())) {\n    throw new IllegalArgumentException(\n        \"LiteLLM does not support image generation in Conductor. Use: \" + IMAGE_CAPABLE);\n}","typeGuard":"null","tryCatchPattern":"try {\n    ImageModel model = llm.getImageModel();\n} catch (UnsupportedOperationException e) {\n    throw new IllegalArgumentException(\"LiteLLM does not support image generation\", e);\n}","preventionTips":["Use LiteLLM for chat-only tasks.","Route image tasks to openai or stabilityai.","Implement a LiteLLM image adapter if your gateway proxies image endpoints."],"tags":["litellm","image-generation","unsupported-operation","ai","provider"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}