Skip to content

feat(ai-sdk): add Eden AI as a built-in provider#131

Open
MVS-source wants to merge 1 commit into
BidingCC:masterfrom
MVS-source:feat/edenai-provider
Open

feat(ai-sdk): add Eden AI as a built-in provider#131
MVS-source wants to merge 1 commit into
BidingCC:masterfrom
MVS-source:feat/edenai-provider

Conversation

@MVS-source

Copy link
Copy Markdown

What

Adds Eden AI as a built-in provider.

Eden AI is an EU-based, OpenAI-compatible LLM gateway (one API key, one endpoint, many upstream vendors). Because it speaks the OpenAI protocol, it is registered through the shared @ai-sdk/openai-compatible adapter, mirroring the existing Moonshot and SiliconFlow providers. No new dependency is added.

Model ids are vendor-prefixed, e.g. openai/gpt-4o-mini, anthropic/claude-haiku-4-5, mistral/mistral-small-latest. The provider reads its API key as a Bearer token and defaults to https://api.edenai.run/v3 (overridable via baseURL). listModels() uses the shared fetchProviderModels helper against Eden AI's OpenAI-style /v3/models endpoint.

Changes

  • packages/@buildingai/ai-sdk/src/providers/edenai/index.ts: the provider (mirrors providers/moonshot).
  • packages/@buildingai/ai-sdk/src/providers/index.ts: export edenai and its settings type.
  • packages/@buildingai/ai-sdk/src/registry/provider-registry.ts: register edenai.
  • packages/@buildingai/db/src/seeds/data/model-config.json: seed Eden AI as a built-in provider entry (empty models, like azure/ollama/spark; users add models or listModels() fetches them live). total bumped 19 -> 20.

Testing

  • pnpm --filter @buildingai/ai-sdk check-types (tsc) passes.
  • eslint and prettier --check are clean on the changed files.
  • Live: verified against the real Eden AI API with a real key, using the same code path as the provider (createOpenAICompatible with the Bearer header + languageModel + generateText). Three upstream vendors returned completions: openai/gpt-4o-mini, anthropic/claude-haiku-4-5, mistral/mistral-small-latest.

Note

This registers and seeds Eden AI for new installs. Existing installs would additionally need a seed-sync migration (like 1778524800000-26.1.1-ai-model-seed-sync.ts) to insert the provider row into an already-migrated database; happy to add one if you'd like it in this PR.

Eden AI is an EU-based, OpenAI-compatible LLM gateway. It is registered
through the shared @ai-sdk/openai-compatible adapter, mirroring the existing
Moonshot/SiliconFlow providers, and reads its API key as a Bearer token with
a default base URL of https://api.edenai.run/v3. Model ids are vendor-prefixed
(e.g. openai/gpt-4o-mini, anthropic/claude-haiku-4-5).

Adds the provider implementation, exports it, registers it in the provider
registry, and seeds it as a built-in provider in model-config.json.
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