fix(embeddings/registry): add DeepInfra to embedding provider registry (#2298)

Custom embedding models on the DeepInfra provider (e.g.
Qwen/Qwen3-Embedding-8B) were rejected by createEmbeddingResponse with
'Unknown embedding provider: deepinfra. No matching hardcoded or local
provider found.' because the registry only included Nebius/OpenAI/Together/
Fireworks/NVIDIA/Mistral/Voyage/Jina/Gemini. The fallback to
provider_nodes only resolves localhost/172.x dev URLs, so remote DeepInfra
keys had no path to /v1/embeddings.

Adds DeepInfra with 8 popular embedding models (Qwen3-Embedding-8B/4B/0.6B,
BGE Large/Base/M3, E5 Large v2, GTE Large) routed through
https://api.deepinfra.com/v1/openai/embeddings.

Part 1 (incomplete model list import) still needs reproduction details
from the reporter and will be tracked separately.
This commit is contained in:
diegosouzapw
2026-05-16 10:14:57 -03:00
parent 124ed82f02
commit 52222aaf76

View File

@@ -114,6 +114,26 @@ export const EMBEDDING_PROVIDERS: Record<string, EmbeddingProvider> = {
models: [{ id: "nvidia/nv-embedqa-e5-v5", name: "NV EmbedQA E5 v5", dimensions: 1024 }],
},
// Issue #2298: Adding DeepInfra to the embedding registry so custom
// embedding models on the DeepInfra provider don't fail with "Unknown
// embedding provider" when the user adds them via the dashboard.
deepinfra: {
id: "deepinfra",
baseUrl: "https://api.deepinfra.com/v1/openai/embeddings",
authType: "apikey",
authHeader: "bearer",
models: [
{ id: "Qwen/Qwen3-Embedding-8B", name: "Qwen3 Embedding 8B", dimensions: 4096 },
{ id: "Qwen/Qwen3-Embedding-4B", name: "Qwen3 Embedding 4B", dimensions: 2560 },
{ id: "Qwen/Qwen3-Embedding-0.6B", name: "Qwen3 Embedding 0.6B", dimensions: 1024 },
{ id: "BAAI/bge-large-en-v1.5", name: "BGE Large EN v1.5", dimensions: 1024 },
{ id: "BAAI/bge-base-en-v1.5", name: "BGE Base EN v1.5", dimensions: 768 },
{ id: "BAAI/bge-m3", name: "BGE-M3", dimensions: 1024 },
{ id: "intfloat/e5-large-v2", name: "E5 Large v2", dimensions: 1024 },
{ id: "thenlper/gte-large", name: "GTE Large", dimensions: 1024 },
],
},
openrouter: {
id: "openrouter",
baseUrl: "https://openrouter.ai/api/v1/embeddings",