Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
274 changes: 0 additions & 274 deletions AGENTS.md

This file was deleted.

13 changes: 12 additions & 1 deletion litellm/litellm_core_utils/litellm_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -5064,15 +5064,26 @@ def get_error_information(
)
_llm_provider_in_exception = getattr(original_exception, "llm_provider", "")

include_traceback = True
if error_class in ("HTTPException", "ProxyException"):
try:
error_status_int = int(error_status)
except (TypeError, ValueError):
error_status_int = None
if error_status_int is not None and 400 <= error_status_int < 500:
include_traceback = False

# Get traceback information (first 100 lines)
traceback_info = traceback_str or ""
if original_exception:
if include_traceback and original_exception:
tb = getattr(original_exception, "__traceback__", None)
if tb:
tb_lines = traceback.format_tb(tb)
traceback_info += "".join(
tb_lines[:MAXIMUM_TRACEBACK_LINES_TO_LOG]
) # Limit to first 100 lines
if not include_traceback:
traceback_info = ""

# Get additional error details
error_message = str(original_exception)
Expand Down
Loading
Loading