Skip to content

docs: add Eden AI provider page - #13169

Merged
chrarnoldus merged 4 commits into
Kilo-Org:mainfrom
MVS-source:docs/add-edenai-provider
Aug 20, 2026
Merged

docs: add Eden AI provider page#13169
chrarnoldus merged 4 commits into
Kilo-Org:mainfrom
MVS-source:docs/add-edenai-provider

Conversation

@MVS-source

Copy link
Copy Markdown
Contributor

Issue

Fixes #11795

Context

Eden AI is already in the models.dev catalog that Kilo refreshes, so the provider is selectable
today, 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.dev catalog 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.dev entry, and the Eden AI models
endpoint.

Implementation

Docs only. Three files, no provider code and no static model catalog:

  • packages/kilo-docs/pages/ai-providers/edenai.md, new page
  • packages/kilo-docs/lib/nav/ai-providers.ts, nav entry appended to AI Gateways
  • packages/kilo-docs/pages/ai-providers/index.md, matching line in the gateway list

Values come from the published providers/edenai/provider.toml in models.dev: provider ID
edenai, env = ["EDENAI_API_KEY"], api = "https://api.edenai.run/v3",
npm = "@ai-sdk/openai-compatible". Because the catalog already supplies api and npm, the
config examples deliberately omit both.

Four points worth a reviewer's attention:

  1. Three-segment model IDs. Eden AI model IDs are themselves in vendor/model form, so a full
    reference is edenai/<vendor>/<model>, for example edenai/anthropic/claude-sonnet-5. The page
    states this explicitly because a two-segment guess is the obvious first mistake.
  2. cost and limit on self-declared models. For a model absent from the catalog, the config
    path defaults cost and limit to zero, which would silently report zero spend. The page tells
    readers to declare them and explains that costs are per million tokens.
  3. Two distinct EU mechanisms. options.baseURL selects Eden AI's EU gateway. Separately, some
    models are published as region-pinned variants with an @eu suffix, which pin the upstream
    vendor's region. These are independent, and the page says so, because conflating them is easy.
  4. No model count anywhere. The page links the public, unauthenticated models endpoint instead.
    The Eden AI entry in models.dev is kept current by their sync automation, so any number written
    here would go stale.

Screenshots / Video

Not applicable. Documentation-only change with no product UI change. The production build generates
the /ai-providers/edenai route, and the page renders under AI Gateways in the sidebar and in
the 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/edenai
    static route. Inspected the emitted HTML to confirm the Markdoc tabs and callout tags render
    rather 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.ts
    defines command: "auth", the login [url] subcommand, and a provider option described as
    "provider id or name to log in to (skips provider selection)".
  • Credentials land in the auth.json store: packages/opencode/src/auth/index.ts resolves
    path.join(Global.Path.data, "auth.json"), and providers.ts reads the same path.
  • options.baseURL overrides the catalog API base: packages/opencode/src/provider/provider.ts
    merges config options over the catalog entry, then resolveSDK prefers a non-empty
    options.baseURL over model.api.url before instantiating the SDK. options.baseURL is an
    explicit field of the provider config schema in packages/core/src/v1/config/provider.ts.
  • A model declared under provider.edenai.models but absent from the catalog resolves correctly:
    the same file inherits api.npm and api.url from the catalog provider entry and passes the
    declared key through as api.id. The zero defaults for cost and limit were found here, which
    is why the page documents them.

Human-executed:

  • An Eden AI engineer ran a multi-step task in Kilo CLI 7.4.22 with the Eden AI provider and
    Gemini 3.6 Flash, including a tool call, and the session reported a per-request cost.
  • A member of the Kilo team confirmed on 2026-08-13 that Eden AI appears and works.
  • Every model ID on the page was checked against https://api.edenai.run/v3/models.

Reviewer test steps

  1. bun run --filter @kilocode/kilo-docs dev
  2. Open /docs/ai-providers/edenai.
  3. Confirm the page appears under AI Gateways in the sidebar and in the Overview list, that both
    config tabs render, and that internal and external links resolve.

Blocked checks and substitute verification

No targeted docs checks are blocked.

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes. None added: this publishes documentation only,
    and @kilocode/kilo-docs is a private, unpublished package.
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

Get in Touch

Discord: victor_edenai

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.
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

@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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kilo-code-bot

kilo-code-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

All three findings from previous reviews are resolved at HEAD (30d7581054). The incremental commit removes the "exact per-request cost" claim from the frontmatter description, which now accurately describes the page as an OpenAI-compatible gateway config with one API key across vendors and an EU endpoint for data residency. No new issues on the changed lines.

Files Reviewed (3 files)
  • packages/kilo-docs/pages/ai-providers/edenai.md
  • packages/kilo-docs/lib/nav/ai-providers.ts
  • packages/kilo-docs/pages/ai-providers/index.md
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

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-docs/pages/ai-providers/edenai.md 3 Frontmatter description still promises "exact per-request cost", contradicting the corrected Cost tracking section (Kilo's spend is derived from token counts and catalog rates, not Eden AI's response-body cost). Same overstatement as the previously fixed intro/body claims.
Files Reviewed (3 files)
  • packages/kilo-docs/pages/ai-providers/edenai.md - 1 issue
  • packages/kilo-docs/lib/nav/ai-providers.ts - 0 issues
  • packages/kilo-docs/pages/ai-providers/index.md - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit 7a9d66c)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-docs/pages/ai-providers/edenai.md 144 "Cost tracking" section (and intro line 9) claims Kilo uses Eden AI's response-body cost so reported spend matches billing, but Kilo's provider-reported cost path only supports OpenRouter/Kilo/Vercel transports; for edenai spend is derived from token counts and catalog rates.

SUGGESTION

File Line Issue
packages/kilo-docs/pages/ai-providers/edenai.md 9 "several hundred models" is a stale-prone count that contradicts the PR's own no-model-count principle.
Files Reviewed (3 files)
  • packages/kilo-docs/pages/ai-providers/edenai.md - 2 issues
  • packages/kilo-docs/lib/nav/ai-providers.ts - 0 issues
  • packages/kilo-docs/pages/ai-providers/index.md - 0 issues

Fix these issues in Kilo Cloud


Reviewed by kimi-k3 · Input: 38.2K · Output: 2.2K · Cached: 205.8K

Review guidance: REVIEW.md from base branch main

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.
@MVS-source

Copy link
Copy Markdown
Contributor Author

Thanks, the WARNING was correct and I have fixed it in 46dbca3.

I traced it before changing anything. KiloSession.providerCost in packages/opencode/src/kilocode/session/index.ts returns a provider-reported cost only for three shapes: metadata["openrouter"]["usage"], usage.providerMetadata["aiSdk"]["cost_details"].upstream_inference_cost, and metadata["gateway"].marketCost. Otherwise it returns undefined and session.ts falls through to token counts multiplied by the catalog rates. Eden AI is served over @ai-sdk/openai-compatible and populates none of those three, so the displayed spend is an estimate, exactly as you said.

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 cost or the estimate stays at zero. I also removed the claim from the intro line.

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: bun run --filter @kilocode/kilo-docs test (4 files, 22 tests), typecheck, and build all pass, and script/check-forbidden-strings.ts and script/check-md-table-padding.ts report no findings.

One note for whoever picks this up: the GitHub Actions suites are sitting in action_required because this comes from an external fork, so the docs workflows have not run yet. Happy to rebase or adjust anything else.

@@ -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."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Suggested change
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.

@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs (docs-staging) Ready Ready Preview Aug 20, 2026 7:32pm

Request Review

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.
@MVS-source

Copy link
Copy Markdown
Contributor Author

Right again, fixed in 30d7581. The frontmatter description still carried the exact-cost promise I had removed from the intro and the Cost tracking section, so it was inconsistent with the rest of the page.

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 cost with a note that the estimate stays at zero without it.

test, typecheck and build on packages/kilo-docs pass on the new commit, and both check-forbidden-strings and check-md-table-padding report no findings.

Thanks also to whoever approved the workflows and the Vercel deploy.

@chrarnoldus
chrarnoldus merged commit 1510403 into Kilo-Org:main Aug 20, 2026
25 checks passed
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.

feat: add Eden AI as a model provider

3 participants