llm 0.37.3 发布,修复 Homebrew 新版 SQLite 3.54.1 引发的日志问题
llm 0.37.3
如果你用 Homebrew 装 LLM 工具,日志可能悄悄坏了,升级到 0.37.3 就能解决。背后是 SQLite 3.54.1 改了 json_object 的返回行为,作者还附了 workaround 写法。任何在自己项目里用 SQLite JSON 函数的人都值得看一眼这个坑。
Simon Willison 发布了 LLM 命令行工具的 0.37.
3 版本,主要修复 Homebrew 安装包带来的日志代码报错。问题根源在于 Homebrew 现在捆绑的 SQLite 3.
54.1 改变了 json_object 的行为:在 3.
54.0 中,select json_object('a', (select json_array(1))) 返回 {"a":[1]},而 3.
54.1 返回 {"a":"[1]"},子查询结果从 JSON 变成了字符串,导致 LLM 的日志写入失效。
SQLite 作者 D.Richard Hipp 确认这不是回归,而是修正——按文档约定,(SELECT json_array(.
..
)) 返回的是 SQL 文本而非 JSON,3.54.
0 的行为才是 bug。官方推荐的写法是在子查询外包裹 json() 函数:select json_object('a', json((select json_array(1))))。
对通过 Homebrew 使用 LLM 的开发者来说,升级到 0.37.
3 即可恢复正常,这也提醒依赖 SQLite JSON 函数的项目在升级 SQLite 版本时需要留意行为变化。
llm 0.37.3
Release: llm 0.37.3 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: select json_object('a', (select json_array(1))) Returns this: {"a":[1]} But in 3.54.1 the same query returns this: {"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: select json_object('a', json((select json_array(1)))) Tags: llm , webassembly , sqlite , generative-ai , ai , llms , d-richard-hipp
本条情报归属 AITOP「产品」核心栏目,重点聚焦北美前沿实验室与硅谷科技巨头。在跨区域产业观察坐标中,该动态直接关联「AI 开发者工具链、Coding Agent 与工程化实践」「中美大模型技术代差与商业化对照」研究主线,反映出当前技术演进与商业落地的最新风向。涉及核心实体与技术议题包括:LLM、SQLite、Homebrew、Simon Willison,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。
信源核验说明:本文原始线索采编自「Simon Willison’s Weblog」,经 AITOP 多维评分管线结构化提炼。