github / github/copilot-cli

Issue Summary: Copilot CLI Session Resume Fails Due to Inconsistent Model Name Prefix Handling

Abierto
#4,282 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

area:models area:sessions
Lenguaje dominante
Shell
Estrellas
11.2k
Forks
1.9k
Merge medio
14 h 16 min
PR fusionados (30 d)
6

Descripción

Describe the bug

When attempting to resume a previous session that used a custom endpoint model (e.g., a locally hosted LM Studio model qwen3.6-35b-a3b) in VS Code’s Copilot CLI, the CLI fails to restore the session because of an inconsistency in the model name prefix. The session metadata stores a prefixed name, but the actual API call uses the unprefixed name, leading to a non‑JSON error response and a subsequent parsing failure.

Affected version

GitHub Copilot CLI 1.0.74.

Steps to reproduce the behavior

1.Configure a custom endpoint in VS Code pointing to a local LM Studio server with the model qwen3.6-35b-a3b.

2.Start a new session using that model and complete a conversation successfully. The session is saved normally.

3.End the session (e.g., by closing the conversation or letting it finish).

4.Attempt to resume the session from the VS Code Copilot history panel.

5.Observe the error – the CLI logs show model fallback warnings and eventually an API call failure.

Expected behavior

When resuming a session, the Copilot CLI should:

Maintain model name consistency – either store the unprefixed name in the session metadata, or use the full name (including the customendpoint/ prefix) when making the API call.

Provide clearer error messaging – when a model name mismatch occurs, the CLI should give an explicit, actionable error instead of a cryptic JSON parsing failure.

Additional context

2026-07-28T11:50:21.747Z [INFO] Proxy configuration: HTTP_PROXY=(not set), HTTPS_PROXY=(not set), NO_PROXY=192.168.1.101,localhost,127.0.0.1
2026-07-28T11:50:21.748Z [INFO] Running in offline mode. GitHub features are unavailable.
2026-07-28T11:50:21.748Z [INFO] Shell completions: no supported shell detected, skipping
2026-07-28T11:50:21.748Z [INFO] Starting CLI in server mode (stdio)
2026-07-28T11:50:21.749Z [INFO] Starting CLI in stdio mode (Rust JSON-RPC engine)
2026-07-28T11:50:21.749Z [INFO] CLI server ready (stdio mode, Rust JSON-RPC engine)
2026-07-28T11:50:21.749Z [INFO] Server started, waiting for requests
2026-07-28T11:50:22.651Z [INFO] Workspace initialized: 59d2872e-c098-4f97-872d-e2ee57464169 (checkpoints: 0)
2026-07-28T11:50:22.666Z [INFO] [managedSettings] applied: bypass-permissions mode DISABLED by enterprise policy (fail-closed: policy could not be determined) — /allow-all and permission escalation are now blocked
2026-07-28T11:50:22.666Z [INFO] [managedSettings] self-fetch starting for account https://github.com/YH20250922
2026-07-28T11:50:22.666Z [INFO] [managedSettings] device MDM: no policy present on this device
2026-07-28T11:50:23.538Z [INFO] [managedSettings] server policy: none for this account (404/empty) from https://github.com
2026-07-28T11:50:23.538Z [INFO] [managedSettings] effective policy resolved: source=none, bypassDisabled=false, serverFetchFailed=false
2026-07-28T11:50:23.538Z [INFO] [managedSettings] applied: no bypass restriction in force (managed policy absent)
2026-07-28T11:50:23.538Z [INFO] [managedSettings] self-fetch complete for https://github.com/YH20250922: bypassDisabled=false, serverFetchFailed=false
2026-07-28T11:50:23.551Z [INFO] Resumed session: 59d2872e-c098-4f97-872d-e2ee57464169
2026-07-28T11:50:23.561Z [INFO] Retrieved 17 events from session 59d2872e-c098-4f97-872d-e2ee57464169
2026-07-28T11:50:31.665Z [WARNING] Model 'customendpoint/qwen3.6-35b-a3b' from CLI argument is not available. Falling back to next option.
2026-07-28T11:50:31.665Z [WARNING] Model 'customendpoint/qwen3.6-35b-a3b' from session is not available. Falling back to next option.
2026-07-28T11:50:31.665Z [INFO] Using default model: gpt-5.4
2026-07-28T11:50:31.673Z [INFO] Closing session 59d2872e-c098-4f97-872d-e2ee57464169
2026-07-28T11:50:31.678Z [INFO] Destroyed session: 59d2872e-c098-4f97-872d-e2ee57464169
2026-07-28T11:50:31.688Z [INFO] Workspace initialized: 59d2872e-c098-4f97-872d-e2ee57464169 (checkpoints: 0)
2026-07-28T11:50:31.691Z [INFO] [managedSettings] applied: bypass-permissions mode DISABLED by enterprise policy (fail-closed: policy could not be determined) — /allow-all and permission escalation are now blocked
2026-07-28T11:50:31.691Z [INFO] [managedSettings] self-fetch starting for account https://github.com/YH20250922
2026-07-28T11:50:31.691Z [INFO] [managedSettings] device MDM: no policy present on this device
2026-07-28T11:50:32.114Z [INFO] [managedSettings] server policy: none for this account (404/empty) from https://github.com
2026-07-28T11:50:32.114Z [INFO] [managedSettings] effective policy resolved: source=none, bypassDisabled=false, serverFetchFailed=false
2026-07-28T11:50:32.114Z [INFO] [managedSettings] applied: no bypass restriction in force (managed policy absent)
2026-07-28T11:50:32.114Z [INFO] [managedSettings] self-fetch complete for https://github.com/YH20250922: bypassDisabled=false, serverFetchFailed=false
2026-07-28T11:50:32.125Z [INFO] Resumed session: 59d2872e-c098-4f97-872d-e2ee57464169
2026-07-28T11:50:32.129Z [ERROR] Starting remote MCP client for GitHub with url: https://api.githubcopilot.com/mcp/
2026-07-28T11:50:32.129Z [ERROR] Connecting MCP client for GitHub...
2026-07-28T11:50:32.130Z [ERROR] Starting remote MCP client for unreal-mcp with url: http://127.0.0.1:8000/mcp
2026-07-28T11:50:32.130Z [ERROR] Connecting MCP client for unreal-mcp...
2026-07-28T11:50:32.970Z [ERROR] [rust:rmcp::transport::worker] worker quit with fatal: Transport channel closed, when AuthRequired(AuthRequiredError { www_authenticate_header: "******"invalid_request", error_description="No access token was provided in this request", resource_metadata="https://api.githubcopilot.com/.well-known/oauth-protected-resource/mcp/\"" })
2026-07-28T11:50:32.971Z [ERROR] Server GitHub requires authentication, initiating OAuth flow
2026-07-28T11:50:33.773Z [ERROR] OAuth authentication required for GitHub
2026-07-28T11:50:34.149Z [ERROR] [rust:rmcp::transport::worker] worker quit with fatal: Transport channel closed, when Client(reqwest::Error { kind: Request, url: "http://127.0.0.1:8000/mcp", source: hyper_util::client::legacy::Error(Connect, ConnectError("tcp connect error", 127.0.0.1:8000, Os { code: 10061, kind: ConnectionRefused, message: "由于目标计算机积极拒绝,无法连接。" })) })
2026-07-28T11:50:34.149Z [ERROR] Failed to start MCP client for remote server unreal-mcp: Error: failed to initialize MCP client: Send message error Transport [rmcp::transport::worker::WorkerTransport<rmcp::transport::streamable_http_client::StreamableHttpClientWorkermcp::client::RawCapturingReqwestClient>] error: Client error: error sending request for url (http://127.0.0.1:8000/mcp), when send initialize request (code=GenericFailure)
2026-07-28T11:50:34.149Z [ERROR] Recorded failure for server unreal-mcp: failed to initialize MCP client: Send message error Transport [rmcp::transport::worker::WorkerTransport<rmcp::transport::streamable_http_client::StreamableHttpClientWorkermcp::client::RawCapturingReqwestClient>] error: Client error: error sending request for url (http://127.0.0.1:8000/mcp), when send initialize request
2026-07-28T11:50:34.337Z [INFO] Using custom provider: type=openai, baseUrl=http://127.0.0.1:62659/v/customendpoint, wireApi=completions
2026-07-28T11:50:34.337Z [INFO]
2026-07-28T11:50:34.337Z [INFO] --- Start of group: Custom provider configured settings: ---
2026-07-28T11:50:34.337Z [INFO] --- End of group ---
2026-07-28T11:50:34.399Z [INFO] --- Start of group: Completion request configuration: ---
2026-07-28T11:50:34.399Z [INFO] --- End of group ---

session log

First conversation (successful):
{"type":"session.start","data":{"selectedModel":"customendpoint/qwen3.6-35b-a3b",...}}
{"type":"assistant.turn_start","data":{"model":"qwen3.6-35b-a3b",...}} // prefix dropped during actual call

Resume attempt (failure):
{"type":"session.resume","data":{"selectedModel":"customendpoint/qwen3.6-35b-a3b",...}}
{"type":"assistant.turn_start","data":{"model":"qwen3.6-35b-a3b",...}} // still unprefixed
// Repeated model_call errors follow
{"type":"session.error","data":{"errorType":"query","message":"non-streaming response body was not valid JSON: expected value at line 1 column 1"}}

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con el flujo de reanudación de la sesión y los metadatos de session.start/session.resume mostrados en el informe; después, compara el valor de selectedModel con el modelo enviado en assistant.turn_start. Reproduce el fallo con el endpoint personalizado y el modelo qwen3.6-35b-a3b. Se considera terminado cuando la reanudación conserva un nombre de modelo utilizable e informa de un error accionable en lugar de un fallo de análisis de JSON.

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

Evaluación

Stack tecnológico
rust, vscode
Área
api, cli
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.