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

Closed
opened 2026-02-16 17:33:25 -05:00 by yindo · 2 comments
Owner

Originally created by @DanRioDev on GitHub (Oct 5, 2025).

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.

Originally created by @DanRioDev on GitHub (Oct 5, 2025). 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.
yindo closed this issue 2026-02-16 17:33:25 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 5, 2025):

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

  • #2758: Same exact error message "model gpt-5-codex is not accessible via the /chat/completions endpoint" when using GPT-5-Codex through GitHub Copilot
  • #2890: Explains that gpt-5-codex only supports the /responses API endpoint, not /chat/completions, and provides technical details about the fix needed

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

@github-actions[bot] commented on GitHub (Oct 5, 2025): This issue might be a duplicate of existing issues. Please check: - #2758: Same exact error message "model gpt-5-codex is not accessible via the /chat/completions endpoint" when using GPT-5-Codex through GitHub Copilot - #2890: Explains that gpt-5-codex only supports the /responses API endpoint, not /chat/completions, and provides technical details about the fix needed Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Oct 5, 2025):

duplicate of #2758

@rekram1-node commented on GitHub (Oct 5, 2025): duplicate of #2758
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1958