Mintplex-Labs/anything-llm · error · Error
Azure OpenAI Failed to embed
Error message
Azure OpenAI Failed to embed: ${error} What it means
Aggregation guard in AzureOpenAiEmbedder.embedChunks: one or more chunk embedding sub-requests returned per-chunk errors (collected, deduplicated, and joined), so the batch is treated as failed and the combined error detail is rethrown to the caller.
Solutions
- Check the Azure endpoint, key, and deployment name.
- Verify the deployment exists and the API version is supported.
- Review the embedded error for details.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown when an embedding request to Azure OpenAI fails.
Common situations: Bad credentials, wrong deployment name, or API error.
AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18).
Data as JSON: /api/errors/1ac91a780c02faa7.
Report an issue: GitHub.
Appendix: source
Thrown at server/utils/EmbeddingEngines/azureOpenAi/index.js:105
.flat();
if (errors.length > 0) {
let uniqueErrors = new Set();
errors.map((error) =>
uniqueErrors.add(`[${error.type}]: ${error.message}`)
);
return {
data: [],
error: Array.from(uniqueErrors).join(", "),
};
}
return {
data: results.map((res) => res?.data || []).flat(),
error: null,
};
});
if (!!error) throw new Error(`Azure OpenAI Failed to embed: ${error}`);
return data.length > 0 &&
data.every((embd) => embd.hasOwnProperty("embedding"))
? data.map((embd) => embd.embedding)
: null;
}
}
module.exports = {
AzureOpenAiEmbedder,
};
View on GitHub (pinned to 3aec848f28)