Skip to content

_meta field is not included at serialization #18

@Nemtecl

Description

@Nemtecl

Description

When using field_meta it doesn't uses alias at runtime.
When not provided field_meta is always added at serialization

Image

I think by_alias=True is missing when using model_dump

Step to reproduce

With field_meta

connection.sessionUpdate(
    SessionNotification(
        sessionId="random_id",
        update=AgentMessageChunk(
            sessionUpdate="agent_message_chunk",
            content=TextContentBlock(type="text", text="demo"),
            field_meta={"foo": "bar"}
        ),
    )
)

field_meta is not included in the json

Without field_meta

connection.sessionUpdate(
    SessionNotification(
        sessionId="random_id",
        update=AgentMessageChunk(
            sessionUpdate="agent_message_chunk",
            content=TextContentBlock(type="text", text="demo"),
        ),
    )
)

field_meta is always null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions