LLM 0.33 Adds Template Chaining, Per-Call Embedding Keys, and Server Tool Logging

Simon Willison has released llm 0.33, an update to the open-source command-line tool and Python library for interacting with large language models. The release introduces template composition, stateless per-call embedding credentials, and server-side tool execution visibility in logs, alongside an upgrade to the OpenAI Python 3.x client and httpx2. Template Composition and Parameter Decoupling The primary workflow enhancement in version 0.33 is the ability to repeat the -t or --template flag

2 min
LLM 0.33 Adds Template Chaining, Per-Call Embedding Keys, and Server Tool Logging

Simon Willison has released llm 0.33, an update to the open-source command-line tool and Python library for interacting with large language models. The release introduces template composition, stateless per-call embedding credentials, and server-side tool execution visibility in logs, alongside an upgrade to the OpenAI Python 3.x client and httpx2.

Template Composition and Parameter Decoupling

The primary workflow enhancement in version 0.33 is the ability to repeat the -t or --template flag to chain multiple templates in execution order. This allows developers to decouple model configurations and inference hyperparameters from prompt content.

Previously, combining model settings such as reasoning effort with distinct prompt templates required duplicate definitions or manual flag overrides. Under the new chaining pattern, developers can define a reusable configuration template:

llm -m gpt-5.6-luna -o reasoning_effort high --save reasoning-config
llm "Generate an SVG diagram of a neural network layer" --save svg-diagram
llm -t reasoning-config -t svg-diagram

When evaluated, the CLI resolves options and system configurations sequentially, merging runtime parameters before injecting the final prompt template.

LLM 0.33 Architecture and Features

Per-Invocation Embedding Credentials

To address concurrency issues in multi-tenant or multi-key workflows, llm embed and llm embed-multi now accept an explicit --key CLI option.

In the Python API, the key= parameter has been added across core embedding methods:

  • EmbeddingModel.embed()
  • EmbeddingModel.embed_multi()
  • Collection.embed()
  • Collection.embed_multi()

Passing credentials directly to invocation methods routes the resolved key to underlying embedding plugins without mutating shared model instance state. Plugins relying on the legacy self.key property continue to function via a backwards-compatibility fallback.

Server-Side Tool Execution and Reasoning Stream Preservation

For models supporting server-side tool execution, llm logs now displays tool outputs in a dedicated Tool results section within the recorded response. In structured output modes (--json and --short), these entries include a server_executed boolean flag to differentiate server-run operations from local tool calls.

The release also refines handling of reasoning model streams. Provider stream chunks that carry metadata without text tokens are now stored as ReasoningPart objects. This preserves opaque cryptographic signatures and redacted reasoning blocks from providers such as Anthropic during round-trip serialization.

Additionally, models accessed through OpenAI-compatible Responses API endpoints gain support for a reasoning_summary configuration parameter with auto, concise, and detailed settings.

Validation and Schema Error Handling

Version 0.33 adds stricter pre-flight validation across conversation and structured output pipelines:

  • Attachment validation: Conversation prompts now verify that attached assets (such as images or documents) are supported by the selected model architecture before dispatching requests across both synchronous and asynchronous execution paths.
  • Schema DSL errors: The schema_dsl() parser now raises explicit ValueError exceptions when encountering duplicate field identifiers or unrecognized data types, replacing prior behavior that silently coerced invalid types to strings.
  • Collection defaults: llm embed-multi automatically reuses an existing collection's configured embedding model when no default model is globally specified.

Sources

Written by

More to read

  • Distributed RLHF Frameworks in Production: Comparing OpenRLHF, verl, and TRL Architecture, Ray Resource Scheduling, and Rollout-Training Co-Location

    Post-training alignment has shifted from offline preference tuning to large-scale, online reinforcement learning. Modern post-training loops for reasoning models, agentic workflows, and conversational alignment require coordinating multiple distinct neural network roles simultaneously. Under standard Proximal Policy Optimization (PPO), an RL infrastructure pipeline must manage up to four distinct model instances: the Actor (the active policy undergoing gradient updates), the Critic (the value mo

    1 min
  • Forward KL vs. Reverse KL Divergence: Mode Covering, Mode Seeking, and the Alignment Dynamics of Large Language Models

    Forward KL vs. Reverse KL Divergence: Mode Covering, Mode Seeking, and the Alignment Dynamics of Large Language Models Every phase of modern large language model development, from multi-trillion token pre-training to reinforcement learning from human feedback (RLHF) and student model distillation, fundamentally revolves around minimizing statistical distance between probability distributions. The primary mathematical tool utilized for this purpose is the Kullback-Leibler (KL) divergence, introd

    1 min
  • Embedding Model Fine-Tuning in Production: Hard Negative Mining, Synthetic Data Pipelines, and Contrastive Distillation

    Production retrieval-augmented generation (RAG) and semantic search architectures frequently suffer from domain mismatch when relying on general-purpose embedding models. Off-the-shelf bi-encoders trained on broad web corpora often experience a 15% to 30% degradation in retrieval metrics such as NDCG@10 and MRR@10 when deployed on specialized enterprise corpora, including proprietary codebases, internal API schemas, clinical trials, and technical documentation. While downstream cross-encoder re

    1 min