Open liatweissman opened 2 days ago
Going to gently ping @enyst as he's quite good with these things...
This looks strange... On one hand, the error is not about Bedrock/LLM, it's from the websocket, for some reason the UI has an event without id here. Maybe @tofarr has a better idea there?
I cannot replicate it, even if I use bedrock and litellm proxy. @liatweissman could you please try to add in the model name 'bedrock' though, or make sure litellm works? I mean, I'd expect the pattern of the model name here to look like "litellm_proxy/bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0".
Also, could you do a hard refresh of the browser, and try again? Normally even if there's a problem with the llm it should start.
Hi @enyst Thank you for the suggestions. I tried the following based on your feedback:
bedrock
, as in:
litellm_proxy/bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0
curl
command I shared earlier.1.52.12
).Unfortunately, I am still encountering the same ValueError
related to latest_event_id
. The WebSocket session starts but fails due to the undefined
value for latest_event_id
.
Could you suggest any additional steps or debugging options I could try? Also, is there any more information you need from my side to help replicate this issue?
Let me know how I can assist further in diagnosing or resolving this.
Thank you. Can you please try to run openhands:main
instead of openhands:0.14
?
I already tried running openhands:main
instead of openhands:0.14
, but unfortunately, I am still encountering the same error with the latest_event_id
being 'undefined'
.
I saw this when debugging https://github.com/All-Hands-AI/OpenHands/pull/5056 . The issue is that some events use an ID which is not an integer:
If the last event the frontend received before init was one of these events, you get that error. I mitigate the issue by checking in ws-client-provider.tsx:
if (lastEvent && !Number.isNaN(parseInt(lastEvent.id as string, 10))) {
TBH - I think in the long term these events should be refactored - STATUS$STARTING_CONTAINER
and such should be a status
rather than an id
Oh, that can explain it. Except if you delete everything and incognito mode... @liatweissman Considering the above, could you please try to clean out the browser's local storage? Then maybe also, make a new project, or at least change the settings and save, to force a new session.
Is there an existing issue for the same bug?
Describe the bug and reproduction steps
Description:
I'm encountering a critical issue while integrating OpenHands with LiteLLM Proxy to access Amazon Bedrock. The WebSocket crashes repeatedly due to a
ValueError
when OpenHands attempts to process the query parameterlatest_event_id
. This seems to occur because the value oflatest_event_id
is'undefined'
, which cannot be converted to an integer.Steps to Reproduce:
Configure LiteLLM Proxy with the following
config.yaml
:Start the LiteLLM Proxy:
Verify that the LiteLLM Proxy works by making the following API call:
Start OpenHands using the following Docker command:
Configure OpenHands with the following in the UI:
litellm_proxy/us.anthropic.claude-3-5-sonnet-20241022-v2:0
http://0.0.0.0:4000
sk-xxxxxxxx
Start a conversation in OpenHands.
Observed Behavior:
OpenHands enters an infinite loop, throwing the following error repeatedly:
Environment Details:
0.14
1.52.10
MacOs
us-east-1
OpenHands Installation
Docker command in README
OpenHands Version
0.14
Operating System
MacOS
Logs, Errors, Screenshots, and Additional Context
No response