Skip to content

feat(llm): add built-in Eden AI provider preset#346

Merged
lizhengfeng101 merged 1 commit into
alibaba:mainfrom
MVS-source:feat/edenai-provider
Jul 10, 2026
Merged

feat(llm): add built-in Eden AI provider preset#346
lizhengfeng101 merged 1 commit into
alibaba:mainfrom
MVS-source:feat/edenai-provider

Conversation

@MVS-source

Copy link
Copy Markdown
Contributor

Description

Adds Eden AI (https://www.edenai.co) as a built-in provider preset in internal/llm/providers.go, as discussed in #338. Eden AI is an OpenAI-compatible aggregator that exposes 100+ models from many providers (OpenAI, Anthropic, Google, Mistral, DeepSeek, xAI, …) through a single EU-hosted endpoint and one API key. Models use the provider/model naming scheme.

Mirrors the existing OpenAI-compatible presets (same shape as the recently added Ollama Cloud preset #310):

  • Protocol: openai
  • BaseURL: https://api.edenai.run/v3
  • EnvVar: EDENAI_API_KEY
  • a small curated Models list (anthropic/claude-sonnet-4-5, openai/gpt-5.1-codex, mistral/codestral-latest, deepseek/deepseek-v4-pro, …)

From a user's perspective: ocr config provider → pick Eden AI → supply a key (or set EDENAI_API_KEY) → done.

Closes #338

Testing

  • go build ./... and go test ./internal/llm/ pass (the provider-registry tests were updated to include edenai).
  • gofmt / go vet clean.
  • Verified live against the Eden AI API (/v3/chat/completions and /v3/models both 200).
  • API key is read from EDENAI_API_KEY; never hardcoded.

Happy to adjust the curated model list to your preference.

Eden AI (https://www.edenai.co) is an OpenAI-compatible aggregator that exposes 100+ models from multiple providers through a single EU-hosted endpoint and API key.

Registers it as a built-in provider preset (protocol openai, base URL https://api.edenai.run/v3, key via EDENAI_API_KEY), mirroring the existing OpenAI-compatible presets. Models use Eden AI's provider/model naming. Updates the provider registry tests accordingly.

Signed-off-by: Victor M. SMITH <72023257+MVS-source@users.noreply.github.com>
@CLAassistant

CLAassistant commented Jul 9, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

OpenCodeReview: No comments generated. Looks good to me.

@lizhengfeng101 lizhengfeng101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Code Review

Overall

Clean, well-structured PR that follows the existing OpenAI-compatible provider pattern exactly. The two-file change is minimal and focused. Test updates are correct — "edenai" is inserted in the right alphabetical position in TestListProviders_Order.

Issue: Outdated Model List

The curated model list appears to be significantly behind what vendors currently recommend. Comparing against this project's own provider registry:

Vendor This repo's current provider list Eden AI PR proposes
Anthropic claude-opus-4-8, claude-opus-4-7, claude-opus-4-6, claude-sonnet-4-6 claude-opus-4-5, claude-sonnet-4-5, claude-haiku-4-5
OpenAI gpt-5.5, gpt-5.4, gpt-5.4-mini gpt-5.1, gpt-5.1-codex

The Anthropic models in the PR are 3 generations behind the latest Opus (4.5 vs 4.8) and 1 generation behind on Sonnet (4.5 vs 4.6). The OpenAI models are similarly outdated (5.1 vs 5.4/5.5). These older model versions are generally no longer recommended by the vendors themselves.

Suggestion: Update the model list to reflect current recommended models. For example:

Models: []string{
    "anthropic/claude-opus-4-8",
    "anthropic/claude-sonnet-4-6",
    "anthropic/claude-haiku-4-5",
    "openai/gpt-5.5",
    "openai/gpt-5.4-mini",
    "google/gemini-3.1-pro-preview",
    "mistral/devstral-medium-latest",
    "mistral/codestral-latest",
    "deepseek/deepseek-v4-pro",
    "xai/grok-4",
},

Of course, the exact model IDs depend on what Eden AI actually supports via its provider/model routing — please verify against Eden AI's /v3/models endpoint and update accordingly.

Minor

  • BaseURL /v3: Other OpenAI-compatible providers in this project use /v1. The PR description confirms /v3/chat/completions works, so this is fine — just noting the difference.
  • Everything else (env var naming, no hardcoded secrets, test coverage) looks good.

@lizhengfeng101 lizhengfeng101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@lizhengfeng101 lizhengfeng101 merged commit 802af6b into alibaba:main Jul 10, 2026
3 checks passed
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.

Feature: add Eden AI as a built-in provider preset

3 participants