Skip to content

Commit 8c3cc85

Browse files
wikaaaaaaabmass
andauthored
Align gen_ai.tool_definitions with JSON Schema and add it to completion hook (#4181)
* add gen_ai.tool_definitions to completion hook * hash tool defintions * Update CHANGELOG * make tool.defintions optional in on_completion * fix lint errors * add gen_ai.tool_definitions to completion hook * hash tool defintions * fix CompetionHook docstring * fix lint test * add gen_ai.tool_definitions to completion hook * hash tool defintions * Update CHANGELOG * align tool.defintions with JSON schema * fix tests * fix ruff * fix unexpected indent * use local changes from util/opentelemetry-util-genai * fix ruff * add gen_ai.tool_definitions to completion hook * re-add changes lost during merge * put tool.defintions in the telemetry by default and the params behind the flag * fix: Too many local variables * address comments * Add comments to udpate of util-genai version after release --------- Co-authored-by: Aaron Abbott <aaronabbott@google.com>
1 parent 22e31a5 commit 8c3cc85

File tree

10 files changed

+535
-143
lines changed

10 files changed

+535
-143
lines changed

instrumentation-genai/opentelemetry-instrumentation-google-genai/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## Unreleased
99
- Fix bug in how tokens are counted when using the streaming `generateContent` method. ([#4152](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4152)).
1010
- Add `gen_ai.tool.definitions` attribute to `gen_ai.client.inference.operation.details` log event ([#4142](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4142)).
11+
- Add `gen_ai.tool_definitions` to completion hook ([#4181](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4181))
12+
1113

1214
## Version 0.6b0 (2026-01-27)
1315

instrumentation-genai/opentelemetry-instrumentation-google-genai/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dependencies = [
4242
"opentelemetry-api ~=1.37",
4343
"opentelemetry-instrumentation >=0.58b0, <2",
4444
"opentelemetry-semantic-conventions >=0.58b0, <2",
45-
"opentelemetry-util-genai >= 0.2b0, <0.3b0",
45+
"opentelemetry-util-genai >= 0.2b0, <0.3b0", # TODO: update version after release (https://github.com/open-telemetry/opentelemetry-python-contrib/issues/4221)
4646
]
4747

4848
[project.optional-dependencies]

0 commit comments

Comments
 (0)