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

fix llm err handling #5958

Merged
merged 1 commit into from
Jan 1, 2025
Merged

fix llm err handling #5958

merged 1 commit into from
Jan 1, 2025

Conversation

rbren
Copy link
Collaborator

@rbren rbren commented Jan 1, 2025

End-user friendly description of the problem this fixes or functionality that this introduces

  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below
    no changelog

Give a summary of what the PR does, explaining any non-trivial design decisions

Minor fix of an LLM hallucination 🙃


Link of any specific issues this addresses


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0130246-nikolaik   --name openhands-app-0130246   docker.all-hands.dev/all-hands-ai/openhands:0130246

@@ -208,7 +208,7 @@ async def _step_with_exception_handling(self):
reported = RuntimeError(
'There was an unexpected error while running the agent.'
)
if isinstance(e, litellm.LLMError):
if isinstance(e, litellm.AuthenticationError):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be if isinstance(e, (litellm.LLMError, litellm.AuthenticationError)):

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no LLMError, I don't think? 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right--does not exist 🫠

@rbren rbren merged commit 50a0b1d into main Jan 1, 2025
19 of 20 checks passed
@rbren rbren deleted the rb/fix-errs branch January 1, 2025 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants