Skip to content

Merge main into planner#13

Merged
ddobrin merged 23 commits intoplannerfrom
main
Mar 25, 2026
Merged

Merge main into planner#13
ddobrin merged 23 commits intoplannerfrom
main

Conversation

@ddobrin
Copy link
Copy Markdown
Owner

@ddobrin ddobrin commented Mar 25, 2026

No description provided.

rolandkakonyi and others added 23 commits March 18, 2026 05:02
…, and use JSpecify Nullable

- Migrate LangChain4j to a builder pattern
- Enhance token usage handling with TokenCountEstimator (from PR google#623)
- Upgrade to latest version of LangChain4j
- Replace javax.annotation.Nullable with org.jspecify.annotations.Nullable
PiperOrigin-RevId: 886828787
Ensure sequential event processing and persistence in ADK Runner. This
ensures that events are appended in order and returned from runAsync in
order. This aligns better with the Python implementation.

PiperOrigin-RevId: 886961696
PiperOrigin-RevId: 887389399
…already implemented, but adding tests from PR google#603)
PiperOrigin-RevId: 888064419
The `slf4j-simple` dependency and the exclusion of `logback-classic` are removed, allowing the default logging implementation provided by `google-adk-dev` to be used.

PiperOrigin-RevId: 888114465
PiperOrigin-RevId: 888667558
PiperOrigin-RevId: 889140710
The Claude model integration parsing logic failed when processing MCP tool responses because it only extracted output from the legacy `result` field. Extended extraction logic to:
- Support native MCP `content` arrays.
- Support legacy `result` structures natively.
- Fallback to generic JSON serialization of the entire map.
Additionally, updated AbstractMcpTool.wrapCallResult() format to match Python ADK.

PiperOrigin-RevId: 889141233
Previously, MessageConverter only transferred text content from ADK to Spring AI,
ignoring image and media attachments. This caused vision model requests to fail
even though Spring AI's underlying models (like GPT-4o) support image inputs.

Updated MessageConverter to properly handle image/media parts by constructing
UserMessage with Media attachments.

Fixes google#705
Fixing when the execute tool happens in the graph.  Refactor and simplify the tracing logic for function and tool calls within the ADK. The primary goal is to consolidate multiple tracing events into more cohesive operations, specifically merging "tool_call" and "tool_response" into a single "execute_tool" operation.

### Key Changes:

*   **Consolidated Tool Tracing:** Replaced the separate `traceToolCall` and `traceToolResponse` methods with a unified `traceToolExecution` in `Tracing.java`. This reduces span noise by representing a tool's lifecycle as a single "execute_tool" operation containing both arguments and results (or errors).
*   **Standardized Operation Names:** Introduced constants for core Gen AI operations: `invoke_agent`, `execute_tool`, `send_data`, and `call_llm`.
*   **Improved Error Tracing:** `traceToolExecution` and `traceCallLlm` now explicitly accept an optional `Exception`, allowing them to automatically set the span status to error and record the exception.
*   **Refactored Tracing API:**
    *   `traceSendData` and other methods now require an explicit `Span` argument, moving away from implicit context lookups where appropriate.
    *   Added `traceMergedToolCalls` to specifically handle the telemetry for parallel tool executions.
*   **Flow Logic Cleanup:** Simplified `Functions.java` and `BaseLlmFlow.java` by removing redundant context passing and aligning with the new consolidated tracing methods.
*   **Test Suite Updates:** Significantly updated `ContextPropagationTest.java` to reflect the new tracing model. Several manual hierarchy tests were removed in favor of testing the consolidated `execute_tool` logic and updated attributes.

PiperOrigin-RevId: 889246953
@ddobrin ddobrin merged commit 9a3721b into planner Mar 25, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants