File size: 365 Bytes
482ed6f
 
 
 
e5fcb2d
482ed6f
 
 
 
e5fcb2d
1
2
3
4
5
6
7
8
9
10
11
"""Helpers for safe LLM failure messages in quant agent output."""

from __future__ import annotations

from polyhedra.services.error_sanitizer import sanitize_exception


def format_llm_failure(exc: Exception, *, limit: int = 240) -> str:
    """Return a concise, redacted exception detail safe for artifacts/UI."""
    return sanitize_exception(exc, limit=limit)