feat(llm): add built-in Eden AI provider preset#346
Conversation
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>
|
✅ OpenCodeReview: No comments generated. Looks good to me. |
lizhengfeng101
left a comment
There was a problem hiding this comment.
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/completionsworks, so this is fine — just noting the difference. - Everything else (env var naming, no hardcoded secrets, test coverage) looks good.
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 theprovider/modelnaming scheme.Mirrors the existing OpenAI-compatible presets (same shape as the recently added Ollama Cloud preset #310):
Protocol: openaiBaseURL: https://api.edenai.run/v3EnvVar: EDENAI_API_KEYModelslist (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 setEDENAI_API_KEY) → done.Closes #338
Testing
go build ./...andgo test ./internal/llm/pass (the provider-registry tests were updated to includeedenai).gofmt/go vetclean./v3/chat/completionsand/v3/modelsboth 200).EDENAI_API_KEY; never hardcoded.Happy to adjust the curated model list to your preference.