Gemini models return 400 Bad Request in Copilot CLI
Nobody has claimed this yet.
- 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
- Using Copilot with Gemini model selection (tried
gemini-3.1-pro-previewandgemini-3.5-flash) - Sent plain text prompt with no attachments/tools
- All advanced options at defaults (no custom reasoning/context overrides)
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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