ALL INTELLIGENCE
Simon Willison 博客T2·Tools

LLM 0.37.3 Ships Fix for SQLite 3.54.1 Compatibility Break

Original title: llm 0.37.3
38AI Score

Simon Willison's LLM CLI tool released version 0.37.3, mainly fixing a breakage in its logging code caused by SQLite 3.54.1 shipped in the latest Homebrew package. The root cause is SQLite's corrected behavior where a subquery returns SQL text rather than a JSON value; the fix wraps the subquery in json().

Full Report

A bug fix release for LLM, mainly to cover a problem with the most recent Homebrew package of the software.

Homebrew now ships the latest SQLite, 3.54.1, which includes a fix that broke LLM's logging code.

Short version: in SQLite 3.54.0 the following SQL:

SQL
select json_object('a', (select json_array(1)))

Returns this:

JSON
{"a":[1]}

But in 3.54.1 the same query returns this:

JSON
{"a":"[1]"}

According to D. Richard Hipp:

That was a bug fix. Per the documentation, (SELECT json_array(...)) returns SQL text, not JSON. Hence the 3.54.1 behavior is correct and 3.54.0 was a bug.

The workaround looks like this:

SQL
select json_object('a', json((select json_array(1))))