Skip to content

Python: Add Eden AI chat client provider#7308

Open
MVS-source wants to merge 2 commits into
microsoft:mainfrom
MVS-source:add-edenai-provider
Open

Python: Add Eden AI chat client provider#7308
MVS-source wants to merge 2 commits into
microsoft:mainfrom
MVS-source:add-edenai-provider

Conversation

@MVS-source

Copy link
Copy Markdown

Adds an agent-framework-edenai package with an EdenAIChatClient.

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/model format (for example openai/gpt-4o-mini or anthropic/claude-sonnet-4-5), so the catalog is not hardcoded.

What is included:

  • New package python/packages/edenai with EdenAIChatClient, EdenAIChatOptions and EdenAISettings. 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.edenai namespace shim in core, plus the workspace source entry so the package resolves like the other connectors.
  • Settings: EDENAI_API_KEY, EDENAI_MODEL, and optional EDENAI_BASE_URL (defaults to https://api.edenai.run/v3).
  • A provider sample under samples/02-agents/providers/edenai, a row in the providers overview, and a cspell dictionary entry.
  • Unit tests mirroring the Foundry Local package tests.

Notes:

  • No new dependency (reuses the openai SDK already used by the OpenAI package).
  • Verified end to end against the live Eden AI API with both an OpenAI and an Anthropic model routed through the gateway.
  • ruff format, ruff check, mypy and pyright are 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.

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.
Copilot AI review requested due to automatic review settings July 24, 2026 16:57
@MVS-source
MVS-source temporarily deployed to github-app-auth July 24, 2026 16:57 — with GitHub Actions Inactive
@MVS-source
MVS-source temporarily deployed to github-app-auth July 24, 2026 16:57 — with GitHub Actions Inactive
@MVS-source
MVS-source temporarily deployed to github-app-auth July 24, 2026 16:57 — with GitHub Actions Inactive
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python labels Jul 24, 2026
@MVS-source
MVS-source temporarily deployed to github-app-auth July 24, 2026 16:58 — with GitHub Actions Inactive
@github-actions github-actions Bot changed the title Add Eden AI chat client provider Python: Add Eden AI chat client provider Jul 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-edenai package with EdenAIChatClient, 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.

Comment thread python/packages/edenai/README.md Outdated
@@ -0,0 +1,19 @@
# Get Started with Microsoft Agent Framework Eden AI

Please install this package as the extra for `agent-framework`:
Comment thread python/packages/edenai/README.md Outdated
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 thread python/packages/edenai/AGENTS.md Outdated
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")
@MVS-source

Copy link
Copy Markdown
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
MVS-source temporarily deployed to github-app-auth July 27, 2026 09:26 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants