diff --git a/litellm/proxy/common_utils/debug_utils.py b/litellm/proxy/common_utils/debug_utils.py index d9d7b70fe3a..f496b9718a4 100644 --- a/litellm/proxy/common_utils/debug_utils.py +++ b/litellm/proxy/common_utils/debug_utils.py @@ -9,10 +9,10 @@ import tracemalloc from collections import Counter from collections.abc import Mapping, Sequence from types import FrameType -from typing import Any, Final, NamedTuple, Protocol, TypeAlias, TypedDict +from typing import Any, Final, NamedTuple, Protocol, TypeAlias from fastapi import APIRouter, Depends, HTTPException, Query -from typing_extensions import ReadOnly +from typing_extensions import ReadOnly, TypedDict from litellm import get_secret_str from litellm._logging import verbose_proxy_logger diff --git a/ui/litellm-dashboard/src/lib/http/schema.d.ts b/ui/litellm-dashboard/src/lib/http/schema.d.ts index 29435c31aee..dabf81e7344 100644 --- a/ui/litellm-dashboard/src/lib/http/schema.d.ts +++ b/ui/litellm-dashboard/src/lib/http/schema.d.ts @@ -4042,6 +4042,23 @@ export interface paths { patch?: never; trace?: never; }; + "/debug/asyncio-tasks/stacks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Active Task Stacks */ + get: operations["get_active_task_stacks_debug_asyncio_tasks_stacks_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/debug/memory/details": { parameters: { query?: never; @@ -39628,6 +39645,35 @@ export interface components { /** Status */ status?: ("pending" | "running" | "paused" | "completed" | "failed") | null; }; + /** _Frame */ + _Frame: { + /** File */ + file: string; + /** Function */ + function: string; + /** Line */ + line: number; + }; + /** _TaskStackDump */ + _TaskStackDump: { + /** Groups */ + groups: components["schemas"]["_TaskStackGroup"][]; + /** Total Active Tasks */ + total_active_tasks: number; + /** Worker Pid */ + worker_pid: number; + }; + /** _TaskStackGroup */ + _TaskStackGroup: { + /** Coroutine */ + coroutine: string; + /** Count */ + count: number; + /** Stack */ + stack: components["schemas"]["_Frame"][]; + /** Task Names */ + task_names: string[]; + }; /** ModelInfo */ litellm__proxy___types__ModelInfo: { /** Base Model */ @@ -45869,6 +45915,37 @@ export interface operations { }; }; }; + get_active_task_stacks_debug_asyncio_tasks_stacks_get: { + parameters: { + query?: { + max_frames?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["_TaskStackDump"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; get_memory_details_debug_memory_details_get: { parameters: { query?: {