[Frontend][Metrics] Add vllm:tool_call_parser_invocations_total Prometheus metric (#44448)

Signed-off-by: Yifan Zong <yzong@redhat.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
yzong-rh
2026-06-10 10:29:11 -04:00
committed by GitHub
co-authored by mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent c9e5bf8135
commit 6ec7dcd641
3 changed files with 167 additions and 20 deletions
+8 -1
View File
@@ -13,7 +13,7 @@ import warnings
from argparse import Namespace
from collections.abc import AsyncIterator
from contextlib import asynccontextmanager
from typing import Any
from typing import Any, cast
import uvloop
from fastapi import FastAPI, HTTPException
@@ -322,6 +322,13 @@ async def init_app_state(
vllm_config.structured_outputs_config.enable_in_reasoning
)
if args.tool_call_parser is not None:
from vllm.parser.metrics import init_parser_metrics
init_parser_metrics(
model_name=cast(str, vllm_config.model_config.served_model_name)
)
if supported_tasks is None:
warnings.warn(
"The 'supported_tasks' parameter was not provided to "