vllm-tool-calling

Harden vLLM deployments against tool-call leaks and parsing failures.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/saintgo7/claude-skills --skill vllm-tool-calling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vllm-tool-calling
Source: https://github.com/saintgo7/claude-skills/tree/main/vllm-tool-calling
Command: npx skills add https://github.com/saintgo7/claude-skills --skill vllm-tool-calling

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

vLLM tool calling can silently fail or leak tool-call markup into user-visible content, breaking automated function execution in production.

Core Features & Use Cases

  • 3-stage defenses (server + model + client fallback): Prevents failures when any single layer regresses, including stream boundary issues.
  • Parser-to-model mapping: Ensures the selected vLLM --tool-call-parser matches the model’s real tokenizer/chat-template output format.
  • Client-side promotion of leaked patterns: Detects Hermes/Qwen3 XML and bare-JSON cases, then promotes them into OpenAI-standard tool_calls while stripping leaked content.
  • Smoke test guidance: Validates both non-stream and stream behavior and checks that leaks do not appear in content.

Quick Start

Install and activate this skill guidance by running: ./install.sh vllm-tool-calling.

Frequently Asked Questions about vllm-tool-calling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stop vLLM tool-call markup from leaking into user-visible content?

To stop vLLM tool-call leaks, apply a 3-stage defense combining server parsing, model-format validation, and client-side fallback promotion to strip leaked Hermes XML, Qwen3, and bare-JSON patterns from content while mapping them to OpenAI-standard tool_calls.

Why does vLLM tool calling silently fail after a model upgrade?

vLLM tool calling fails after model upgrades because the selected vLLM --tool-call-parser no longer matches the new model's tokenizer chat-template output format, requiring parser-to-model mapping validation to ensure format alignment.

How do I validate vLLM streaming chat completions for tool_calls regressions?

Validate vLLM streaming tool_calls by enforcing automated smoke tests that check both stream and non-stream chat completions, ensuring tool_calls are present and that tool syntax does not leak into the content field across chunk boundaries.

Does vLLM support OpenAI-compatible tool_calls for both streaming and non-streaming?

Yes, vLLM supports OpenAI-compatible tool_calls for both streaming and non-streaming chat completions, but requires hardening through parser-to-model mapping and client-side promotion to detect Hermes, Qwen3, and bare-JSON formats reliably.

What is the best way to detect Hermes and Qwen3 tool-call formats in vLLM?

The best way to detect Hermes and Qwen3 tool-call formats in vLLM is using client-side promotion logic that identifies these specific XML patterns alongside bare-JSON cases, then promotes them into standard tool_calls while stripping leaked content.

Can I use a single vLLM tool-call parser for multiple model formats?

No, a single vLLM tool-call parser cannot safely cover multiple model formats, because each model's tokenizer chat-template outputs differ, requiring strict parser-to-model mapping and fallback promotion to handle format regressions.