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.
Currently, the greylitlm and nuextract backends do not have good error handling for LLM errors like the following:
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.