Simon Willison releases llm 0.31.1 with a fix for a tool-call bug
Simon Willison has updated his open-source CLI tool llm to version 0.31.1. The patch fixes a bug where a tool call with empty arguments sometimes caused a JSON error with certain providers when working through the OpenAI Chat Completion API. The bug surfaced while he was testing his own plugin, llm-meta-ai.
AI-processed from Simon Willison; edited by Hamidun News
Developer Simon Willison has released version 0.31.1 of llm, his open-source command-line utility and Python library for working with large language models from the terminal.
What was fixed
The patch fixes a bug in how llm works with OpenAI Chat Completion endpoints: when a model called a tool (tool call) with empty arguments, some providers returned a JSON format error instead of a valid result. The error is tracked in issue #1521 in the project's GitHub repository.
How the bug was found
Willison found the problem while testing another of his projects, the llm-meta-ai plugin, which adds support for Meta models to llm. The tool is built as a plugin system: the base CLI can be extended with support for new providers and models without changing the core, so bugs in the core tool-calling logic affect every installed plugin at once.
The project's author is also known as the creator of Datasette, an open-source tool for publishing and exploring data, and his work on LLM tooling has long drawn attention from the developer community.
What this means
Even small CLI tools for working with LLMs increasingly depend on the reliability of tool calling, the mechanism by which a model calls external functions. JSON format errors in such chains can break entire automated pipelines, so targeted patches like this matter to developers building agents on top of third-party APIs.
- Nov 1, 2026OpenAI Rewrites GPT Behavior Rules: Five Values and a Chain of Command
- Nov 1, 2026Google admits AI Mode cuts search revenue, shares fall 15%
- Oct 31, 2026Author puts his script before an AI jury: the verdict cost 850 thousand tokens
- Oct 31, 2026Anthropic: Fold Subagents Back Into a Single Loop — One Customer's Tasks Ran Twice as Fast
Key Questions Answered
What was fixed?
The patch fixes a bug in how llm works with OpenAI Chat Completion endpoints: when a model called a tool (tool call) with empty arguments, some providers returned a JSON format error instead of a valid result. The error is tracked in issue #1521 in the project's GitHub repository.
How the bug was found?
Willison found the problem while testing another of his projects, the llm-meta-ai plugin, which adds support for Meta models to llm. The tool is built as a plugin system: the base CLI can be extended with support for new providers and models without changing the core, so bugs in the core tool-calling logic affect every installed plugin at once. The project's author is also known as the creator of Datasette, an open-source tool for publishing and exploring data, and his work on LLM tooling has long drawn attention from the developer community.
What this means?
Even small CLI tools for working with LLMs increasingly depend on the reliability of tool calling, the mechanism by which a model calls external functions. JSON format errors in such chains can break entire automated pipelines, so targeted patches like this matter to developers building agents on top of third-party APIs.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.