From fa2077ba3f5a20933a75cc4570e3c92ec4fad1a8 Mon Sep 17 00:00:00 2001 From: David Lo Dico Date: Wed, 18 Feb 2026 12:48:16 +0100 Subject: [PATCH] feat: add EUrouter as AI provider Add EUrouter (https://eurouter.ai) as an OpenAI-compatible AI provider. EUrouter is an EU-based GDPR-compliant AI gateway that routes to multiple providers through a single API. - Add eurouter.chat provider using @ai-sdk/openai-compatible - Add representative models to the playground model list - Add EUROUTER_API_KEY to both .env.example files - Add eurouter test model entry Co-Authored-By: Claude Opus 4.6 --- examples/09-ai/02-playground/src/data/aimodels.ts | 7 +++++++ packages/xl-ai-server/.env.example | 3 ++- .../xl-ai-server/src/routes/model-playground/index.ts | 6 ++++++ packages/xl-ai/.env.example | 3 ++- packages/xl-ai/src/testUtil/testAIModels.ts | 9 ++++++++- 5 files changed, 25 insertions(+), 3 deletions(-) diff --git a/examples/09-ai/02-playground/src/data/aimodels.ts b/examples/09-ai/02-playground/src/data/aimodels.ts index 329805d1b2..576a9e4c85 100644 --- a/examples/09-ai/02-playground/src/data/aimodels.ts +++ b/examples/09-ai/02-playground/src/data/aimodels.ts @@ -20,4 +20,11 @@ export const AI_MODELS = [ "google.generative-ai/gemini-1.5-flash", "google.generative-ai/gemini-2.5-pro", "google.generative-ai/gemini-2.5-flash", + "eurouter.chat/mistral-large-3", + "eurouter.chat/gpt-oss-120b", + "eurouter.chat/gpt-5-mini", + "eurouter.chat/claude-opus-4-6", + "eurouter.chat/green-r", + "eurouter.chat/deepseek-r1", + "eurouter.chat/kimi-k2.5", ]; diff --git a/packages/xl-ai-server/.env.example b/packages/xl-ai-server/.env.example index 531ac8a8ef..d5cbb7507e 100644 --- a/packages/xl-ai-server/.env.example +++ b/packages/xl-ai-server/.env.example @@ -4,4 +4,5 @@ GROQ_API_KEY= ANTHROPIC_API_KEY= MISTRAL_API_KEY= ALBERT_ETALAB_API_KEY= -GOOGLE_API_KEY= \ No newline at end of file +GOOGLE_API_KEY= +EUROUTER_API_KEY= diff --git a/packages/xl-ai-server/src/routes/model-playground/index.ts b/packages/xl-ai-server/src/routes/model-playground/index.ts index e113660614..2e57b00695 100644 --- a/packages/xl-ai-server/src/routes/model-playground/index.ts +++ b/packages/xl-ai-server/src/routes/model-playground/index.ts @@ -73,6 +73,12 @@ function getModel(aiModelString: string) { baseURL: "https://albert.api.etalab.gouv.fr/v1", apiKey: providerKey, })(modelName); + } else if (provider === "eurouter.chat") { + return createOpenAICompatible({ + name: "eurouter", + baseURL: "https://api.eurouter.ai/api/v1", + apiKey: providerKey, + })(modelName); } else if (provider === "mistral.chat") { return createMistral({ apiKey: providerKey, diff --git a/packages/xl-ai/.env.example b/packages/xl-ai/.env.example index f7f5b2bc6f..5a4ae6c18f 100644 --- a/packages/xl-ai/.env.example +++ b/packages/xl-ai/.env.example @@ -4,4 +4,5 @@ GROQ_API_KEY= ANTHROPIC_API_KEY= MISTRAL_API_KEY= ALBERT_ETALAB_API_KEY= -GOOGLE_API_KEY= \ No newline at end of file +GOOGLE_API_KEY= +EUROUTER_API_KEY= diff --git a/packages/xl-ai/src/testUtil/testAIModels.ts b/packages/xl-ai/src/testUtil/testAIModels.ts index c6ed3a2b8a..ac679160a6 100644 --- a/packages/xl-ai/src/testUtil/testAIModels.ts +++ b/packages/xl-ai/src/testUtil/testAIModels.ts @@ -22,12 +22,19 @@ const albert = createOpenAICompatible({ apiKey: process.env.ALBERT_API_KEY || "not-available-in-ci", })("albert-etalab.chat/albert-large"); +const eurouter = createOpenAICompatible({ + name: "eurouter", + baseURL: "https://api.eurouter.ai/api/v1", + apiKey: process.env.EUROUTER_API_KEY || "not-available-in-ci", +})("mistral-large-3"); + export const testAIModels: Record< - "groq" | "openai" | "albert" | "anthropic", + "groq" | "openai" | "albert" | "anthropic" | "eurouter", Exclude > = { groq, openai, albert, anthropic, + eurouter, };