Repository navigation
feat(embedding): add a provider-neutral LiteLLM embedding node #2065
Description
Problem
embedding_openai declares six profiles with modelSource: "litellm", but
OpenAIEmbeddingWrapper never reads modelSource. It passes every selected
model directly to LangChain's OpenAIEmbeddings using the default OpenAI
endpoint and probes the model during startup.
The affected profiles are:
text-embedding-004text-embedding-005text-embedding-3-small-inferencetext-embedding-ada-002-v2text-embedding-large-exp-03-07text-embedding-preview-0409
Selecting one sends a non-OpenAI model identifier to OpenAI, so startup fails
before the node processes documents or questions.
CodeRabbit found this while reviewing the regenerated README in #1975:
#1975 (comment)
The short-term documentation clarification is committed in #1975. It identifies
the three profiles that currently work and explains that the other six are not
routed.
Proposed direction
Create a provider-neutral embedding_litellm node instead of adding multiple
providers to embedding_openai.
Keep embedding_openai limited to direct OpenAI models. A separate LiteLLM
node makes the provider boundary, credentials, dependencies, model naming, and
failure behavior explicit.
Use LiteLLM's embedding API or a deliberately configured LiteLLM proxy. Do not
send LiteLLM profiles through OpenAIEmbeddings without an explicit compatible
endpoint.
Before moving any of the six profiles, verify that LiteLLM currently supports
the model and determine its canonical provider-prefixed identifier and required
credentials. The existing raw identifiers should not be assumed to be routable.
Acceptance criteria
- Add an
embedding_litellmnode with the samedocumentsandquestions
lane contract as the existing text embedding nodes. - Route document batches and single questions through LiteLLM's embedding
surface or an explicitly configured LiteLLM proxy. - Require provider-qualified model identifiers where LiteLLM requires them.
- Define secure, provider-appropriate credential and endpoint configuration;
do not assume one OpenAI API key works for every provider. - Probe vector size through the selected LiteLLM backend, not the OpenAI
backend. - Preserve the requirement that ingestion and querying use the same embedding
model and vector dimensions. - Audit all six affected profiles. Add only profiles proven to work through
the selected route; remove or leave unsupported any model that cannot be
verified. - Keep
embedding_openaiwith only direct OpenAI profiles after the migration. - Add tests for profile routing, authentication selection, document batching,
question embedding, startup probing, and clear provider errors. - Add a README following
docs/development/nodes/readme-schema.mdand regenerate
machine-owned parameter sections. - Validate both nodes with
scripts/validate-node-readme.pyand relevant node
tests.
Why a separate node
embedding_openai is provider-specific in its name, dependency, credential
model, and implementation. Teaching it to switch among unrelated providers
would make its contract misleading and create conditional authentication and
endpoint behavior inside an OpenAI node. embedding_litellm gives users an
explicit choice between direct OpenAI access and provider-neutral routing.
Activity
github-actions commentedon Aug 21, 2026
🤖 Internal: Discord sync marker
Auto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete.
airouter-dev commentedon Aug 27, 2026
The separate embedding_litellm node is a good boundary. I would make the acceptance contract explicit around the vector shape and provider identity:
If an account-visible embedding model is available, I operate AI Router, whose OpenAI-compatible API root is https://api.ai-router.dev/v1. It can be an optional manual fixture for the embeddings path only; it should not be treated as evidence that every account or model supports embeddings.
Disclosure: I represent AI Router. This is a provider-neutral RAG/embedding test suggestion, not a request for a named provider integration or a pricing/free-credit promotion.