Skip to content

v2: OpenAI OAuth filters out gpt-6-astra #47405

Closed

Description

@nr1brolyfan

Summary

OpenCode V2 filters gpt-6-astra out of the model catalog when using OpenAI ChatGPT/Codex OAuth, even when the model is explicitly configured and the connected account has access to it.

Environment

  • opencode version: 0.0.0-beta-19124
  • OS: Linux 6.6.87.2-microsoft-standard-WSL2, x86_64
  • Terminal: VS Code (TERM_PROGRAM=vscode, TERM=xterm-256color, COLORTERM=truecolor)
  • Shell: /usr/bin/zsh
  • Install/channel: OpenCode V2 beta
  • Active plugins: None configured

Reproduction

  1. Connect OpenAI using ChatGPT/Codex OAuth with an account that has access to GPT-6 Astra.

  2. Add the following to ~/.config/opencode/opencode.jsonc:

    {
      "$schema": "https://opencode.ai/config.json",
      "model": "openai/gpt-6-astra",
      "providers": {
        "openai": {
          "models": {
            "gpt-6-astra": {
              "modelID": "gpt-6-astra",
              "name": "GPT-6 Astra"
            }
          }
        }
      }
    }
  3. Confirm that opencode2 debug config includes openai/gpt-6-astra.

  4. Run opencode2 models.

Expected Behavior

openai/gpt-6-astra should be enabled, listed, and selectable when using ChatGPT/Codex OAuth.

Actual Behavior

The configuration is loaded, but openai/gpt-6-astra is absent from opencode2 models. The issue reproduces consistently.

The V2 OpenAI provider currently matches OAuth models using:

const match = apiID.match(/^gpt-(\d+\.\d+)/)

This requires a decimal component and therefore rejects gpt-6-astra.

Additional Context

The stable OpenCode implementation had a related report and fix:

That fix updates packages/opencode/src/plugin/openai/codex.ts, but V2 has a separate implementation in packages/core/src/plugin/provider/openai.ts. The current beta and v2 branches still use the decimal-only regex shown above.

Activity

  1. github-actions commented on Sep 5, 2026

    @github-actions
    Contributor

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

    If this is intentionally tracking the V2-specific fix separately (since V2 has a separate implementation in packages/core), that context is already noted in the issue and this can be kept open as a distinct V2 tracking issue.

  2. rekram1-node commented on Sep 5, 2026

    @rekram1-node
    Contributor

    alreaady fixed

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions