Align message-part class names with semconv (*Part suffix) - #365
Draft
rads-1996 wants to merge 5 commits into
Draft
Align message-part class names with semconv (*Part suffix)#365rads-1996 wants to merge 5 commits into
rads-1996 wants to merge 5 commits into
Conversation
rads-1996
force-pushed
the
align-models-with-semconv
branch
from
August 7, 2026 15:57
cff1a11 to
5f2e10e
Compare
Pull request dashboard statusWaiting on the author · refreshed 2026-08-07 16:36 UTC Move out of draft to request review. Status above doesn't look right?
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the shared opentelemetry-util-genai message-part model class names to align with the GenAI semantic conventions non-normative models (adding the *Part suffix), and propagates those renames through dependent instrumentation packages and their tests.
Changes:
- Rename util-genai message-part dataclasses (e.g.,
Text→TextPart,ToolCallRequest→ToolCallRequestPart) and updateMessagePartaccordingly. - Update util-genai tests and several instrumentations (OpenAI, Anthropic, LangChain, Google GenAI, Qwen Agent, Agno) to use the new
*Partnames. - Add per-package towncrier changelog fragments documenting the rename.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| util/opentelemetry-util-genai/tests/test_workflow_invocation.py | Update workflow invocation tests to use TextPart. |
| util/opentelemetry-util-genai/tests/test_utils.py | Update helper constructors to use TextPart. |
| util/opentelemetry-util-genai/tests/test_upload.py | Update upload hook tests to use *Part types. |
| util/opentelemetry-util-genai/tests/test_toolcall.py | Update toolcall tests/docstrings to *Part names. |
| util/opentelemetry-util-genai/tests/test_handler_workflow.py | Update handler workflow tests to use TextPart. |
| util/opentelemetry-util-genai/tests/test_handler_fetch_response.py | Update fetch-response handler tests to use TextPart. |
| util/opentelemetry-util-genai/tests/test_handler_completion_hook.py | Update completion-hook tests to use TextPart. |
| util/opentelemetry-util-genai/tests/test_handler_agent.py | Update agent handler tests to use TextPart. |
| util/opentelemetry-util-genai/src/opentelemetry/util/genai/types.py | Rename message-part dataclasses to *Part and update MessagePart union. |
| util/opentelemetry-util-genai/src/opentelemetry/util/genai/_upload/completion_hook.py | Update hashability check to use TextPart. |
| util/opentelemetry-util-genai/src/opentelemetry/util/genai/_tool_invocation.py | Update docstring reference to ToolCallRequestPart. |
| util/opentelemetry-util-genai/README.rst | Update docs to mention *Part message types. |
| util/opentelemetry-util-genai/.changelog/365.changed | Add changelog fragment for the rename. |
| instrumentation/opentelemetry-instrumentation-google-genai/tests/interactions/test_parser.py | Update tests to assert *Part types. |
| instrumentation/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/message.py | Update message conversion to construct *Part types. |
| instrumentation/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/interactions.py | Update interactions conversion to use *Part types. |
| instrumentation/opentelemetry-instrumentation-google-genai/.changelog/365.changed | Add changelog fragment for the rename. |
| instrumentation/opentelemetry-instrumentation-genai-qwen-agent/src/opentelemetry/instrumentation/genai/qwen_agent/utils.py | Update Qwen Agent conversion helpers to *Part types. |
| instrumentation/opentelemetry-instrumentation-genai-qwen-agent/.changelog/365.changed | Add changelog fragment for the rename. |
| instrumentation/opentelemetry-instrumentation-genai-openai/tests/test_response_extractors.py | Update patching test to reference TextPart. |
| instrumentation/opentelemetry-instrumentation-genai-openai/src/opentelemetry/instrumentation/genai/openai/utils.py | Update OpenAI message prep to emit *Part types. |
| instrumentation/opentelemetry-instrumentation-genai-openai/src/opentelemetry/instrumentation/genai/openai/response_extractors.py | Update response extraction helpers to use TextPart / ReasoningPart. |
| instrumentation/opentelemetry-instrumentation-genai-openai/src/opentelemetry/instrumentation/genai/openai/chat_wrappers.py | Update streaming buffers to emit TextPart / ToolCallRequestPart. |
| instrumentation/opentelemetry-instrumentation-genai-openai/.changelog/365.changed | Add changelog fragment for the rename. |
| instrumentation/opentelemetry-instrumentation-genai-langchain/tests/test_callback_handler.py | Update LangChain tests to use TextPart / ToolCallRequestPart. |
| instrumentation/opentelemetry-instrumentation-genai-langchain/src/opentelemetry/instrumentation/genai/langchain/utils.py | Update LangChain conversion utilities to *Part types and docstrings. |
| instrumentation/opentelemetry-instrumentation-genai-langchain/src/opentelemetry/instrumentation/genai/langchain/callback_handler.py | Update callback handler to emit TextPart / ToolCallRequestPart. |
| instrumentation/opentelemetry-instrumentation-genai-langchain/.changelog/365.changed | Add changelog fragment for the rename. |
| instrumentation/opentelemetry-instrumentation-genai-anthropic/src/opentelemetry/instrumentation/genai/anthropic/utils.py | Update Anthropic conversion utilities to emit *Part types. |
| instrumentation/opentelemetry-instrumentation-genai-anthropic/.changelog/365.changed | Add changelog fragment for the rename. |
| instrumentation/opentelemetry-instrumentation-genai-agno/tests/requirements.oldest.txt | Add util-genai editable install note for oldest tests. |
| instrumentation/opentelemetry-instrumentation-genai-agno/src/opentelemetry/instrumentation/genai/agno/patch.py | Update Agno patching to use TextPart. |
| instrumentation/opentelemetry-instrumentation-genai-agno/pyproject.toml | Bump util-genai dependency lower bound to 1.1b0.dev. |
| instrumentation/opentelemetry-instrumentation-genai-agno/.changelog/365.changed | Add changelog fragment for the rename. |
| .github/skills/write-conformance-tests/SKILL.md | Update documentation table to reference *Part types. |
| .github/skills/migrate-from-openinference/SKILL.md | Update migration guidance to reference *Part types. |
Comment on lines
223
to
+227
| ToolDefinition = Union[FunctionToolDefinition, GenericToolDefinition] | ||
|
|
||
| MessagePart = Union[ | ||
| Text, | ||
| ToolCallRequest, | ||
| ToolCallResponse, | ||
| ServerToolCall, | ||
| ServerToolCallResponse, | ||
| Blob, | ||
| File, | ||
| Uri, | ||
| Reasoning, | ||
| TextPart, | ||
| ToolCallRequestPart, |
11 tasks
rads-1996
marked this pull request as draft
August 7, 2026 16:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Complies with the semantic conventions for non-normative models.
Type of change
Please delete options that are not relevant.
How has this been tested?
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. List any relevant details for your test
configuration.
Checklist
See CONTRIBUTING.md
for the style guide, changelog guidance, and more.