Repository navigation
feat(providers): add Eden AI as an OpenAI-compatible gateway - #990
Conversation
Eden AI (https://www.edenai.co/) routes to many upstream vendors behind one key on an OpenAI-compatible surface, so it needs no new provider implementation. Same shape as the NEAR AI Cloud and Atlas Cloud entries. Base URL is https://api.edenai.run/v3, and chatCompletionsUrl appends /chat/completions to it, which is the real endpoint. Model ids carry a vendor segment (anthropic/claude-sonnet-5), which the prefix stripping in normalizeProviderModel and the known_url_model_provider_namespaces entry already handle, the same way they handle Atlas Cloud's qwen/... ids. The models_dev_providers entry is the part worth pointing at: Eden AI has been in models.dev since anomalyco/models.dev#4506, so the onboarding model list comes from that catalog and stays current without a hardcoded list here. Wired into the compat provider table, the env candidates, the name aliases, the onboarding list, the URL namespaces, and the integrations list, with docs in both locales.
vernonstinebaker
left a comment
There was a problem hiding this comment.
Approving as maintainer. Reviewed all twelve hunks: textbook OpenAI-compatible gateway registration in the exact NEAR AI / Atlas Cloud / Evolink shape — compat_providers URL+display entry (api.edenai.run/v3, EU endpoint), provider classification + URL + env-candidate + name-alias tests included, onboard known_providers and models_dev mapping (Eden AI is in models.dev since Aug), integrations entry, config example, and consistent en/zh docs. Merging per the established gateway precedent (#922 lineage).
|
@vernonstinebaker thanks for the merge, and for the thorough review. One small thing I noticed: the providers page on nullclaw.io doesn't mention any of the gateways added this year, Eden AI included. Want me to send a short PR for it, or would you rather leave that page as is? |
What
Adds Eden AI as an OpenAI-compatible gateway provider, following the shape of #922 (NEAR AI Cloud and Atlas Cloud). No new provider implementation, it goes through
OpenAiCompatibleProviderlike the other gateways.Eden AI routes to many upstream vendors behind one key, and it is EU based with an EU endpoint, which is mostly why people reach for it.
The models.dev part
This is the bit worth pointing at. Eden AI has been in models.dev since anomalyco/models.dev#4506 merged on 12 August, so the
models_dev_providersentry means the onboarding model list comes from that catalog and stays current on its own. There is no hardcoded model list to maintain here, and no second URL to fetch like NEAR AI Cloud and Atlas Cloud need.Changes
providers/factory.zig:edenaiincompat_providers, basehttps://api.edenai.run/v3.chatCompletionsUrlappends/chat/completions, which is the real endpoint.providers/api_key.zig:EDENAI_API_KEY.provider_names.zig:eden-aiandeden_aicanonicalise toedenai.onboard.zig: one row inknown_providersand themodels_dev_providersmapping.model_refs.zig:edenaiinknown_url_model_provider_namespaces. Model ids carry a vendor segment,anthropic/claude-sonnet-5, so this is the same case as Atlas Cloud'sqwen/...ids. The prefix stripping feat(providers): add NEAR AI Cloud and Atlas Cloud providers #922 added tonormalizeProviderModelalready covers the rest.integrations.zig,config.example.json,README.md, anddocs/enplusdocs/zhfor configuration and architecture.Two judgement calls
I put the row in Tier 4 next to the other recently added gateways rather than Tier 1, even though Eden AI is a multi-provider gateway. Putting a newcomer above Anthropic and OpenAI in the onboarding menu is not mine to decide, and #922 landed in Tier 4 too. Move it if you disagree.
I did not add a separate
edenai-euentry for the EU endpoint. It is reachable today with a per-providerbase_urlin config, the way the Azure example does it, and that keeps the diff small. Worth flagging one consequence though:shouldUseModelsDevCatalogreturns false as soon asbase_urlis set, so an EU user loses the models.dev catalog for the model list. If you would rather have a proper twin entry, themoonshot-cnandzai-cnpattern fits it exactly and I am happy to send that instead.Validation
Local, zig 0.16.0, the version
nullbuilderinstalls:zig fmt --check src/clean, which is thepre-commithook.zig build test --summary allgreen, thepre-pushhook. 7375 tests pass onmainbefore the change and 7376 after, the extra one being the new env-alias test. The 8 other assertions went into existing tests rather than new blocks.zig build -Doptimize=ReleaseSmallclean.https://api.edenai.run/v3/chat/completions, was exercised with a live key, andanthropic/claude-sonnet-5, the default model in the row, returns 200. I picked that id off the live catalog rather than a docs page.I do work at Eden AI.