Gemini models return 400 Bad Request in Copilot CLI
- Dominant language
- Shell
- Stars
- 11.2k
- Forks
- 1.9k
- Avg merge
- 14h 16m
- Merged PRs (30d)
- 6
Description
**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.
Contributor guide
Research direction
Start by reproducing the request in Copilot CLI on Windows with the listed Gemini models, using request ID 8B9B:2E3309:6C8CC:19684A:6A593988 and comparing normal and explore modes. Trace which request field causes the HTTP 400; done means plain prompts work with Gemini without changing modes, while GPT and Claude behavior remains unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100