fix(chatgpt): honour engine override instead of hardcoding model 'auto' - #76
fix(chatgpt): honour engine override instead of hardcoding model 'auto'#76sjgold wants to merge 1 commit into
Conversation
PR Summary by QodoFix ChatGPT engine override being dropped (model hardcoded to 'auto')
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
`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 Zen4-bit#75 Co-Authored-By: Seth Goldberg <sethjaygoldberg@mac.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
c08a11d to
80e5be6
Compare
|
Closing this. After further testing, the change doesn't deliver a functional fix: ChatGPT's ignores the field for browser-session requests and serves whatever the in-app model picker is set to. Confirmed behaviourally — requesting the So The underlying observation still stands and I've left it in #75: the ChatGPT engine accepts an |
|
Closing this. After further testing it does not deliver a functional fix. ChatGPT's So The underlying observation still stands in #75: the ChatGPT engine accepts an |
Fixes #75
chatgpt-engine.jssend()accepts anengineargument and never reads it, so every request postsmodel: 'auto'no matter what the caller asked for. The override already survives the entire chain (CLI ->rest-api.cjs->main-v2.cjs->api.cjs-> injectedwindow.__proximaChatGPT.send); it was just dropped at the final step. Gemini's equivalent selection works, which is what made the gap easy to overlook.Change
Nine lines. Read
enginewhen it is present, keepautowhen it is not.What is verified
The parameter now reaches the request payload instead of being discarded. Confirmed by tracing the value through to the injected call and into the POST body on Windows 11, v5.0.0, Session (Browser) mode. Behaviour with no override is unchanged.
What is NOT verified
I cannot currently confirm that ChatGPT's backend honours the
modelfield on/backend-api/conversationfor browser-session requests.An earlier revision of this PR claimed verification based on
message.metadata.model_slugfrom the response stream. That method is invalid and I have withdrawn it.model_slugechoes whatever model string was sent, including nonsense:Both returned normal completions. So the field proves the value was transmitted, and nothing more. Apologies for the noise; I would rather correct it than leave a false result in the record.
If a maintainer knows whether this endpoint respects
modelfor session-mode requests, that would settle it. Either way the current code is wrong on its face, since the argument is accepted and then ignored.Note for maintainers
MODEL_ALIASESinrest-api.cjs:25maps bare names likegpt-4oto the providerchatgpt, so-m gpt-4oreads as a provider selection with no engine. The colon form-m chatgpt:<slug>is the only way to express an engine today. Worth a line inproxima --helpif you want that discoverable.