feat(ai-sdk): add Eden AI as a built-in provider#131
Open
MVS-source wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-compatibleadapter, 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 tohttps://api.edenai.run/v3(overridable viabaseURL).listModels()uses the sharedfetchProviderModelshelper against Eden AI's OpenAI-style/v3/modelsendpoint.Changes
packages/@buildingai/ai-sdk/src/providers/edenai/index.ts: the provider (mirrorsproviders/moonshot).packages/@buildingai/ai-sdk/src/providers/index.ts: exportedenaiand its settings type.packages/@buildingai/ai-sdk/src/registry/provider-registry.ts: registeredenai.packages/@buildingai/db/src/seeds/data/model-config.json: seed Eden AI as a built-in provider entry (emptymodels, likeazure/ollama/spark; users add models orlistModels()fetches them live).totalbumped 19 -> 20.Testing
pnpm --filter @buildingai/ai-sdk check-types(tsc) passes.eslintandprettier --checkare clean on the changed files.createOpenAICompatiblewith 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.