[GH-ISSUE #4814] [FEAT]: Streaming API outputs character-level chunks (breaks RTL languages) #3031

Closed
opened 2026-02-22 18:32:20 -05:00 by yindo · 3 comments
Owner

Originally created by @imhastie on GitHub (Dec 29, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4814

What would you like to see?

Hi,

When using AnythingLLM local with the /stream-chat endpoint, the stream sends extremely small chunks (often single characters).

This causes serious rendering issues for RTL languages like Persian, resulting in broken spacing and unreadable output unless complex client-side buffering is implemented.

Is there a way to:

  • Stream larger chunks?
  • Or respect word boundaries for RTL languages?

Thanks!

Image
Originally created by @imhastie on GitHub (Dec 29, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4814 ### What would you like to see? Hi, When using AnythingLLM local with the /stream-chat endpoint, the stream sends extremely small chunks (often single characters). This causes serious rendering issues for RTL languages like Persian, resulting in broken spacing and unreadable output unless complex client-side buffering is implemented. Is there a way to: - Stream larger chunks? - Or respect word boundaries for RTL languages? Thanks! <img width="646" height="312" alt="Image" src="https://github.com/user-attachments/assets/344c17fd-69a2-4a10-a3ca-12385da36533" />
yindo added the enhancementfeature request labels 2026-02-22 18:32:20 -05:00
yindo closed this issue 2026-02-22 18:32:20 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jan 2, 2026):

This is related to the issues in layout from #3430, if we patched the UI totally, including the layout issues it would also fix this issue as well as text would be appended in the correct layout automatically.

The blocker for this was that the layout for RTL causes a ton of oddities beyond just text direction and instead moves elements all over the page

@timothycarambat commented on GitHub (Jan 2, 2026): This is related to the issues in layout from #3430, if we patched the UI totally, including the layout issues it would also fix this issue as well as text would be appended in the correct layout automatically. The blocker for this was that the layout for RTL causes a ton of oddities beyond just text direction and instead moves elements all over the page
Author
Owner

@Smahdigit commented on GitHub (Feb 13, 2026):

now this issue is over?
persian promt and out put is ok?

@Smahdigit commented on GitHub (Feb 13, 2026): now this issue is over? persian promt and out put is ok?
Author
Owner

@timothycarambat commented on GitHub (Feb 13, 2026):

The chunk separation for any RTL language is entirely dependent on the model provider, nothing we can control for that since all we get back are the chunks including spacing/newlines. There is nothing we can do to patch this specific issue aside from an overall RTL implementation which is nontrival and breaks the entire UI

@timothycarambat commented on GitHub (Feb 13, 2026): The chunk separation for any RTL language is entirely dependent on the model provider, nothing we can control for that since all we get back are the chunks including spacing/newlines. There is nothing we can do to patch this specific issue aside from an overall RTL implementation which is nontrival and breaks the entire UI
yindo changed title from [FEAT]: Streaming API outputs character-level chunks (breaks RTL languages) to [GH-ISSUE #4814] [FEAT]: Streaming API outputs character-level chunks (breaks RTL languages) 2026-06-05 14:49:56 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#3031