github / github/app

GitHub Copilot App v1.0.0: model_not_supported on GHEC Data Residency — OAuth token missing copilot scope

Abierto
#1,131 2 comentarios 1 reacción 0 asignados Ver en GitHub
Bugs
Lenguaje dominante
Sin datos de lenguaje
Estrellas
2.1k
Forks
153
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Short summary

The GitHub Copilot App v1.0.0 fails to work on GHEC Data Residency instances (e.g. *.ghe.com). The model picker shows only "Auto" and all chat requests fail with CAPIError: 400 model_not_supported.

### Affected version or release

v1.0.0

### Installation context

_No response_

### What happened?

Description

The GitHub Copilot App v1.0.0 fails to work on GHEC Data Residency instances (e.g. *.ghe.com). The model picker shows only "Auto" and all chat requests fail with CAPIError: 400 model_not_supported.

Environment

- GitHub Copilot App v1.0.0 (macOS, aarch64)
- Bundled CLI v1.0.63
- GHEC DR instance with Copilot Business ( all features enabled)


Root Cause

The desktop app's OAuth flow does not request the copilot scope. On github.com this works because the Copilot API grants full model access without it. On GHEC DR, the copilot scope is required.

Without the copilot scope, the Copilot API on GHEC DR returns only 4 legacy models:

["gpt-4o-mini-2024-07-18", "gpt-3.5-turbo-0613", "gpt-3.5-turbo", "gpt-4o-mini"]

With the copilot scope (e.g. via gh CLI token), the same user gets 18 models including all current ones.


Verified by extracting the app's token from ~/.copilot/data.db (github_accounts table) and testing both tokens with curl against the GHEC DR Copilot API.

### Steps to reproduce

1. Install GitHub Copilot App v1.0.0
2. Sign in with a GHEC Data Residency account (*.ghe.com)
3. Open a new chat session
4. Send any message

### Expected behavior

Expected: Model picker shows available models, chat responds normally.
Actual: Model picker shows only "Auto". Chat fails with:

CAPIError: 400 The requested model is not supported.
code: "model_not_supported"
param: "model"
type: "invalid_request_error"

### Additional context

Suggested Fix

Add copilot to the OAuth scope list in the desktop app's auth flow, at minimum for non-github.com hosts.

Workaround

Users can replace the app's stored token with a gh CLI token that has the copilot scope:

# 1. Quit the Copilot App (Cmd+Q)
# 2. Authenticate gh CLI with copilot scope
gh auth login -h your_host.ghe.com -s copilot,repo,read:org,user,gist
# 3. Replace the app's token
TOKEN=$(gh auth token -h your_host.ghe.com)
sqlite3 ~/.copilot/data.db \
"UPDATE github_accounts SET access_token='$TOKEN' WHERE host='your_host.ghe.com';"
# 4. Reopen the Copilot App

Note: Signing out/in from the app will revert the fix since the app will re-authenticate without the copilot scope.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Locate the desktop app's OAuth flow and its scope list, then compare sign-in behavior for github.com and GHEC Data Residency hosts. Verify completion by reproducing the issue on a *.ghe.com account and confirming that the model picker exposes available models and chat requests succeed without the workaround in ~/.copilot/data.db.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
github, macos, sqlite
Área
authentication, desktop
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.