conductor-oss/conductor · error · UnsupportedOperationException

Image generation not supported by the model yet

Error message

Image generation not supported by the model yet

What it means

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.

Source

Thrown at ai/src/main/java/org/conductoross/conductor/ai/providers/litellm/LiteLLM.java:99

                .maxTokens(input.getMaxTokens())
                .stopSequences(input.getStopWords())
                .frequencyPenalty(input.getFrequencyPenalty())
                .presencePenalty(input.getPresencePenalty())
                .topK(input.getTopK())
                .toolCallbacks(toolCallbacks)
                .toolNames(toolNames)
                .internalToolExecutionEnabled(false)
                .build();
    }

    @Override
    public ChatModel getChatModel() {
        return this.chatModel;
    }

    @Override
    public ImageModel getImageModel() {
        throw new UnsupportedOperationException("Image generation not supported by the model yet");
    }
}

View on GitHub (pinned to cf7c3e4a8a)

Solutions

  1. Switch the image task to a provider with a real ImageModel: openai, gemini, azureopenai, stabilityai, bedrock, or cohere.
  2. Implement a LiteLLM image adapter if your LiteLLM gateway proxies an image endpoint.
  3. Keep LiteLLM for chat-only tasks.

Example fix

// before
{"llmProvider": "litellm", "prompt": "a cat"}
// after
{"llmProvider": "openai", "model": "dall-e-3", "prompt": "a cat"}
Defensive patterns

Strategy: validation

Validate before calling

// Same IMAGE_CAPABLE set
private static final Set<String> IMAGE_CAPABLE = Set.of(
    "openai", "gemini", "azureopenai", "bedrock", "stabilityai", "cohere");

if (!IMAGE_CAPABLE.contains(request.getLlmProvider())) {
    throw new IllegalArgumentException(
        "LiteLLM does not support image generation in Conductor. Use: " + IMAGE_CAPABLE);
}

Type guard

null

Try / catch

try {
    ImageModel model = llm.getImageModel();
} catch (UnsupportedOperationException e) {
    throw new IllegalArgumentException("LiteLLM does not support image generation", e);
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14). Data as JSON: /api/errors/8aa9a117f371d823. Report an issue: GitHub.