github / github/copilot-cli

Cannot use Grok 4.20 due to reasoningEffort being sent always for responses wire format

未關閉
#2,932 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
area:configuration area:models
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### Describe the bug

I'm setting the following envvars:

```
Set COPILOT_PROVIDER_TYPE=openai
Set COPILOT_PROVIDER_BASE_URL=https://api.x.ai/v1
Set COPILOT_MODEL=grok-4.20-non-reasoning
Set COPILOT_PROVIDER_WIRE_API=responses
Set COPILOT_PROVIDER_MAX_PROMPT_TOKENS=2000000
Set COPILOT_PROVIDER_API_KEY=***********
```

There seems to be no way to turn that parameter off entirely (or even customize as proposed at https://github.com/github/copilot-cli/issues/2559).

Ideally there should be support for setting `off` (don't send the parameter at all) as well as custom values via `COPILOT_MODEL_EFFORT` envvar

NOTE: despite 4.20 and 4.1 being reasoning models, the parameter is still not supported. See https://docs.x.ai/developers/model-capabilities/text/reasoning#the-reasoning-parameter

### Affected version

1.0.34

### Steps to reproduce the behavior

Set the above variables so they are valid for xAI (in particular your API key).

### Expected behavior

Requests succeed.

### Additional context

_No response_

貢獻指南

開啟貢獻指南

研究方向

先追蹤 COPILOT_PROVIDER_WIRE_API=responses 如何建構請求,以及 reasoningEffort 從模型設定中的哪個位置設定。根據 issue 中描述的 xAI 行為,檢查 provider 和 model-effort 的處理;當支援 off 設定或自訂的 COPILOT_MODEL_EFFORT 值,使請求不帶不受支援的參數即可成功時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

領域
api
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。