mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-23 00:41:40 +00:00
Adds Eden AI (https://www.edenai.co/) as a JSON-configured provider in litellm/llms/openai_like/providers.json, the matching LlmProviders enum entry, the .env.example documentation block, and unit + live tests under tests/test_litellm/llms/openai_like/. Eden AI is an aggregator exposing 100+ underlying models from OpenAI, Anthropic, Google, Mistral and others through a single OpenAI-shape chat-completions endpoint. It is a clean drop-in: standard request body, standard `choices[0].message` response, OpenAI-shape `usage`, standard SSE streaming, and standard `tool_calls`. No Python adapter is needed. Files: - litellm/llms/openai_like/providers.json: register `edenai` (base URL https://api.edenai.run/v3, env var EDENAI_API_KEY, optional EDENAI_API_BASE override, max_completion_tokens -> max_tokens param mapping) - litellm/types/utils.py: LlmProviders.EDENAI = "edenai" - litellm/constants.py: edenai added to LITELLM_CHAT_PROVIDERS, openai_compatible_providers, and the base URL added to openai_compatible_endpoints (mirroring Helicone PR #17663) - provider_endpoints_support.json: edenai entry under "providers" so the check_provider_folders_documented.py CI gate sees the new openai_like provider as documented; chat_completions and messages are true (the openai_like loader's default surface plus LiteLLM's internal Anthropic-format -> OpenAI translation); responses, embeddings, image_generations, audio_transcriptions, audio_speech, moderations, batches, rerank are false (Eden AI's API supports them but LiteLLM-side handlers under litellm/llms/edenai/ ship in follow-up PRs and will flip those flags as they land) - README.md: row in the Supported Providers table; chat / messages ticked, matching what is wired through the openai_like loader today - .env.example: document EDENAI_API_KEY and EDENAI_API_BASE next to the existing provider blocks - tests/test_litellm/llms/openai_like/test_edenai.py: mocked tests for enum membership, JSON config shape, get_llm_provider routing, EDENAI_API_BASE override, Router config, mocked completion; plus a live integration test guarded by `pytest.skipif(not os.environ.get('EDENAI_API_KEY'))` that calls api.edenai.run/v3 end-to-end and validates the response shape Endpoints wired through this PR: /chat/completions only (via the openai_like loader's default surface). /messages is also routed via LiteLLM's internal Anthropic-format translation; /responses is NOT (would require explicit `supported_endpoints` opt-in in the JSON config). Provider-specific handlers under litellm/llms/edenai/ for /responses, /embeddings, /image/generations, /audio/* and /moderations ship in follow-up PRs. Companion docs PR: BerriAI/litellm-docs adds the docs/providers/edenai.md page that the README and provider_endpoints_support.json link to. Per CONTRIBUTING.md: - scope is isolated (one provider, no drive-by changes) - adds 1 mocked test in tests/test_litellm/ (hard requirement) plus a live integration test guarded by EDENAI_API_KEY presence - passes make lint and make test-unit - CLA: https://cla-assistant.io/BerriAI/litellm Pattern matches Helicone (#17663) and AIHubMix (#24294) — closest JSON-configured aggregator analogs.
34 lines
700 B
Text
34 lines
700 B
Text
# OpenAI
|
|
OPENAI_API_KEY = ""
|
|
OPENAI_BASE_URL = ""
|
|
# Cohere
|
|
COHERE_API_KEY = ""
|
|
# OpenRouter
|
|
OR_SITE_URL = ""
|
|
OR_APP_NAME = "LiteLLM Example app"
|
|
OR_API_KEY = ""
|
|
# Azure API base URL
|
|
AZURE_API_BASE = ""
|
|
# Azure API version
|
|
AZURE_API_VERSION = ""
|
|
# Azure API key
|
|
AZURE_API_KEY = ""
|
|
# Replicate
|
|
REPLICATE_API_KEY = ""
|
|
REPLICATE_API_TOKEN = ""
|
|
# Anthropic
|
|
ANTHROPIC_API_KEY = ""
|
|
# Infisical
|
|
INFISICAL_TOKEN = ""
|
|
# Novita AI
|
|
NOVITA_API_KEY = ""
|
|
# INFINITY
|
|
INFINITY_API_KEY = ""
|
|
# Eden AI
|
|
EDENAI_API_KEY = ""
|
|
EDENAI_API_BASE = "https://api.edenai.run/v3"
|
|
|
|
# Development Configs
|
|
LITELLM_MASTER_KEY = "sk-1234"
|
|
DATABASE_URL = "postgresql://llmproxy:dbpassword9090@db:5432/litellm"
|
|
STORE_MODEL_IN_DB = "True"
|