adk-web icon indicating copy to clipboard operation
adk-web copied to clipboard

Token Streaming: each thought chunk renders as a new bubble instead of updating a single progressive bubble

Open hananawi opened this issue 5 months ago • 5 comments

Summary

When Token Streaming is enabled, responses that contain a thought section render every incoming chunk as a separate chat bubble instead of updating one existing bubble.

Steps to Reproduce

  1. Enable Stream tokens in settings.
  2. Send a prompt that triggers an assistant response with a thought field.
  3. Observe the UI: each thought chunk spawns a new bubble.

Expected Behavior

  • Only one thought bubble should be created and its text should grow progressively as new chunks arrive.

Actual Behavior

  • Every thought chunk creates an additional bubble, flooding the chat history.

Environment

  • adk-web version: main branch
  • Browser: Chrome 138.0.0.0
  • OS: macOS 15
  • Other experimental flags: none

Questions

  1. Is this behaviour intended?
  2. If not, is there already a fix planned or an existing Issue/PR I can follow or contribute to?

Additional Context

https://github.com/user-attachments/assets/0144bcbd-2b52-436d-b471-f906049893a2

I also debugged the code, but i'm not familiar with angularjs, and only found that currently it seems the app can't handle the stream thought text in response? thank you for your reply🙇‍♂️🙇‍♂️ Image

hananawi avatar Jul 18 '25 06:07 hananawi

having the same issue

zhy3213 avatar Jul 27 '25 05:07 zhy3213

Thank you, I am working on a fix for this

wyf7107 avatar Aug 15 '25 04:08 wyf7107

Can you still reproduce this? I was able to use it with no problems

Image

wyf7107 avatar Aug 16 '25 19:08 wyf7107

Thanks for checking this issue! This happens when multiple thought streaming events are produced in a single response. You can try a harder question where Gemini produces multiple thought chunks. The expected behavior is that dev ui aggregates thought stream events in a single bubble as they are streamed through, like non-thought messages. While showing thought streaming events in separate bubbles are not so disrupting with Gemini, it does get frustrating when we are using third party models which stream thoughts by tokens, where it would be like what demonstrated in op’s video.

zhy3213 avatar Aug 16 '25 23:08 zhy3213

OK got it, I will try to reproduce it

wyf7107 avatar Aug 17 '25 03:08 wyf7107