Skip to content

Metadata Loss in DefaultChatClient.DefaultStreamResponseSpec When Converting UserMessage to AdvisedRequest #2612

Closed
@ck-jesse

Description

@ck-jesse

Bug description

Metadata from UserMessage is inadvertently discarded during the conversion chain in streaming responses. Key breakdown:

Data Loss Point:
DefaultStreamResponseSpec.doGetObservableFluxChatResponse loses metadata when calling toAdvisedRequest.
StreamAroundAdvisor’s internal AdvisedRequest.toPrompt() fails to propagate metadata.

Environment
Spring AI version: 1.0.0-M6
Affected module: spring-ai-core

Expected behavior
UserMessage metadata should persist through the entire processing chain for multimodal support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions