AIToday

LLM 0.32a0 alpha refactors Python library to handle diverse input and output types via messages and typed streaming parts

Simon Willison's WeblogApr 29, 20262 min read
LLM 0.32a0 alpha refactors Python library to handle diverse input and output types via messages and typed streaming parts

Summaries like this, in your inbox every morning.

Sign up free →

3 Key Points

  1. Simon Willison released LLM 0.32a0 on 29th April 2026, an alpha version of his LLM Python library and CLI tool. The release introduces two key changes: model inputs can now be represented as a sequence of messages (matching the conversational turn format used by major vendor APIs), and model responses can be composed of a stream of differently typed parts rather than plain text.

  2. Previously, LLM modeled prompts and responses as simple text-in/text-out. The new interface supports feeding in previous conversations at the start using `model.prompt(messages=[user(...), assistant(...), ...])`, and responses can now stream mixed content types—reasoning output, text, JSON tool calls, tool outputs, and other formats—allowing the library to represent capabilities like OpenAI's code interpreter or Anthropic's web search.

  3. The CLI tool can now display "thinking" text in a different color from final response text, with thinking text sent to stderr so it does not affect piped results. The prior `prompt=` option still works but is upgraded to a single-item messages array behind the scenes.

Discussion

No comments yet. Be the first to share your thoughts!

Log in to join the discussion

Related Articles

Stay ahead with AI news

Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.

Get Started Free

Free · takes 30 seconds · unsubscribe anytime

1 minute a day. The AI essentials.

200+ sources · Email / LINE / Slack

Get it free →