GitHub Copilot's gpt-5-codex model is not accessible via OpenAI /chat/completions endpoint #1825

Closed
opened 2026-02-16 17:32:49 -05:00 by yindo · 1 comment
Owner

Originally created by @falcon-head on GitHub (Sep 25, 2025).

I'm trying to use GPT-5-Codex within opencode. I have successfully enabled access to the GPT-5-Codex model through my GitHub account settings, but when attempting to use the model in opencode, I'm encounter the below error

AI_APICallError: model gpt-5-codex is not accessible via the /chat/completions endpoint

Steps to Reproduce:

  • Enabled GPT-5-Codex model access in GitHub account settings
  • Configured OpenCode to use GPT-5-Codex as the model
  • Attempted to run opencode with GPT-5-Codex
  • Error occurs preventing model usage

Environment

  • Opencode version : v0.11.3
  • OS: MacOS Tahoe
  • Model: gpt-5-codex through github copilot
Image
Originally created by @falcon-head on GitHub (Sep 25, 2025). I'm trying to use GPT-5-Codex within opencode. I have successfully enabled access to the GPT-5-Codex model through my GitHub account settings, but when attempting to use the model in opencode, I'm encounter the below error ``` AI_APICallError: model gpt-5-codex is not accessible via the /chat/completions endpoint ``` Steps to Reproduce: - Enabled GPT-5-Codex model access in GitHub account settings - Configured OpenCode to use GPT-5-Codex as the model - Attempted to run opencode with GPT-5-Codex - Error occurs preventing model usage Environment - Opencode version : v0.11.3 - OS: MacOS Tahoe - Model: gpt-5-codex through github copilot <img width="2554" height="240" alt="Image" src="https://github.com/user-attachments/assets/8a9c8f42-79e7-4568-9a36-ff2139d492c6" />
yindo closed this issue 2026-02-16 17:32:49 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 25, 2025):

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

  • #2758: Both issues report the exact same error message "model gpt-5-codex is not accessible via the /chat/completions endpoint" when trying to use GitHub Copilot's gpt-5-codex model with OpenCode

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

@github-actions[bot] commented on GitHub (Sep 25, 2025): This issue might be a duplicate of existing issues. Please check: - #2758: Both issues report the exact same error message "model gpt-5-codex is not accessible via the /chat/completions endpoint" when trying to use GitHub Copilot's gpt-5-codex model with OpenCode Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1825