add logger when model response has no choices for streaming /response and /messages

This commit is contained in:
Xiaohan Fu 2026-01-30 22:46:11 +00:00
parent e4a16241a1
commit 1fde2579bf
2 changed files with 4 additions and 0 deletions

View file

@ -395,6 +395,8 @@ class AnthropicMessagesHandler(BaseTranslation):
input_type="response",
logging_obj=litellm_logging_obj,
)
else:
verbose_proxy_logger.debug("Skipping output guardrail - model response has no choices")
return responses_so_far
string_so_far = self.get_streaming_string_so_far(responses_so_far)

View file

@ -447,6 +447,8 @@ class OpenAIResponsesHandler(BaseTranslation):
logging_obj=litellm_logging_obj,
)
return responses_so_far
else:
verbose_proxy_logger.debug("Skipping output guardrail - model response has no choices")
# model_response_stream = OpenAiResponsesToChatCompletionStreamIterator.translate_responses_chunk_to_openai_stream(final_chunk)
# tool_calls = model_response_stream.choices[0].tool_calls
# convert openai response to model response