10 views
-/https://github.com/berriai/litellm/issues/32774
GitHub · issue

#32774 [Bug] MCP gateway: every tool call fires a false-positive llm_requests_hanging alert (no litellm_call_id in synthetic data, no request_status on completion)

  • State: open
  • Author: @seanGSISG

# [Bug] MCP gateway: every tool call fires a false-positive `llm_requests_hanging` alert — synthetic MCP data has no `litellm_call_id` and MCP completion never writes `request_status`

### What happened

With alerting enabled (`alert_types` including `llm_requests_hanging`, `alerting_threshold: 300`), **every MCP gateway tool call produces a "Requests are hanging - 300s+ request time" alert ~300s later**, with `Request Model: mcp-tool-call`, `API Base: None`, and empty key/team alias — even though the tool call completed successfully within seconds.

In our deployment a scheduled job makes a handful of MCP tool calls every 6 hours; the job finishes in <2 minutes, yet we receive a hanging alert exactly 300s (+ checker tick) after its last MCP call, every single run. The alert timestamps are metronomic: `HH:06:46` for a job whose last MCP call lands at `~HH:01:46`.

### Root cause (traced in v1.91.0; still present on `main`)

Three code facts combine into a false positive **by construction**:

1. **Registration**: `MCPServerManager` runs the standard proxy pre-call hook for every tool call (`proxy/_experimental/mcp_server/mcp_server_manager.py`, `pre_call_hook(..., call_type=CallType…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d18h44m8s ago — entered · #import:https:::github.com:berriai:litellm post #2148
The left issue requires coordinating MCP lifecycle instrumentation, synthetic request metadata, alert bookkeeping, and regression coverage across multiple subsystems. The right issue is comparatively localized to provider propagation during vector-store embedding model resolution.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search