2682 Commits

Author SHA1 Message Date
Jacksunwei daa814072f chore: update last-release-sha for next v1 release v1.34.1 2026-05-22 18:41:18 +00:00
Wei (Jack) Sun 5b768331a1 chore(release/v1-candidate): release 1.34.1 (#5810)
Co-authored-by: asobran <asobran@google.com>
2026-05-22 14:41:03 -04:00
asobran b0d419411f ci(releases): Scope changelog strictly to v1 bug fixes
Set last-release-sha to the commit immediately prior to v1 cherry-picks (e13ada75) to prevent Release Please from scanning upstream main history and incorrectly generating minor releases rather than patch releases.

Change-Id: Ic78faa3c558b0cab1670246310c734a2e1616cc4
2026-05-22 18:36:28 +00:00
asobran 8257bf8bfc ci(releases): Use semantic versioning strategy for v1 bug fixes
Configure release-please-config-v1.json with default versioning strategy so that bug fixes correctly trigger patch releases (e.g., 1.34.1) rather than minor releases.

Change-Id: I79efe1743968c6228a470a7a84ba11bcc5b82995
2026-05-22 18:31:25 +00:00
asobran 0ebc155d02 ci(releases): Set last-release-sha to v1.34.0 tag SHA
Fix last-release-sha in release-please-config-v1.json to track the commit SHA of tag v1.34.0 so that Release Please does not generate massive changelogs including legacy commits.

Change-Id: I2e59566ebb3900975b9f86326bb53ed959a92815
2026-05-22 18:26:39 +00:00
asobran 472c770b4f ci(releases): Configure release-please for v1 stable releases
Fix release-please-config-v1.json and .release-please-manifest-v1.json to track stable v1 versioning (1.34.0) and CHANGELOG.md rather than v2 prerelease configurations.

Change-Id: I7a82c4b27cad0f0af8a6736fe6e6e4552153b80a
2026-05-22 18:04:33 +00:00
asobran c1212379f5 ci(releases): Mirror v1 release-please configurations to v1 branch
Add .release-please-manifest-v1.json and release-please-config-v1.json to v1 branch to resolve base release-please config not found error when running release action.

Change-Id: If95237eba75aeac824fed2054dbef99924cbc517
2026-05-22 17:51:38 +00:00
sasha-gitg c54e9e810d Merge pull request #5804 from google/fix-v1-workflows
ci(workflows): Synchronize release workflows into v1 branch
2026-05-22 12:14:31 -04:00
asobran d27b099f18 ci(workflows): Synchronize release workflows for v1 branch
Add release-v1-*.yml workflow files to v1 branch to resolve GitHub Actions HTTP 422 error when triggering Release Please via workflow_dispatch, and remove inapplicable v2 workflow files.

Change-Id: Ic4f5a70df4502f670e372ccfd5a46cae686386f9
2026-05-22 16:08:34 +00:00
sasha-gitg d22291d4d6 Merge pull request #5798 from google/v1-cherry-pick
fix: cherry-pick bug fixes from main into v1
2026-05-22 10:41:04 -04:00
Sasha Sobran 1fd406b90a fix(tools): Prevent session drop on MCP tool error
Enable MCP graceful error handling by default and retrieve background session context task exceptions. This prevents unhandled AnyIO TaskGroup transport failures from bubbling through the event loop and abruptly terminating live streaming sessions with 1006 abnormal closure.

Change-Id: Ib4669fb57cddfc6ce61f9a3991b80db3f2b3e9ab
2026-05-22 00:32:14 +00:00
Kathy Wu 13763d71f8 fix: fix input and output transcription finished events for Gemini v3.1
Change-Id: I3c33e84569d5f63f46c99154afa9e9d68a2fdf3c
2026-05-22 00:32:14 +00:00
Kathy Wu 9b6b9e9763 fix: Fix bug where grounding metadata in Gemini 3.1 live was being silently discarded
In Gemini 3.1 live, LlmResponse packets sometimes contain only grounding metadata - don't skip these responses

Change-Id: I9e2c1080395588d61aefffd1b6570102930e1fe0
2026-05-22 00:32:14 +00:00
Wei (Jack) Sun e13ada758a chore: merge release v1.34.0 to main
Merge https://github.com/google/adk-python/pull/5747

Syncs version bump and CHANGELOG from release v1.34.0 to main.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/5747 from google:release/v1.34.0 160b1b45e4
PiperOrigin-RevId: 917514751
2026-05-18 17:40:10 -07:00
Xuan Yang 07a9a01b3c fix: Preserve live_session_id in function call handling
Fixes https://github.com/google/adk-python/issues/5702

Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 917452441
2026-05-18 15:17:43 -07:00
Google Team Member 03b915b1bd fix(anthropic): map negative thinking_budget to adaptive thinking
- Claude Opus 4.7 rejects `thinking.type: "enabled"` with a 400 error
  and requires `thinking.type: "adaptive"`; adaptive is also the
  recommended mode for Opus 4.6 / Sonnet 4.6 where `"enabled"` is
  deprecated.
- The genai `ThinkingConfig.thinking_budget = -1` (AUTOMATIC) sentinel
  is the natural mapping for adaptive: the model picks the depth
  itself. Callers opt in with `-1`; positive values keep the existing
  `"enabled"` path so older models are unchanged.
- Bump `anthropic>=0.78` in `pyproject.toml`; 0.78 introduced
  `ThinkingConfigAdaptiveParam`. The previous floor (`>=0.43`) let
  Kokoro install `anthropic==0.75.0`, which crashes the new tests
  with `AttributeError: module 'anthropic.types' has no attribute
  'ThinkingConfigAdaptiveParam'`.

PiperOrigin-RevId: 917449729
2026-05-18 15:12:26 -07:00
George Weale 57d8fc7d81 perf(models): guard debug log evaluation with isEnabledFor
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 917411239
2026-05-18 13:57:16 -07:00
Arpit Jain e7ca943b6b ci: declare contents: read on seven workflows missing a permissions block
Merge https://github.com/google/adk-python/pull/5687

Co-authored-by: Xuan Yang <xygoogle@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/5687 from arpitjain099:ci/add-permissions c145c102024d761ee90d0643a8d26f399578a0f4
PiperOrigin-RevId: 917369094
2026-05-18 12:28:52 -07:00
Google Team Member baf7efbaa9 feat: Added config option to include tool calls/responses in conversation history passed to user simulator
PiperOrigin-RevId: 917340645
2026-05-18 11:31:14 -07:00
Google Team Member 48f1b30251 feat: Simplify data retrieved handling of ask_data_agent tool and ask_data_insights tool
PiperOrigin-RevId: 917326615
2026-05-18 11:04:04 -07:00
Google Team Member 59f7347a63 fix(small): Convert events to the A2A format while respecting user vs agent role
PiperOrigin-RevId: 917275872
2026-05-18 09:28:29 -07:00
Jorge Israel Frómeta Moya 3d07960a70 fix: use tool_responses role for gemma4 models in LiteLLM integration
Merge https://github.com/google/adk-python/pull/5655
Closes: #5650

Co-authored-by: Xuan Yang <xygoogle@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/5655 from jfrometa88:main d74b5216b0937ff371b25cc8f272ee8ab33c8dc9
PiperOrigin-RevId: 917231422
2026-05-18 07:54:00 -07:00
Google Team Member 12844939f1 fix: only serialize llm_response to json if it will be included in the trace
PiperOrigin-RevId: 917108173
2026-05-18 02:36:34 -07:00
Google Team Member bd062ec9eb perf: lazy-load service registries and split apps.app to cut cold start ~8%
PiperOrigin-RevId: 916278514
2026-05-15 18:35:23 -07:00
Google Team Member 6e6621c768 perf: lazy-load service registries and split apps.app to cut cold start ~8%
PiperOrigin-RevId: 916265957
2026-05-15 17:50:01 -07:00
Google Team Member 790c9bef9a feat: add general support for Gemini Live API in ADK evaluate
* Implements live inference in evaluation_generator.py using Runner.run_live().
* Updates base_eval_service.py, local_eval_service.py to support live mode data structures and connection handling.

Testing: Added unit tests:
* test_generates_inferences_with_user_simulator_live
* test_live_session_manually_triggers_callbacks
* test_live_session_manually_triggers_callbacks_with_tools
* test_perform_inference_with_use_live
* test_perform_inference_single_eval_item_live
* test_perform_inference_single_eval_item_non_live
PiperOrigin-RevId: 916231029
2026-05-15 16:14:21 -07:00
Google Team Member a5cddb8e86 chore: Remove experimental tag from SkillToolset
PiperOrigin-RevId: 916227202
2026-05-15 16:05:59 -07:00
Sasha Sobran 4309159700 fix(tools): Prevent AnyIO CancelScope task boundary violations during MCP session creation failure
Co-authored-by: Sasha Sobran <asobran@google.com>
PiperOrigin-RevId: 916220631
2026-05-15 15:50:01 -07:00
George Weale ec54bd439e perf(utils): cache find_context_parameter introspection
Adds @functools.lru_cache to find_context_parameter so the inspect.signature
+ typing.get_type_hints lookup runs once per function, not on every MCP
confirmation callback or declaration build. No public surface change.

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 916204929
2026-05-15 15:14:36 -07:00
Kathy Wu 2388090cd2 chore: Remove experimental tag from SkillToolset
Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 916198410
2026-05-15 15:00:19 -07:00
George Weale 7e61b51702 fix(tools): preserve code_execution_result and executable_code in AgentTool
AgentTool.run_async only extracted text parts from the inner agent's
response, silently dropping code_execution_result.output and
executable_code.code. Outer agents using an inner agent with a code
executor saw nothing.

Close #5481

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 916196604
2026-05-15 14:56:02 -07:00
George Weale 6ca6a14187 perf: lazy-load service registries and split apps.app to cut cold start ~8%
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 916195791
2026-05-15 14:54:10 -07:00
George Weale 0cb9ae94b3 fix(models): treat empty GenerateContentResponse without prompt feedback as successful
Previously, an empty `candidates` list without `prompt_feedback` resulted in an `UNKNOWN_ERROR`. This change updates the logic to handle such cases as a successful completion with no generated content, which is valid for certain model interactions like tool-driven turns.

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 916115022
2026-05-15 11:55:40 -07:00
Amaad Martin 0524797ac7 fix(agents): fix visibility of output_key state delta in callbacks
Co-authored-by: Amaad Martin <amaadmartin@google.com>
PiperOrigin-RevId: 916112779
2026-05-15 11:51:28 -07:00
George Weale 9a1e75f242 fix(models): preserve string content in Anthropic tool_result blocks
`part_to_message_block` iterated `content` char-by-char when a tool
returned it as a plain string (e.g. `LoadSkillResourceTool`'s
`{"content": <file text>}`), producing `"H\ne\nl\nl\no"` instead of
`"Hello"`. Guard the list branch with `isinstance(..., list)` and add
a sibling branch that passes a scalar string through directly, matching
Anthropic's `content: str | list[ContentBlockParam]` shape.

Close #5358

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 916109239
2026-05-15 11:44:41 -07:00
George Weale bb2efb6bd2 fix: Prevent compaction of events involved in Human-in-the-Loop interactions
This change introduces logic to identify events containing requests for tool confirmation or auth credentials. The compaction process will now stop before any such "Human-in-the-Loop" (HITL) events, ensuring that the full context of the interaction is preserved and not summarized away. This applies to both sliding window and token threshold compaction strategies.

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 916108771
2026-05-15 11:43:53 -07:00
George Weale eed9bd319f fix(evaluation): handle none config in per_turn_user_simulator_quality
When judge_model_config is None, LlmRequest raises a ValidationError
because it requires a config. We now construct a default GenerateContentConfig
if one isn't provided.

Close #5677

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 916087055
2026-05-15 11:00:49 -07:00
George Weale f5b765d608 chore(build): exclude nested README.md files from sdist packaging
This ensures that adding README.md files to subdirectories (as discussed
for new folders and integrations) won't result in them being included in
the published package.

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 916075206
2026-05-15 10:36:36 -07:00
Google Team Member 85f397d20f fix: avoid pre-serializing dict values in Interactions API to prevent double-escaping
PiperOrigin-RevId: 916037238
2026-05-15 09:17:19 -07:00
Google Team Member 115124cdf4 feat: add support for A2aAgentExecutor factory in to_a2a() function
PiperOrigin-RevId: 916015512
2026-05-15 08:22:25 -07:00
Shangjie Chen 27e71f3bcf chore: Update Gemini Actions workflows for enhanced security and community alignment
- Restrict invoke and review triggers purely to explicit user comments.
- Enforce strict author association verification (OWNER, MEMBER, COLLABORATOR).
- Enforce strict targeting assertion to ensure pull requests act on the main branch.
- Synchronize prompt constraints and GitHub action tools with the community catalog.
- Refine action API key options to uniformly target secrets.GOOGLE_API_KEY.

Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 915654346
2026-05-14 15:43:31 -07:00
Kathy Wu 88ebd426be feat: Implement GCPSkillRegistry in ADK
This CL implements the  class in the integrations folder, used specifically for the Skill Registry API.

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 915627057
2026-05-14 14:47:42 -07:00
Google Team Member 9f38973081 feat: Make Agent Skill description validation more informative
PiperOrigin-RevId: 915616175
2026-05-14 14:24:45 -07:00
Kathy Wu 8de1ae8f80 chore: change name of skill cache to "fetched_skill_cache" to reduce confusion from BaseToolset's invocation_cache
Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 915578052
2026-05-14 13:11:27 -07:00
Google Team Member cfe8d2cc2b feat: Add mTLS support to Google Cloud Telemetry exporter
This change enables the Google Cloud Telemetry exporter to use mTLS endpoints. It checks for the availability of client certificates and respects the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variables to determine whether to use the mTLS-specific endpoint and configure the session accordingly.

PiperOrigin-RevId: 915541335
2026-05-14 11:54:45 -07:00
Google Team Member c35a57969d fix(auth): remove unneeded OAuth flows
This is related to https://github.com/google/adk-python/issues/5327.
`BaseToolset.get_auth_config()` returns `None` by default and removing its overrides in toolsets that don't need OAuth flows to list tools does the job.

No regressions in unit tests (`pytest tests/unittests/auth`):
```
================================================================= 181 passed, 508 warnings in 4.23s =================================================================
```

PiperOrigin-RevId: 915128706
2026-05-13 16:49:37 -07:00
Shangjie Chen e04a4683f4 chore: Remove deprecated CLI flags and version-based service URI handling
This change removes support for the deprecated `--session_db_url`, `--artifact_storage_uri`, and `--verbosity` flags from the ADK CLI. It also simplifies the service URI handling in `cli_deploy.py` by always using the new `--session_service_uri`, `--artifact_service_uri`, and `--memory_service_uri` flags, regardless of the ADK version.

The deprecated flags has been more than 1 year

Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 915100881
2026-05-13 15:48:39 -07:00
Google Team Member f9097cbf7b fix: Fix missing dynamically loaded tools in SkillToolset during the same invocation
Currently, BaseToolset caches its tools per invocation_id. Because SkillToolset dynamically resolves additional tools from the state when a skill is loaded, the cache prevents new tools from being picked up in the same invocation right after a load_skill call. This change sets `_use_invocation_cache = False` in SkillToolset so that it correctly re-evaluates the state-dependent tools at each step of the LLM generation loop within an invocation, preventing "Tool not found" errors.

PiperOrigin-RevId: 914997555
2026-05-13 12:31:50 -07:00
Kathy Wu e377cb5ec0 fix: fallback to project id if crendetials don't contain quota project
Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 914934690
2026-05-13 10:25:49 -07:00
Google Team Member 6e534723dd feat: add support for non-ADK produced input-required events
This CL introduces logic to handle scenarios where a non-ADK agent transitions to the `TaskState.input_required` or `TaskState.auth_required` states. It intercepts these events and converts them into a synthetic ADK `FunctionCall` event.

PiperOrigin-RevId: 914877123
2026-05-13 08:25:10 -07:00