Repository navigation
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
|
Hi, I’ve signed the CLA and triggered the |
|
Hi @AbarnaaSree, thanks for the AFC fix, and sorry for the slow response. Two small things are blocking it:
Generated by Claude Code |
|
Hi @mikeldking, thanks for the feedback! I've pushed the Ruff formatting changes, and the CLA check is now passing. The targeted regression tests pass locally (6 passed). I'll keep an eye on the CI checks. Thanks for your help! |
eba3178 to
6000c84
Compare
|
Verified the changes with live examples using a local Phoenix instance. Each run generated one Existing vs Updated Behavior
SummaryPreviously, tool calls were stored at the root level and were not visible in Phoenix. With this change, tool calls are grouped under a separate output message ( The final text response and all other span attributes remain unchanged. |
|
I ran live Gemini examples against a local Phoenix with both builds:
Other checks
|
The AFC history loop rendered each model turn by hand and kept only its function calls. A turn with "Let me check." and a get_weather call reached the span as a bare tool call, and a thought part before a call was dropped the same way. The loop now skips the request-seeded turns and the turns already published as candidates, then renders each remaining model turn with _get_attributes_from_generate_content_content, the path candidates use. AFC turns now record their text and reasoning next to their tool calls. _request_content_count no longer re-checks that request_parameters is a Mapping. Its signature already says so, and every caller passes the dict from _parse_args.
|
Thanks @AbarnaaSree. I pushed two commits to this branch on top of your work, b9eb0d0 and d0ffb30. Merged AFC model turns keep their text and reasoning (d0ffb30). The AFC history loop built each model turn's attributes by hand and kept only the function calls. When the model answered with "Let me check." plus a
|
Summary
Fixes #3788.
Automatic function calling (AFC) tool calls from the Google GenAI instrumentation were emitted without the
llm.output_messages.<messageIndex>prefix, producing orphanedmessage.tool_calls.*attributes.This change publishes AFC tool calls under the appropriate output-message bucket and keeps tool-call indices scoped to each model message.
Changes
llm.output_messages.<messageIndex>.Contentobject appears in AFC history.Testing
python -m pytest .\python\instrumentation\openinference-instrumentation-google-genai\tests\test_response_attributes_extractor.py -qgit diff --checkpasses.