2026-11-26 15:47 UTC

Ubicloud reports 100% schema-valid tool calls with constrained decoding in vLLM

state: significantheat: lowuncertainty: mediumrelevance: mediumvllm tool-calling inference-servingUbicloudBurak YucesoyJesse DonkervlietJunhao Li

What is this?

Ubicloud’s October 20, 2026 post describes using vLLM’s server-side constrained-decoding flag, available in vLLM 0.31, when serving Kimi and DeepSeek models. The company reports that Kimi K2.6 on vLLM 0.28 produced schema-valid tool calls 92% of the time; after enabling constrained decoding, Ubicloud says its K2VV ToolCall benchmark reached 100% across the newer model versions it serves. Constrained decoding limits token choices so tool calls follow the supplied schema. These are Ubicloud’s reported test results, not an independent evaluation or a claim that every model and configuration will reach 100%.

Why it matters

This is a practical serving improvement, not a new model: constrained decoding makes tool-call arguments conform to a schema instead of relying on the model to generate valid structure unaided. That can prevent malformed calls, retries and wasted agent context, making multi-step workflows more reliable. The result is notable for teams serving compatible models with vLLM, but the evidence is one provider’s benchmark on selected models and does not establish universal gains or zero failures across deployments.

Current assessment

Ubicloud’s October 20, 2026 post reports that enabling vLLM’s server-side constrained-decoding flag, available in vLLM 0.31, raised schema-valid tool calls from 92% in an earlier Kimi K2.6/vLLM 0.28 test to 100% across newer Kimi and DeepSeek models it serves, using Moonshot AI’s 2,000-request K2VV ToolCall benchmark. Constrained decoding limits outputs to those allowed by a schema, potentially avoiding malformed-call errors, retries, wasted context and cost in agent workflows; it does not ensure the model selects the right tool or supplies semantically correct arguments. The accuracy and negligible-overhead claims are Ubicloud’s own, with no independent replication provided here. Compatibility and feature interactions can cause regressions, so the option is not a universal default. HN discussion has increased, but current measured activity is zero; no new implementation result or independent evidence has changed the assessment.

Measured heat

now 0 pts/hpeak 0 pts/hcomments 0/hpeers p10momentum: steady2 platformsage 914h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

10-19 13:00⭐ origin echo-reconstructedUbicloud describes using constrained decoding, available as a vLLM server-side flag in version 0.31, to achieve 100% tool-call schema accura
Burak Yucesoy; Jesse Donkervliet and Junhao Li on blog (echo) · attributed from hn.story.50242870
—
10-26 12:59first on hacker news · published · +168.0hFixing Tool-Call Accuracy in vLLM
coffeemug
—
10-26 12:59amplified on hacker news 👑hn.story.50242870
coffeemug
peak 172 · 74 comments · 100% of case engagement
10-26 13:26our radar first saw it · +168.4hdiscovery anchor: hn.story.50242870—
pace: p80 vs 879 stories at the 720h mark (now 914h old) — ahead of nvidia-alphanist-emergent-rl-assembly (1.0x), behind simulon-reality-aware-rendering (1.0x)

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnFixing Tool-Call Accuracy in vLLM
Retrieved article excerpt

Open article · Retrieved 2026-10-26T13:28:12.512699+00:00

[Ubicloud Postgres is now available on Google Cloud! Click here to sign up](https://www.ubicloud.com/sign-up-gcp?utm_source=Website)

[Star us](https://github.com/ubicloud/ubicloud)[Log in](https://console.ubicloud.com/login)[Sign up](https://console.ubicloud.com/create-account)

[Loading...](https://github.com/ubicloud/ubicloud)

All Blog Posts

All Blog Posts

[Fixing Tool-Call Accuracy in vLLM](https://www.ubicloud.com/blog/fixing-tool-call-accuracy-in-vllm)[Announcing Ubicloud Machine Images](https://www.ubicloud.com/blog/announcing-ubicloud-machine-images)[AI Safety Study for DeepSeek V4, Kimi K2.6, and Nemotron 3 Ultra](https://www.ubicloud.com/blog/ai-safety-study-for-deepseek-v4-kimi-k2-6-and-nemotron-3-ultra)[PostgreSQL and the OOM Killer: Why We Use Strict Memory Overcommit](https://www.ubicloud.com/blog/postgresql-and-the-oom-killer-why-we-use-strict-memory-overcommit)[Ubicloud Price Adjustment](https://www.ubicloud.com/blog/ubicloud-price-adjustment-2026)[ClickHouse PostgreSQL powered by Ubicloud: Fast transactions and analytics](https://www.ubicloud.com/blog/clickhouse-postgresql-powered-by-ubicloud)[Virtualizing NVIDIA HGX B200 GPUs with Open Source](https://www.ubicloud.com/blog/virtualizing-nvidia-hgx-b200-gpus-with-open-source)[Keeping Documentation Up-To-Date via Automated Screenshot Generation](https://www.ubicloud.com/blog/how-to-keep-documentation-screenshots-up-to-date-using-ruby)[End-to-End OCR with Vision Language Models](https://www.ubicloud.com/blog/end-to-end-ocr-with-vision-language-models)[Hardware Touch, Stronger SSH](https://www.ubicloud.com/blog/hardware-touch-stronger-ssh)[AI Coding: A Sober Review](https://www.ubicloud.com/blog/ai-coding-a-sober-review)[Does MHz still matter?](https://www.ubicloud.com/blog/does-mhz-still-matter)[Life of an inference request (vLLM V1): How LLMs are served efficiently at scale](https://www.ubicloud.com/blog/life-of-an-inference-request-vllm-v1)[Ubicloud Premium Runners: 2x Faster Builds, 10x Larger Cache](https://www.ubicloud.com/blog/ubicloud-premium-runners-40-faster-builds-10x-larger-cache)[PostgreSQL Performance: Local vs. Network-Attached Storage](https://www.ubicloud.com/blog/postgresql-performance-local-vs-network-attached-storage)[Ubicloud PostgreSQL: New Features, Higher Performance](https://www.ubicloud.com/blog/ubicloud-postgresql-new-features-higher-performance)[Building Burstables: cpu slicing with cgroups](https://www.ubicloud.com/blog/building-burstables-cpu-slicing-with-cgroups)[Worry-free Kubernetes, with price-performance of bare metal](https://www.ubicloud.com/blog/worry-free-kubernetes-with-price-performance-of-bare-metal)[Ubicloud's Thin CLIent approach to command line interfaces](https://www.ubicloud.com/blog/ubiclouds-thin-client-approach-to-command-line-interfaces)[Dewey.py: Rebuilding Deep Research with Open Models](https://www.ubicloud.com/blog/rebuilding-deep-research-with-open-models)[Ubicloud Burstable VMs starting at $0.01 per hour](https://www.ubicloud.com/blog/ubicloud-burstable-vms)[Debugging Hetzner: Uncovering failures with powerstat, sensors, and dmidecode](https://www.ubicloud.com/blog/debugging-hetzner-uncovering-failures-with-powerstat-sensors-and-dmidecode)[Cloud virtualization: Red Hat, AWS Firecracker, and Ubicloud internals](https://www.ubicloud.com/blog/cloud-virtualization-red-hat-aws-firecracker-and-ubicloud-internals)[OpenAI o1 vs. QwQ-32B: An Analysis](https://www.ubicloud.com/blog/openai-o1-vs-qwq-32b-advanced-reasoning-models)[Making GitHub Actions and Docker Layer Caching 4x Faster](https://www.ubicloud.com/blog/github-actions-transparent-cache)[EuroGPT: Open source and privacy conscious alternative to ChatGPT Enterprise](https://www.ubicloud.com/blog/eurogpt-open-source-and-privacy-conscious-alternative-to-chatgpt-enterprise)[Private Network Peering under 200 Lines](https://www.ubicloud.com/blog/private-network-peering-under-200-lines)[Lantern on Ubicloud: Build AI applications with PostgreSQL](https://www.ubicloud.com/blog/build-ai-apps-with-postgresql)[Elastic-Quality Full Text Search on Postgres: Fully managed ParadeDB on Ubicloud](https://www.ubicloud.com/blog/elastic-quality-full-text-search-on-postgres)[Ubicloud Load Balancer: Simple and Cost-Effective](https://www.ubicloud.com/blog/ubicloud-load-balancer-simple-and-cost-free)[13 Years of Building Infrastructure Control Planes in Ruby](https://www.ubicloud.com/blog/building-infrastructure-control-planes-in-ruby)[Difference between running Postgres for yourself and for others](https://www.ubicloud.com/blog/difference-between-running-postgres-for-yourself-and-for-others)[Ubicloud Block Storage: Encryption](https://www.ubicloud.com/blog/ubicloud-block-storage-encryption)[Announcing New Ubicloud Compute Features](https://www.ubicloud.com/blog/announcing-new-ubicloud-compute-features)[How we enabled ARM64 VMs](https://www.ubicloud.com/blog/how-we-enabled-arm64-vms)[Ubicloud Firewalls: How Linux Nftables Enables Flexible Rules](https://www.ubicloud.com/blog/ubicloud-firewalls-how-linux-nftables-enables-flexible-rules)[Improving Network Performance with Linux Flowtables](https://www.ubicloud.com/blog/improving-network-performance-with-linux-flowtables)[EU's new cloud portability requirements - What do they mean?](https://www.ubicloud.com/blog/eus-new-cloud-portability-requirements---what-do-they-mean-for-the-future)[Ubicloud hosted Arm runners, 100x better price/performance](https://www.ubicloud.com/blog/ubicloud-hosted-arm-runners-100x-better-price-performance)[Building block storage for the cloud with SPDK (non-replicated)](https://www.ubicloud.com/blog/building-block-storage-for-cloud-with-spdk-non-replicated)[Open and portable Postgres-as-a-service](https://www.ubicloud.com/blog/open-and-portable-managed-postgresql-avail-hetzner)[Learnings from Building a Simple Authorization System (ABAC)](https://www.ubicloud.com/blog/learnings-from-building-a-simple-authorization-system-abac)[vCPU, thread, core, node, socket. What do CPU terms mean these days?](https://www.ubicloud.com/blog/vcpu-thread-core-node-socket-what-do-cpu-terms-mean-these-days)[Introducing Ubicloud](https://www.ubicloud.com/blog/introducing-ubicloud)

## Fixing Tool-Call Accuracy in vLLM

October 20, 2026 · 8 min read

Burak Yucesoy

Jesse Donkervliet and Junhao Li

Senior Software Engineers

When I use an open-weight model, I see results that are nowhere close to what the quality benchmarks indicate.

Software developer working with AI models these days

Tool call accuracy is an important part of serving open-weight models. When your tool calls aren’t accurate, the model builds up on nonsensical context. This leads to low quality results, particularly for agentic workloads where multi-turn sessions are common.  
  
Sadly, many providers and widely-used inference engines [don’t fully pass tool-call accuracy tests](https://github.com/MoonshotAI/K2-Vendor-Verifier). For example, when we served Kimi K2.6 with vLLM version 0.28, we got the expected tool call schema only 92% of the time. In other words, 2 out of every 25 attempted tool calls failed.  
  
Fortunately, vLLM recently added support for *constrained decoding*, a technique to guarantee schema-adherence. This feature has then been released as a server-side flag in vLLM 0.31. By enabling it, you can get to 100% schema accuracy with the newer Kimi and DeepSeek models.  
  
In this blog post, we first describe tool call schema accuracy and why it’s important in serving agentic workloads. We then talk about constrained decoding and how it fixes the schema accuracy problem.

### Tool-call Schemas

You can enable an LLM to call an external tool in two steps: (1) inform the AI model about the existence of externally available tool calls and (2) provide the model with instructions on how to output structured tool-calls. For example, when connecting OpenCode to Kimi, OpenCode sends Kimi a JSON array describing available tools. One of the tools in this list is webfetch, which fetches Web page contents:

```
[{
  "type": "function",
  "function": {
    "name": "webfetch",
    "description": "- Fetches content from a specified URL\n- Takes a URL and optional format as input\n- Fetches the URL content, converts to requested format (markdown by default)\n- Returns the content in the specified format\n- Use this tool when you need to retrieve and analyze web content\n\nUsage notes:\n  [content redacted for brevity]\n",
    "parameters": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "The URL to fetch content from"
        },
        "format": {
          "type": "string",
          "enum": [
            "text",
            "markdown",
            "html"
          ],
          "description": "The format to return the content in (text, markdown, or html). Defaults to markdown.",
          "default": "markdown"
        },
        "timeout": {
          "type": "number",
          "description": "Optional timeout in seconds (max 120)"
        }
      },
      "required": [
        "url"
      ]
    }
  }
}, ...]
```

The inference engine then wraps this JSON description in LLM-specific tokens before passing it into the LLM, to match how the LLM was trained to recognize tool declarations. When serving Kimi, this looks something like:

```
<|im_system|>tool_declare<|im_middle|>[{"type":"function","function":{...}, ...]<|im_end|>
```

The JSON object describing the tool (or *function*, in the JSON above) includes the tool’s parameters, their types, which of the parameters are required, etc. This is known as the tool’s *schema*. For an agent harness (e.g., OpenCode) to successfully execute a tool call generated by the LLM, the call must follow the rules specified in its schema.  
  
Then, when a user asks to fetch a Web page via their agent harness, the LLM may output the following tokens:

```
I'll fetch that page. <|tool_calls_section_begin|><|tool_call_begin|>functions.webfetch:0<|tool_call_argument_begin|>{"url": "https://ubicloud.com", "format": "markdown"}<|tool_call_end|><|tool_calls_section_end|>
```

These tokens are parsed by the inference server’s parser, extracting the LLM-specific tokens and turning the call into a JSON object such as:

```
{
  "role": "assistant",
  "content": "I'll fetch that page.",
  "tool_calls": [
    {
      "id": "functions.webfetch:0",
      "type": "function",
      "function": {
        "name": "webfetch",
        "arguments": "{\"url\": \"https://example.com\", \"format\": \"markdown\"}"
      }
    }
  ]
}
```

This is then sent back to your harness (OpenCode, in our example), which runs its webfetch tool and sends its output back to the model.

### The Importance of Schema Accuracy

For a tool-call to succeed, the call must adhere to the tool’s schema.  
  
The simple approach to tool calling is to let the model generate tool calls freely and trust that the model’s training is sufficient to generate correct calls. This is similar to how we trust the model to generate syntactically correct prose.  
  
The simple approach works most of the time because modern models are good at following structured patterns. But success “most of the time” implies that many tool calls can still fail, resulting in context window pollution due to error messages, lower model performance, and increased cost due to the agent having to retry the call one or more times.  
  
To avoid such experiences when using Kimi, Moonshot AI published their K2VV ToolCall benchmark. This benchmark lets providers verify that they serve Kimi with the same quality as the original, including its default behavior of only generating valid tool calls.  
  
K2VV ToolCall’s workload consists of 2000 requests selected to evaluate when the LLM generates tool calls and whether the generated tool calls are syntactically correct (i.e., adhere to the provided schema). The benchmark all
coffeemug17274
🟧 echo.blog ⭐Ubicloud describes using constrained decoding, available as a vLLM server-side flag in version 0.31, to achieve 100% tool-call schema accuraBurak Yucesoy; Jesse Donkervliet and Junhao Li——

Interpretation history

Decision trace