Skip to content

gpt-5-codex through GitHub Copilot provider returns API call error #2890

Closed as duplicate

Description

@sin4ch

My selected provider for opencode is GitHub Copilot. Whenever I try to select gpt-5-codex, I get this error:

Image

This felt strange since gpt-5 non-codex works perfectly.

I figured out that gpt-5 supports the chat/completions and responses APIs, while gpt-5-codex does not.

Case in point:

In opencode's provider implementation, only Azure/OpenAI models work with the responses endpoint. All others, including those from GitHub Copilot, are implemented using chat/completions. This is what's causing the problem with codex.

I will be creating a PR with a fix shortly. My fix will ensure that all gpt-5* models use the responses api rather than chat/completions. I also implemented a fallback, just in case.

Activity

  1. github-actions commented on Oct 1, 2025

    @github-actions
    Contributor

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

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Oct 1, 2025

    @rekram1-node
    Contributor

    duplicate of #2758

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

Metadata

Metadata

Assignees

No one assigned

    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