Skip to content

feat: add Eden AI provider (OpenAI-compatible, 600+ models, EU/GDPR)#81

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

feat: add Eden AI provider (OpenAI-compatible, 600+ models, EU/GDPR)#81
MVS-source wants to merge 1 commit into
Fast-Editor:mainfrom
MVS-source:feat/edenai-provider

Conversation

@MVS-source

Copy link
Copy Markdown

Summary

Adds Eden AI as a native provider, mirroring the existing OpenRouter (OpenAI-compatible) path. Eden AI is an OpenAI-compatible gateway (https://api.edenai.run/v3/chat/completions, provider/model naming) giving one key + EU/GDPR-compliant access to 600+ models across OpenAI, Anthropic, Google, Mistral, etc. It exposes both OpenAI- and Anthropic-compatible endpoints, so it fits both Lynkr's OpenAI-format path and the Claude Code / Cursor / Codex passthrough, and pairs naturally with tier routing (cheap model for SIMPLE → frontier for REASONING, one key).

What changed

  • Config (src/config/index.js): edenai in SUPPORTED_MODEL_PROVIDERS, config.edenai, EDENAI_API_KEY/MODEL/EMBEDDINGS_MODEL/ENDPOINT, reload path.
  • Dispatch (src/clients/databricks.js): invokeEdenAI() mirroring invokeOpenRouter, reusing the shared Anthropic↔OpenAI converters; initial + fallback branches.
  • Orchestrator (src/orchestrator/index.js): endpoint lookup, tool passthrough, response conversion, headroom/caveman provider sets.
  • API/embeddings (src/api/openai-router.js, src/api/providers-handler.js): provider listing + /v3/embeddings parity.
  • Routing/capabilities: src/routing/index.js, src/routing/model-tiers.js, src/clients/provider-capabilities.js (reasoning_content), src/clients/prompt-cache-injection.js, src/dashboard/api.js.
  • UX/docs: bin/lynkr-init.js wizard entry, .env.example, documentation/providers.md.
  • Tests/CI: test/edenai-integration.test.js, .github/workflows/edenai-integration.yml (EDENAI_API_KEY secret scoped to the live-test step only; self-skips on fork PRs).

15 files, +401 / −10.

Usage

MODEL_PROVIDER=edenai
EDENAI_API_KEY=your-key
EDENAI_MODEL=anthropic/claude-sonnet-4-5
# or per tier:
TIER_SIMPLE=edenai:openai/gpt-4o-mini
TIER_REASONING=edenai:anthropic/claude-opus-4-8

Testing

Live-tested against api.edenai.run/v3 with a real key:

  • Chat completion (200, OpenAI shape) ✅
  • Tool-calling on openai/gpt-4o, gpt-4o-mini, anthropic/claude-opus-4-8, claude-haiku-4-5finish_reason: tool_calls
  • Streaming (SSE) ✅
  • node --test test/edenai-integration.test.js (config/routing/capabilities) ✅

Notes

  • Implemented as an OpenAI-compatible provider; no new response-conversion code (reuses openrouter-utils).
  • Reviewer: the diff intentionally follows the OpenRouter provider 1:1 for maintainability.

@MVS-source MVS-source force-pushed the feat/edenai-provider branch from 2f9333b to b8a6813 Compare July 3, 2026 09:49
@MVS-source

Copy link
Copy Markdown
Author

Hi Fast-Editor team 👋

This PR adds Eden AI as a native provider, built by mirroring your OpenRouter path 1:1 (reuses the existing Anthropic↔OpenAI converters — no new conversion code). We live-tested it against api.edenai.run/v3: chat, tool-calling (GPT-4o, Claude Opus 4.8 → finish_reason: tool_calls) and streaming.

For Lynkr users it means one EU/GDPR-compliant key → 600+ models, OpenAI- and Anthropic-compatible — so it fits both the OpenAI-format path and the Claude Code / Cursor / Codex passthrough, and pairs naturally with tier routing.

Happy to adjust to your conventions, and we're glad to maintain the provider going forward. Would love a review 🙏 — and thanks for building Lynkr!

— Eden AI

@MVS-source MVS-source force-pushed the feat/edenai-provider branch 2 times, most recently from 78b1f99 to cee3cd0 Compare July 3, 2026 10:53
Adds Eden AI as a native provider, mirroring the existing OpenRouter
(OpenAI-compatible) path. Eden AI exposes both OpenAI- and Anthropic-
compatible endpoints at https://api.edenai.run/v3 with provider/model
naming, giving one EU/GDPR-compliant key across 600+ models.

- config: SUPPORTED_MODEL_PROVIDERS, config.edenai, EDENAI_* env + reload
- clients/databricks: invokeEdenAI() + initial/fallback dispatch
- orchestrator: endpoint lookup, tool passthrough, response conversion,
  headroom/caveman provider sets
- api: provider listing + /v3/embeddings parity
- routing, provider-capabilities (reasoning_content), prompt-cache, dashboard
- bin/lynkr-init wizard, .env.example, documentation/providers.md
- test/edenai-integration.test.js + CI workflow (secret scoped to the
  live-test step only; self-skips on fork PRs)

Live-tested against api.edenai.run/v3: chat, tool-calling across OpenAI &
Anthropic models (finish_reason: tool_calls), and streaming.
@MVS-source MVS-source force-pushed the feat/edenai-provider branch from cee3cd0 to cc526ff Compare July 3, 2026 10:58
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