Skip to content

0.37

Latest

Choose a tag to compare

@simonw simonw released this 02 Nov 23:49
· 1 commit to main since this release

New features:

  • New OpenAI models: gpt-6.1-sol for GPT-6.1 Sol, gpt-6.1-terra for GPT-6.1 Terra and chat-latest for Chat Latest.
  • The default model for users who have not set their own default is now GPT-6 Luna, OpenAI's cheapest frontier model. It was previously GPT-5.6 Luna. You can switch back using llm models default gpt-5.6-luna. #1746
  • New llm openai endpoint add, list, remove and path commands for managing OpenAI-compatible models saved in extra-openai-models.yaml. See Configure an OpenAI-compatible model. #1838
  • Embedding models can now accept typed attachments, which carry a MIME type and the path or URL they came from. Plugins declare the MIME types they support using attachment_types and receive matching inputs as llm.Attachment objects. llm embed, llm embed-multi and llm similar gain -a/--attachment and --at/--attachment-type options. Collections store the MIME type in a new content_type column, exposed as Entry.content_type. See llm embed and Writing plugins to add new embedding models. #1741
  • llm chat now accepts -u/--usage to display token usage on standard error after each chat turn. Thanks, Bian Yuhan. #980, #1754
  • New chain.on_response(callback) method in the Python API, which runs a callback for each completed response in a tool chain before the chain limit is checked or that response's tool calls are executed. See Running code when a response has completed. #1768
  • Added support for Python 3.15 and dropped support for Python 3.10.
  • Removed OpenAI models that have been shut down: gpt-3.5-turbo, gpt-3.5-turbo-16k, gpt-3.5-turbo-instruct, gpt-4, gpt-4-turbo, gpt-4-turbo-2024-04-09, gpt-4.1-nano, gpt-5.2-chat-latest, o1, o1-2024-12-17, o3-mini and o4-mini, along with their aliases such as 3.5, chatgpt, 4 and 4t. #1696

Bug fixes:

  • llm chat now respects llm logs off. Previously it logged every response even when logging had been turned off. #1203
  • Response.reply() now passes before_call and after_call to the tool calls it executes automatically, and keeps them for later replies. Previously a tool rejected by before_call would still run. Thanks, 0d00ciallo0721. #1835, #1836
  • llm embed-multi --files no longer corrupts non-ASCII UTF-8 files by decoding them as latin-1, which stored and embedded "Café" as "Café". Run the same command again to repair an existing collection: only the affected files will be embedded again. Thanks, Alex. #283, #1750
  • llm prompt and llm chat now log each response in a tool chain as soon as it completes, so an error or hitting the chain limit no longer discards the earlier responses in that chain from the logs. #1768
  • Fixed SQLITE_BUSY errors when multiple processes logged responses to the same database at the same time. #1742
  • Tool chains that finish within their chain limit no longer raise a Chain limit of N exceeded error. The limit now only applies when the final allowed response requests another round of tool calls. Thanks, Bishop Kammeraad. #1757, #1766
  • Fixed AsyncChainResponse.log_to_db() raising RuntimeError inside a running event loop, for example straight after await chain.text(). Thanks, Christopher Krah. #1727, #1734
  • Fixed llm prompt --usage crashing with an AttributeError when used with --async and tools. Thanks, Ethan Stoner. #1709
  • Response.execute_tool_calls() now returns an error result for a tool with no implementation instead of raising ValueError, matching the behavior of AsyncResponse.execute_tool_calls(). Thanks, Chen Yufeiyang. #1724
  • Toolboxes exposing more than one method now run prepare() and prepare_async() once per instance, instead of once per method. Thanks, Jiachen Xie. #1761
  • Tool specs passed to -T/--tool with keyword arguments whose names start with true, false or null, such as MyTool(nullable=true), are no longer mistaken for a single positional JSON value. Thanks, Olamide Faniyan. #1704
  • llm logs -s/--short now truncates tool call arguments. #1772
  • A schema passed to a tool chain now applies to every request in that chain, including the final response. It was previously dropped after the first round of tool calls. Thanks, Chen Yufeiyang. #1222, #1825
  • Collection.embed() no longer silently skips a new ID when another item in the collection has the same content, matching the behavior of Collection.embed_multi(). Thanks, nosmile99. #1789, #1812
  • Collection.embed_multi() now raises ValueError if an embedding model returns the wrong number of embeddings for a batch, instead of silently losing rows or storing vectors against the wrong IDs. Thanks, Sharat Chandra Sai Boddu. #1722, #1726
  • llm schemas list now includes schemas used by recently logged responses. Thanks, Jiachen Xie. #1808
  • llm schemas list no longer crashes on schemas with boolean property definitions such as {"properties": {"x": true}}. Thanks, Jiachen Xie. #1748
  • AsyncConversation.prompt() now uses the tools set on the conversation, matching Conversation.prompt(). Thanks, Bishop Kammeraad. #1790, #1791
  • Calling response.log_to_db() on a synchronous response that has not yet been read now runs the response first. Previously the logged turn was missing its output and token usage. Thanks, Allen Flux. #1817