From 622858e37c6b1eb9f82540eaaabc8daa7dfc15f0 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 10 Jun 2024 17:54:57 -0700 Subject: [PATCH] fix(utils.py): handle together ai timeout exception --- litellm/utils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/litellm/utils.py b/litellm/utils.py index 5794df74f..f2bc7b307 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -9695,7 +9695,13 @@ def exception_type( llm_provider="together_ai", response=original_exception.response, ) - + elif "A timeout occurred" in error_str: + exception_mapping_worked = True + raise Timeout( + message=f"TogetherAIException - {error_str}", + model=model, + llm_provider="together_ai", + ) elif ( "error" in error_response and "API key doesn't match expected format."