From 3050424d5327f20bbcc990721109302d255ac37b Mon Sep 17 00:00:00 2001 From: perf3ct Date: Tue, 3 Jun 2025 20:47:16 +0000 Subject: [PATCH] fix(llm): don't filter for specific words when pulling models for openai --- apps/server/src/routes/api/openai.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/server/src/routes/api/openai.ts b/apps/server/src/routes/api/openai.ts index c78f183cd..ced03ce04 100644 --- a/apps/server/src/routes/api/openai.ts +++ b/apps/server/src/routes/api/openai.ts @@ -81,13 +81,13 @@ async function listModels(req: Request, res: Response) { // Filter and categorize models const allModels = response.data || []; - // Separate models into chat models and embedding models + // Include all models as chat models, without filtering by specific model names + // This allows models from providers like OpenRouter to be displayed const chatModels = allModels - .filter((model) => - // Include GPT models for chat - model.id.includes('gpt') || - // Include Claude models via Azure OpenAI - model.id.includes('claude') + .filter((model) => + // Exclude models that are explicitly for embeddings + !model.id.includes('embedding') && + !model.id.includes('embed') ) .map((model) => ({ id: model.id,