conductor-oss/conductor · error · UnsupportedOperationException

Not supported

Error message

Not supported

What it means

LiteLLM.java throws UnsupportedOperationException from generateEmbeddings() with message "Not supported". LiteLLM is configured as an OpenAI-compatible chat proxy (ToolCallingChatOptions path) but does not wire an embeddings implementation. AIModel.generateEmbeddings() (line 97) is abstract, so LiteLLM must override it — it declines by throwing.

Source

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

                        config.getApiKey(),
                        config.getBaseURL(),
                        "/v1/chat/completions");
        this.chatModel = new OpenAICompatChatModel(api);
    }

    @Override
    public String getModelProvider() {
        return NAME;
    }

    @Override
    public List<String> getProviderAliases() {
        return List.of("LiteLLM");
    }

    @Override
    public List<Float> generateEmbeddings(EmbeddingGenRequest embeddingGenRequest) {
        throw new UnsupportedOperationException("Not supported");
    }

    @Override
    public ChatOptions getChatOptions(ChatCompletion input) {
        List<ToolCallback> toolCallbacks = getToolCallback(input);
        Set<String> toolNames =
                toolCallbacks.stream()
                        .map(tc -> tc.getToolDefinition().name())
                        .collect(Collectors.toSet());

        return ToolCallingChatOptions.builder()
                .model(input.getModel())
                .temperature(input.getTemperature())
                .topP(input.getTopP())
                .maxTokens(input.getMaxTokens())
                .stopSequences(input.getStopWords())
                .frequencyPenalty(input.getFrequencyPenalty())
                .presencePenalty(input.getPresencePenalty())

View on GitHub (pinned to cf7c3e4a8a)

Solutions

  1. Route embedding tasks to openai, azureopenai, ollama, gemini, or cohere — providers that implement generateEmbeddings().
  2. Subclass LiteLLM and implement generateEmbeddings() by calling LiteLLM's /v1/embeddings proxy endpoint.
  3. Use LiteLLM only for chat-completion tasks in Conductor.

Example fix

// before
{"llmProvider": "litellm", "model": "text-embedding-3-small", "text": "hello"}
// after
{"llmProvider": "openai", "model": "text-embedding-3-small", "text": "hello"}
Defensive patterns

Strategy: validation

Validate before calling

// Check provider supports embeddings
private static final Set<String> EMBEDDING_CAPABLE = Set.of(
    "openai", "gemini", "azureopenai", "bedrock", "ollama", "cohere", "mistral");

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

Type guard

null

Try / catch

try {
    List<Float> embeddings = llm.generateEmbeddings(request);
} catch (UnsupportedOperationException e) {
    throw new IllegalArgumentException("LiteLLM does not support embeddings", e);
}

Prevention

When it happens

Trigger: An embedding-generation task (VectorDBWorkers or LLMWorkers.generateEmbeddings) is configured with llmProvider="litellm" or alias "LiteLLM". The call reaches llm.generateEmbeddings() and throws immediately.

Common situations: Using LiteLLM as a unified proxy gateway for chat and assuming the same provider handles embeddings (LiteLLM does proxy embeddings upstream, but this Conductor provider does not implement that path); reusing a chat provider config for a vector-store indexing task.

Related errors


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