gemini-cli-robot
35589570be
# Fix 400 error when more than 128 tools are enabled
...
## What the change is
- Implemented `smartLimitTools` in `ToolRegistry` to ensure that `getFunctionDeclarations` returns at most 128 tools (the Gemini API limit).
- The "smart" limiting strategy:
1. Always prioritizes built-in tools.
2. Prioritizes non-MCP discovered tools.
3. Fairly distributes the remaining slots among all available MCP servers (round-robin style).
- Added a hard limit of 128 tools in `GeminiChat` as a final safety measure before calling the API.
- Added warning logs when tools are truncated to inform the user.
## Why it is recommended
The Gemini API has a hard limit of 128 tools per request. If more than 128 tools are enabled (e.g., multiple MCP servers with many tools), the CLI currently sends all of them, resulting in a 400 Bad Request error from the API. This change prevents those errors while ensuring that a representative and critical set of tools remains available to the model.
## Expected impact
- Fixes the 400 error reported in #24246 .
- Improves reliability when many MCP servers are connected.
- No negative impact on existing functionality, as most users have fewer than 128 tools, and for those who have more, it provides a stable fallback instead of a crash.
2026-04-28 00:17:23 +00:00
anj-s
c17400b830
fix(core): enforce parallel task tracker updates ( #24477 )
...
Co-authored-by: anj-s <anjalisridhar@google.com >
2026-04-27 23:17:26 +00:00
Coco Sheng
6cc0b1b136
feat(cli): provide manual session UUID via command line arg ( #26060 )
2026-04-27 21:05:27 +00:00
Dev Randalpura
820a4e3c92
fix(core): better error message for failed cloudshell-gca auth ( #26079 )
2026-04-27 21:05:08 +00:00
Coco Sheng
7d08f84305
fix(cli): make MCP ping optional in list command and use configured timeout ( #26068 )
2026-04-27 20:36:50 +00:00
Adib234
31337b9269
fix(cli): correct alternate buffer warning logic for JetBrains ( #26067 )
2026-04-27 20:00:01 +00:00
Emily Hedlund
b1a50a58af
fix(cli): ensure sandbox proxy cleanup and remove handler leaks ( #26065 )
2026-04-27 19:35:41 +00:00
joshualitt
71f313b51a
feat(core): wire up the new ContextManager and AgentChatHistory ( #25409 )
2026-04-27 18:50:00 +00:00
Dev Randalpura
98aca28985
fix(ui): better error messages for ECONNRESET and ETIMEDOUT ( #26059 )
2026-04-27 17:17:04 +00:00
Coco Sheng
2de81902c3
test(cli): add unit tests for restore ACP command ( #23402 ) ( #26053 )
2026-04-27 17:07:14 +00:00
Coco Sheng
1cdfeb6633
fix(cli): provide manual update command when automatic update fails ( #26052 )
2026-04-27 16:15:04 +00:00
Gaurav Dubey
743518e1b8
fix(cli): add missing response key to custom theme text schema ( #25822 )
...
Co-authored-by: Adib234 <30782825+Adib234@users.noreply.github.com >
2026-04-27 15:01:30 +00:00
Sandy Tao
42587de733
feat(memory): persist auto-memory scratchpad for skill extraction ( #25873 )
2026-04-24 17:21:12 -07:00
Abhijit Balaji
2e0641c83b
feat(voice): implement real-time voice mode with cloud and local backends ( #24174 )
2026-04-24 21:29:38 +00:00
Tommaso Sciortino
048bf6e514
fix(cli-ui): revert backspace handling to fix Windows regression ( #25941 )
2026-04-24 20:30:00 +00:00
Emily Hedlund
ed469e492b
fix(core): fail closed in YOLO mode when shell parsing fails for restricted rules ( #25935 )
2026-04-24 19:26:59 +00:00
Spencer
cfd7541ad4
fix(cli): allow output redirection for cli commands ( #25894 )
2026-04-24 18:31:43 +00:00
Emily Hedlund
571ca5a555
update FatalUntrustedWorkspaceError message to include doc link ( #25874 )
2026-04-23 23:26:29 +00:00
Abhijit Balaji
d4c5333dcf
feat(core,cli): add support for Gemma 4 models (experimental) ( #25604 )
2026-04-23 23:02:17 +00:00
Spencer
1f73ec70c5
perf(core): fix slow boot by fetching experiments and quota asynchronously ( #25758 )
...
Co-authored-by: Gal Zahavi <38544478+galz10@users.noreply.github.com >
Co-authored-by: David Pierce <davidapierce@google.com >
Co-authored-by: Keith Schaab <keithsc@google.com >
Co-authored-by: Keith Schaab <keith.schaab@gmail.com >
Co-authored-by: Emily Hedlund <ehedlund@google.com >
2026-04-23 21:52:58 +00:00
Dev Randalpura
69150e87b2
fix(ui): corrected background color check in user message components ( #25880 )
2026-04-23 21:29:11 +00:00
Gal Zahavi
27927c55e5
feat(core): enhance shell command validation and add core tools allowlist ( #25720 )
...
Co-authored-by: David Pierce <davidapierce@google.com >
Co-authored-by: Keith Schaab <keithsc@google.com >
Co-authored-by: Keith Schaab <keith.schaab@gmail.com >
Co-authored-by: Emily Hedlund <ehedlund@google.com >
2026-04-23 20:26:01 +00:00
hsm207
ff28d55100
fix: fatal hard-crash on loop detection via unhandled AbortError ( #20108 )
...
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com >
2026-04-23 16:51:21 +00:00
Emily Hedlund
dba9b9a0ff
feat(cli): secure .env loading and enforce workspace trust in headless mode ( #25814 )
...
Co-authored-by: galz10 <galzahavi@google.com >
Co-authored-by: davidapierce <davidapierce@google.com >
2026-04-23 16:09:14 +00:00
cynthialong0-0
a007f64d20
fix(core): only show list suggestion if the partial input is empty ( #25821 )
2026-04-23 14:07:06 +00:00
gemini-cli-robot
d1c91f5267
chore(release): bump version to 0.41.0-nightly.20260423.gaa05b4583 ( #25847 )
2026-04-23 04:28:26 +00:00
Sandy Tao
aa05b4583d
fix(release): exclude ripgrep binaries from npm tarballs ( #25841 )
2026-04-22 21:01:45 -07:00
Sandy Tao
5318610c1d
fix(core): support jsonl session logs in memory and summary services ( #25816 )
2026-04-22 23:07:39 +00:00
Sandy Tao
9c0a6864da
fix(devtools): reduce memory usage and defer connection ( #24496 )
2026-04-22 15:21:58 -07:00
Dev Randalpura
2e12c34009
fix(ui): removed background color for input ( #25339 )
2026-04-22 20:27:09 +00:00
Horizon_Architect_07
2a52611e71
Fix/command injection shell ( #24170 )
...
Co-authored-by: David Pierce <davidapierce@google.com >
2026-04-22 20:00:44 +00:00
xoma-zver
1c43deee07
fix(core): handle line endings in ignore file parsing ( #23895 )
...
Co-authored-by: cynthialong0-0 <82900738+cynthialong0-0@users.noreply.github.com >
2026-04-22 18:09:36 +00:00
Kishan Patel
0758a5eb28
fix(core): use dynamic CLI version for IDE client instead of hardcoded '1.0.0' ( #24414 )
...
Co-authored-by: cynthialong0-0 <82900738+cynthialong0-0@users.noreply.github.com >
2026-04-22 16:43:48 +00:00
mini2s
607180bfb2
fix(cli): fix "/clear (new)" command ( #25801 )
2026-04-22 15:20:22 +00:00
Sandy Tao
6edfba481f
refactor(memory): replace MemoryManagerAgent with prompt-driven memory editing across four tiers ( #25716 )
2026-04-22 01:21:55 +00:00
Sandy Tao
ffb28c772b
test(e2e): default integration tests to Flash Preview ( #25753 )
2026-04-21 22:21:52 +00:00
Adam Weidman
d6f88f8720
fix(core): remove duplicate initialize call on agents refreshed ( #25670 )
2026-04-21 20:17:21 +00:00
Jason Matthew Suhari
194c779f9b
fix(cli): start auto memory in ACP sessions ( #25626 )
2026-04-21 20:06:30 +00:00
Vedant Mahajan
189c0ac0a0
feat: add /new as alias for /clear and refine command description ( #17865 )
2026-04-21 20:04:40 +00:00
euxaristia
c47233a474
fix(core): disable detached mode in Bun to prevent immediate SIGHUP of child processes ( #22620 )
2026-04-21 20:01:28 +00:00
JAYADITYA
8999a885f0
fix(cli): ensure theme dialog labels are rendered for all themes ( #24599 )
...
Co-authored-by: cynthialong0-0 <82900738+cynthialong0-0@users.noreply.github.com >
2026-04-21 19:57:15 +00:00
Coco Sheng
93a8d9001c
fix(cli): use newline in shell command wrapping to avoid breaking heredocs ( #25537 )
2026-04-21 19:12:50 +00:00
PRAS Samin
cdc5cccc13
feat: detect new files in @ recommendations with watcher based updates ( #25256 )
2026-04-21 18:35:14 +00:00
Mahima Shanware
a4e98c0a4c
fix(core): resolve nested plan directory duplication and relative path policies ( #25138 )
2026-04-21 18:20:57 +00:00
Spencer
c260550146
feat(telemetry): add flag for enabling traces specifically ( #25343 )
2026-04-21 18:07:32 +00:00
Danyel Cabello
7f8f3309a6
Allow dots on GEMINI_API_KEY ( #25497 )
2026-04-21 11:43:39 -07:00
Muhammad Ahsan Farooq
ebebbbfc20
Fix/allow for session persistence ( #25176 )
2026-04-21 11:20:07 -07:00
Gordon Hui
27344833cb
feat(vertex): add settings for Vertex AI request routing ( #25513 )
2026-04-21 17:48:30 +00:00
cynthialong0-0
aee2cde1a3
feat(test): refactor the memory usage test to use metrics from CLI process instead of test runner ( #25708 )
2026-04-21 17:06:22 +00:00
Mundur
2c14954010
Fix: Disallow overriding IDE stdio via workspace .env (RCE) ( #25022 )
...
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com >
2026-04-21 10:31:10 -07:00