Skip to content

[FEATURE]: Codex plugin improvement to remove release lag of available models #18566

Closed as not planned

Description

@wilkie1990

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

OpenCode currently relies on a hardcoded Codex model allowlist.

This means every time OpenAI releases a new Codex-compatible model, users have to wait for an OpenCode release before they can use it, even when the model is already live upstream. For instance, GPT5.4-Mini is still not available for OpenCode users unless they use a dev build.

Why this is a problem

  • unnecessary release lag
  • users cannot access newly released Codex models immediately
  • repeated maintenance burden for contributors and maintainers
  • the app becomes stale whenever OpenAI ships model updates faster than OpenCode ships releases

Suggested resolution

I think there are two good options:

  1. allow users to explicitly add OAuth-valid Codex models within opencode.json configuration file. For example: "codex": { "additionalAllowedModels": [ "gpt5.4-mini", "gpt5.5" ] },
  2. extend the models.dev schema with a flag indicating whether a model is valid for OAuth auth flows, so OpenCode can rely on metadata instead of a hardcoded local list

Example

A new OpenAI model can already exist in models.dev, but OpenCode will still hide/block it for Codex OAuth until the hardcoded allowlist is updated and a new release is published.

Expected outcome

New OAuth-valid Codex models should not require a new OpenCode release just to become selectable.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Mar 21, 2026
  2. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 21, 2026
  3. github-actions commented on Mar 21, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your request is distinct from those, feel free to clarify the difference so maintainers can track them separately.

  4. wilkie1990 commented on Mar 21, 2026

    @wilkie1990
    Author

    Proposal for option 1:

    config.ts

    Add new optional section to schema:

          codex: z
            .object({
              additionalAllowedModels: z
                .array(z.string())
                .optional()
                .describe("Additional model IDs to allow when using Codex OAuth authentication"),
            })
            .optional()
            .describe("Codex-specific configuration")

    codex.ts

    Import config:

    import { Config } from "@/config/config"

    Merge in any additional models from user config:

            const config = await Config.get()
            if (config.codex?.additionalAllowedModels) {
              for (const model of config.codex. additionalAllowedModels) {
                allowedModels.add(model)
              }
            }
  5. removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  6. github-actions commented on Jul 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions