---
source: https://iinventedlight.com/library/notes/ao-tools-vllm-tool-parsers.md
title: "Serving tool calls from open models: vLLM parsers and llama.cpp templates"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (vllm-project/vllm (GitHub)); MIT (ggml-org/llama.cpp (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: vllm-project/vllm (GitHub), Tool calling (vLLM docs), Apache-2.0 (https://raw.githubusercontent.com/vllm-project/vllm/main/LICENSE); ggml-org/llama.cpp (GitHub), Function calling (llama.cpp docs), MIT (https://raw.githubusercontent.com/ggml-org/llama.cpp/master/LICENSE). Copyright (c) 2023-2026 The ggml authors."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-16
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-16
as_of: 2026-11-16
confidence: medium
untested: "Not reproduced (2026-11-16). Docs read; no API call was made for this note."
category: agent-operations
topic_area: "agent operations: tool calling"
tags: [vllm, llama-cpp, tool-call-parser, chat-template]
client: Librarian
sources:
  - id: S1
    title: "Tool calling (vLLM docs)"
    publisher: vllm-project/vllm (GitHub)
    url: https://github.com/vllm-project/vllm/blob/main/docs/features/tool_calling.md
    accessed: 2026-11-16
    license: "Apache-2.0"
  - id: S2
    title: "Function calling (llama.cpp docs)"
    publisher: ggml-org/llama.cpp (GitHub)
    url: https://github.com/ggml-org/llama.cpp/blob/master/docs/function-calling.md
    accessed: 2026-11-16
    license: "MIT"
---
# Serving tool calls from open models: vLLM parsers and llama.cpp templates
**Answer:** vLLM's quickstart starts the server with `--enable-auto-tool-choice`, `--tool-call-parser llama3_json` and a `--chat-template` from the vLLM examples directory. llama.cpp supports function calling for all models with native and generic handlers.

## vLLM

vLLM supports `auto`, `required` (as of vLLM 0.8.3) and `none` for `tool_choice`. The client is `OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")`.

## llama.cpp

Native formats are listed for Llama 3.x, Functionary, Hermes and Qwen 2.5; other templates use the generic handler. Use `--chat-template-file` to override the template when appropriate.

## See also

- [ao-tools-openai-function-calling](https://iinventedlight.com/library/notes/ao-tools-openai-function-calling/)
- [ao-tools-ollama-tool-calling](https://iinventedlight.com/library/notes/ao-tools-ollama-tool-calling/)
- [ao-tools-parallel-tool-calls](https://iinventedlight.com/library/notes/ao-tools-parallel-tool-calls/)
- [ao-tools-tool-choice-across-providers](https://iinventedlight.com/library/notes/ao-tools-tool-choice-across-providers/)

## Claims

- id: C1
  claim: vLLM uses a tool-call parser flag.
  source: S1
  evidence: "--tool-call-parser llama3_json"

- id: C2
  claim: vLLM lists required from 0.8.3.
  source: S1
  evidence: "`required` (as of `vllm>=0.8.3`)"

- id: C3
  claim: llama.cpp can override the template.
  source: S2
  evidence: "Use `--chat-template-file` to override the template when appropriate"

## Sources

- [S1] Tool calling (vLLM docs). vllm-project/vllm (GitHub). https://github.com/vllm-project/vllm/blob/main/docs/features/tool_calling.md . License: Apache-2.0. Accessed 2026-11-16.

- [S2] Function calling (llama.cpp docs). ggml-org/llama.cpp (GitHub). https://github.com/ggml-org/llama.cpp/blob/master/docs/function-calling.md . License: MIT. Accessed 2026-11-16.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: vllm-project/vllm (GitHub), Tool calling (vLLM docs), Apache-2.0 (https://raw.githubusercontent.com/vllm-project/vllm/main/LICENSE); ggml-org/llama.cpp (GitHub), Function calling (llama.cpp docs), MIT (https://raw.githubusercontent.com/ggml-org/llama.cpp/master/LICENSE). Copyright (c) 2023-2026 The ggml authors. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
