Commit Graph

645 Commits

Author SHA1 Message Date
Ankur Sharma b2c45f8d91 chore: Enhance the messaging with possible fixes for RESOURCE_EXHAUSTED errors from Gemini
Co-authored-by: Ankur Sharma <ankusharma@google.com>
PiperOrigin-RevId: 833538475
2025-11-17 16:15:56 -08:00
Google Team Member 5ac5129fb0 feat: Enhance BQ Plugin Schema, Error Handling, and Logging
This update enhances the BigQuery agent analytics plugin:

*   **Enhanced Error Logging:** Improved error messages for schema mismatches.
*   **Reordered Logging Content:** Prioritized metadata in `before_model_callback`.

PiperOrigin-RevId: 833508755
2025-11-17 15:00:38 -08:00
Kathy Wu a48a1a9e88 fix: Improve logic for checking if a MCP session is disconnected
Currently logic to check for a disconnected session only checks for certain headers but doesn't detect all cases, leading to situations where it tries to connect to a session that is down. This adds logic so that we ping the server to check if it is disconnected. Fixes https://github.com/google/adk-python/issues/3321.

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 833487825
2025-11-17 14:05:02 -08:00
Xuan Yang a5ac1d5e14 feat: Add progressive SSE streaming feature
Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 833483804
2025-11-17 13:55:38 -08:00
George Weale 0ec01956e8 fix: keep vertex session event history intact
Close #3504

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 833417574
2025-11-17 11:13:08 -08:00
Xuan Yang 1dd97f5b45 fix: Add experimental feature to use parameters_json_schema and response_json_schema for McpTool
Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 833144947
2025-11-16 20:55:16 -08:00
Xuan Yang 871da731f1 feat: Add feature decorator for the feature registry system
Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 832503990
2025-11-14 16:48:09 -08:00
Shangjie Chen 9211f4ce8c fix: Use async for to loop through event iterator to get all events in vertex_ai_session_service
Fix https://github.com/google/adk-python/issues/3559

Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 832476367
2025-11-14 15:22:27 -08:00
Kathy Wu a754c96d3c fix: Improve logic for checking if a MCP session is disconnected
Currently logic to check for a disconnected session only checks for certain headers but doesn't detect all cases, leading to situations where it tries to connect to a session that is down. This adds logic so that we ping the server to check if it is disconnected. Fixes https://github.com/google/adk-python/issues/3321.

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 832460068
2025-11-14 14:33:39 -08:00
anrzeszutek 29fea7ec1f fix: Fix deploy to cloud run on Windows
Merge https://github.com/google/adk-python/pull/3536

- Closes: #1597
- Related: #3306

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/3536 from anrzeszutek:main ab9f6bfcd51b373934c0c03ef41c880ce224b31d
PiperOrigin-RevId: 832441843
2025-11-14 13:41:58 -08:00
Google Team Member 7c993b01d1 feat: Schema Enhancements with Descriptions, Partitioning, and Truncation Indicator
This update enhances the BigQuery agent analytics plugin:

*   **Schema Field Descriptions:** The recommended BigQuery table schema now includes descriptions for each field, improving data understandability.
*   **Optimized Table Structure:** The plugin now creates the table with daily partitioning on `timestamp` and clustering on `event_type`, `agent`, and `user_id` by default.
*   **Truncation Flag:** A new boolean field `is_truncated` is added to the schema to show if the `content` was truncated.

PiperOrigin-RevId: 832436799
2025-11-14 13:28:45 -08:00
Ankur Sharma 696852a280 chore: Add default retry options as fall back to llm_request that are made during evals
In order to make evals more resilient to temporary model failures, we add retry options to llm_requests that are made during evals.

Note that this is a fall back option, if the developer has already specified their own retry options, then those will be honored.

Co-authored-by: Ankur Sharma <ankusharma@google.com>
PiperOrigin-RevId: 832383755
2025-11-14 11:02:54 -08:00
milkisbad 9b754564b3 fix: status code in error message in RestApiTool
Merge https://github.com/google/adk-python/pull/2819

add status code to http error to make it more verbose

issue: https://github.com/google/adk-python/issues/2820

# testing plan
run new tests that have beed added in PR

Co-authored-by: Hangfei Lin <hangfei@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/2819 from milkisbad:rest_api_tool_verbose_error 79ac6d96174d414e7ca958379102cfa7ede0e883
PiperOrigin-RevId: 832367374
2025-11-14 10:24:21 -08:00
Google Team Member b7d571bc3f chore: make readability improvements in ADK BQ tool tests
PiperOrigin-RevId: 832110063
2025-11-13 19:43:25 -08:00
Google Team Member 5adbf95a0a fix: stop updating write mode in the global settings during tool execution
Two tools - detect_anomalies and analyze_contribution are modifying the settings passed to them, which is not right as the settings are held and passed by the top level, which means several tools share the same settings.

PiperOrigin-RevId: 832081738
2025-11-13 18:02:19 -08:00
Xuan Yang 23ad40bad2 feat: Introduce a feature registry system for ADK
Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 832050198
2025-11-13 16:14:49 -08:00
Google Team Member ffbb0b37e1 feat: allow setting max_billed_bytes in BigQuery tools config
This will allow users to configure a limit to access in ADK tools on the charges for queries.

PiperOrigin-RevId: 831921163
2025-11-13 10:42:56 -08:00
George Weale 22eb7e5b06 feat: Add support for parsing inline JSON tool calls in LiteLLM responses
Close #1968

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 831911719
2025-11-13 10:18:27 -08:00
Sara Robinson 2efc184a46 chore: Add support for abstract types in AFC
PiperOrigin-RevId: 831873580
2025-11-13 08:38:25 -08:00
Google Team Member 6bb0b7417e chore: Add abstract type annotation support to AFC
PiperOrigin-RevId: 831545133
2025-11-12 14:39:43 -08:00
George Weale 675ecaa8db feat!: Upgrade to include python3.14
pin crew ai to 3.13 at highest version as it uses chromadb and that uses onnxruntime which does not work yet with 3.14

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 831508884
2025-11-12 13:09:00 -08:00
Google Team Member d12468ee5a feat: add a2a_request_meta_provider to RemoteAgent init
The change adds an extension point for controlling which request metadata gets attached to A2A requests made by a RemoteAgent.
Instead of taking metadata from custom_metadata of session events users can construct payloads using a2a_request_meta_provider.

request_meta feature was added in v0.3.11 of the a2a-sdk library: https://github.com/a2aproject/a2a-python/releases/tag/v0.3.11

PiperOrigin-RevId: 831506364
2025-11-12 13:04:06 -08:00
Sara Robinson 52b1dfea14 chore: Add abstract type annotation support to AFC
PiperOrigin-RevId: 831462920
2025-11-12 11:11:41 -08:00
Liang Wu 22c6dbe83c chore: Defer import of live, Client and _transformers in google.genai
Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 831444358
2025-11-12 10:27:56 -08:00
George Weale a19be12c1f fix: change LiteLLM content and tool parameter handling
This changes how content parts are converted for LiteLLM, treating all "text/" mime types as plain text and only "application/pdf" as a file

Close #1940

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 831418696
2025-11-12 09:23:00 -08:00