How Ubicloud Used vLLM Constrained Decoding to Raise Tool Calling Accuracy from 92% to 100%
When Ubicloud deployed Kimi K2.6 on vLLM 0.28, tool calling schema accuracy was only 92%, meaning 2 out of every 25 calls failed. vLLM 0.31 turned constrained decoding into a server-side switch, using XGrammar's structured tags to mask illegal tokens during generation; after Ubicloud enabled it, accuracy on the K2VV ToolCall benchmark rose to 100%, and it has been deployed to production. The article also explains why vLLM disables this feature by default, including some models' outputs deviating from the schema, grammar conversion bugs, and interaction issues with speculative decoding.
Why read this
AI score 52
The article uses measured data from the K2VV ToolCall benchmark to explain how inference engine settings affect tool calling accuracy, and provides a reusable troubleshooting path.