diegosouzapw/OmniRoute · error · Error
Embeddings request failed
Error message
Embeddings request failed (${res.status}) What it means
embedText(): the createEmbeddingResponse call for the configured provider/model returned a non-OK status and its (truncated) body was empty or unusable, so the fallback message with the status code is thrown.
Solutions
- Check the embedding provider's credential/quota (body text is preferred when present)
- Retry on 429/5xx with backoff
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at src/lib/memory/qdrant.ts:296 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/c05a0a72ee6e8055.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/memory/qdrant.ts:296
}
const names = Object.keys(vectors);
if (names.length === 0) return null;
return names[0] || null;
}
async function embedText(cfg: QdrantConfig, text: string): Promise<number[]> {
const modelStr = cfg.embeddingModel.trim();
if (!modelStr.includes("/")) {
throw new Error(`Invalid embedding model '${modelStr}'. Use provider/model format.`);
}
const res = await createEmbeddingResponse({
model: modelStr,
input: text,
});
if (!res.ok) {
const txt = await res.text().catch(() => "");
throw new Error(txt.slice(0, 300) || `Embeddings request failed (${res.status})`);
}
const data = (await res.json().catch(() => null)) as any;
const vec = data?.data?.[0]?.embedding;
if (!Array.isArray(vec) || vec.length === 0) {
throw new Error("Embedding response missing vector");
}
return vec as number[];
}
export async function upsertSemanticMemoryPoint(input: {
id: string;
apiKeyId: string;
sessionId: string;
key: string;
content: string;
metadata: JsonRecord;
createdAt: string;
expiresAt: string | null;View on GitHub (pinned to a179ffed5b)