{"record":{"id":"490054fb3f0b0911","repo":"conductor-oss/conductor","slug":"image-generation-not-supported-by-the-model-yet-490054","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/perplexity/PerplexityAI.java","lineNumber":80,"sourceCode":"                .maxTokens(input.getMaxTokens())\n                .topP(input.getTopP())\n                .temperature(input.getTemperature())\n                .toolCallbacks(getToolCallback(input))\n                .internalToolExecutionEnabled(false)\n                .frequencyPenalty(input.getFrequencyPenalty())\n                .topK(input.getTopK())\n                .presencePenalty(input.getPresencePenalty())\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":62,"sourceCodeEnd":83,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/ai/src/main/java/org/conductoross/conductor/ai/providers/perplexity/PerplexityAI.java#L62-L83","documentation":"Thrown by PerplexityAI.getImageModel as UnsupportedOperationException. Perplexity is a text/chat-only provider and has no image generation capability; getImageModel is intentionally unimplemented.","triggerScenarios":"Calling getImageModel() on a PerplexityAI instance, or routing an image-generation task to the perplexity provider.","commonSituations":"An image task configured with llmProvider=perplexity, or generic code that calls getImageModel() on every AIModel without checking capabilities.","solutions":["Route image generation to an image-capable provider (StabilityAI, OpenAI).","Guard getImageModel() calls with a capability check (e.g. getModelProvider()) before invocation.","Correct the llmProvider on the image task input."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (\"perplexity\".equals(model.getModelProvider())) {\n    throw new IllegalArgumentException(\n        \"Perplexity does not support image generation\");\n}\nImageModel img = model.getImageModel();","typeGuard":"boolean supportsImages(AIModel m) {\n    return !\"perplexity\".equals(m.getModelProvider());\n}","tryCatchPattern":"try {\n    ImageModel img = model.getImageModel();\n} catch (UnsupportedOperationException e) {\n    // provider lacks image generation; switch provider\n}","preventionTips":["Check getModelProvider() before calling getImageModel().","Route image tasks to StabilityAI or OpenAI.","Maintain a capability registry per provider."],"tags":["perplexity","image-generation","unsupported-operation","provider-capabilities"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}