Skip to content

Better handling of LLM errors #82

Description

@osma

Currently, the greylitlm and nuextract backends do not have good error handling for LLM errors like the following:

  • connection timed out
  • connection refused
  • LLM service returns 403 (forbidden)
  • LLM service returns 404 (wrong model id)
  • LLM service returns another error code e.g. 500 Internal Server Error

Currently these raise an exception in the backend code at the Pydantic AI agent.run() call which is not caught and thus propagates up, producing a nasty traceback.

We should design better error handling for LLM calls and show the user what happened.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions