Skip to content

feat: add Eden AI as a first-class LLM provider and embedder#705

Open
MVS-source wants to merge 1 commit into
repowise-dev:mainfrom
MVS-source:feat/edenai-provider
Open

feat: add Eden AI as a first-class LLM provider and embedder#705
MVS-source wants to merge 1 commit into
repowise-dev:mainfrom
MVS-source:feat/edenai-provider

Conversation

@MVS-source

Copy link
Copy Markdown

Summary

  • Adds Eden AI as a first-class LLM provider (EdenAIProvider) and embedder
    (EdenAIEmbedder). Eden AI is an EU-headquartered gateway exposing 700+ models
    (Mistral, GPT, Claude, Gemini, Cohere, DeepSeek, Llama, …) behind a single
    OpenAI-compatible endpoint — so it reuses the existing openai dependency
    with a custom base_url, no new dependency.
  • Follows the openrouter / deepseek pattern: generate(), streaming chat,
    live /models discovery, EDENAI_API_KEY, and an EDENAI_BASE_URL override
    for the EU endpoint (https://api.eu.edenai.run/v3) for data residency.
    reasoning maps to OpenAI reasoning_effort for OpenAI reasoning models routed
    via Eden; other models expose only auto.
  • Wires the new provider/embedder through the registries, rate-limiter defaults,
    server provider catalog, CLI provider selection/resolution/validation, embedder
    auto-detection, the web settings UI, tests, and docs (CONFIG.md, .env.example).

Related Issues

Closes #704

Test Plan

  • Tests pass (pytest) — 31 new tests (test_edenai_provider.py,
    test_edenai_embedder.py); full provider + embedder suites: 220 passed, no regressions.
  • Lint passes (ruff check) — llm/edenai.py clean; the embedder carries the
    same single RUF012 on _DIMS as the existing openrouter.py embedder.
  • Verified end-to-end against the live Eden AI API: generate(), streaming
    chat, /models discovery, and embeddings (1536-dim, L2-normalized).
  • Web build (npm run build) — TS change is additive (new keys on existing
    typed records / const arrays).

Checklist

  • My code follows the project's code style
  • I have added tests for new functionality
  • All existing tests still pass
  • I have updated documentation if needed

Notes: The API key is read only from EDENAI_API_KEY (or passed explicitly) — never
logged or hardcoded. .github/CONTRIBUTING.md referenced a run-config-form.tsx
file that no longer exists in the tree, so only provider-section.tsx was updated.

Eden AI (https://www.edenai.co/) is an EU-headquartered gateway exposing 700+
models (Mistral, GPT, Claude, Gemini, Cohere, DeepSeek, Llama, ...) behind a
single OpenAI-compatible endpoint. Because it is OpenAI-compatible, this reuses
the existing `openai` dependency with a custom base_url — no new dependency.

- llm/edenai.py: EdenAIProvider (generate + streaming chat + /models discovery),
  default mistral/mistral-small-latest, EDENAI_API_KEY, EDENAI_BASE_URL override
  (EU endpoint https://api.eu.edenai.run/v3 for data residency). reasoning maps
  to OpenAI reasoning_effort for OpenAI reasoning models routed via Eden.
- embedding/edenai.py: EdenAIEmbedder (openai/text-embedding-3-small default,
  1536/3072/1024 dims for the supported models).
- Registered in the LLM and embedding registries, rate limiter defaults, server
  provider catalog, CLI provider selection / resolution / validation, embedder
  auto-detection, and the web settings UI.
- Unit tests for the provider and embedder (mocked; no network).
- Docs: CONFIG.md provider + embedder + env-var entries, .env.example.

The API key is read only from EDENAI_API_KEY (or passed explicitly); it is never
logged or hardcoded.

Signed-off-by: MVS-source <72023257+MVS-source@users.noreply.github.com>
@repowise-bot

repowise-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

✅ Health: 7.7 (unchanged)
1 file moved · 5 hotspots · 5 hidden couplings · 3 with fix history · 3 dead-code findings

🚨 Change risk: high (riskier than 68% of this repo's commits · raw 9.4/10)
This change's risk is driven by:

  • more lines added than baseline
  • more scattered than baseline

🩹 Review priority (files here with the most recent bug-fix history — defects cluster, so review these first)

File Score Δ Why
.../providers/embedders.py 5.2 → 4.5 ▼ -0.7 🔻 introduced complex method · ✅ resolved dry violation

💡 .../providers/embedders.py: Reduce cyclomatic complexity. Decompose the function along its conditional axes; if it dispatches on a type tag, replace the if/elif ladder with polymorphism or a lookup table.

🔥 Hotspots touched (5)
  • .../cli/helpers.py — 22 commits/90d, 57 dependents · primary owner: Raghav Chamadiya (72%)
  • .../llm/registry.py — 4 commits/90d, 6 dependents · primary owner: Raghav Chamadiya (90%)
  • .../providers/embedders.py — 4 commits/90d, 6 dependents · primary owner: biggiesmallcap-blip (40%)
2 more
  • .../server/provider_config.py — 6 commits/90d, 7 dependents · primary owner: Raghav Chamadiya (91%)
  • .../embedding/registry.py — 2 commits/90d, 4 dependents · primary owner: Raghav Chamadiya (90%)
🔗 Hidden coupling (1 file)
  • .../cli/helpers.py co-changes with these files (not in this PR):
    • .../cli/test_helpers.py (8× — 🟢 routine)
    • .../server/app.py (5× — 🟢 routine)
    • .../commands/serve_cmd.py (4× — 🟢 routine)
    • pyproject.toml (4× — 🟢 routine)
    • docs/CLI_REFERENCE.md (4× — 🟢 routine)
💀 Dead code (3 findings)
  • 💀 .../cli/helpers.py ensure_db (confidence 1.00)
  • 💀 .../cli/helpers.py is_interactive_session (confidence 1.00)
  • 💀 .../server/provider_config.py get_active_provider (confidence 0.40)

👀 Suggested reviewers @biggiesmallcap-blip


📊 Full report · ⭐ Star Repowise · 📥 Install bot · Last updated 2026-07-07 12:41 UTC
Silence on a single PR with [skip repowise] in the title · Per-repo toggle on repowise.dev/settings?tab=bot

@repowise-bot repowise-bot Bot added repowise:health-decline Repowise: repository health score declined repowise:hotspot Repowise: touches a temporal hotspot file repowise:risk-high Repowise: change-risk high for this repo's history labels Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

repowise:health-decline Repowise: repository health score declined repowise:hotspot Repowise: touches a temporal hotspot file repowise:risk-high Repowise: change-risk high for this repo's history

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Eden AI as a first-class LLM provider (and embedder)

1 participant