Release Notes
The following sections summarize and highlight the changes for the current release. For a complete record of changes in a release, refer to the CHANGELOG.md in the GitHub repository.
0.25.0
Version 0.25.0 expands input, output, and tool checks. It also changes Python
requirements and deprecates the LLMRails engine and Colang runtimes.
Key Features
New integrations and rails extend checks to model requests, tool calls, and languages.
- The experimental NeMo Guardrails Gateway applies input and output rails to supported OpenAI Chat Completions and Responses requests. It inspects one user text input and one assistant text output and supports both buffered and streaming responses.
- The hooks server checks tool calls before Claude Code, Codex, or NeMo Relay executes them. You can allow or block tools by name and check their arguments before execution.
- With
IORails, you can run per-tool checks on arguments and results using regular expressions, Common Expression Language (CEL) expressions, or a large language model (LLM) judge. - The
/v1/checksendpoint can run per-tool checks independently of generation. It reports which tools violated a policy intool_violations. - The Language Detector input rail can allow or block messages by language and return a localized refusal.
- The library restores input and output moderation with Zscaler AI Guard.
Breaking Changes
Existing applications can require environment, streaming, or error-handling updates.
-
Python support. Upgrade Python 3.10 environments to Python 3.11, 3.12, or 3.13 before installing this release. Refer to Installation.
-
Event-loop patching. If your application enables automatic event-loop patching, install
nemoguardrails[nest-asyncio]. In an application or notebook with a running event loop, you can useawait rails.generate_async(...). -
Streaming tool calls. Python consumers of
IORailsstreams now receive completed tool calls asToolCallChunkobjects. To update a stream consumer:- Read completed calls from
chunk.tool_calls. - Handle text chunks separately.
- Read completed calls from
-
Jailbreak detection. The model-based rail rejects messages longer than 2,048 tokens, including special tokens. If a detector is unavailable or returns an invalid result, the request stops with an internal error. To update an application that uses this rail:
- Keep each message within the token limit.
- Ensure the
tokenizerspackage is installed for input validation. - Enforce blocked results when using check-only APIs.
Refer to Jailbreak Protection.
Deprecations
The following engines, runtimes, and configuration names remain available but are deprecated.
-
The
LLMRailsengine and the Colang 1.0 and 2.x runtimes are deprecated. Removal is planned no earlier than 0.27.0. Before migrating:- Review engine coverage in Migrating to 0.25, especially for dialog flows or a Colang 2.x application.
- Use
Guardrails(config)to run supported configurations onIORails.
-
The
tool_outputandtool_inputnames remain available as deprecated aliases. To update rail configuration and generation options:- Rename
tool_outputtotool_call. - Rename
tool_inputtotool_result.
- Rename
Fixes and Enhancements
Streaming errors, injection handling, and configuration validation have the following updates.
- When the API server encounters a rail execution failure during streaming, it sends a terminal server-sent error event. Clients can distinguish a failed check from a completed response.
- Injection detection rechecks the text after removing a match and blocks the request if it cannot safely remove all matches.
- Configuration loading validates model references in global and per-tool rails.
- Configuration loading suggests supported names when it encounters an unknown configuration key.
Previous Releases
Release-specific documentation preserves the notes for earlier versions.