From 702214146c1f0f2c2120b87e6a460d5a39cef418 Mon Sep 17 00:00:00 2001 From: Ting SUN Date: Thu, 18 Jun 2026 14:56:46 +0800 Subject: [PATCH] [Bugfix][Frontend] Fix Anthropic count_tokens decorator order driving server load negative (#44725) Signed-off-by: Ting Sun Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- vllm/entrypoints/anthropic/api_router.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/entrypoints/anthropic/api_router.py b/vllm/entrypoints/anthropic/api_router.py index 16756a9028..31b5a3fbab 100644 --- a/vllm/entrypoints/anthropic/api_router.py +++ b/vllm/entrypoints/anthropic/api_router.py @@ -102,8 +102,8 @@ async def create_messages(request: AnthropicMessagesRequest, raw_request: Reques HTTPStatus.INTERNAL_SERVER_ERROR.value: {"model": AnthropicErrorResponse}, }, ) -@load_aware_call @with_cancellation +@load_aware_call async def count_tokens(request: AnthropicCountTokensRequest, raw_request: Request): handler = messages(raw_request) if handler is None: