From c0efc5573fce9ee3eb232432c4ad6bd1da243ca3 Mon Sep 17 00:00:00 2001 From: zahlekhan Date: Wed, 6 May 2026 21:56:33 +0530 Subject: [PATCH] chore(openui-chat): make model configurable via environment Use OPENAI_MODEL in the chat route so deployments can change models without code edits, while preserving gpt-5.4 as the default fallback. Co-authored-by: Cursor --- examples/openui-chat/src/app/api/chat/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/openui-chat/src/app/api/chat/route.ts b/examples/openui-chat/src/app/api/chat/route.ts index 0ebcc126b..845128390 100644 --- a/examples/openui-chat/src/app/api/chat/route.ts +++ b/examples/openui-chat/src/app/api/chat/route.ts @@ -202,7 +202,7 @@ export async function POST(req: NextRequest) { const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY, }); - const MODEL = "gpt-5.4"; + const MODEL = process.env.OPENAI_MODEL || "gpt-5.4"; // eslint-disable-next-line @typescript-eslint/no-explicit-any const cleanMessages = (messages as any[])