Skip to content

GPT-5-Codex over GitHub copilot does not work #2977

@DanRioDev

Description

@DanRioDev

So, I've been trying to make GPT 5 Codex to work (through copilot), but the farthest I could was to this:

Error: {
  code = "unsupported_api_for_model",
  message = "model gpt-5-codex is not accessible via the /chat/completions endpoint"
}

These are some important debug information from copilot:

{
  "capabilities": {
    "family": "gpt-5-codex",
    "limits": {
      "max_context_window_tokens": 200000,
      "max_output_tokens": 64000,
      "max_prompt_tokens": 128000,
      "vision": {
        "max_prompt_image_size": 3145728,
        "max_prompt_images": 1,
        "supported_media_types": [
          "image/jpeg",
          "image/png",
          "image/webp",
          "image/gif"
        ]
      }
    },
    "object": "model_capabilities",
    "supports": {
      "parallel_tool_calls": true,
      "streaming": true,
      "structured_outputs": true,
      "tool_calls": true,
      "vision": true
    },
    "tokenizer": "o200k_base",
    "type": "chat"
  },
  "id": "gpt-5-codex",
  "model_picker_category": "powerful",
  "model_picker_enabled": true,
  "name": "GPT-5-Codex (Preview)",
  "object": "model",
  "policy": {
    "state": "enabled",
    "terms": "Enable access to the latest GPT-5-Codex model from OpenAI. [Learn more about how GitHub Copilot serves GPT-5-Codex](https://gh.io/copilot-openai)."
  },
  "preview": true,
  "supported_endpoints": [
    "/responses"
  ],
  "vendor": "OpenAI",
  "version": "gpt-5-codex"
}

It uses the new API /responses which may need a specific parser too.

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