gemini-cli - ✅(Solved) Fix another issue! [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#26996Fetched 2026-05-14 03:45:46
View on GitHub
Comments
2
Participants
3
Timeline
14
Reactions
0
Author
Timeline (top)
labeled ×7commented ×2unlabeled ×2added_to_project_v2 ×1

Error Message

✕ [API Error: [{ "error": { ℹ This request failed. Press F12 for diagnostics, or run /settings and change "Error Verbosity" to full for full ℹ Some internal tool attempts failed before this final error. Press F12 for diagnostics, or run /settings and change "Error Verbosity" to full for details. ✕ [API Error: [{ "error": {

Fix Action

Fixed

PR fix notes

PR #27007: fix(core): add aliases and thinking config for gemini-3.1 models

Description (problem / solution / changelog)

Summary

This PR resolves the INVALID_ARGUMENT (400) API error encountered when using Gemini 3.1 models. It ensures that all Gemini 3.1 variants are correctly mapped to the chat-base-3 configuration, which includes the mandatory thinkingLevel parameter required by the Google Generative AI API.

Details

The investigation revealed that while gemini-3.1-pro-preview was present, it lacked an entry in the aliases section of defaultModelConfigs.ts. This caused the CLI to fall back to a basic configuration that enabled "Thinking" mode but failed to provide a thinkingLevel (e.g., HIGH). Gemini 3.1 models strictly require this level when thinking is enabled; without it, the API rejects the request as an invalid argument.

Changes include:

  • Added gemini-3.1-pro-preview, gemini-3.1-pro-preview-customtools, and gemini-3.1-flash-lite-preview to the core alias registry.
  • Mapped these models to inherit from chat-base-3 to ensure ThinkingLevel.HIGH is included in all requests.

Related Issues

Fixes #26997, #27000, #27005, #26996

How to Validate

  1. Run Tests: Execute the updated test suite in packages/core/src/config/models.test.ts to ensure 3.1 models resolve with the correct config.
    • npm run test core
  2. Manual Verification: Use a Gemini 3.1 model to process a comparison prompt (e.g., "AMD Ryzen 9 9950X vs 9950X3D") and verify the 400 error no longer occurs.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • Windows (Validated via MINGW64/git-bash)
      • npm run

Changed files

  • packages/core/src/config/defaultModelConfigs.ts (modified, +18/-0)
  • packages/core/src/config/models.test.ts (modified, +32/-0)
RAW_BUFFERClick to expand / collapse

What happened?

[ACTION REQUIRED] 📎 PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.

What did you expect to happen?

icrosoft Windows [Version 10.0.26200.8328] (c) Microsoft Corporation. All rights reserved.

C:\Users\bonch\source>gemini

▝▜▄ Gemini CLI v0.42.0 ▝▜▄ ▗▟▀ Signed in with Google /auth ▝▀ Plan: Gemini Code Assist in Google One AI Ultra

ℹ Skipping project agents due to untrusted folder. To enable, ensure that the project root is trusted.

╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ Do you trust the files in this folder? │ │ │ │ Trusting a folder allows Gemini CLI to load its local configurations, including custom commands, hooks, MCP │ │ servers, agent skills, and settings. These configurations could execute code on your behalf or change the behavior │ │ of the CLI. │ │ │ │ │ │ ● 1. Trust folder (source) │ │ 2. Trust parent folder (bonch) │ │ 3. Don't trust │ │ │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Gemini CLI is restarting to apply the trust changes...

▝▜▄ Gemini CLI v0.42.0 ▝▜▄ ▗▟▀ Signed in with Google /auth ▝▀ Plan: Gemini Code Assist in Google One AI Ultra

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

how to see if i have ssh key?? ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ✕ [API Error: [{ "error": { "code": 400, "message": "Request contains an invalid argument.", "errors": [ { "message": "Request contains an invalid argument.", "domain": "global", "reason": "badRequest" } ], "status": "INVALID_ARGUMENT" } } ]]

ℹ This request failed. Press F12 for diagnostics, or run /settings and change "Error Verbosity" to full for full details. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

what??? ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ ✓ Shell Get-ChildItem -Path ~/.ssh -ErrorAction SilentlyContinue │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

ℹ Some internal tool attempts failed before this final error. Press F12 for diagnostics, or run /settings and change "Error Verbosity" to full for details. ✕ [API Error: [{ "error": { "code": 400, "message": "Request contains an invalid argument.", "errors": [ { "message": "Request contains an invalid argument.", "domain": "global", "reason": "badRequest" } ], "status": "INVALID_ARGUMENT" } } ]]

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

/bug ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

ℹ To submit your bug report, please open the following URL in your browser: https://github.com/google-gemini/gemini-cli/issues/new?template=bug_report.yml&title=&info=%0A*%20**CLI%20Version%3A** %200.42.0%0A*%20Git%20Commit%3A%2068e2196d5%0A*%20Session%20ID%3A%20c5e0294b-d18d-4d12-be36-6e57626da2da%0A*%2 0Operating%20System%3A%20win32%20v24.11.0%0A*%20Sandbox%20Environment%3A%20no%20sandbox%0A*%20Model%20Versio n%3A%20gemini-3.1-pro-preview%0A*%20Auth%20Type%3A%20oauth-personal%0A*%20Memory%20Usage%3A%20261.0%20MB%0A* %20Terminal%20Name%3A%20Unknown%0A*%20Terminal%20Background%3A%20%230c0c0c%0A*%20Kitty%20Keyboard%20Protocol %3A%20Unsupported%0A&problem=%0A%0A%5BACTION%20REQUIRED%5D%20%F0%9F%93%8E%20PLEASE%20ATTACH%20THE%20EXPORTED%20CHAT% 20HISTORY%20JSON%20FILE%20TO%20THIS%20ISSUE%20IF%20YOU%20FEEL%20COMFORTABLE%20SHARING%20IT.

📄 Chat History Exported To help us debug, we've exported your current chat history to: C:\Users\bonch.gemini\tmp\source\bug-report-history-1778692425384.json Please consider attaching this file to your GitHub issue if you feel comfortable doing so. Privacy Disclaimer: Please do not upload any logs containing sensitive or private information that you are not comfortable sharing publicly.

                                                                                                    ? for shortcuts

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Shift+Tab to accept edits 4 GEMINI.md files · 2 MCP servers · 4 skills ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

Type your message or @path/to/file ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ workspace (/directory) sandbox /model quota context memory tokens ~\source no sandbox gemini-3.1-pro-preview 3% used 1% used 261.9 MB 27.2k tokens

Client information

  • CLI Version: 0.42.0
  • Git Commit: 68e2196d5
  • Session ID: c5e0294b-d18d-4d12-be36-6e57626da2da
  • Operating System: win32 v24.11.0
  • Sandbox Environment: no sandbox
  • Model Version: gemini-3.1-pro-preview
  • Auth Type: oauth-personal
  • Memory Usage: 261.0 MB
  • Terminal Name: Unknown
  • Terminal Background: #0c0c0c
  • Kitty Keyboard Protocol: Unsupported

Login information

No response

Anything else we need to know?

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING