113 Commits

Author SHA1 Message Date
Liang Wu 4000c0251d chore: remove scipy from eval dependencies
It's not used in the codebase.

Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 869020801
2026-02-11 21:59:31 -08:00
Liang Wu 61c329f8ce ci: match the environment with internal ones for pyink/isort/unittest
Previously submitted change is causing [Pyink error](https://github.com/google/adk-python/actions/runs/21884351396/job/63176122118) in repo because Pyink recently updated to 25.12.0.

Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 868806575
2026-02-11 13:01:32 -08:00
Wei Sun (Jack) a2e43aaf19 chore(version): Limits sphinx under 9 for docs
Co-authored-by: Wei Sun (Jack) <weisun@google.com>
PiperOrigin-RevId: 866569793
2026-02-06 12:34:07 -08:00
George Weale bb89466623 chore: Improve type hints and handle None values in ADK utils
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 866025998
2026-02-05 11:04:46 -08:00
George Weale 706a6dda81 fix: Update OpenTelemetry dependency versions
Relax version constraints for opentelemetry-api and opentelemetry-sdk to allow versions between 1.36.0 and 1.40.0

Close #4229

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 864896212
2026-02-03 08:41:39 -08:00
Google Team Member 125bc85ac5 fix: Resolving MutualTLSChannelError 'OpenSSL' module error on by adding pyopenssl dependency in pyproject.toml
- Add 'pyopenssl' to project dependencies to fix MutualTLSChannelError  encountered during mTLS channel configuration.

PiperOrigin-RevId: 864874340
2026-02-03 07:43:09 -08:00
Max Ind e87a8437fb feat(otel): add extra attributes to span generated with opentelemetry-instrumentation-google-genai
Co-authored-by: Max Ind <maxind@google.com>
PiperOrigin-RevId: 864272319
2026-02-02 03:17:08 -08:00
Vasilii Novikov 9290b96626 feat: Make OpenAPI tool async
Merge https://github.com/google/adk-python/pull/2872

Closes https://github.com/google/adk-python/issues/787

The OpenAPI tool has been ported to the httpx client to make requests truly asynchronous.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/2872 from condorcet:async_openapi_tool bf83f73af93f624126462fb0bd41fef27c53a0b6
PiperOrigin-RevId: 864250822
2026-02-02 02:15:52 -08:00
Sara Robinson 32f9f92042 chore: Add GitHub Action check to run mypy
Merge https://github.com/google/adk-python/pull/4276

This adds 2 mypy GitHub Actions checks:

* `mypy.yml` runs mypy on every PR. This will list all errors, so it shouldn't block until errors are resolved.
* `mypy-new-errors.yml` compares the PR branch to `main` to ensure no new mypy errors are introduced. This check can be made blocking now and can be removed once all errors are resolved in favor of `mypy.yml`.

### Checklist

- [x] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document.
- [x] I have performed a self-review of my own code.
- [x] I have commented my code, particularly in hard-to-understand areas.
- [x] I have added tests that prove my fix is effective or that my feature works.
- [x] New and existing unit tests pass locally with my changes.
- [x] I have manually tested my changes end-to-end.
- [x] Any dependent changes have been merged and published in downstream modules.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/4276 from sararob:mypy-gh-actions 63130773c4862e90e352d4cb79221d78a6b9f5fd
PiperOrigin-RevId: 862226296
2026-01-28 07:27:52 -08:00
Liang Wu 65cbf4b35c fix: Make OpenAPI /docs path work again
* The main fix is in eval_metrics.py
* Removed some deprecated paths in the FastAPI server
* Added a unit test to catch future breakages
* Bump fastapi version to be 0.124.1 to capture the fix in https://github.com/fastapi/fastapi/pull/14482
* Removed the upper-bound restriction on fastapi version which was used to temporarily fix the issue

Fixes #3173

Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 861867708
2026-01-27 13:41:26 -08:00
Shangjie Chen e8f7aa3140 fix: Add pypika>=0.50.0 to project.toml since crewai depends on it and the default version does not work with py 3.12+
Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 860181604
2026-01-23 11:15:19 -08:00
Max Ind 935c279f82 feat(otel): add minimal generate_content {model.name} spans and logs for non-gemini inference and when opentelemetry-inference-google-genai dependency is missing
Co-authored-by: Max Ind <maxind@google.com>
PiperOrigin-RevId: 859667045
2026-01-22 10:18:06 -08:00
Liang Wu 3d96b7883b chore: Pin litellm dependency to versions below 1.80.17
This is a stopgap before the actual fix is added for 1.80.17+.

Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 859351463
2026-01-21 18:43:26 -08:00
Liang Wu 3e3566bd0e chore: Pin litellm dependency to versions below 1.81.0
Update the litellm version constraint in both project dependencies and dev dependencies to exclude versions 1.81.0 and higher because unit test breakages in GitHub actions introduced by it.

This is a stopgap before the actual fix is added. Close #4225

Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 859239880
2026-01-21 13:31:01 -08:00
George Weale 7955177fb2 fix: Update dependency versions in pyproject.toml
Bump authlib to >=1.6.6 and mcp to >=1.23.0.

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 858728187
2026-01-20 13:29:34 -08:00
Google Team Member 7dc6adf4e5 feat: migrate ToolboxToolset to use toolbox-adk and align validation
### Description of Change

**Problem:**
The `ToolboxToolset` was relying on the legacy `toolbox-core` package. Users wanting to use the Toolbox features were forced to install the heavy `[extensions]` group, lacking a granular installation option. Additionally, `ToolboxToolset` had a validation check enforcing either `toolset_name` or `tool_names` to be present, preventing the default behavior of loading all tools (which `toolbox-adk` supports).

**Solution:**
* Refactored `ToolboxToolset` to delegate to `toolbox-adk`.
* Added a new `toolbox` optional dependency group in `pyproject.toml`.
  * Users can now run `pip install google-adk[toolbox]` to install only the necessary dependencies.
* Updated the `extensions` dependency group to replace `toolbox-core` with `toolbox-adk`.
  * This ensures existing users of `[extensions]` are not broken upon upgrade.
* Removed the restrictive validation check to allow default loading of all tools.
* Updated the `ImportError` message to guide users toward the new granular installation command.

### Testing Plan

**Unit Tests:**
- [x] I have added or updated unit tests for my change.
- [x] All unit tests pass locally.

**Manual End-to-End (E2E) Tests:**
- Verified that the sample agent runs correctly with `toolbox-adk` locally.
- Verified that `ToolboxToolset` can now be instantiated without arguments to load all tools.

### Checklist

- [x] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document.
- [x] I have performed a self-review of my own code.
- [x] I have commented my code, particularly in hard-to-understand areas.
- [x] I have added tests that prove my fix is effective or that my feature works.
- [x] New and existing unit tests pass locally with my changes.
- [x] I have manually tested my changes end-to-end.
- [x] Any dependent changes have been merged and published in downstream modules.

PiperOrigin-RevId: 857171811
2026-01-16 08:27:16 -08:00
Google Team Member 277084e313 refactor(tools): Update ToolboxToolset to wrap toolbox-adk
### Description of Change

**Problem:**
The `ToolboxToolset` was implemented directly within `adk-python`, leading to code duplication and potential drift from the core `toolbox-adk` implementation.

**Solution:**
Refactored `ToolboxToolset` to act as a rigorous wrapper around the `toolbox-adk` package, which delegates all functionality to `toolbox_adk.ToolboxToolset`.

### Testing Plan

**Unit Tests:**

- [x] I have added or updated unit tests for my change.
- [x] All unit tests pass locally.

Summary:
-   Verified initialization flows through to `toolbox-adk`.
-   Verified `auth_token_getters` are correctly propagated.
-   Verified type hints are static-analysis friendly.

**Manual End-to-End (E2E) Tests:**

Manually verified standard toolbox loading and execution with the new wrapper:
```python
from google.adk.tools import ToolboxToolset
from toolbox_adk import CredentialStrategy

# Loading with toolset_name
ts = ToolboxToolset(
    server_url='http://localhost:8080',
    toolset_name='calculator',
    credentials=CredentialStrategy.toolbox_identity()
)
tools = await ts.get_tools()
print(f'Loaded {len(tools)} tools')
```

### Checklist

- [x] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document.
- [x] I have performed a self-review of my own code.
- [x] I have commented my code, particularly in hard-to-understand areas.
- [x] I have added tests that prove my fix is effective or that my feature works.
- [x] New and existing unit tests pass locally with my changes.
- [x] I have manually tested my changes end-to-end.
- [x] Any dependent changes have been merged and published in downstream modules.

PiperOrigin-RevId: 855798474
2026-01-13 10:59:51 -08:00
Google Team Member a0b2aac108 fix: Add google-cloud-geminidataanalytics to dependencies
PiperOrigin-RevId: 853515315
2026-01-07 19:57:53 -08:00
Google Team Member 3cd3d56176 fix: Add google-cloud-geminidataanalytics to dependencies
PiperOrigin-RevId: 853504915
2026-01-07 19:19:24 -08:00
Liang Wu 35308d3809 chore: add min version of Google Auth to include fix
Context: https://github.com/googleapis/python-genai/commit/930c7ca7d5b696d3388fe16fb724184eb88c6a65. The GenAI SDK relies on Google Auth for the fix, and adding this as a direct dependency in ADK will decouple the release of ADK and GenAI SDK.

Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 852990837
2026-01-06 17:01:16 -08:00
George Weale 4ddb2cb2a8 chore: Close database engines to avoid aiosqlite pytest hangs
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 852428755
2026-01-05 13:18:08 -08:00
Xiang (Sean) Zhou d58ea589ad chore: Update google-genai and google-cloud-aiplatform versions
Co-authored-by: Xiang (Sean) Zhou <seanzhougoogle@google.com>
PiperOrigin-RevId: 846307170
2025-12-18 09:42:15 -08:00
Xuan Yang f5f4c01d1b fix: Pin aiosqlite version to 0.21.0
Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 846056994
2025-12-17 21:26:19 -08:00
Kamal Aboul-Hosn b6f6dcbeb4 feat: Add a handwritten tool for Cloud Pub/Sub
Merge https://github.com/google/adk-python/pull/3865

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/3865 from kamalaboulhosn:main 37a38a4dcadb04a0af0ec584e6f611204a63cd2a
PiperOrigin-RevId: 845345128
2025-12-16 10:48:09 -08:00
Google Team Member 9cccab4537 fix: installing dependencies for py 3.10
PiperOrigin-RevId: 843378433
2025-12-11 14:35:51 -08:00