-
Notifications
You must be signed in to change notification settings - Fork 168
Open
Labels
Description
Describe the bug
The _extract_message_role function in the OpenInference LangChain instrumentation tracer fails to handle RemoveMessage from langchain_core.messages.modifier. When processing a RemoveMessage class, the function raises a ValueError.
To Reproduce
- Use LangChain with OpenInference instrumentation enabled.
- Create a workflow or chain that uses RemoveMessage from
langchain_core.messages.modifier(ex: Remove a message from complied Langgraph state). - The tracer will throw a ValueError with message:
"Cannot parse message of type: RemoveMessage"
Expected behavior
The _extract_message_role function should properly handle RemoveMessage without throwing an error.
Screenshots
N/A
Desktop (please complete the following information):
- OS: macOS
- Python Version: 3.12
- langchain-core>=0.3.72
- openinference-instrumentation-langchain>=0.1.52
- arize-phoenix>=10.13.1
Additional context
Add any other context about the problem here.
dosubot and Eskapp
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo