feat(providers): add Eden AI provider (Chat Completions + Responses)#3741
feat(providers): add Eden AI provider (Chat Completions + Responses)#3741tristantelleb wants to merge 1 commit into
Conversation
Adds Eden AI (https://www.edenai.co) as a built-in provider via the registry architecture. Eden AI is an OpenAI-compatible aggregator that routes to 100+ models from many providers using the `provider/model` id format (e.g. `openai/gpt-4o`), plus a special `@edenai` auto-router. Two variants are registered: - "Eden AI" — Chat Completions (type OpenAI, extends OpenAICompatible), apiHost https://api.edenai.run/v3 - "Eden AI (Responses)" — the stateful Responses API (type OpenAIResponses), apiHost https://api.edenai.run/v3, path /responses The Responses variant uses a dedicated model class instead of the shared normalizeOpenAIResponsesHostAndPath helper, because Eden AI keeps the version segment in the path (.../v3/responses) and the shared helper would incorrectly append /v1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@themez , could you please take a look at the PR? The goal is to add an EU-based provider, similar to OpenRouter, to Chatbox. We noticed that some of our users also use Chatbox, so we thought it could be valuable to explore a collaboration. Best regards, |
What
Adds Eden AI (edenai.co) as a built-in provider through the registry architecture (
docs/adding-new-provider.md). Eden AI is an OpenAI-compatible aggregator that routes to 100+ models across many providers using theprovider/modelid format (e.g.openai/gpt-4o), plus a special@edenaiauto-router id.Two variants are registered, mirroring the existing
openrouterandopenai-responsesproviders:OpenAI(extendsOpenAICompatible)POST https://api.edenai.run/v3/chat/completionsOpenAIResponsesPOST https://api.edenai.run/v3/responses(stateful)Both authenticate with the Eden AI API key as a Bearer token, and model discovery uses
GET https://api.edenai.run/v3/models.Files
src/shared/types/provider.ts—EdenAI+EdenAIResponsesenum entriessrc/shared/providers/definitions/eden-ai.ts+models/eden-ai.tssrc/shared/providers/definitions/eden-ai-responses.ts+models/eden-ai-responses.tssrc/shared/providers/index.ts— side-effect registration importsDesign note
The Responses variant uses a dedicated model class rather than the shared
normalizeOpenAIResponsesHostAndPathhelper. Eden AI keeps the version segment in the path (.../v3/responses), and the shared helper appends/v1to any host not ending in/v1, which would produce an incorrect.../v3/v1/responsesURL. The dedicated class routes requests explicitly to${apiHost}${apiPath}, matching the pattern inmodels/openai-responses.ts.Testing
pnpm exec biome linton all changed files: clean.pnpm run check(tsc): the new Eden AI files introduce zero type errors.curatedModelIdis present indefaultSettings.models.🤖 Generated with Claude Code