Python: Add Eden AI chat client provider#7308
Open
MVS-source wants to merge 2 commits into
Open
Conversation
Eden AI is a gateway to many model providers behind one OpenAI compatible API and a single key. This adds an agent-framework-edenai package with an EdenAIChatClient, following the same pattern as the Foundry Local client (it subclasses the OpenAI chat completion client and points it at the Eden AI base URL). Models use the provider/model format, for example openai/gpt-4o-mini or anthropic/claude-sonnet-4-5, so the catalog is not hardcoded. - New package python/packages/edenai (client, settings, options, tests, README, AGENTS) - Namespace shim agent_framework.edenai in core, plus the workspace source entry - EDENAI_API_KEY, EDENAI_MODEL and optional EDENAI_BASE_URL settings - Provider sample under samples/02-agents/providers/edenai and a row in the providers overview - cspell dictionary entry Verified end to end against the live Eden AI API (openai and anthropic models). ruff, mypy and pyright are clean and the unit tests pass.
MVS-source
temporarily deployed
to
github-app-auth
July 24, 2026 16:57 — with
GitHub Actions
Inactive
MVS-source
temporarily deployed
to
github-app-auth
July 24, 2026 16:57 — with
GitHub Actions
Inactive
MVS-source
temporarily deployed
to
github-app-auth
July 24, 2026 16:57 — with
GitHub Actions
Inactive
MVS-source
temporarily deployed
to
github-app-auth
July 24, 2026 16:58 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Python provider package (agent-framework-edenai) that integrates Eden AI as an OpenAI-compatible gateway, along with a core agent_framework.edenai shim, sample usage, and unit tests consistent with existing provider packages.
Changes:
- Introduces
agent-framework-edenaipackage withEdenAIChatClient, settings resolution (EDENAI_*), middleware/telemetry/function-invocation composition, and typed options. - Wires the connector into the workspace and core namespace shim (
agent_framework.edenai) for optional installation. - Adds a provider sample and unit tests mirroring the Foundry Local pattern, plus docs/spellcheck updates.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| python/samples/02-agents/providers/README.md | Adds Eden AI to the provider samples index. |
| python/samples/02-agents/providers/edenai/README.md | Documents setup/env vars and links the Eden AI sample script. |
| python/samples/02-agents/providers/edenai/edenai_chat_client.py | Runnable Eden AI client sample including a function tool. |
| python/pyproject.toml | Registers agent-framework-edenai as a workspace package dependency. |
| python/packages/edenai/tests/test_edenai_client.py | Adds settings/client initialization tests and signature shape assertions. |
| python/packages/edenai/tests/conftest.py | Adds test env fixtures for EDENAI_* variables. |
| python/packages/edenai/README.md | Adds package README and quickstart snippet. |
| python/packages/edenai/pyproject.toml | Defines the new package metadata, dependencies, and tooling config. |
| python/packages/edenai/LICENSE | Adds package license file. |
| python/packages/edenai/AGENTS.md | Adds package-level usage/config documentation for contributors. |
| python/packages/edenai/agent_framework_edenai/py.typed | Marks the package as typed for type checkers. |
| python/packages/edenai/agent_framework_edenai/_chat_client.py | Implements EdenAIChatClient, options/settings, and OpenAI-compatible client wiring. |
| python/packages/edenai/agent_framework_edenai/init.py | Exposes public API and package version. |
| python/packages/core/agent_framework/edenai/init.pyi | Adds typing-only re-exports for the core shim namespace. |
| python/packages/core/agent_framework/edenai/init.py | Adds lazy import shim for optional Eden AI connector. |
| python/.cspell.json | Adds edenai to the dictionary. |
| @@ -0,0 +1,19 @@ | |||
| # Get Started with Microsoft Agent Framework Eden AI | |||
|
|
|||
| Please install this package as the extra for `agent-framework`: | |||
Comment on lines
+12
to
+16
| from agent_framework.edenai import EdenAIChatClient | ||
|
|
||
| # Reads EDENAI_API_KEY from the environment, or pass api_key=... | ||
| client = EdenAIChatClient(model="openai/gpt-4o-mini") | ||
| response = await client.get_response("Hello") |
Comment on lines
+14
to
+17
| from agent_framework.edenai import EdenAIChatClient | ||
|
|
||
| client = EdenAIChatClient(model="openai/gpt-4o-mini") | ||
| response = await client.get_response("Hello") |
Author
|
@microsoft-github-policy-service agree company="Eden AI" |
The README and AGENTS.md examples passed a raw string to get_response, which expects a list of Message objects and would fail at runtime. Also aligned the install line wording with the other provider packages.
MVS-source
temporarily deployed
to
github-app-auth
July 27, 2026 09:26 — with
GitHub Actions
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an
agent-framework-edenaipackage with anEdenAIChatClient.Eden AI is a gateway to many model providers behind one OpenAI compatible API and a single key, so one integration gives access to a broad model catalog. It is hosted in the EU and does not store prompts or outputs by default, which is a useful option for teams with data residency needs. Models use the
provider/modelformat (for exampleopenai/gpt-4o-minioranthropic/claude-sonnet-4-5), so the catalog is not hardcoded.What is included:
python/packages/edenaiwithEdenAIChatClient,EdenAIChatOptionsandEdenAISettings. It follows the Foundry Local pattern: it subclasses the OpenAI chat completion client and points it at the Eden AI base URL, since Eden AI is OpenAI compatible.agent_framework.edenainamespace shim in core, plus the workspace source entry so the package resolves like the other connectors.EDENAI_API_KEY,EDENAI_MODEL, and optionalEDENAI_BASE_URL(defaults tohttps://api.edenai.run/v3).samples/02-agents/providers/edenai, a row in the providers overview, and a cspell dictionary entry.Notes:
openaiSDK already used by the OpenAI package).ruff format,ruff check,mypyandpyrightare clean, and the unit tests pass.Happy to adjust naming, versioning or the docs wiring to match your conventions. I can also add an embedding client later if that is useful.