Zero Labs
Industry News / AI

Local LLM Tool Calling Depends on Your Runtime’s Parser

Source · Towards AI By Decoding AI by Nueravi

From the publisher’s feed, collected in the ZeroLabs newsroom.

Local Agent Lab · part 1 of 3. We read four local runtimes’ source: 41 model families get a dedicated tool-call parser somewhere, and only 8 get one in all four.Whether local LLM tool calling works depends on code you rarely see: the parser that turns a model’s raw text back into a structured tool call. On 6 October 2026 we read the source of the four runtimes most people use to serve models locally: Ollama, llama.cpp, vLLM and SGLang. 41 model families get a dedicated tool-call parser in at least one of them. Only 8 get one in all four. Llama has one in two runtimes, Phi in one. The docs also lag the code: 18 of vLLM’s 53 parsers appear nowhere in its documentation.Local Agent Lab is a new three-part series on running agents on your own machine. Part 1 reads the parsers.Every named tool-call parser in four local runtimes, mapped to a model family. Main branches, 6 Oct 2026.Key takeawaysThe four runtimes ship 136 named tool-call parsers between them: vLLM 53, SGLang 42, Ollama 25 and llama.cpp 16.41 model families have a dedicated parser in at least one runtime. 8 have one in all four: Qwen, DeepSeek, Gemma, Mistral, GPT-OSS, Cohere Command, LFM2 and Muse Glimmer.Of the seven families we picked before counting, Llama and Phi are the gaps. Llama has a dedicated parser only in vLLM and SGLang, and Phi only in vLLM.vLLM documents 29 of its 53 parsers on its tool-calling page. 18, including phi4_mini_json and kimi_k3, appear nowhere in its docs.llama.cpp’s docs name 15 “native” formats; 3 still have a dedicated handler. The other 12 use a parser built from the template.TL;DRWhich local LLM runtimes support tool calling for my model? All four do, but each needs a parser for your model’s output format. vLLM makes you name it, SGLang lets you name it or guess, Ollama takes it from the model’s config, and llama.cpp matches the chat template. Qwen, DeepSeek, Gemma, Mistral and GPT-OSS have a dedicated parser in all four. Llama and Phi do not.Status, 6 October 2026, 12:45 UTC: main branches of Ollama (8a971df), llama.cpp (4f54067), vLLM (3e18218) and SGLang (1291f31). Parsers are added most weeks, so your installed release may have fewer. To re-check vLLM, run grep -c '^ "' vllm/tool_parsers/__init__.py in its source tree.Place your bet before you scroll: of seven popular families (Qwen, Llama, Gemma, Mistral, DeepSeek, Phi, GPT-OSS), how many have a dedicated tool-call parser in all four runtimes? Three, five, or all seven?Why does the runtime decide whether tool calls work?Because the model only writes text, and the runtime has to recognise that text as a call. Each family wraps calls in its own format: a block, a [TOOL_CALLS] marker, Harmony channels. The runtime's parser cuts that text into a function name and JSON arguments. If the parser is wrong or missing, the call usually arrives as plain text, and your agent sees a model that talked about a tool without using it.How does each runtime pick a parser?Two runtimes ask you to choose and two choose for you, which changes what can go wrong.vLLM: you name it with --tool-call-parser. Its command-line code refuses --enable-auto-tool-choice without one.SGLang: you name it, or pass auto. Auto reads the chat template and has detection rules for 28 of its 42 parsers. Llama 3 is not among them.Ollama: the model’s own config names a parser. If it names none, Ollama falls back to a generic parser that takes the tool-call tag from the model’s template.llama.cpp: it compares the chat template with 16 dedicated handlers. If none matches, it builds a parser from the template automatically.On vLLM, choosing is your job. On Ollama and llama.cpp, a model without a dedicated parser still gets a generic path, just not one written for its family.Which model families get a parser everywhere?Five of our seven did, and the two most familiar names did not. We picked these seven families before counting. Here is which runtimes ship a parser written for each one:Qwen: all fourDeepSeek: all fourGemma: all fourMistral: all fourGPT-OSS: all four (Ollama detects its Harmony format from the template)Llama: vLLM and SGLang onlyPhi: vLLM only (phi4_mini_json)If you bet five, you won.The seven families we picked before counting. Llama and Phi are the gaps.Across all 41 families, 8 are covered everywhere, 7 in three runtimes, 10 in two and 16 in one, including Granite, Nemotron and Jamba. Llama 3.x still works in llama.cpp: its chat tests run three Llama 3 templates through the template-derived parser.Do the docs match the code?Not closely. The code is ahead of the pages that tell you what to type.vLLM: its tool-calling page names 29 of the 53 registered parsers. Six more appear elsewhere in the docs. 18 appear nowhere, including phi4_mini_json, kimi_k3, minimax_m3 and llama4_json.SGLang: its tool-parser page names 14 of 42. Its server-arguments reference lists 41, so the names are there if you know where to look.llama.cpp: its function-calling page lists 15 formats with native handlers, including Llama 3.1, Hermes and Qwen 2.5. Today 3 of the 15 have a dedicated handler (Functionary v3.2, GPT-OSS, LLM-jp). The rest go through the template-derived parser, and 13 of the 16 handlers are for formats the page does not list. Its Chat format: Generic log line no longer exists in the source.Ollama: its tool-calling page lists no parsers. They are set per model.None of this means features are broken. It means the reliable list is the source tree.What wire format does your model use?Find your model’s format, then you know which parser to ask for. Post your FORMAT line in the comments, with your runtime and whether calls came back structured or as text.Save it as toolfmt.py and run python3 toolfmt.py tokenizer_config.json (or a .jinja template). Plain Python, nothing to install.import json, syssrc = open(sys.argv[1], encoding="utf-8").read()if sys.argv[1].endswith(".json"): # a Hugging Face tokenizer_config.json t = json.loads(src).get("chat_template", "") src = t if isinstance(t, str) else "\n".join(x.get("template", "") for x in t)checks = [ # markers in the chat template -> the tool-call wire format the model is trained to emit ([""], "Harmony (GPT-OSS style)"), (["call:"], "Gemma 4"), (["tool▁calls▁begin"], "DeepSeek"), (["DSML"], "DeepSeek DSML"), ([""], "Kimi K2"), (["[TOOL_CALLS]"], "Mistral [TOOL_CALLS]"), ([" (["Environment: ipython"], "Llama 3.x JSON"), ([""], " wrapper (Hermes, Qwen, GLM, Granite and others)"),]fmt = next((f for marks, f in checks if all(m in src for m in marks)), "none of the 9 known here")print(f"FORMAT {fmt}")We ran it on all 71 chat templates in llama.cpp’s repo and checked the output by hand. Meta’s Llama 3.1 template prints FORMAT Llama 3.x JSON. The most common answer, 19 of 71, was the generic wrapper, where the family name matters most: GLM, Granite and Qwen put different things inside the same tag.How did we measure this?We read the code that registers each parser and the code that selects one, not the README. On 6 October 2026:Sources: shallow clones of each project’s main branch at the commits in the status lineRegistries: vLLM’s lazy parser table, SGLang’s parser-name list, Ollama’s parser switch and llama.cpp’s specialised-template dispatch. Ollama’s switch has 27 names, and two of them (passthrough, olmo3-think) report no tool support, so we count 25Families: each name mapped to a family by hand, generic formats (Hermes, pythonic, JSON) left out, unclear names checked in model docsDocs: a name counts only as a parser argument or in code formatting, not as a word in a sentenceThe census output. Counting scripts are kept with the draft.We dropped one measurement: a count of tested parsers matched by class name, and a hand check found false “untested” results.What this does not showWhether tool calls succeed. We read code. We did not run models, so a dedicated parser is not proof of good tool calling, and a generic one is not proof of bad.Every generation of a family. A family counts if a runtime has a parser for any member. Ollama’s Mistral parser targets Ministral 3, and llama.cpp’s DeepSeek handler targets the V3.2 format.Releases. We read main branches. A release from last month may have fewer parsers.Other runtimes. LM Studio and LocalAI were not in the sample.FAQDoes Ollama support tool calling for every model? For models whose template describes tools. It uses the parser the model’s config names, or else a generic parser that reads the tool-call tag from the template.Which vLLM tool-call parser should I use? The one for your model family, via --tool-call-parser. 18 of the 53 are undocumented, so check vllm/tool_parsers/__init__.py for new models.Does llama.cpp support tool calling? Yes. Its docs say to start llama-server with --jinja. It has 16 handlers for specific templates and builds a parser from the template for everything else, including Llama 3.x.Why does my local model print the tool call as text? Usually the runtime did not recognise the model’s tool-call format. Check that the parser or chat template matches the model family.Which FORMAT did your model print, and did your runtime turn it into a real tool call?Tomorrow, part 2 asks what one tool list costs in each model’s chat template. Follow Decoding AI to get it.What we measure nextThree more posts are coming. We have not run any of them yet, so we do not know the answers:Tomorrow, Local Agent Lab part 2: the same ten tools, rendered through each model family’s chat template. How many tokens does each format spend before the model answers?Then part 3: each runtime’s default context window, and how long an agent runs before it hits one.Then the day-21 re-probe on 13 October: GPT-6 Sol support across AI frameworks, three weeks after launch.Every family in today’s count emits its tool calls in some format. Tomorrow we find out how much of your context window that format costs before your agent does anything.NEXT → Local agents · one tool list · tokens per template · tomorrowNext: Local Agent Lab part 2.If this saved you an afternoon of tool calls coming back as text, clap so more developers see it, tell us in the comments which FORMAT your model printed, and follow Decoding AI. Then hit subscribe so tomorrow’s part lands in your inbox.Sources & ReferencesDecoding AI, We Timed 50 Model-Support Commits Across 3 Local LLM Runtimes, our earlier measurement of how fast local runtimes ship model support.Decoding AI, Why Your Claude Code Token Usage Is So High, the guide to The Context Tax series.vLLM documentation, Tool Calling, read 6 October 2026.SGLang documentation, Tool Parser and its server-arguments reference, read 6 October 2026.llama.cpp, function-calling.md and common/chat.cpp at commit 4f54067.Ollama, Tool calling and model/parsers/parsers.go at commit 8a971df.Counting scripts and outputs are kept with this post’s draft.Local LLM Tool Calling Depends on Your Runtime’s Parser was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.