From 80e5be64db158c5187a5cef1d6776b384da64a24 Mon Sep 17 00:00:00 2001 From: Seth Goldberg Date: Thu, 23 Jul 2026 22:29:42 -0500 Subject: [PATCH] fix(chatgpt): honour engine override instead of hardcoding model 'auto' `send()` accepted an `engine` argument and never read it, so every request posted `model: 'auto'` regardless of what the caller asked for. The override already survives the whole chain (CLI -> rest-api -> main-v2 -> api.cjs -> injected `window.__proximaChatGPT.send`), it was simply dropped at the last step. Gemini's engine selection works, which made the gap easy to miss. The requested slug now reaches the request payload rather than being discarded. Behaviour is unchanged when no override is passed. Not verified: whether ChatGPT's backend honours the `model` field for browser-session requests. `message.metadata.model_slug` in the response stream echoes whatever was sent (including nonsense slugs), so it cannot be used as evidence either way. Fixes #75 Co-Authored-By: Seth Goldberg Co-Authored-By: Claude Opus 4.8 (1M context) --- electron/providers/engines/chatgpt-engine.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/electron/providers/engines/chatgpt-engine.js b/electron/providers/engines/chatgpt-engine.js index c593fd7..b0cb59c 100644 --- a/electron/providers/engines/chatgpt-engine.js +++ b/electron/providers/engines/chatgpt-engine.js @@ -442,6 +442,14 @@ }; } + // Honour an explicit engine override (e.g. `-m chatgpt:gpt-5-5-thinking`), + // falling back to the account default when none is supplied. + var requestedModel = 'auto'; + if (typeof engine === 'string' && engine.trim() && engine.trim() !== 'auto') { + requestedModel = engine.trim(); + console.log('[Proxima ChatGPT] Requested model:', requestedModel); + } + var payload = { action: 'next', messages: [{ @@ -450,7 +458,7 @@ content: messageContent, metadata: messageMetadata }], - model: 'auto', + model: requestedModel, parent_message_id: _parentMessageId || crypto.randomUUID(), timezone_offset_min: new Date().getTimezoneOffset(), history_and_training_disabled: false,