docs(providers): document Eden AI setup and WebUI parity

This commit is contained in:
Xubin Ren 2026-08-03 16:32:17 +08:00
parent e7ec981f79
commit ac216c3e94
3 changed files with 54 additions and 0 deletions

View File

@ -268,6 +268,7 @@ Tracing covers the providers that go through nanobot's OpenAI-compatible client
|----------|---------|-------------|
| `custom` | Any OpenAI-compatible endpoint | — |
| `openrouter` | LLM gateway for hosted model families + Voice transcription (STT models) | [openrouter.ai](https://openrouter.ai) |
| `edenai` | LLM gateway for Eden AI's OpenAI-compatible model catalog | [app.edenai.run](https://app.edenai.run/) |
| `opencode` | LLM gateway (OpenCode Zen coding-agent models) | [opencode.ai/docs/zen](https://opencode.ai/docs/zen/) |
| `opencode_zen` | LLM gateway (legacy alias for OpenCode Zen) | [opencode.ai/docs/zen](https://opencode.ai/docs/zen/) |
| `opencode_go` | LLM gateway (OpenCode Go low-cost coding models) | [opencode.ai/docs/go](https://opencode.ai/docs/go/) |

View File

@ -100,6 +100,39 @@ Gateway-style setup for model IDs served through OpenRouter.
Use the model ID exactly as OpenRouter lists it.
### Eden AI Gateway
Eden AI exposes an OpenAI-compatible chat-completions endpoint at
`https://api.edenai.run/v3`. Configure the built-in `edenai` provider and use
the full `provider/model` identifier listed by Eden AI:
```json
{
"providers": {
"edenai": {
"apiKey": "${EDENAI_API_KEY}"
}
},
"modelPresets": {
"primary": {
"provider": "edenai",
"model": "anthropic/claude-sonnet-4-5",
"maxTokens": 8192
}
},
"agents": {
"defaults": {
"modelPreset": "primary"
}
}
}
```
Nanobot sends the model ID unchanged, including its provider prefix. Use
Eden AI's [model listing](https://www.edenai.co/docs/v3/llms/listing-models)
to choose a currently available model. The WebUI can also load that catalog
after the Eden AI API key is saved under **Settings → Models**.
### OpenCode Zen and Go
OpenCode Zen and OpenCode Go are OpenCode-managed gateways for coding-agent models.

View File

@ -86,6 +86,26 @@ def test_settings_payload_includes_versioned_docs(
}
def test_settings_payload_exposes_edenai_provider(
tmp_path,
monkeypatch: pytest.MonkeyPatch,
) -> None:
config_path = tmp_path / "config.json"
config = Config()
config.providers.edenai.api_key = "eden-test-key"
save_config(config, config_path)
monkeypatch.setattr("nanobot.config.loader._current_config_path", config_path)
payload = settings_payload()
edenai = next(row for row in payload["providers"] if row["name"] == "edenai")
assert edenai["label"] == "Eden AI"
assert edenai["configured"] is True
assert edenai["default_api_base"] == "https://api.edenai.run/v3"
assert edenai["model_catalog"] == "catalog"
assert edenai["model_selectable"] is True
def test_settings_payload_includes_relocated_capabilities(
tmp_path,
monkeypatch: pytest.MonkeyPatch,