conductor-oss/conductor · error · UnsupportedOperationException
Not supported
Error message
Not supported
What it means
HuggingFace.java throws UnsupportedOperationException from generateEmbeddings() with message "Not supported". HuggingFace is wired to OpenAI Responses API for chat (see constructor at line 60-62), but embeddings are not implemented. AIModel.generateEmbeddings() (line 97) is abstract, so the provider must override it — HuggingFace declines by throwing. Called via LLMHelper.generateEmbeddings() which delegates directly to llm.generateEmbeddings().
Source
Thrown at ai/src/main/java/org/conductoross/conductor/ai/providers/huggingface/HuggingFace.java:67
}
public HuggingFace(HuggingFaceConfiguration config, OkHttpClient httpClient) {
this.config = config;
// Bearer auth (azureAuth=false via the 3-arg constructor). baseURL is the
// router /v1 root; the client appends /responses.
OpenAIResponsesApi responsesApi =
new OpenAIResponsesApi(httpClient, config.getApiKey(), config.getBaseURL());
this.chatModel = new OpenAIResponsesChatModel(responsesApi);
}
@Override
public String getModelProvider() {
return NAME;
}
@Override
public List<Float> generateEmbeddings(EmbeddingGenRequest embeddingGenRequest) {
throw new UnsupportedOperationException("Not supported");
}
@Override
public ChatOptions getChatOptions(ChatCompletion input) {
List<Tool> tools = convertTools(input);
return OpenAIResponsesChatOptions.builder()
.model(input.getModel())
.temperature(input.getTemperature())
.topP(input.getTopP())
.frequencyPenalty(input.getFrequencyPenalty())
.presencePenalty(input.getPresencePenalty())
.maxTokens(input.getMaxTokens())
.stopSequences(input.getStopWords())
.jsonOutput(input.isJsonOutput())
.responsesApiTools(tools.isEmpty() ? null : tools)
.build();
}
View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Route the embedding task to a provider that implements generateEmbeddings(): openai, gemini, azureopenai, bedrock, ollama, or cohere.
- If you need HuggingFace embeddings, subclass HuggingFace and implement generateEmbeddings() by calling HuggingFace's /embeddings or sentence-transformers endpoint.
- Split workflow: use HuggingFace for chat, openai/ollama for embedding.
Example fix
// before
{"llmProvider": "huggingface", "model": "bge-large-en", "text": "hello"}
// after
{"llmProvider": "openai", "model": "text-embedding-3-small", "text": "hello"} Defensive patterns
Strategy: validation
Validate before calling
// Check provider supports embeddings before calling generateEmbeddings()
private static final Set<String> EMBEDDING_CAPABLE = Set.of(
"openai", "gemini", "azureopenai", "bedrock", "ollama", "cohere", "mistral");
String provider = request.getLlmProvider();
if (!EMBEDDING_CAPABLE.contains(provider)) {
throw new IllegalArgumentException(
"Provider '" + provider + "' does not support embeddings. " +
"Supported: " + EMBEDDING_CAPABLE);
} Type guard
null
Try / catch
try {
List<Float> embeddings = llm.generateEmbeddings(request);
} catch (UnsupportedOperationException e) {
throw new IllegalArgumentException(
"Provider '" + providerName + "' does not support embeddings: " + e.getMessage(), e);
} Prevention
- Maintain a capability set for embeddings-capable providers.
- Validate the provider when configuring vector-store/indexing workflows.
- Use a dedicated embeddings provider config separate from chat provider config.
When it happens
Trigger: A VectorDB worker or LLMEmbeddingGen task is configured with llmProvider="huggingface". VectorDBWorkers.generateEmbeddings() (line 75) or LLMWorkers calls llm.generateEmbeddings(), which throws UnsupportedOperationException before any HTTP request.
Common situations: Using HuggingFace TGI (Text Generation Inference) for chat but routing an embedding/indexing pipeline to the same provider; assuming HuggingFace's inference endpoints cover embeddings (they do have an embedding API but this provider doesn't wire it).
Related errors
- Image generation not supported by the model yet
- Not supported
- Not supported
- Image generation not supported by the model yet
- Image generation not supported by the model yet
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/875105b3c78a71f4.
Report an issue: GitHub.