Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Too many agent responses lead to a laggy UI #5791

Closed
1 task done
avi12 opened this issue Dec 24, 2024 · 9 comments · Fixed by #6006
Closed
1 task done

[Bug]: Too many agent responses lead to a laggy UI #5791

avi12 opened this issue Dec 24, 2024 · 9 comments · Fixed by #6006
Labels
bug Something isn't working severity:medium Affecting multiple users

Comments

@avi12
Copy link

avi12 commented Dec 24, 2024

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

Every time I have a deep-ish conversation with the agent, the web page can barely respond
I suggest to modify the "chat" experience to lazy load the messages

OpenHands Installation

Docker command in README

OpenHands Version

main

Operating System

Windows

Logs, Errors, Screenshots, and Additional Context

No response

@avi12 avi12 added the bug Something isn't working label Dec 24, 2024
@mamoodi mamoodi added the severity:medium Affecting multiple users label Dec 26, 2024
@mamoodi
Copy link
Collaborator

mamoodi commented Dec 26, 2024

CC @rbren and @amanape

@amanape
Copy link
Member

amanape commented Dec 26, 2024

Could you explain what kind of laggy UI you are experiencing? Does it take a long time to load when switching between tabs? Is it problematic when scrolling?

@avi12
Copy link
Author

avi12 commented Dec 26, 2024

Suppose I want to click on something, when I hover on the element it might take a few seconds for the cursor to turn into a pointer, and when I click it it will take a few seconds to register the click and then update the DOM

@amirshawn
Copy link

This is happening to me as well. I might be wrong but it seems like even if I clear out the long conversation and start a new one. Reload the page in a new browser window. It seems to start lagging on the second conversation a lot quicker than the first conversation.

@mamoodi
Copy link
Collaborator

mamoodi commented Dec 29, 2024

Weird. I'll see if someone can take a look.

@avi12
Copy link
Author

avi12 commented Dec 30, 2024

This is happening to me as well. I might be wrong but it seems like even if I clear out the long conversation and start a new one. Reload the page in a new browser window. It seems to start lagging on the second conversation a lot quicker than the first conversation.

Can confirm

@Jakan-Kink
Copy link

Jakan-Kink commented Jan 2, 2025

I'm not sure if the posters before me are using Claude 3.5, but for me after a little bit of time it takes more than a minute per response because of

Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.

23:04:45 - openhands:ERROR: retry_mixin.py:47 - litellm.RateLimitError: AnthropicException - {"type":"error","error":{"type":"rate_limit_error","message":"This request would exceed your organization’s rate limit of 80,000 input tokens per minute. For details, refer to: https://docs.anthropic.com/en/api/rate-limits; see the response headers for current usage. Please reduce the prompt length or the maximum tokens requested, or try again later. You may also contact sales at https://www.anthropic.com/contact-sales to discuss your options for a rate limit increase."}}. Attempt #1 | You can customize retry values in the configuration.

Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.

23:05:01 - openhands:ERROR: retry_mixin.py:47 - litellm.RateLimitError: AnthropicException - {"type":"error","error":{"type":"rate_limit_error","message":"This request would exceed your organization’s rate limit of 80,000 input tokens per minute. For details, refer to: https://docs.anthropic.com/en/api/rate-limits; see the response headers for current usage. Please reduce the prompt length or the maximum tokens requested, or try again later. You may also contact sales at https://www.anthropic.com/contact-sales to discuss your options for a rate limit increase."}}. Attempt #2 | You can customize retry values in the configuration.

Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.

23:05:16 - openhands:ERROR: retry_mixin.py:47 - litellm.RateLimitError: AnthropicException - {"type":"error","error":{"type":"rate_limit_error","message":"This request would exceed your organization’s rate limit of 80,000 input tokens per minute. For details, refer to: https://docs.anthropic.com/en/api/rate-limits; see the response headers for current usage. Please reduce the prompt length or the maximum tokens requested, or try again later. You may also contact sales at https://www.anthropic.com/contact-sales to discuss your options for a rate limit increase."}}. Attempt #3 | You can customize retry values in the configuration.

Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.

23:05:31 - openhands:ERROR: retry_mixin.py:47 - litellm.RateLimitError: AnthropicException - {"type":"error","error":{"type":"rate_limit_error","message":"This request would exceed your organization’s rate limit of 80,000 input tokens per minute. For details, refer to: https://docs.anthropic.com/en/api/rate-limits; see the response headers for current usage. Please reduce the prompt length or the maximum tokens requested, or try again later. You may also contact sales at https://www.anthropic.com/contact-sales to discuss your options for a rate limit increase."}}. Attempt #4 | You can customize retry values in the configuration.

Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.

23:05:48 - openhands:ERROR: retry_mixin.py:47 - litellm.RateLimitError: AnthropicException - {"type":"error","error":{"type":"rate_limit_error","message":"This request would exceed your organization’s rate limit of 80,000 input tokens per minute. For details, refer to: https://docs.anthropic.com/en/api/rate-limits; see the response headers for current usage. Please reduce the prompt length or the maximum tokens requested, or try again later. You may also contact sales at https://www.anthropic.com/contact-sales to discuss your options for a rate limit increase."}}. Attempt #5 | You can customize retry values in the configuration.
23:06:26 - ACTION

It seems like Clause just keeps adding to the message all of the content it has already processed, and get to the point that just a simple prompt takes many, many minutes per step.

After looking at the other bugs, this might be a dupe of #5715

@avi12
Copy link
Author

avi12 commented Jan 3, 2025

@Jakan-Kink Yep, OH easily runs into this issue
The only way to bypass it as far as I'm aware is by contacting Anthropic's sales department, which you can only do if you have a company email (i.e not of Gmail and possibly not Outlook, Yahoo, etc)
I just gave up and switched to GPT-4o and I haven't ran into this issue since

@amirshawn
Copy link

amirshawn commented Jan 3, 2025

@Jakan-Kink you need to get to a higher tier through anthropic and the only way is to spend more. I think I had to buy $500 in tokens to get up to tier 4 and now I get 400,000 tokens/minute. I still hit that limit every 30 seconds or so and then it bogs down until the next minute. A nice feature to add to Open Hands would be a setting for how many input tokens you can use in a minute so instead of sending messages that won't work, Open Hands would throttle the conversation at that limit. Until Anthropic raises the limit to about 1,000,000 tokens per minute I don't think it will be able to catch up to Open Hands. I guess what I'm saying is this isn't a bug in Open Hands. The other post you linked to I shared a strategy that I think would also help us not reach that limit as quickly. The issue that's occurring in this bug report is about the length of the conversation causing too much memory to be used by the browser to where eventually the page is unresponsive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working severity:medium Affecting multiple users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants