jira_agent passed tool_name to ApplicationIntegrationToolset, which only
accepts tool_name_prefix. hello_world_litellm_add_function_to_prompt
failed at import because langchain-core 1.x no longer auto-imports
langchain_core.tools, which convert_to_openai_function relies on.
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 945809141
Add replay test fixtures covering the documented flows of the
contributing/samples/models/interactions_api sample (basic text, Google
Search grounding, multi-turn stateful recall, and a custom function
tool), so the sample is exercised by tests/unittests/test_samples.py.
Also fix the shared sample test harness (cli/agent_test_runner.py) to
support the Interactions API:
- Exclude the volatile interaction_id (a server-issued token) and
turn_complete fields from fixture comparison and from rebuilt
fixtures, matching how other non-reproducible fields (timestamps,
usage metadata, etc.) are already handled. The Interactions API
stamps these onto every model response and the replay MockModel
cannot reproduce them.
- Drive all turns of a fixture rebuild on a single persistent event
loop. The sync Runner.run() uses asyncio.run() per call, which closes
the loop the model's cached async api_client is bound to, so
subsequent turns fail with "Event loop is closed" and corrupt
multi-turn fixtures. Reusing one loop keeps the cached client valid
across the conversation.
Co-authored-by: Haran Rajkumar <haranrk@google.com>
PiperOrigin-RevId: 940691339
Update ADK to support the new Interactions API. See: https://ai.google.dev/gemini-api/docs/interactions-breaking-changes-may-2026
Key changes include:
* Updated `interactions_utils.py` to parse new v2 interaction events such as
`InteractionCreatedEvent`, `InteractionCompletedEvent`, and explicit step
types (`ModelOutputStep`, `FunctionCallStep`, etc.).
* Transitioned from "turns" to "steps" terminology, including renaming
`convert_contents_to_turns` to `convert_contents_to_steps`.
* Updated `contributing/samples/interactions_api`
Breaking Changes in interactions_utils.py:
- Renamed "turn" functions to "step" equivalents:
- `convert_content_to_turn` -> `_convert_content_to_step`
- `convert_contents_to_turns` -> `_convert_contents_to_steps`
- `convert_interaction_output_to_part` -> `_convert_interaction_step_to_parts`
- Updated `build_interactions_request_log` to use required `input_steps` instead of `input_turns`.
- Deprecated `convert_part_to_interaction_content`
Change-Id: I962724321342ba0192251896ce51832b214d60d9