Skip to content

[BUG] OpenAI Embeddings Custom silently falls back to 192-dim embeddings when using LiteLLM + Infinity backend #5693

@periti1

Description

@periti1

When using the "OpenAI Embeddings Custom" node connected to a LiteLLM proxy with Infinity as the embedding backend, Flowise silently falls back to an internal 192-dimension embedder instead of using the
configured API.

This causes a dimension mismatch error when querying vector stores that were populated with the correct 768-dimension embeddings:
Error searching for documents: 22000 different vector dimensions 768 and 192 null

To Reproduce

  1. Set up LiteLLM proxy with Infinity backend serving nomic-embed-text (768 dims)
  2. Create a flow with "OpenAI Embeddings Custom" node:
    • BasePath: http://<litellm-host>:4000/v1
    • Model: nomic-embed-text
    • Credential: Valid API key
  3. Connect to a Supabase/pgvector store with 768-dim vectors
  4. Try to query the vector store

Expected behavior

Flowise should either:

  1. Successfully call the LiteLLM/Infinity API and return 768-dim embeddings, OR
  2. Throw a clear error if the API call fails

Current behavior

  • Flowise silently falls back to an internal 192-dimension embedder
  • No error is shown in the UI
  • The vector search fails due to dimension mismatch

Evidence that the API works correctly

Calling the same endpoint from CLI returns correct 768-dim embeddings:

curl -s http://<litellm-host>:4000/v1/embeddings \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{"model": "nomic-embed-text", "input": "test"}'
# Returns embedding with 768 dimensions ✓

Workaround

Using the native "Ollama Embeddings" node instead of "OpenAI Embeddings Custom" works correctly with the same model.

Environment

- Flowise version: latest (Docker image flowiseai/flowise:latest)
- LiteLLM version: latest
- Infinity version: latest
- Embedding model: nomic-embed-text (768 dimensions)
- Vector store: Supabase with pgvector

Additional context

The issue appears to be in how Flowise handles the response from LiteLLM/Infinity. The fallback to 192 dimensions happens silently without any error logging, making it very difficult to debug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions