- Major version: Significant and breaking changes (e.g. v1.X to v2.X)
- Minor version: New features or improvements (e.g. v1.0 to v1.1)
- Patch version: Bug fixes or minor improvements (e.g. v1.0.0 to v1.0.1)
Migrating from v2.x to v3.x
Python 3.9 Support Dropped
As we move forward with Rigging and other libraries, we’ve settled on Python 3.10 as the minimum supported version. This allows us to leverage new language features and optimizations that are otherwise difficult to support in older versions.Action RequiredEnsure your environment uses Python 3.10 or later. Update your
pyproject.toml or requirements.txt if necessary.Chat Pipeline Refactor (ChatPipeline)
The internal mechanics of ChatPipeline have been substantially rewritten to allow for better control over iterative generation within then(), map(), and associated parsing and tool invocation. Previously it was difficult to control the process of multiple pipelines being executed within each other and callbacks. We’ve standardized the interface to use PipelineStep objects and a context manager to yield moments of control back to the user and wrapping libraries (.step()). For the most part, users don’t need to worry about this interface directly, but it does have some downstream effects on the pipeline flow.
Moving from until() to then()
The until() mechanism inside pipelines and its parameters (attempt_recovery, drop_dialog, max_rounds) have been removed. In the early days of Rigging we used this interface to support iterative parsing, but it’s been largely replaced by the new then() and map() callbacks since v2. We’re committed to using this new structure and avoid internal complexities like calling a generator multiple times within a single pipeline step.
Action RequiredLogic previously implemented with
until() needs to be refactored.- For simple validation/recovery based on parsing, the updated
until_parsed_as()(see below) might suffice. - For more complex iterative loops, use the
then()ormap()callbacks. These callbacks can now return or yieldPipelineStepContextManagerorPipelineStepGeneratorobjects, allowing you to recursively call the pipeline or trigger further generation steps. - The new
step()async context manager provides fine-grained control for advanced custom iteration patterns.
.until_parsed_as() method still exists, but its internal implementation and parameters have changed as a function of migrating from until() to then().
- The
max_roundsparameter is deprecated. Use the newmax_depthparameter, which controls the maximum depth of recursive parsing attempts (defaulting toDEFAULT_MAX_DEPTH). - The
attempt_recoveryanddrop_dialogparameters are deprecated and have no effect. Recovery is now implicit within themax_depthlimit, and the full dialog history is
Action RequiredUpdate calls to
.until_parsed_as():- Replace
max_rounds=Nwithmax_depth=N. - Remove
attempt_recoveryanddrop_dialogarguments.
Error Handling
MessagesExhaustedMaxRoundsErroris replaced byMaxDepthError. This error is now raised when the recursive depth limit (set viamax_depthinthen,map, oruntil_parsed_as) is exceeded.- The
errors_to_fail_onparameter in the.catch()method is renamed toerrors_to_catch.
Action Required
- Update any
try...exceptblocks catchingMessagesExhaustedMaxRoundsErrorto catchMaxDepthError. - Rename
errors_to_fail_ontoerrors_to_catchin calls to.catch(). Review the default caught errors if relying on implicit behavior.
Unified Tool System (rigging.tool)
We worked hard in v3 to bring together some of the early tool systems and unify them under a single interface with clean support for Robopages and MCP. The previous ApiTool and native Tool classes have been merged into a single, more flexible system. This change simplifies the way tools are defined, used, and integrated into pipelines. Beyond that, the new system allows for the same tools to be used by models using various calling conventions - regardless of whether they underlying provider supports JSON tool calling or not.
ApiTooland the previous nativeToolclass are removed. Just build functions or methods inside classes, decorate them, and use them as tools anywhere.- The primary way to define tools is now via the
@tooland@tool_methoddecorators applied to functions and class methods, respectively. - The
ChatPipeline.using()method signature has changed significantly:- It now accepts
Toolinstances or callables directly:using(*tools: Tool | Callable) - It uses a
mode: ToolModeparameter (auto,api,xml,json-in-xml) to control calling convention. - It uses
max_depth: intto limit recursive tool calls. - Parameters like
force,attempt_recovery,drop_dialog,max_roundsare removed.
- It now accepts
- The
rigging.integrationsmodule is removed. Userigging.tools.robopagesand the newrigging.tools.mcpto use those integrations as tools.
Action Required
- Redefine Tools: Convert all tool definitions to use the
@toolor@tool_methoddecorators instead of inheriting fromToolin your class. - Update
using()Calls: Modify calls to.using()to passToolinstances/callables directly and use the new parameters (mode,max_depth, etc.). - Update Imports: Change imports for integrations like Robopages and MCP.
Message Content Model (rigging.message)
Handling of message content, especially multi-modal content, has been standardized.
Message.all_contentis deprecated. UseMessage.content_parts(alist[Content]) to access the full list of text, image, and audio parts.Message.contentproperty now only gets/sets the concatenated text fromContentTextparts. Use it for simple text manipulation.- New
ContentAudioInputtype for audio messages. - Message serialization (e.g.,
to_openai_spec()) is updated for thecontent_partsstructure.
Action Required
- Replace
message.all_contentwithmessage.content_partswhen dealing with multi-modal data. - Use
message.contentonly when working solely with the text components. - Verify any custom serialization or direct API interactions involving message content.
Other Changes & Notes
ChatPipeline.addDefault: Themerge_strategydefault changed tonone. Messages of the same role are not merged automatically anymore. Usemerge_strategy="alloronly-user-roleexplicitly if merging is desired.- Caching: New
ChatPipeline.cache()method provides basic control over prompt caching hints. - Dependencies: Check for updated versions of core dependencies (
litellm,openai, etc.) and new additions (mcp,httpx-sse).
Migrating from v1.x to v2.x
Rigging is now exclusivley async
Maintaining dual interface support was complex and error-prone, and we always tried to implement the more performant code in the async interface. Ideally we could have maintained synchronous “gates” which managed asyncio loops for the user, but this is has caveats in notebook/jupyter environments. Ultimately we’ve decided to migrate exclusively to async to simplify the codebase and improve performance.- There are no longer any
a-prefixed functions. Functions likerun() andgenerate_messages()` are now coroutines that need to be awaited. map()andthen()callbacks are now expected to be coroutines.
await can be used directly in Jupyter nodebooks by default. Wrapping any entrypoint with asyncio.run(...) is a simple way to manage an event loop. If you’re in a more unique scenario, check out the greenbackto allow stepping in/out of async code in a larger system.
We also provide a helper rg.await_ function which can be used in place of standard await in synchronous code.Underneath rigging will manage an event loop for you in a separate thread and pass coroutines into it for resolution.
- You can pass a single coroutine or a positional list of coroutines to
await_. This will manage an event loop for you in a separate thread and resolve the coroutines.
”Pending” -> “Pipeline”
Language around chat pipelines and completions was confusing, and didn’t accurately communicate the power of the pipeline system. We’verenamedPendingChat to ChatPipeline and PendingCompletion to CompletionPipeline.
This shouldn’t affect most users unless you were manually accessing these classes. You’ll see us replace the frequently use of pending variables with pipeline in our code.
on_failed replaces skip_failed/include_failed
Pipelines now provide better clarity for catching errors and translating them into failed outputs. We’ve replaced the skip_failed and include_failed arguments for a general string literal on_failed mapped to FailMode.
This should help us clarity behaviors and expand them in the future without causing argument bloat.
