Skip to content

[Bug] streamify is appending StatusStreamingCallback directly to the shared settings.callbacks list #9074

@glesperance

Description

@glesperance

What happened?

Bug

streamify is appending StatusStreamingCallback directly to the shared settings.callbacks list.

That list is mutated in place and reused across calls, callbacks (and their status message providers) leaked between different dspy.streamify(...) invocations.

see https://github.com/stanfordnlp/dspy/blob/main/dspy/streaming/streamify.py#L164

Steps to reproduce

refer to the tests added in #9073 for steps to reproduce

DSPy version

3.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions