Skip to content

Commit 1e84ad9

Browse files
committed
update exception pattern thrown when invalid openai litellm model requested
1 parent ff1331d commit 1e84ad9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

garak/generators/litellm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
litellm.drop_params = True
4848
# Suppress log messages from LiteLLM
4949
litellm.verbose_logger.disabled = True
50-
# litellm.set_verbose = True
50+
#litellm.set_verbose = True
5151

5252
# Based on the param support matrix below:
5353
# https://docs.litellm.ai/docs/completion/input
@@ -152,6 +152,7 @@ def _call_model(
152152
except (
153153
litellm.exceptions.AuthenticationError, # authentication failed for detected or passed `provider`
154154
litellm.exceptions.BadRequestError,
155+
litellm.exceptions.APIError, # this seems to be how LiteLLM/OpenAI are doing it on 2025.02.18
155156
) as e:
156157

157158
raise BadGeneratorException(

0 commit comments

Comments
 (0)