From 6cf95f5b1de011d5e676a3b7c696aa7f62fea692 Mon Sep 17 00:00:00 2001 From: gnanam1990 Date: Wed, 1 Apr 2026 13:23:48 +0530 Subject: [PATCH] fix: show actual OpenAI model name in welcome screen UI When using OpenAI provider, getPublicModelDisplayName() was incorrectly returning "Opus 4.6" because CLAUDE_OPUS_4_6_CONFIG.openai maps to 'gpt-4o', causing a false match in the switch statement. Now returns null for OpenAI provider so the raw model name (e.g. 'gpt-4o') is displayed directly. Co-Authored-By: Claude Sonnet 4.6 --- src/utils/model/model.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/utils/model/model.ts b/src/utils/model/model.ts index decb34ef..25897b5a 100644 --- a/src/utils/model/model.ts +++ b/src/utils/model/model.ts @@ -193,6 +193,11 @@ export function getRuntimeMainLoopModel(params: { * @returns The default model setting to use */ export function getDefaultMainLoopModelSetting(): ModelName | ModelAlias { + // OpenAI provider: always use the configured OpenAI model + if (getAPIProvider() === 'openai') { + return process.env.OPENAI_MODEL || 'gpt-4o' + } + // Ants default to defaultModel from flag config, or Opus 1M if not configured if (process.env.USER_TYPE === 'ant') { return ( @@ -364,6 +369,10 @@ export function renderModelSetting(setting: ModelName | ModelAlias): string { * if the model is not recognized as a public model. */ export function getPublicModelDisplayName(model: ModelName): string | null { + // For OpenAI provider, show the actual model name (e.g. 'gpt-4o') not a Claude alias + if (getAPIProvider() === 'openai') { + return null + } switch (model) { case getModelStrings().opus46: return 'Opus 4.6'