Context window visualization bar #3706

Closed
opened 2025-11-11 15:37:39 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @Master-Pr0grammer on GitHub (Feb 8, 2025).

Original feature

This is a official feature request based on this community post: https://www.reddit.com/r/OpenWebUI/comments/1ifzrv5/context_window_visualization_bar/
The feedback from the community on this idea has been very positive


Is your feature request related to a problem? Please describe.

  • When using local models with limited resources, it is often challenging to work with smaller context windows in favor of working with a more powerful model. With the addition of thinking models that often times overflow the context window in a single response, massively tanking performance. This is also a problem when working with documents, large code, RAG, or even web search.
  • Being able to see how full the context window is, when the context is full, and when it has overflowed would be extremely useful. For many tasks, the responses after the context window has overflowed are mostly incorrect, and it would be extremely valuable to know this. It would also be valuable to know how much is left so you can gauge what context is essential, and what is not.

Describe the solution you'd like

  • I propose a context window visualization bar. This would be similar to a loading bar, displaying x/max_ctx, and the bar would visually fill up as the context does, maybe it also has a green fill color when it is mostly empty, and it shifts to red when mostly full. I also propose a verbal warning notification to the user that the context window has overflown so that they are aware of the truncated context, and reduced performance.

Taking it one step further


I think this concept could be taken even further, though it would require a bit more effort to implement.

With the feature of Claude's artifacts, this could be a way to dynamically manage the context window. for each artifact, we can visually show how much context it takes up, and we can give the user the ability to remove it from the context to save space. also before attaching files, it could show a preview of how much that file context it will take (or if it will use RAG it should state so). This would be extremely useful for debugging code.

NOTE: openwebUI's artifacts would need to include a list of artifacts like claude artifacts does, including user uploaded docs (non-RAG), generated markdown docs (code snippets, html, text blocks, etc)

Use case example

You are working on debugging code, and after 6 iterations, the context window has filled up. rather than starting from scratch in a new chat, and wasting time carefully and meticulously crafting a new prompt that grabs all of the relevant information discovered, you simply remove the old code iterations from the context window that are no longer relevant. reducing context window usage from 110% to 40%, saving tons of time.

Originally created by @Master-Pr0grammer on GitHub (Feb 8, 2025). ### **Original feature** This is a official feature request based on this community post: https://www.reddit.com/r/OpenWebUI/comments/1ifzrv5/context_window_visualization_bar/ The feedback from the community on this idea has been very positive --- **Is your feature request related to a problem? Please describe.** - When using local models with limited resources, it is often challenging to work with smaller context windows in favor of working with a more powerful model. With the addition of thinking models that often times overflow the context window in a single response, massively tanking performance. This is also a problem when working with documents, large code, RAG, or even web search. - Being able to see how full the context window is, when the context is full, and when it has overflowed would be extremely useful. For many tasks, the responses after the context window has overflowed are mostly incorrect, and it would be extremely valuable to know this. It would also be valuable to know how much is left so you can gauge what context is essential, and what is not. **Describe the solution you'd like** - I propose a context window visualization bar. This would be similar to a loading bar, displaying `x/max_ctx`, and the bar would visually fill up as the context does, maybe it also has a green fill color when it is mostly empty, and it shifts to red when mostly full. I also propose a verbal warning notification to the user that the context window has overflown so that they are aware of the truncated context, and reduced performance. ### **Taking it one step further** --- I think this concept could be taken even further, though it would require a bit more effort to implement. With the feature of Claude's artifacts, this could be a way to dynamically manage the context window. for each artifact, we can visually show how much context it takes up, and we can give the user the ability to remove it from the context to save space. also before attaching files, it could show a preview of how much that file context it will take (or if it will use RAG it should state so). This would be extremely useful for debugging code. NOTE: openwebUI's artifacts would need to include a list of artifacts like claude artifacts does, including user uploaded docs (non-RAG), generated markdown docs (code snippets, html, text blocks, etc) ### Use case example You are working on debugging code, and after 6 iterations, the context window has filled up. rather than starting from scratch in a new chat, and wasting time carefully and meticulously crafting a new prompt that grabs all of the relevant information discovered, you simply remove the old code iterations from the context window that are no longer relevant. reducing context window usage from 110% to 40%, saving tons of time.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#3706