Commit Graph

4725 Commits

Author SHA1 Message Date
Sri Pasumarthi
88650f320d fix(acp/auth): support optional API keys natively for enterprise gateways and unify gateway inference
Summary:
Configures the `GATEWAY` authentication mode to natively supply an empty string for `apiKey` instead of injecting a dummy placeholder, avoiding client instantiation errors while directly suppressing conflicting `x-goog-api-key` network headers. Additionally, unifies environmental inference by updating `getAuthTypeFromEnv` to route any `GOOGLE_GEMINI_BASE_URL` usage to `GATEWAY` auth, guaranteeing absolute consistency across background CLI execution, subagents, and ACP sidecars.

Details:

Why this happened:
Initializing a session with the `GATEWAY` auth method without specifying an API key previously caused the underlying `@google/genai` SDK to throw a constructor instantiation error. To circumvent this, a placeholder key (`'gateway-placeholder-key'`) was automatically injected. However, the SDK's internal `WebAuth` module unconditionally appended this placeholder as an `x-goog-api-key` header to outgoing network requests. When enterprise AI API Gateways received both an OIDC authentication header (e.g., `Authorization: Bearer <token>`) and the invalid placeholder key, they prioritized validating the API key and rejected the requests. Furthermore, background CLI execution or embedded SDK scenarios could crash or fail to authenticate consistently when custom proxy URLs were active without explicit auth settings.

Solution Implemented:
1. Pristine SDK Instantiation: Configured `createContentGeneratorConfig` to fall back to `process.env['GEMINI_API_KEY']` to preserve any injected placeholder values from existing partner integrations, while supplying an empty string (`apiKey ?? ''`) when no key is provided. The `GoogleGenAI` constructor options explicitly preserve this empty string mapping under `GATEWAY` auth to satisfy internal null checks safely.
2. Network Header Suppression: Updated `createContentGenerator` to pre-clear the `x-goog-api-key` base header (`headers['x-goog-api-key'] = ''`) whenever `GATEWAY` auth runs with an empty string key. This triggers an early return inside the SDK's `WebAuth` interceptor, guaranteeing that outgoing requests heading to enterprise Gateways remain pristine.
3. Unified Environmental Mapping: Centralized `AuthType.GATEWAY` inference mapping inside `getAuthTypeFromEnv` when `GOOGLE_GEMINI_BASE_URL` is configured. This cleanly bypasses default `USE_GEMINI` startup validations consistently across all application entry points.
2026-05-13 17:09:27 -07:00
Daniel Finimundi
7cd228f5af fix(cli): allow installing extensions from ssh repo (#26274)
Signed-off-by: Daniel Finimundi <danielrf@motorola.com>
Co-authored-by: Dev Randalpura <devrandalpura@google.com>
2026-05-11 15:57:52 +00:00
joshualitt
8a3fde4c33 fix(context): Change snapshotter model config. (#26745) 2026-05-11 15:06:55 +00:00
joshualitt
1a894c18ea feat(context): Improvements to the snapshotter. (#26655) 2026-05-08 23:54:44 +00:00
Adam Weidman
54f1e8c6d7 feat(core): add RemoteSubagentProtocol behind AgentProtocol (#25303) 2026-05-08 22:48:17 +00:00
krishdef7
f51391a0f2 fix(mcp): treat GET 404 as 405 in StreamableHTTPClientTransport (#24847)
Co-authored-by: Coco Sheng <cocosheng@google.com>
Co-authored-by: Spencer <spencertang@google.com>
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2026-05-08 22:16:08 +00:00
Sri Pasumarthi
1238dcfe91 feat(acp/core): prefix tool call IDs with tool names to support tool rendering in ACP compliant IDEs. (#26676) 2026-05-08 21:21:54 +00:00
Coco Sheng
90e7155971 ci: implement codebase-aware effort level triage (#26666) 2026-05-08 20:48:54 +00:00
JAYADITYA
9d0860bd0f fix(cli): remove noisy theme registration logs from terminal (#25858)
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
2026-05-08 19:59:33 +00:00
Adam Weidman
014bfeb89b feat(core): add LocalSubagentProtocol behind AgentProtocol (#25302) 2026-05-08 19:28:16 +00:00
Aishanee Shah
5890f50496 fix(core): resolve parallel tool call streaming ID collision (#26646) 2026-05-08 19:14:23 +00:00
Daniel Weis
6b9b778d82 fix: resolve "function response turn must come immediately after function call" error (#26691)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2026-05-08 19:01:24 +00:00
Aishanee Shah
f86e0ee418 fix(core): throw explicit error on dropped tool responses (#26668) 2026-05-08 18:36:39 +00:00
joshualitt
01635ddb83 fix(context): implement loose boundary policy for gc backstop. (#26594) 2026-05-08 17:36:57 +00:00
Adam Weidman
12c8469b34 refactor(core): agent session protocol changes (#26661) 2026-05-08 17:12:54 +00:00
Dev Randalpura
dfec94869b fix(ui): added quotes around session id in resume tip (#26669) 2026-05-08 16:55:51 +00:00
mahadevan
2cad5db770 Feat: Add Machine Hostname to CLI interface (#25637)
Signed-off-by: M-DEV-1 <mahadevankizhakkedathu@gmail.com>
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2026-05-08 16:12:35 +00:00
Coco Sheng
3805640530 feat: export session to file and import via flag (#26514) 2026-05-08 15:53:52 +00:00
AK
ebeea7570d fix(core): cache model routing decision in LocalAgentExecutor (#26548) 2026-05-08 00:18:22 +00:00
Br1an
c52acebaa2 fix: prevent false command conflicts when launching from home directory (#23069)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2026-05-07 22:41:12 +00:00
Sandy Tao
16e345831b fix(cli): hide /memory add subcommand when memoryV2 is enabled (#26605) 2026-05-07 20:48:12 +00:00
Dev Randalpura
451bf32c82 fix(ux): fixed issue with transcribed text not showing after releasing space (#26609) 2026-05-07 19:39:03 +00:00
Daniel Weis
ac31e80984 fix(routing): fix resolveClassifierModel argument mismatch in ApprovalModeStrategy (#26658)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2026-05-07 19:34:14 +00:00
Coco Sheng
49456e4e15 fix(core): preserve system PATH in Git environment to fix ENOENT (#25034) (#26587) 2026-05-07 18:24:49 +00:00
Tommaso Sciortino
a809bc7c51 don't wrap args unnecessarily (#26599) 2026-05-06 23:20:47 +00:00
Michael Bleigh
90304b279c refactor(cli): migrate core tools to native ToolDisplay property and fix UI rendering (#25186) 2026-05-06 21:23:26 +00:00
Rhys Sullivan
bb4224fdff fix(core): prevent silent hang during OAuth auth on headless Linux (#26571)
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
2026-05-06 19:47:30 +00:00
Adib234
a38f393af7 fix(cli): improve mcp list UX in untrusted folders (#26457)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-05-06 19:35:35 +00:00
Christian Van
e4242edf61 fix(cli): hide read-only settings scopes (#26249) 2026-05-06 19:03:48 +00:00
Sandy Tao
7fb5146c6b Tighten private Auto Memory patch allowlist (#26535) 2026-05-06 17:32:15 +00:00
joshualitt
897a4d7f83 fix(core): Fix hysteresis in async context management pipelines. (#26452) 2026-05-06 16:37:08 +00:00
Kartik
5155221bbe fix(cli): randomize sandbox container names (#26014) 2026-05-06 16:33:24 +00:00
Keith Schaab
02995ba939 fix(a2a-server): Resolve race condition in tool completion waiting (#26568) 2026-05-06 16:20:22 +00:00
Sri Pasumarthi
97a2bd7507 fix(acp): move tool explanation from thought stream to tool call content (#26554) 2026-05-06 15:42:01 +00:00
cynthialong0-0
80e091a8e1 fix(core): handle invalid custom plans directory gracefully (#26560) 2026-05-06 13:37:59 +00:00
cynthialong0-0
469092a72c fix(cli): provide JSON output for AgentExecutionStopped in non-interactive mode (#26504)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-05-06 00:33:31 +00:00
joshualitt
80d2690540 fix(core): Fix chat corruption bug in context manager. (#26534) 2026-05-05 22:50:01 +00:00
Gal Zahavi
3627f4777f fix(core): allow redirection in YOLO and AUTO_EDIT modes without sandboxing (#26542) 2026-05-05 21:26:16 +00:00
Himanshu Kumar
d8f2a89865 fix(core): remove unsafe type assertion suppressions in error utils (#19881)
Co-authored-by: David Pierce <davidapierce@google.com>
2026-05-05 19:52:29 +00:00
Abhijit Balaji
f29eb9a569 fix(core): reject numeric project IDs in GOOGLE_CLOUD_PROJECT (#24695) (#26532) 2026-05-05 19:50:36 +00:00
Aishanee Shah
0218817fe3 feat(core): steer model to use edit tool for surgical edits, fix a typo (#26480) 2026-05-05 19:35:04 +00:00
joshualitt
0803007c8f fix(core): Minor fixes for generalist profile. (#26357) 2026-05-05 19:32:13 +00:00
Coco Sheng
f5c0977e96 fix(core): retry on ERR_STREAM_PREMATURE_CLOSE errors (#26519) 2026-05-05 19:19:50 +00:00
Coco Sheng
e80d7cc083 feat: allow queuing messages during compression (#24071) (#26506) 2026-05-05 17:52:08 +00:00
Jack Wotherspoon
7cc19c2a1b fix(cli): prevent settings dialog border clipping using maxHeight (#26507) 2026-05-05 16:22:58 +00:00
Keith Schaab
1d72a120fb fix(a2a-server): resolve tool approval race condition and improve status reporting (#26479)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-05-05 02:47:26 +00:00
Tirth Naik
8f0edcd64f fix(cli): use os.homedir() for home directory warning check (#25890) 2026-05-04 23:24:49 +00:00
Sandy Tao
56809d7069 fix(cli): make SkillInboxDialog fit and scroll in alternate buffer (#26455) 2026-05-04 21:54:13 +00:00
Anjaligarhwal
5dfbb739e5 feat(cli): add /bug-memory command and auto-capture heap snapshot in /bug (#25639) 2026-05-04 21:17:36 +00:00
Adib234
6a3175e973 fix(core): properly format markdown in AskUser tool by unescaping newlines (#26349)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-05-04 20:59:11 +00:00