Skip to content

[Bug] ChatGPT model override is discarded: chatgpt-engine.js ignores its engine argument and hardcodes model: 'auto' #75

Description

@sjgold

Summary

ChatGPT model selection is plumbed all the way from the CLI to the injected browser call, then discarded. chatgpt-engine.js accepts an engine argument and never reads it, hardcoding model: 'auto' in the request to /backend-api/conversation.

Gemini's equivalent works, so the routing layer is fine. Only the ChatGPT engine is missing its half of the implementation.

Version: v5.0.0, Session (Browser) mode, Windows 11.

Reproduction

proxima ask chatgpt "Reply with your model name, then OK. Nothing else."
# -> GPT-5.5-mini

proxima ask -m chatgpt:gpt-4o "Reply with your model name, then OK. Nothing else."
# -> GPT-5.5-mini  (override ignored)

Selecting a different model in the ChatGPT tab's own model picker inside the Agent Hub changes nothing either, since the engine posts to /backend-api/conversation directly and bypasses whatever the web UI has selected.

Trace

The override survives the entire chain and dies at the last consumer:

  1. cli/proxima-cli.cjs:705 reads --model and posts it as { model, message } (:335)
  2. electron/api/rest-api.cjs:269-283 _parseResolved splits on : generically, so chatgpt:gpt-4o resolves to { providers: ['chatgpt'], gemini: 'gpt-4o' } (the field name says gemini but it functions as a provider-agnostic engine override)
  3. electron/api/rest-api.cjs:401 passes it to queryProvider
  4. electron/main-v2.cjs:525-527 builds targetProvider = provider + ':' + engineOverride, generic across providers
  5. electron/providers/api.cjs:129-131,159 splits that and injects window.__proximaChatGPT.send(message, "gpt-4o", attachments, conversationId)
  6. electron/providers/engines/chatgpt-engine.js:374 receives "gpt-4o" as engine and never references it. Line 453 is model: 'auto'.

For comparison, gemini-engine.js:507-539 parses its engine argument into a workspace ID plus a {modelId, customIndex11, inner79} profile and bakes it into request headers (:627) and innerReq[79] (:614).

Suggested fix

Minimal pass-through at chatgpt-engine.js:445-453:

var requestedModel = 'auto';
if (typeof engine === 'string' && engine.trim() && engine.trim() !== 'auto') {
    requestedModel = engine.trim();
    console.log('[Proxima ChatGPT] Using requested model:', requestedModel);
}

var payload = {
    action: 'next',
    messages: [ /* ... */ ],
    model: requestedModel,
    // ...
};

That keeps auto as the default and forwards anything explicit. A follow-up would be validating against the slugs /backend-api/models actually returns, so an unknown slug fails with a clear message instead of a raw backend error.

Related note

MODEL_ALIASES in rest-api.cjs:25 maps gpt-4o and gpt-4 to the provider chatgpt, so a bare -m gpt-4o is read as a provider selection with no engine. The colon form is the only way to express an engine today, which is worth documenting in proxima --help whichever way the fix lands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions