Skip to content

Content block discriminator serialized twice ("type":"text","type":"text") #15

Description

@krickert

Observed on 0.14.0, still present on main.

ContentBlock is annotated @JsonTypeInfo(use = Id.NAME, property = "type") and the concrete records (TextContent, ImageContent, ...) also declare a @JsonProperty("type") String type component. Serializing a session/prompt request therefore emits the key twice:

"prompt":[{"type":"text","type":"text","text":"hello"}]

Strict JSON parsers reject duplicate keys; lenient ones silently take the first or last value. Emit the discriminator once (or drop the record component).

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