Skip to content

Conversation

@adtyavrdhn
Copy link
Contributor

@adtyavrdhn adtyavrdhn commented Nov 14, 2025

Closes #3404

Adds metadata field to ModelMessage.

@adtyavrdhn
Copy link
Contributor Author

adtyavrdhn commented Nov 14, 2025

I've not added a history processor test for the same because I did not think it was relevant to the field or history processor itself, but if you think we should add one as a valid use case scenario let me know :)

@DouweM DouweM changed the title Adds Metadata field to ModelMessage(ModelRequest, ModelResponse) for tagging additional information on the messages Adds {ModelRequest,ModelResponse}.metadata fields Nov 17, 2025
"""The unique identifier of the agent run in which this message originated."""

metadata: dict[str, Any] | None = None
"""Additional data tagged on the message but is not sent to the model"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like the description from ToolReturn.metadata:

Suggested change
"""Additional data tagged on the message but is not sent to the model"""
"""Additional data that can be accessed programmatically by the application but is not sent to the LLM."""

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add metadata field to ModelMessage

2 participants