github / github/copilot-cli

Gemini models return 400 Bad Request in Copilot CLI

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

描述

**Request ID:** 8B9B:2E3309:6C8CC:19684A:6A593988
**Timestamp:** 2026-07-16T13:05:40Z
**Error:** CAPIError: 400 Bad Request

## Reproduction
1. Using Copilot with Gemini model selection (tried `gemini-3.1-pro-preview` and `gemini-3.5-flash`)
2. Sent plain text prompt with no attachments/tools
3. All advanced options at defaults (no custom reasoning/context overrides)
4. Extensions/tool-calling disabled

## Observed Behavior
- Request rejected with HTTP 400 before reaching model inference
- Error appears to be request-shape validation (not model timeout or API availability)
- Other models (GPT, Claude) work fine in same session

## Expected Behavior
Gemini models should accept and process the request like other available models

## Environment
- Copilot CLI (latest via app)
- Windows

Note: It appears to work if switched to "explore" mode

---
Request the backend to trace this request ID to identify which field/parameter was rejected.

貢獻指南

開啟貢獻指南

研究方向

首先,在 Windows 上使用列出的 Gemini 模型於 Copilot CLI 中重現該請求,使用請求 ID 8B9B:2E3309:6C8CC:19684A:6A593988,並比較 normal 和 explore 模式。追蹤導致 HTTP 400 的請求欄位;完成標準是一般提示詞可以在 Gemini 中正常運作且無需變更模式,同時 GPT 和 Claude 的行為不受影響。

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

評估

技術堆疊
shell
領域
api, cli
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
活躍
描述清晰度
需要釐清
新手友好度
35/100

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

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