github / github/app

**Title:** GitHub Copilot App BYOK fails with OpenAI-compatible endpoint whil...

Aperta
#2,903 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Nessun dato sulla lingua
Stelle
2.1k
Fork
153
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**Title:** GitHub Copilot App BYOK fails with OpenAI-compatible endpoint while VS Code works

I'm using an OpenAI-compatible BYOK endpoint from OpenCode Go.

The same endpoint, API key, and model work normally when configured in VS Code, but fail when configured in the GitHub Copilot App.

The Copilot App returns HTTP 400 errors such as:

```text
Failed to deserialize the JSON body into the target type:
messages[1]: unknown variant `image_url`, expected `text`
```

and:

```text
invalid_request_error:
Extra inputs are not permitted,
field: `messages[2].refusal`,
value: None
```

Steps to reproduce:

1. Configure the OpenCode Go OpenAI-compatible endpoint in VS Code.
2. Use the model normally — requests succeed.
3. Configure the same endpoint, API key, and model in GitHub Copilot App using BYOK.
4. Send a request.
5. GitHub Copilot App returns HTTP 400.

Expected behavior:

The same OpenAI-compatible endpoint should work in GitHub Copilot App as it does in VS Code.

Actual behavior:

Requests from GitHub Copilot App contain fields/message formats that the endpoint rejects, while VS Code requests succeed.

I'm not sure whether this is caused by the Copilot App request payload or an incompatibility in the endpoint, but the issue is reproducible specifically with GitHub Copilot App.

---
| Field | Value |
| --- | --- |
| App version | 1.1.10 |
| OS | Windows 10.0.26300 |
| Theme | GitHub |
| Path | /chat |
| Tenure | Week 9 |

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dal percorso della richiesta /chat BYOK e confronta il payload di GitHub Copilot App con la richiesta funzionante di VS Code per lo stesso endpoint, la stessa chiave e lo stesso modello. Riproduci le risposte HTTP 400 e determina se l’app invia i campi image_url e refusal; il lavoro è completato quando l’endpoint accetta la richiesta dell’app senza questi errori di deserializzazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
github, vscode
Ambito
api
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Da chiarire
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.