[Bug] org.eclipse.lsp4e error: Failed to parse /models response from CAPI: AssertError: Expected union value

Aperta
#521 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java

Direzione di ricerca

Start by locating the code that requests and parses the Copilot /models response; the issue identifies capabilities.type at /data/15 as the failing value (decisions). Check the schema and related model parsing tests, if present. Done means the response parses without this error and the expected behavior is verified; the issue names no source files or test entry points.

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

Descrizione

bug

Environment

  • OS: Windows
  • Eclipse Version: 2026-09 (4.41)
  • Plugin Version: 0.21.0

Describe the bug
I see the following entry in the Error Log:

[LS:GitHub Copilot Language Server][Error]	[default] Failed to parse /models response from CAPI: AssertError: Expected union value
    at AssertValue (C:\snapshot\copilot-language-server-internal\dist\main.js:1766:1717)
    at Assert (C:\snapshot\copilot-language-server-internal\dist\main.js:1766:1796)
    at C:\snapshot\copilot-language-server-internal\dist\main.js:1766:28462
    at C:\snapshot\copilot-language-server-internal\dist\main.js:1766:29070
    at Array.reduce (<anonymous>)
    at ParseValue (C:\snapshot\copilot-language-server-internal\dist\main.js:1766:28967)
    at Object.Parse (C:\snapshot\copilot-language-server-internal\dist\main.js:1766:29317)
    at t.parseModelsResponse (C:\snapshot\copilot-language-server-internal\dist\main.js:1766:30267)
    at t.fetchImpl (C:\snapshot\copilot-language-server-internal\dist\main.js:1766:30882)
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5) {
  error: {
    type: 62,
    schema: { anyOf: [Array], [Symbol(TypeBox.Kind)]: 'Union' },
    path: '/data/15/capabilities/type',
    value: 'decisions',
    message: 'Expected union value',
    errors: [
      [ValueErrorIterator],
      [ValueErrorIterator],
      [ValueErrorIterator]
    ]
  }
}

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
No error should be present in the Error log

Screenshots
image

Additional context
This error comes from the GitHub Copilot Language Server.

What happened:
• The language server requested the list of available models from the Copilot API (/models).
• It checks the response against a strict schema.
• The entry at /data/15 (the 16th model in the list) has capabilities.type = 'decisions'.
• The schema only allows a fixed set of values for capabilities.type (a union, probably chat, completion, embeddings and similar).
• 'decisions' is not in that set, so the check fails with Expected union value.

Why it happens The server added a new kind of model that your installed Copilot plugin version doesn't know about yet. The Copilot Eclipse plugin is older than the API.

Lingua principale
Java
Stelle
128
Fork
70
Merge medio
5g 20h
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/copilot-for-eclipse

Tutte le issue di microsoft/copilot-for-eclipse

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.