feat(core): add Eden AI as a built-in model provider
What
Adds Eden AI as a built-in model provider.
Eden AI is an EU-based, OpenAI-compatible LLM gateway (single API key, one endpoint, many upstream vendors). Because it speaks the OpenAI-compatible protocol, it slots into the existing EXTRA_PROVIDER_REGISTRY and is wired through the shared @ai-sdk/openai-compatible adapter, exactly like the MiniMax entries. No new adapter code is required.
Usage
const agent = new Agent({
name: "Eden AI Assistant",
instructions: "You are a helpful assistant powered by Eden AI.",
model: "edenai/openai/gpt-4o-mini",
});
Eden AI model ids are vendor-prefixed, so the full router id is edenai/<vendor>/<model>, for example:
edenai/openai/gpt-4o-miniedenai/anthropic/claude-haiku-4-5edenai/mistral/mistral-small-latest
The provider reads EDENAI_API_KEY and defaults to https://api.edenai.run/v3. Set EDENAI_BASE_URL=https://api.eu.edenai.run/v3 for EU data residency. The registry splits on the first slash, so the edenai segment is the provider and the remaining <vendor>/<model> is passed straight through to Eden AI.
Changes
packages/core/src/registries/model-provider-registry.ts: oneEXTRA_PROVIDER_REGISTRYentry (id: "edenai",@ai-sdk/openai-compatible,api: https://api.edenai.run/v3,env: ["EDENAI_API_KEY"]).packages/core/src/registries/model-provider-registry-edenai.spec.ts: unit tests mirroring the MiniMax spec (provider is registered, resolves through@ai-sdk/openai-compatiblewith the right base URL and API key, keeps the vendor-prefixed model id after the provider segment, honorsEDENAI_BASE_URL, throws when the key is missing).examples/with-edenai/: runnable example mirroringexamples/with-openrouter..changeset/edenai-provider.md: patch changeset for@voltagent/core.
Testing
- Unit: the new spec and the existing MiniMax spec both pass (
vitest runon the registry specs, 13 tests). - Live: verified end to end against the real Eden AI API with a real key, reproducing the registry adapter path (
createOpenAICompatible({ name: "edenai", baseURL: "https://api.edenai.run/v3", apiKey })) andgenerateTextfromai@6. Three upstream vendors returned completions:openai/gpt-4o-mini,anthropic/claude-haiku-4-5,mistral/mistral-small-latest. - Lint/format:
biome checkclean; example typechecks withtsc --noEmit.
Summary by cubic
Add Eden AI as a built-in model provider via the @ai-sdk/openai-compatible adapter, enabling models addressed as edenai/<vendor>/<model> with EU endpoint support. Includes a runnable example and unit tests; no new adapter code.
- New Features
- Register
edenaiinEXTRA_PROVIDER_REGISTRYwith APIhttps://api.edenai.run/v3; readsEDENAI_API_KEYand supportsEDENAI_BASE_URL. - Preserve vendor-prefixed ids after
edenai/(e.g.edenai/openai/gpt-4o-mini). - Add
examples/with-edenaiand a spec verifying registration, base URL override, and missing-key errors.
- Register
Summary by CodeRabbit
-
New Features
- Added built-in Eden AI model provider support.
- Use vendor-prefixed model IDs such as
edenai/openai/gpt-4o-mini. - Configure access with
EDENAI_API_KEY; optional EU routing is supported throughEDENAI_BASE_URL. - Added a complete Eden AI example application with memory, logging, and server integration.
-
Documentation
- Added setup instructions, configuration guidance, and usage details for Eden AI.