Skip to content

vllm.parser.metrics

Prometheus metrics for the parsers.

Functions:

init_parser_metrics(*, model_name)

Lazily register parser metrics and cache the shared model label.

record_tool_parser_invocation(*, is_tool_called, is_streaming, request)

Increment the tool-call parser invocation counter when registered. Currently parser failures are treated as no tool calls.

TODO: To accurately track parser failures, add a new ToolCallOutcome and more importantly, ensure exceptions are propagated out of the ToolParsers instead of being caught internally. This would require going through ToolParser implementation on a case-by-case basis.