github / github/copilot-cli

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

オープン
#3,911 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る
area:configuration area:models
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### 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)

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
shell
領域
cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。