Skip to content

fix(agent-framework): emit tool_call.id per OpenInference convention - #4481

Open
feiiiiii5 wants to merge 1 commit into
Arize-ai:mainfrom
feiiiiii5:feiiiiii5/1127-D316
Open

feiiiiii5 wants to merge 1 commit into
Arize-ai:mainfrom
feiiiiii5:feiiiiii5/1127-D316

Conversation

@feiiiiii5

Copy link
Copy Markdown
Contributor

What

_extract_tool_attributes() in the agent-framework instrumentation emitted the tool-call id under tool.call_id, which is not an OpenInference attribute. The documented constant is ToolCallAttributes.TOOL_CALL_ID = "tool_call.id", so TOOL spans lost their call id on any OI-compliant backend. Every other key in the extractor was already correct.

How

Use the authoritative semconv constant instead of the misspelled literal. No behavior change for any other attribute.

Verification

  • New unit test asserts tool_call.id == "call_42" and absence of tool.call_id: base-red 1 failed / 17 passed (KeyError: 'tool_call.id'); with fix 18/18 passed.
  • ruff check and ruff format --check clean on touched files.

Full package suite (VCR/integration) not run: requires the optional agent_framework package and network/LLM access.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant