Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(ui): Display newlines correctly in tool descriptions (#22363)

Luo Peng0f4771fe19b4
diff --git a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/FormattedToolView.tsx b/ui/litellm-dashboard/src/components/view_logs/ToolsSection/FormattedToolView.tsx
index 2f036a2a34a..c159232f71d 100644
--- a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/FormattedToolView.tsx
+++ b/ui/litellm-dashboard/src/components/view_logs/ToolsSection/FormattedToolView.tsx
@@ -58,7 +58,14 @@ export function FormattedToolView({ tool }: FormattedToolViewProps) {
{/* Description */}
{tool.description && (
<div style={{ marginBottom: 16 }}>
- <Text style={{ lineHeight: 1.6 }}>{tool.description}</Text>
+ <Text
+ style={{
+ lineHeight: 1.6,
+ whiteSpace: 'pre-wrap',
+ }}
+ >
+ {tool.description}
+ </Text>
</div>
)}