Skip to content

[BUG] Do not normalize gpt-5.3-codex-spark / gpt-5.3-codex / gpt-5.2-codex to gpt-5-codex #169

@sfkmk

Description

@sfkmk

Bug Description
oc-codex-multi-auth incorrectly normalizes distinct, valid Codex-sidecar model IDs to gpt-5-codex, causing model_not_supported_with_chatgpt_account errors on accounts that support the original model.

Affected models:

  • gpt-5.3-codex-spark
  • gpt-5.3-codex
  • gpt-5.2-codex

These IDs are available through ChatGPT/Codex OAuth, but the plugin collapses all three into gpt-5-codex before sending the request, which the backend rejects.

Steps to Reproduce

  1. Configure an OpenCode agent or provider model as openai/gpt-5.3-codex-spark (any variant).
  2. The plugin normalizes the model to gpt-5-codex via:
    • dist/lib/request/helpers/model-map.js lines 41–45
    • dist/lib/request/request-transformer.js lines 34–37
  3. The Codex API returns model_not_supported_with_chatgpt_account.

Expected Behavior

  • gpt-5.3-codex-spark should be preserved as gpt-5.3-codex-spark
  • gpt-5.3-codex should be preserved as gpt-5.3-codex
  • gpt-5.2-codex should be preserved as gpt-5.2-codex
  • Fallback pattern matching in request-transformer.js should also return these exact IDs, not gpt-5-codex

Actual Behavior
All three model IDs are mapped to gpt-5-codex, resulting in backend rejection for accounts where gpt-5-codex is not available but the specific versioned model is.

Environment

  • opencode version: 1.16.2
  • Plugin version: 6.3.1
  • Operating System: macOS 26.5.1

Logs
Plugin metadata shows the active plugin resolves from cache:

{
  "id": "oc-codex-multi-auth.status",
  "source": "npm",
  "spec": "oc-codex-multi-auth",
  "target": ".../.cache/opencode/packages/oc-codex-multi-auth@latest/node_modules/oc-codex-multi-auth",
  "requested": "latest",
  "version": "6.3.1"
}

Model normalization confirmed:

// model-map.js (unpatched)
"gpt-5.3-codex-spark": "gpt-5-codex",
// request-transformer.js (unpatched)
if (normalized.includes("gpt-5.3-codex-spark")) return "gpt-5-codex";

Compliance Checklist
Please confirm:

  • I'm using this plugin for personal development only
  • I have an active ChatGPT Plus/Pro subscription
  • This issue is not related to attempting commercial use or TOS violations
  • I've reviewed the FAQ and Troubleshooting sections

Additional Context

  • gpt-5.3-codex-spark supports reasoning effort levels low, medium, high, and xhigh, but not none.
  • A local patch that fixes this is:
    • In model-map.js: map gpt-5.3-codex-spark*gpt-5.3-codex-spark, gpt-5.3-codex*gpt-5.3-codex, gpt-5.2-codex*gpt-5.2-codex
    • In request-transformer.js fallback patterns: return the same specific IDs instead of gpt-5-codex
  • Also affected: gpt-5.5-fast is collapsed to gpt-5.5 (from earlier memory), and gpt-5.4-fast is missing from plugin model templates entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions