feat: add Eden AI integration (chat generator + embedders)#3517
feat: add Eden AI integration (chat generator + embedders)#3517MVS-source wants to merge 3 commits into
Conversation
Add `edenai-haystack`, a new integration exposing `EdenAIChatGenerator`, a chat generator backed by Eden AI's unified, OpenAI-compatible API (500+ models across providers, provider fallback, EU data residency). The component subclasses `OpenAIChatGenerator` and targets Eden AI's v3 endpoint (https://api.edenai.run/v3), inheriting chat, streaming, tool calling, async and pipeline (de)serialization. Models use Eden AI's `provider/model` naming convention (e.g. `openai/gpt-4o-mini`, `mistral/mistral-large-latest`). Includes unit + integration tests, README usage docs, a runnable RAG example, pydoc config, CI workflow, labeler entry and root README row.
Add text and document embedders backed by Eden AI's OpenAI-compatible embeddings endpoint, so the full RAG stack (retrieval + generation) can run through a single Eden AI key on EU-hosted models. Both subclass the Haystack OpenAI embedders and target https://api.edenai.run/v3, using Eden AI's `provider/model` naming (e.g. openai/text-embedding-3-small, mistral/mistral-embed). Updates the pydoc config, mypy targets, CHANGELOG, README and the root README integration row (now Embedder, Generator).
|
For context: adding this integration was greenlit by the Haystack team, and Eden AI will maintain it going forward. All unit and integration tests pass locally against the live Eden AI API — chat, streaming, tool calling, async, and text/document embeddings. Happy to provide an |
|
Thank you for opening this PR @MVS-source ! Could you please agree to the CLA #3517 (comment) ? If you plan to maintain the integration, I'd like to at least mention that there is the option of you keeping code ownership and releasing the integration yourself: https://github.com/deepset-ai/custom-component We would still promote the integration on our overview page in the same way. Your choice! |
Move EDENAI_API_KEY out of the workflow-level env: block and scope it to only the steps that run integration tests (Run integration tests, Nightly), matching the gha-workflow-env-secret SAST hardening applied to the other integration workflows. Prevents the secret from being exposed to unrelated steps and third-party actions. Signed-off-by: MVS-source <72023257+MVS-source@users.noreply.github.com>
Summary
This PR adds a new Eden AI integration:
edenai-haystack.Eden AI is a unified, OpenAI-compatible API that provides access to 500+ models across providers (OpenAI, Anthropic, Mistral, Google, Cohere, …) through a single API key, with built-in provider fallback and EU data residency.
LangChain already ships an Eden AI integration, but Haystack did not have one — this fills that gap, following the same gateway pattern as the existing
openrouterandcometapiintegrations.Components
EdenAIChatGenerator— subclassesOpenAIChatGenerator; supports streaming, tool calling, async (run_async) and pipeline (de)serialization.EdenAITextEmbedder/EdenAIDocumentEmbedder— subclass the Haystack OpenAI embedders; enable a full RAG stack (retrieval + generation) on Eden AI.All target Eden AI's OpenAI-compatible v3 endpoint (
https://api.edenai.run/v3) and use theprovider/modelnaming convention (e.g.openai/gpt-4o-mini,mistral/mistral-large-latest,openai/text-embedding-3-small).Testing
EDENAI_API_KEY.hatch run fmt-check(ruff) clean.EDENAI_API_KEYrepository secret is configured (referenced by.github/workflows/edenai.yml).Maintenance
Eden AI will maintain this integration.
Checklist
integrations/edenai/Opened as a draft to let CI run first.