github / github/copilot-cli

Bug: Cannot read properties of null (reading 'length') when using BYOK

Abierto
#3,911 1 comentario 1 reacción 0 asignados Ver en GitHub
area:configuration area:models
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 using BYOK (Bring Your Own Key) in the Copilot CLI, I encounter the following error: `Cannot read properties of null (reading 'length')`.

Image

### Affected version

GitHub Copilot CLI 1.0.64.

### Steps to reproduce the behavior

1. Open Copilot CLI with the following command:

> COPILOT_PROVIDER_TYPE=openai COPILOT_PROVIDER_WIRE_API=completions COPILOT_PROVIDER_BASE_URL=https://api.mistral.ai/v1 COPILOT_PROVIDER_API_KEY=$MISTRAL_API_KEY COPILOT_MODEL=mistral-medium-latest COPILOT_PROVIDER_MAX_PROMPT_TOKENS=262144 COPILOT_PROVIDER_MAX_OUTPUT_TOKENS=262144 copilot --yolo --log-level all --log-dir logs/

2. Send prompt

```
hi
```

### Expected behavior

No error

### Additional context

[process-1782304659429-43157.log](https://github.com/user-attachments/files/29293096/process-1782304659429-43157.log)

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start with the reported `copilot` command and its BYOK environment variables, then inspect the attached `process-1782304659429-43157.log` for the null value and preceding operation. Reproduce with the `hi` prompt using Copilot CLI 1.0.64 and verify that the prompt completes without the `reading 'length'` error.

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

Evaluación

Stack tecnológico
shell
Área
cli
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Tranquilo
Claridad
Necesita aclaración
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.