vllm-reasoning-parsers

vllm-reasoning-parsers is a skill for Claude Code from air-gapped/skills. It costs 113 tokens per session (4,444 once invoked), scanned A, original, MIT.

A guide to parsers that separate a reasoning model's private thinking from its final answer in a chat response. A reasoning model produces both streams together, and the parser puts them into separate response fields.

In plain words
What is it for?
Use it to select or build a vLLM reasoning parser and connect it correctly to chat clients and structured-output checks.
Why use it?
Without the right parser, thinking text can appear as the user-facing answer, and clients may read the wrong field.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Part of the vllm plugin — 15 skills shipped together

Good fit Use it to select or build a vLLM reasoning parser and connect it correctly to chat clients and structured-output checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/air-gapped/skills/vllm-reasoning-parsers
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add air-gapped/skills --skill vllm-reasoning-parsers
Clone the repo
git clone --depth 1 https://github.com/air-gapped/skills

Made for: Claude Code.

Or install vllm, the plugin that ships this one along with the rest of its 15 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vllm-reasoning-parsers

README.md
[![agentmods](https://agentmods.dev/badge/skills/air-gapped/skills/vllm-reasoning-parsers/github.svg)](https://agentmods.dev/skills/air-gapped/skills/vllm-reasoning-parsers)
Your own site
<a href="https://agentmods.dev/skills/air-gapped/skills/vllm-reasoning-parsers"><img src="https://agentmods.dev/badge/skills/air-gapped/skills/vllm-reasoning-parsers/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for vllm-reasoning-parsers

Your own site · 80×15
<a href="https://agentmods.dev/skills/air-gapped/skills/vllm-reasoning-parsers"><img src="https://agentmods.dev/badge/skills/air-gapped/skills/vllm-reasoning-parsers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,444 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00113 $0.04444
Opus 5 $0.00056 $0.02222
Sonnet 5 $0.00023 $0.00889
Haiku 4.5 $0.00011 $0.00444

Measured 8d ago against content hash c6a2d4eb5c75, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

vllm-reasoning-parsers scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/vllm-reasoning-parsers/SKILL.md · 169 lines

How it starts

The opening of the file, as written. The whole thing — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.

vLLM reasoning parsers

Target: operators wiring up --reasoning-parser NAME on a chat-completion endpoint, or developers authoring a parser for a new thinking model. Source of truth: vllm/reasoning/ on main.

What a reasoning parser actually does

When a reasoning-trained model emits a single token stream like

<think>user asked X, let me check Y...</think>The answer is 42.

vLLM splits this into two fields on the chat-completion response: reasoning (the CoT) and content (the final answer). --reasoning-parser NAME selects the class that does the split. Without it, the whole stream lands in content.

Field-name note. On current main the field is reasoning (see ChatMessage.reasoning / DeltaMessage.reasoning in vllm/entrypoints/openai/chat_completion/protocol.py). Pre-v0.19 code and many third-party docs / clients call it reasoning_content. If a client is reading reasoning_content against a current-main server it will see null every time even when the parser ran correctly.

The parser is also the gating authority for xgrammar / structured output: by default, grammar enforcement is held off until is_reasoning_end(input_ids) flips true, so the model thinks freely before being constrained to JSON. Flip that default with --structured-outputs-config.enable_in_reasoning=true — then the grammar applies from token 0 regardless of reasoning state (useful for structured CoT).

The contract (ReasoningParser ABC)

vllm/reasoning/abs_reasoning_parsers.py. Every parser implements:

Method Called by Purpose
is_reasoning_end(input_ids) xgrammar, non-streaming serving, tool-call gate Has </think>-equivalent been emitted yet?
is_reasoning_end_streaming(input_ids, delta_ids) xgrammar per decode step Same, but cheap — checks only the delta
extract_content_ids(input_ids) -> list[int] structured output Token IDs of post-reasoning content
extract_reasoning(model_output, request) -> (reasoning, content) non-streaming chat completion Full-string split; either field may be None
extract_reasoning_streaming(previous_text, current_text, delta_text, previous_token_ids, current_token_ids, delta_token_ids) -> DeltaMessage | None streaming chat completion Per-delta split; returns DeltaMessage(reasoning=..., content=...) or None to swallow

Read the full file on GitHub · 169 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 169 lines · 113 tokens per session scan A c6a2d4eb5c75

Subscribe to this mod's changes

vllm-reasoning-parsers is a skill published in the GitHub repository air-gapped/skills (5 stars, last pushed 10d ago), licensed MIT. It adds 113 tokens to every session and 4,444 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

serving-llms-vllm

Use when deploying production LLM APIs, optimizing inference latency/throughput, or serving models with limited GPU memory. Supports OpenAI-compatible endpoints, quantization (GPTQ/AWQ/FP8), and tensor parallelism.

NousResearch/hermes-agent · 27 tokens

omni-inference

The core OpenAI-compatible inference endpoints: chat completions, embeddings, images, audio (TTS/STT), moderations, rerank, and the Responses API. The primary integration surface for AI agents.

diegosouzapw/OmniRoute · 47 tokens

gemini-api-agent-platform

Guides the usage of the Gemini API on Agent Platform with the Google Gen AI SDK for enterprise AI applications. Covers SDK usage (Python, JS/TS, Go, Java, C#), capabilities like Live API, tools, multimedia generation, caching, and batch prediction.

davila7/claude-code-templates · 61 tokens

sglang

Fast structured generation and serving for LLMs with RadixAttention prefix caching. Use for JSON/regex outputs, constrained decoding, agentic workflows with tool calls, or when you need 5× faster inference than vLLM with prefix sharing. Powers 300,000+ GPUs at xAI, AMD, NVIDIA, and LinkedIn.

davila7/claude-code-templates · 72 tokens

llm-provider

Adds a new LLM provider implementing LLMProvider interface with call() and stream() methods. Integrates with provider factory in src/llm/index.ts, config detection in src/llm/config.ts, and error handling via tracking and recovery. Use when adding a new model backend, integrating a third-party LLM API, or extending…

caliber-ai-org/ai-setup · 100 tokens

calling-llms

Use when sending chat completions through liter-llm and routing to a specific provider via the provider/model prefix. Covers the chat call shape, provider routing, modelhint, message roles, and error categories.

xberg-io/liter-llm · 49 tokens