Skip to content

Conversation

@wikaaaaa
Copy link
Contributor

@wikaaaaa wikaaaaa commented Feb 9, 2026

Description

This PR adds gen_ai.tool_definitions to completion hook and configures exporting the attribute to GCS. Its configured the same way as system instructions, it's being hashed, since it might be large and often doesn't differ.

Its a continuation of #4142, which added gen_ai.tool_definitions to gen_ai.client.inference.operation.details.

Please delete options that are not relevant.

New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Manual tests: run adk web and inspected the traces and data send to the storage bucket
  • Unit tests

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

return [asdict(dc) for dc in dataclass_list]
response: JsonEncodeable = []
for data in data_list:
if isinstance(data, dict):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In what case will it be a dict ? Don't you always serialize the tool definitions to a sting ? And otherwise it's a dataclass ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tool definitions are serialized into dictionaries, and in a fallback to a string.

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