From 16c9529bcb06850b51bad1d7d786f7a0224cee7f Mon Sep 17 00:00:00 2001 From: "Victor M. SMITH" <72023257+MVS-source@users.noreply.github.com> Date: Fri, 10 Jul 2026 12:15:06 +0200 Subject: [PATCH] feat(provider): add Eden AI as an OpenAI-compatible provider Eden AI (https://www.edenai.co) is an EU-hosted, OpenAI-compatible gateway exposing 100+ models from many providers through a single endpoint and API key. Models use the provider/model naming scheme. Registers it the same way as the other OpenAI-compatible providers (Moonshot, Mistral, DeepSeek, OpenRouter, ...): adds LLMType.EDENAI and includes it in OpenAILLM's @register_provider list, so it reuses the shared OpenAI-compatible client with the base_url from config. Adds a config example. API key via config/env (api_key); never hardcoded. Signed-off-by: Victor M. SMITH <72023257+MVS-source@users.noreply.github.com> --- config/examples/edenai.yaml | 5 +++++ metagpt/configs/llm_config.py | 1 + metagpt/provider/openai_api.py | 1 + 3 files changed, 7 insertions(+) create mode 100644 config/examples/edenai.yaml diff --git a/config/examples/edenai.yaml b/config/examples/edenai.yaml new file mode 100644 index 0000000000..7b3eff7917 --- /dev/null +++ b/config/examples/edenai.yaml @@ -0,0 +1,5 @@ +llm: + api_type: edenai + base_url: "https://api.edenai.run/v3" + api_key: "YOUR_API_KEY" + model: anthropic/claude-sonnet-4-5 diff --git a/metagpt/configs/llm_config.py b/metagpt/configs/llm_config.py index f17904d8fc..3b6b9a833c 100644 --- a/metagpt/configs/llm_config.py +++ b/metagpt/configs/llm_config.py @@ -44,6 +44,7 @@ class LLMType(Enum): BEDROCK = "bedrock" ARK = "ark" # https://www.volcengine.com/docs/82379/1263482#python-sdk LLAMA_API = "llama_api" + EDENAI = "edenai" # Eden AI: EU-hosted, OpenAI-compatible gateway to 100+ models def __missing__(self, key): return self.OPENAI diff --git a/metagpt/provider/openai_api.py b/metagpt/provider/openai_api.py index 877bd71383..bda9a013c3 100644 --- a/metagpt/provider/openai_api.py +++ b/metagpt/provider/openai_api.py @@ -53,6 +53,7 @@ LLMType.SILICONFLOW, LLMType.OPENROUTER, LLMType.LLAMA_API, + LLMType.EDENAI, ] ) class OpenAILLM(BaseLLM):