2.3.0
BoxLang AI Module v2.3.0 Release Notes - Pipeline System Variables, Enhanced Transformers, and Tool Calling Improvements
This release enhances pipeline composition with automatic variable injection, improves transformer flexibility, and strengthens tool calling reliability with better error handling and streaming support.
π New Features
Pipeline _input System Variable
Automatic injection of previous stage output into message templates, enabling clean multi-stage AI pipelines without manual transformation steps.
Auto-Inject Previous Output:
// Previous stage output automatically available as ${_input}
var pipeline = aiModel( provider: "openai" )
.transform( response => ({ summary: response, wordCount: len( response ) }) )
.to( aiModel( provider: "openai", input: "Translate this summary: ${_input_summary}" ) )
var result = pipeline.run( "Explain quantum computing in 50 words" )
// First model generates summary
// Struct output flattened: { summary: "...", wordCount: 50 }
// Second model receives: "Translate this summary: [actual summary text]"Key Features:
Simple string outputs: Access via
${_input}Struct outputs: Individual fields flattened as
${_input_fieldName}Eliminates manual transformation boilerplate
Enables declarative pipeline composition
Enhanced Transformer Support
The aiTransform() BIF now processes instances of AiTransformRunnable and BaseTransformer classes directly, allowing for more flexible and reusable transformation logic.
Reusable Transformer Instances:
π§ Enhancements
Stricter Tool Calling
Enhanced defensive coding for tool execution prevents errors when tools are called with invalid arguments or when tool execution fails. Includes:
Argument validation before tool invocation
Graceful error handling with detailed error messages
Prevention of chain-breaking failures during multi-tool execution
π Bug Fixes
Tool Calling with Streaming - Fixed context issue where tools executed during streaming didn't have access to the request object. Tools now receive proper request context during streaming execution, enabling seamless tool calling in real-time conversations.
Agent Streaming Tool Context - Corrected
Agent.stream()to pass the correct request object to tools during streaming execution, fixing scoping issues that prevented tools from accessing request-level data.BaseMemory
getRecent()Limit - Fixed bug where thelimitparameter was ignored, causing all messages to be returned instead of the requested number. Now properly respects the limit for retrieving recent messages.SummaryMemory Trimming Logic - Resolved infinite recursion issue when summary threshold was exceeded. Previously, messages weren't trimmed before summarization, causing recursive summarization attempts. Now properly:
Trims messages until under threshold
Generates summary
Adds summary message back to conversation
Prevents infinite recursion
BaseTransformer Constructor - Added missing internal constructor initialization, fixing instantiation issues when creating custom transformer classes.
BaseTransformer Default Config - Fixed missing default value for
configproperty across allBaseTransformerclasses, preventing null reference errors during transformer initialization.aiTransform() BIF Validation - Fixed invalid
throw()call when non-string or non-closure arguments were passed. Now properly validates input types and provides clear error messages.
π Upgrade Notes
This release is backward compatible. Pipeline _input variables are available immediately for new pipelines. Tool calling improvements are automatic, with all streaming and context bugs resolved. No breaking changes.
Recommended Actions:
Simplify existing pipelines using
${_input}variable injectionReplace manual transformation closures with declarative templates
Test tool execution in streaming contexts to verify improved reliability
π Thank You
Thank you to all contributors and users who reported issues and helped improve BoxLang AI's reliability and composability!
Last updated