Skip to content

feat: add Eden AI integration (chat generator + embedders)#3517

Open
MVS-source wants to merge 3 commits into
deepset-ai:mainfrom
edenai:integration/add-edenai
Open

feat: add Eden AI integration (chat generator + embedders)#3517
MVS-source wants to merge 3 commits into
deepset-ai:mainfrom
edenai:integration/add-edenai

Conversation

@MVS-source

Copy link
Copy Markdown

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 openrouter and cometapi integrations.

Components

  • EdenAIChatGenerator — subclasses OpenAIChatGenerator; 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 the provider/model naming convention (e.g. openai/gpt-4o-mini, mistral/mistral-large-latest, openai/text-embedding-3-small).

Testing

  • Unit tests (mocked) + integration tests gated on EDENAI_API_KEY.
  • 37/37 tests pass locally, including live integration tests against the real Eden AI API (chat, streaming, tool calling, async, multi-turn, RAG pipeline, and text/document embeddings).
  • hatch run fmt-check (ruff) clean.
  • Integration tests skip in CI unless an EDENAI_API_KEY repository secret is configured (referenced by .github/workflows/edenai.yml).

Maintenance

Eden AI will maintain this integration.

Checklist

  • New integration package under integrations/edenai/
  • Unit + integration tests
  • README + docstrings + pydoc config
  • CI workflow, labeler entry, root README row
  • Runnable example

Opened as a draft to let CI run first.

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).
@CLAassistant

CLAassistant commented Jul 1, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added topic:CI type:documentation Improvements or additions to documentation labels Jul 1, 2026
@MVS-source MVS-source marked this pull request as ready for review July 1, 2026 14:30
@MVS-source

Copy link
Copy Markdown
Author

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 EDENAI_API_KEY repository secret if you'd like the integration tests to run in CI as well.

@MVS-source MVS-source requested a review from a team as a code owner July 1, 2026 14:30
@MVS-source MVS-source requested review from julian-risch and removed request for a team July 1, 2026 14:30
@julian-risch

Copy link
Copy Markdown
Member

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!
Regarding an API key for CI tests, yes, please. If we go forward with this PR, we would appreciate an API key for that. Feel free to message us via email or discord.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic:CI type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants