-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Description:
After editing a markdown table in Canvas, the next chat message fails because AIMessage.content is serialized as a list (with dict segments and a None) instead of a plain string. This triggers a pydantic_core ValidationError.
Steps to reproduce:
- In Chat, ask the model to “create a sample markdown table.”
- Open the table in Canvas and edit any cell.
- Send a new message in the chat.
Actual Result:
Message fails with:
- pydantic_core.ValidationError for AIMessage
- content.str: “Input should be a valid string”
- content.list[…].2.str/dict: “Input should be a valid string/dictionary”, input_value=None
Expected Result:
Message sends successfully. Canvas edits are serialized back to valid plain markdown (string), with no validation errors.
Note: Reproducable in Stage and NEXT envs.
pydantic_core._pydantic_core.ValidationError: 3 validation errors for AIMessage
content.str
Input should be a valid string [type=string_type, input_value=[{'type': 'text', 'text':...perly formatted table'}], input_type=list]
For further information visit https://errors.pydantic.dev/2.10/v/string_type
content.list[union[str,dict[any,any]]].2.str
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.10/v/string_type
content.list[union[str,dict[any,any]]].2.dict[any,any]
Input should be a valid dictionary [type=dict_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.10/v/dict_type
Metadata
Metadata
Assignees
Labels
Type
Projects
Status