LLM 0.32a0 Backward-Compatible Refactoring
Key point
LLM 0.32a0 has been released with a message- and stream-based redesign that maintains compatibility.
Details
LLM 0.32a0 abandons the previous prompt -> text-centered design and instead treats input as an array of messages and output as a stream of parts with different types. prompt= is still supported but is internally converted into a single message, and the new llm.user() and llm.assistant() builders let you insert conversation history from the start. After a response, you can also continue the conversation with response.reply().
This change more naturally supports APIs like OpenAI chat completions, which require passing the entire previous conversation. The existing conversation() approach was suited to building up a conversation from scratch, but had limitations when injecting conversation history brought in from elsewhere or using storage not tied to SQLite.
Streaming has also been redesigned to fit the new model. Now response.stream_events() and response.astream_events() emit separate events such as text, tool_call_name, and tool_call_args, allowing reasoning text to be distinguished from the final output. Thanks to this, the CLI can display thinking content in a different color and separate it into stderr, and reasoning tokens can be hidden with -R/--no-reasoning.
Key changes:
- Support for multimodal/tool calls: handles not just text but also output types such as tool calls, reasoning, and images/audio within a single stream
- Added serialization API:
response.to_dict()andResponse.from_dict()let you save and restore responses - Log structure reconsidered: plans to redesign SQLite logging into a graph structure so that repeated and extended conversations can be stored without duplication
The author stated that this version was released as an alpha first to verify plugin compatibility, and that the stable 0.32 release will likely follow in nearly the same form. The remaining major challenge is a logging design that reflects the more granular response structure, which may carry over into 0.32 or 0.33.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.