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
Simon Willison releases llm 0.31.1 with a fix for a tool-call bug
Source: Simon Willison. Collage: Hamidun News.
Listen to article

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.

Story

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.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

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.

Try Nomad AI →Launch Nomad Agent
What do you think?
Loading comments…