"The requested model is not supported." and "model gpt-5.1-codex is not accessible via the /chat/completions endpoint" for github copilot provider #3152

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

Originally created by @PadishahIII on GitHub (Nov 27, 2025).

Description

When I try to build using Github copilot's claude-sonnet-4.5 model, the error occur: "The requested model is not supported."

Image

But I've enabled this model following the endpoint in the error message:

Image

It's strange since I've used this model in opencode one or two weeks ago and it used to work fine.

And second, opencode says the 'gpt-5.1-codex' model is not accessible in github copilot, but it's present indeed:

Image

OpenCode version

1.0.119

Steps to reproduce

  1. run opencode and switch to github copilot's claude-sonnet-4.5
  2. send whatever prompt

Screenshot and/or share link

https://opencode.ai/s/hXWfg5i2

Operating System

macOS 15.6

Terminal

alacritty

Originally created by @PadishahIII on GitHub (Nov 27, 2025). ### Description When I try to build using Github copilot's claude-sonnet-4.5 model, the error occur: "The requested model is not supported." <img width="833" height="153" alt="Image" src="https://github.com/user-attachments/assets/cd5b8c5d-7f1b-40ee-a37c-f7b41a6a8333" /> But I've enabled this model following the endpoint in the error message: <img width="979" height="132" alt="Image" src="https://github.com/user-attachments/assets/a2961c27-bbcd-4c74-be05-d9e8a6cf18b6" /> It's strange since I've used this model in opencode one or two weeks ago and it used to work fine. And second, opencode says the 'gpt-5.1-codex' model is not accessible in github copilot, but it's present indeed: <img width="956" height="123" alt="Image" src="https://github.com/user-attachments/assets/58c2fd09-67b3-4380-8884-36c17bcebd94" /> ### OpenCode version 1.0.119 ### Steps to reproduce 1. run opencode and switch to github copilot's claude-sonnet-4.5 2. send whatever prompt ### Screenshot and/or share link https://opencode.ai/s/hXWfg5i2 ### Operating System macOS 15.6 ### Terminal alacritty
yindo added the opentuibug labels 2026-02-16 17:38:53 -05:00
yindo closed this issue 2026-02-16 17:38:53 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 27, 2025):

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

  • #4626: [Bug] OpenCode CLI (Latest) - GitHub Copilot Provider: Claude Sonnet 4.5 model missing/unusable
  • #2758: Copilot / gpt-5-codex "model gpt-5-codex is not accessible via the /chat/completions endpoint"
  • #2977: GPT-5-Codex over GitHub copilot does not work
  • #2927: github copilot claude sonnet 4.5 preview not supported
  • #2740: AI_APICallError: The requested model is not supported
  • #4172: Github Copilot provider requires different endpoint for gpt-5-codex
  • #2890: gpt-5-codex through GitHub Copilot provider returns API call error

These issues relate to:

  1. Claude Sonnet 4.5 model errors with GitHub Copilot (similar to your first issue)
  2. GPT-5-Codex and GPT-5.1-Codex requiring the /responses API endpoint instead of /chat/completions (similar to your second issue)

The underlying cause appears to be that GitHub Copilot's newer models (gpt-5-codex, gpt-5.1-codex) use the /responses API endpoint, but OpenCode is still trying to use the /chat/completions endpoint for them.

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

@github-actions[bot] commented on GitHub (Nov 27, 2025): This issue might be a duplicate of existing issues. Please check: - #4626: [Bug] OpenCode CLI (Latest) - GitHub Copilot Provider: Claude Sonnet 4.5 model missing/unusable - #2758: Copilot / gpt-5-codex "model gpt-5-codex is not accessible via the /chat/completions endpoint" - #2977: GPT-5-Codex over GitHub copilot does not work - #2927: github copilot claude sonnet 4.5 preview not supported - #2740: AI_APICallError: The requested model is not supported - #4172: Github Copilot provider requires different endpoint for gpt-5-codex - #2890: `gpt-5-codex` through GitHub Copilot provider returns API call error These issues relate to: 1. Claude Sonnet 4.5 model errors with GitHub Copilot (similar to your first issue) 2. GPT-5-Codex and GPT-5.1-Codex requiring the `/responses` API endpoint instead of `/chat/completions` (similar to your second issue) The underlying cause appears to be that GitHub Copilot's newer models (gpt-5-codex, gpt-5.1-codex) use the `/responses` API endpoint, but OpenCode is still trying to use the `/chat/completions` endpoint for them. Feel free to ignore if none of these address your specific case.
Author
Owner

@PadishahIII commented on GitHub (Nov 27, 2025):

ok, i've fixed that according to #4626

@PadishahIII commented on GitHub (Nov 27, 2025): ok, i've fixed that according to #4626
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3152