Skip to content

feat(providers): add Eden AI provider (Chat Completions + Responses)#3741

Open
tristantelleb wants to merge 1 commit into
chatboxai:mainfrom
tristantelleb:feat/eden-ai-provider
Open

feat(providers): add Eden AI provider (Chat Completions + Responses)#3741
tristantelleb wants to merge 1 commit into
chatboxai:mainfrom
tristantelleb:feat/eden-ai-provider

Conversation

@tristantelleb

Copy link
Copy Markdown

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 the provider/model id format (e.g. openai/gpt-4o), plus a special @edenai auto-router id.

Two variants are registered, mirroring the existing openrouter and openai-responses providers:

Provider Type Endpoint
Eden AI OpenAI (extends OpenAICompatible) POST https://api.edenai.run/v3/chat/completions
Eden AI (Responses) OpenAIResponses POST 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.tsEdenAI + EdenAIResponses enum entries
  • src/shared/providers/definitions/eden-ai.ts + models/eden-ai.ts
  • src/shared/providers/definitions/eden-ai-responses.ts + models/eden-ai-responses.ts
  • src/shared/providers/index.ts — side-effect registration imports

Design note

The Responses variant uses a dedicated model class rather than the shared normalizeOpenAIResponsesHostAndPath helper. Eden AI keeps the version segment in the path (.../v3/responses), and the shared helper appends /v1 to any host not ending in /v1, which would produce an incorrect .../v3/v1/responses URL. The dedicated class routes requests explicitly to ${apiHost}${apiPath}, matching the pattern in models/openai-responses.ts.

Testing

  • pnpm exec biome lint on all changed files: clean.
  • pnpm run check (tsc): the new Eden AI files introduce zero type errors.
  • Contract invariants verified manually: unique provider ids, and every curatedModelId is present in defaultSettings.models.

⚠️ Heads-up unrelated to this PR: on current main (9c1db31), src/shared/providers/index.ts:29 imports ./definitions/github-copilot, but that file is not present in the tree. This causes pre-existing failures in pnpm run check and index.contract.test.ts independent of this change. Happy to rebase once that lands.

🤖 Generated with Claude Code

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>
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 800c1020-fc0f-4455-89b9-84c2cfefedce

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tristantelleb

Copy link
Copy Markdown
Author

@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,
Tristan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant