docs: add Eden AI provider page - #13169
Conversation
Eden AI is already in the models.dev catalog that Kilo refreshes, so the provider is selectable, but there was no Kilo-specific setup page. Adds one under AI Gateways, with the nav entry and the overview list line. Documents the /connect flow as the primary CLI path, the three-segment model ID form, declaring a model that is not in the catalog, the EU endpoint, and the catalog cache behaviour.
|
@MVS-source is attempting to deploy a commit to the Kilo Code Team on Vercel. A member of the Team first needs to authorize it. |
|
|
||
| ## Cost tracking | ||
|
|
||
| Eden AI returns the actual cost of each request in the response body rather than leaving it to be inferred from token counts, so reported spend matches what you are billed. The models endpoint also reports `cache_read_input_token_cost` for models that support prompt caching. |
There was a problem hiding this comment.
WARNING: This claim doesn't match how Kilo actually computes spend for the edenai provider.
Kilo's provider-reported cost path (providerCost in packages/opencode/src/kilocode/session/index.ts) only extracts response-body cost for OpenRouter, Kilo Gateway, and Vercel AI Gateway transports. There is no Eden AI handling anywhere in packages/opencode/src, so for edenai Kilo falls back to the standard token-count x catalog/declared cost rate calculation in packages/opencode/src/session/session.ts. Eden AI may well return actual cost in its response body, but Kilo never reads it — so "reported spend matches what you are billed" overstates what users will see. The same overstatement appears in the intro (line 9: "the actual per-request cost returned by the API instead of an estimate derived from token counts").
Suggest rewording both spots to say Eden AI publishes exact per-request costs via its API/models endpoint, while noting Kilo's reported spend is derived from token counts and the catalog rates — which is also why the cost declaration advice two sections up matters.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
|
|
||
| # Using Eden AI With Kilo Code | ||
|
|
||
| [Eden AI](https://www.edenai.co/) is an EU-based AI gateway that puts several hundred models from many vendors behind one OpenAI-compatible API. It is worth a look if you want a single key and a single invoice across vendors, an EU endpoint for data-residency requirements, or the actual per-request cost returned by the API instead of an estimate derived from token counts. Kilo Code uses the `edenai` provider ID and reads your API key from `EDENAI_API_KEY`. |
There was a problem hiding this comment.
SUGGESTION: "several hundred models" is a stale-prone count, which contradicts the PR's own stated principle ("No model count anywhere... any number written here would go stale"). The rest of the page deliberately avoids counts and links the live models endpoint instead — consider doing the same here, e.g. "puts models from many vendors behind one OpenAI-compatible API".
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge All three findings from previous reviews are resolved at HEAD ( Files Reviewed (3 files)
Previous Review Summaries (2 snapshots, latest commit 46dbca3)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 46dbca3)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (3 files)
Fix these issues in Kilo Cloud Previous review (commit 7a9d66c)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (3 files)
Reviewed by kimi-k3 · Input: 38.2K · Output: 2.2K · Cached: 205.8K Review guidance: REVIEW.md from base branch |
Kilo reads a provider-reported cost only for the OpenRouter, Kilo Gateway and Vercel AI Gateway shapes, so for edenai the displayed spend is derived from token counts and the catalog rates. The page said reported spend matched billing, which was wrong. It now describes the estimate and points at Eden AI's own response body and dashboard as the authoritative figure. Also drops the model count from the intro, which was stale-prone.
|
Thanks, the WARNING was correct and I have fixed it in 46dbca3. I traced it before changing anything. The "Cost tracking" section now says so plainly, keeps the useful part (Eden AI's own response body and dashboard hold the authoritative figure), and reinforces the point that a self-declared model needs The SUGGESTION was fair too. "several hundred models" contradicted the no-model-count principle I stated in the PR description, so the count is gone. Re-ran on the new commit: One note for whoever picks this up: the GitHub Actions suites are sitting in |
| @@ -0,0 +1,158 @@ | |||
| --- | |||
| title: "Using Eden AI with Kilo Code" | |||
| description: "Connect Kilo Code to Eden AI, an EU-based OpenAI-compatible gateway, with one API key, an EU data-residency endpoint, and exact per-request cost." | |||
There was a problem hiding this comment.
WARNING: The frontmatter description still promises "exact per-request cost" — the same overstatement you just removed from the intro and the Cost tracking section.
Kilo never reads Eden AI's response-body cost, so the spend it shows is derived from token counts and catalog rates — which is exactly what the corrected Cost tracking section now says ("treat it as an estimate"). Since this description feeds the page's meta description / search snippet, it now contradicts the page itself. Suggest dropping the claim here too:
| description: "Connect Kilo Code to Eden AI, an EU-based OpenAI-compatible gateway, with one API key, an EU data-residency endpoint, and exact per-request cost." | |
| description: "Connect Kilo Code to Eden AI, an EU-based OpenAI-compatible gateway, with one API key and an EU data-residency endpoint." |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The frontmatter description still promised exact per-request cost, which the previous commit had already removed from the intro and the Cost tracking section. Swept the whole page for the same overstatement, this was the last one.
|
Right again, fixed in 30d7581. The frontmatter To avoid a third round on the same theme I swept the whole page for that class of claim rather than just patching the flagged line. What remains is scoped to Eden AI's own API, never to what Kilo displays: the Cost tracking section states plainly that Kilo's figure is derived from token counts and catalog rates, and the self-declared model example carries
Thanks also to whoever approved the workflows and the Vercel deploy. |
Issue
Fixes #11795
Context
Eden AI is already in the
models.devcatalog that Kilo refreshes, so the provider is selectabletoday, but there is no Kilo-specific setup page for it. Every other entry under AI Gateways has
one. Without a page there is no documented answer for the provider ID, the environment variable, the
three-segment model ID form, or the EU endpoint.
This closes #11795, which asked for Eden AI as a provider. The provider arrived through the
models.devcatalog rather than through code here, so documentation is the remaining piece.Disclosure: I work at Eden AI, so I am the vendor documenting my own provider. The page carries an
affiliation note for that reason. This change was AI-assisted. I reviewed the diff myself and
verified every claim against this repository, the
models.deventry, and the Eden AI modelsendpoint.
Implementation
Docs only. Three files, no provider code and no static model catalog:
packages/kilo-docs/pages/ai-providers/edenai.md, new pagepackages/kilo-docs/lib/nav/ai-providers.ts, nav entry appended to AI Gatewayspackages/kilo-docs/pages/ai-providers/index.md, matching line in the gateway listValues come from the published
providers/edenai/provider.tomlinmodels.dev: provider IDedenai,env = ["EDENAI_API_KEY"],api = "https://api.edenai.run/v3",npm = "@ai-sdk/openai-compatible". Because the catalog already suppliesapiandnpm, theconfig examples deliberately omit both.
Four points worth a reviewer's attention:
vendor/modelform, so a fullreference is
edenai/<vendor>/<model>, for exampleedenai/anthropic/claude-sonnet-5. The pagestates this explicitly because a two-segment guess is the obvious first mistake.
costandlimiton self-declared models. For a model absent from the catalog, the configpath defaults
costandlimitto zero, which would silently report zero spend. The page tellsreaders to declare them and explains that costs are per million tokens.
options.baseURLselects Eden AI's EU gateway. Separately, somemodels are published as region-pinned variants with an
@eusuffix, which pin the upstreamvendor's region. These are independent, and the page says so, because conflating them is easy.
The Eden AI entry in
models.devis kept current by their sync automation, so any number writtenhere would go stale.
Screenshots / Video
Not applicable. Documentation-only change with no product UI change. The production build generates
the
/ai-providers/edenairoute, and the page renders under AI Gateways in the sidebar and inthe Overview list.
How to Test
Manual/local verification
Agent-executed, on this branch:
bun run --filter @kilocode/kilo-docs test: 4 test files, 22 tests passed.bun run --filter @kilocode/kilo-docs typecheck: passed.bun run --filter @kilocode/kilo-docs build: passed and generated the/ai-providers/edenaistatic route. Inspected the emitted HTML to confirm the Markdoc
tabsandcallouttags renderrather than appearing literally, and that both the sidebar and the Overview list show the new
entry in the intended position.
bun run script/check-forbidden-strings.ts: 9333 files checked, no findings.bun run script/check-md-table-padding.ts: 394 files checked, no findings.Agent-executed, claims checked against this repository rather than asserted:
kilo auth login --provider <id>is a valid invocation:packages/opencode/src/cli/cmd/providers.tsdefines
command: "auth", thelogin [url]subcommand, and aprovideroption described as"provider id or name to log in to (skips provider selection)".
auth.jsonstore:packages/opencode/src/auth/index.tsresolvespath.join(Global.Path.data, "auth.json"), andproviders.tsreads the same path.options.baseURLoverrides the catalog API base:packages/opencode/src/provider/provider.tsmerges config options over the catalog entry, then
resolveSDKprefers a non-emptyoptions.baseURLovermodel.api.urlbefore instantiating the SDK.options.baseURLis anexplicit field of the provider config schema in
packages/core/src/v1/config/provider.ts.provider.edenai.modelsbut absent from the catalog resolves correctly:the same file inherits
api.npmandapi.urlfrom the catalog provider entry and passes thedeclared key through as
api.id. The zero defaults forcostandlimitwere found here, whichis why the page documents them.
Human-executed:
Gemini 3.6 Flash, including a tool call, and the session reported a per-request cost.
https://api.edenai.run/v3/models.Reviewer test steps
bun run --filter @kilocode/kilo-docs dev/docs/ai-providers/edenai.config tabs render, and that internal and external links resolve.
Blocked checks and substitute verification
No targeted docs checks are blocked.
Checklist
and
@kilocode/kilo-docsis a private, unpublished package.Get in Touch
Discord:
victor_edenai