diff --git a/src/renderer/src/assets/images/models/gpt-5-codex.png b/src/renderer/src/assets/images/models/gpt-5-codex.png new file mode 100644 index 0000000000..688d187349 Binary files /dev/null and b/src/renderer/src/assets/images/models/gpt-5-codex.png differ diff --git a/src/renderer/src/config/models/logo.ts b/src/renderer/src/config/models/logo.ts index 5f10f0543c..40df0af30e 100644 --- a/src/renderer/src/config/models/logo.ts +++ b/src/renderer/src/config/models/logo.ts @@ -61,6 +61,7 @@ import ChatGPTImageModelLogo from '@renderer/assets/images/models/gpt_image_1.pn import ChatGPTo1ModelLogo from '@renderer/assets/images/models/gpt_o1.png' import GPT5ModelLogo from '@renderer/assets/images/models/gpt-5.png' import GPT5ChatModelLogo from '@renderer/assets/images/models/gpt-5-chat.png' +import GPT5CodexModelLogo from '@renderer/assets/images/models/gpt-5-codex.png' import GPT5MiniModelLogo from '@renderer/assets/images/models/gpt-5-mini.png' import GPT5NanoModelLogo from '@renderer/assets/images/models/gpt-5-nano.png' import GrokModelLogo from '@renderer/assets/images/models/grok.png' @@ -162,6 +163,7 @@ export function getModelLogo(modelId: string) { return undefined } + // key is regex const logoMap = { pixtral: isLight ? PixtralModelLogo : PixtralModelLogoDark, jina: isLight ? JinaModelLogo : JinaModelLogoDark, @@ -177,6 +179,7 @@ export function getModelLogo(modelId: string) { 'gpt-5-mini': GPT5MiniModelLogo, 'gpt-5-nano': GPT5NanoModelLogo, 'gpt-5-chat': GPT5ChatModelLogo, + 'gpt-5-codex': GPT5CodexModelLogo, 'gpt-5': GPT5ModelLogo, gpts: isLight ? ChatGPT4ModelLogo : ChatGPT4ModelLogoDark, 'gpt-oss(?:-[\\w-]+)': isLight ? ChatGptModelLogo : ChatGptModelLogoDark, @@ -286,7 +289,7 @@ export function getModelLogo(modelId: string) { longcat: LongCatAppLogo, bytedance: BytedanceModelLogo, '(V_1|V_1_TURBO|V_2|V_2A|V_2_TURBO|DESCRIBE|UPSCALE)': IdeogramModelLogo - } + } as const for (const key in logoMap) { const regex = new RegExp(key, 'i') diff --git a/src/renderer/src/config/models/reasoning.ts b/src/renderer/src/config/models/reasoning.ts index f309811a9d..3f55f13a3a 100644 --- a/src/renderer/src/config/models/reasoning.ts +++ b/src/renderer/src/config/models/reasoning.ts @@ -22,6 +22,7 @@ export const MODEL_SUPPORTED_REASONING_EFFORT: ReasoningEffortConfig = { default: ['low', 'medium', 'high'] as const, o: ['low', 'medium', 'high'] as const, gpt5: ['minimal', 'low', 'medium', 'high'] as const, + gpt5_codex: ['low', 'medium', 'high'] as const, grok: ['low', 'high'] as const, gemini: ['low', 'medium', 'high', 'auto'] as const, gemini_pro: ['low', 'medium', 'high', 'auto'] as const, @@ -40,6 +41,7 @@ export const MODEL_SUPPORTED_OPTIONS: ThinkingOptionConfig = { default: ['off', ...MODEL_SUPPORTED_REASONING_EFFORT.default] as const, o: MODEL_SUPPORTED_REASONING_EFFORT.o, gpt5: [...MODEL_SUPPORTED_REASONING_EFFORT.gpt5] as const, + gpt5_codex: MODEL_SUPPORTED_REASONING_EFFORT.gpt5_codex, grok: MODEL_SUPPORTED_REASONING_EFFORT.grok, gemini: ['off', ...MODEL_SUPPORTED_REASONING_EFFORT.gemini] as const, gemini_pro: MODEL_SUPPORTED_REASONING_EFFORT.gemini_pro, @@ -55,8 +57,13 @@ export const MODEL_SUPPORTED_OPTIONS: ThinkingOptionConfig = { export const getThinkModelType = (model: Model): ThinkingModelType => { let thinkingModelType: ThinkingModelType = 'default' + const modelId = getLowerBaseModelName(model.id) if (isGPT5SeriesModel(model)) { - thinkingModelType = 'gpt5' + if (modelId.includes('codex')) { + thinkingModelType = 'gpt5_codex' + } else { + thinkingModelType = 'gpt5' + } } else if (isSupportedReasoningEffortOpenAIModel(model)) { thinkingModelType = 'o' } else if (isSupportedThinkingTokenGeminiModel(model)) { diff --git a/src/renderer/src/types/index.ts b/src/renderer/src/types/index.ts index c3b7754e65..3f38b57749 100644 --- a/src/renderer/src/types/index.ts +++ b/src/renderer/src/types/index.ts @@ -76,6 +76,7 @@ const ThinkModelTypes = [ 'default', 'o', 'gpt5', + 'gpt5_codex', 'grok', 'gemini', 'gemini_pro',