Skip to content

Response is flushed all at once instead of streaming in Copilot #3047

Description

@Mayank-Draup

Hi Team,

We are using queue_text_chunk to stream responses. It works as expected in Teams, but in Copilot the entire response is returned at once instead of streaming.

We are using the same codebase for both channels, and streaming behaves correctly in Teams but not in Copilot.

Python Agent SDK version: 0.9.0

Code snippet -

sr = context.streaming_response

sr.queue_informative_update("Gathering relevant data…")
await asyncio.sleep(1.5)
sr.queue_informative_update("Compiling insights…")
await asyncio.sleep(1.5)
sr.queue_informative_update("Preparing your response…")
await asyncio.sleep(1.5)

for chunk in chunks:
    sr.queue_text_chunk(chunk)
    await asyncio.sleep(1.5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions