You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Raise ValueError for RateLimitingMiddleware burst_capacity below 1 in FastMCP 5 #5295
breaking changeBreaks backward compatibility. Requires minor version bump. Critical for maintainer attention.enhancementImprovement to existing functionality. For issues and smaller PR improvements.serverRelated to FastMCP server implementation or server-side functionality.
In FastMCP 5, RateLimitingMiddleware should raise a ValueError when burst_capacity is below 1.
A token bucket that holds less than one token can never admit a request. In 4.x, burst_capacity=0 silently falls back to the default (twice the rate), and negative or fractional values reject every request. 4.x keeps that behavior and emits a FastMCPDeprecationWarning that points to burst_capacity=1, which allows no bursting beyond the steady rate.
I've reviewed the implementation and existing tests. The change would replace the warning for explicitly supplied burst_capacity < 1 with ValueError, while preserving burst_capacity=None, including the reject-all behavior when max_requests_per_second=0 and burst_capacity is omitted.
Is this change welcome now? If so, which branch should a FastMCP 5 PR target?
breaking changeBreaks backward compatibility. Requires minor version bump. Critical for maintainer attention.enhancementImprovement to existing functionality. For issues and smaller PR improvements.serverRelated to FastMCP server implementation or server-side functionality.
Activity
BlueLi66 commentedon Oct 9, 2026
I've reviewed the implementation and existing tests. The change would replace the warning for explicitly supplied burst_capacity < 1 with ValueError, while preserving burst_capacity=None, including the reject-all behavior when max_requests_per_second=0 and burst_capacity is omitted.
Is this change welcome now? If so, which branch should a FastMCP 5 PR target?