NeMo Guardrails 0.21 to 0.22 upgrade: LangChain becomes optional

Teams moving from NeMo Guardrails 0.21 to 0.22 need to classify every model entry before they upgrade. This page covers the engine and provider changes, the LangChain opt-in, custom LLMModel providers, and the preparation, sequence, testing and rollback steps.

On this page

How to plan a NeMo Guardrails 0.21 to 0.22 upgrade

If your application runs NeMo Guardrails 0.21 with model entries that point at LangChain providers or OpenAI-compatible endpoints, this upgrade is a model-configuration and dependency change to plan for, not a rewrite. The work centers on how each model entry is declared, whether LangChain is installed and enabled, and whether any custom provider code still matches the interface the new release expects. Start by inventorying every model entry in your config.yml files and every custom LLM class your code loads, because those are the items that change.

The current NeMo Guardrails release is 0.25.0, published on 19 November 2026, and the previous release is 0.24.1, published on 16 September 2026. Because 0.22 sits in the middle of that range, teams on 0.21 should move through each intermediate version in order, reading the release notes and migration guides for every step rather than jumping straight to the latest release. The exact 0.22 steps must be confirmed against the 0.22 release notes on the NVIDIA-NeMo/Guardrails releases page before you change anything, since this plan describes the categories of change rather than the full list of 0.22 breaking changes.

Before you upgrade, run your existing test suite and a set of representative guardrail requests against 0.21 and record the outputs, so that any difference after the move can be traced to a specific model entry or provider. Confirm that your target Python interpreter is on the supported list for the release you choose, and pin the version in a test environment first. Assign one owner for model configuration and one for custom provider code, and agree on a rollback point (the 0.21 package pin and configuration snapshot) before the change window opens.

Which NeMo Guardrails 0.22 changes affect your configuration

This table lists each change in the 0.21 to 0.22 window and shows where it affects config.yml, Python code and deployments. Read each row against your own model entries and custom providers, and confirm each item in the 0.22 release notes before you treat it as breaking. The main takeaway is that any application relying on LangChain-backed providers must now opt in explicitly.

ChangeImpact on configuration, code and deploymentsAction needed
LangChain no longer loaded by defaultApplications that used LangChain-backed providers without setting anything may fail to initialize their models.Set NEMOGUARDRAILS_LLM_FRAMEWORK=langchain wherever the application runs, then test each model entry.
Opt-in environment variable in deploymentsContainer images, Kubernetes manifests and CI jobs may not pass the variable, so behavior differs between environments.Add the variable to every environment definition and confirm it reaches the server process.
vLLM and OpenAI-compatible providers move to engine: openaiExisting model entries for vLLM and other compatible endpoints may no longer resolve under their old engine name in config.yml.Rewrite these entries to engine: openai and confirm the exact keys in the 0.22 documentation.
Anthropic, Vertex AI and Cohere entriesEach provider may need either a native engine or the LangChain opt-in, so one setting does not fit all three.Check each provider's 0.22 entry in the migration documentation and decide per provider whether to opt in.
Custom providers under the LLMModel protocolCustom classes written for earlier releases may not match the protocol methods or signatures expected in 0.22.Compare each custom class with the LLMModel protocol and run its unit tests against 0.22.
Dependency changesOptional packages, extras or transitive versions may differ, so a fresh install can break imports that worked before.Rebuild the environment from a lockfile, confirm required extras, and check the release notes for package changes.
Model entry classificationEntries fall into three groups: unchanged, rewritten to engine: openai, or dependent on the LangChain opt-in.Inventory every model entry across configurations and tag each one before changing any file.
Version pins in lockfiles and imagesPins to 0.21 keep the old behavior, and an unpinned upgrade may pull in 0.22 without the required changes.Pin the target version explicitly and update image tags and lockfiles together.

Every model entry lands in one of four upgrade outcomes before any file changes

The diagram starts at a model entry in config.yml and asks which provider it names. vLLM and other OpenAI-compatible endpoints move to the openai engine, which is a rewrite of the entry. Anthropic, Vertex AI and Cohere need a decision about whether to opt into LangChain, and custom providers need a check against the LLMModel protocol. Confirm each end state against the 0.22 configuration reference before editing, since the diagram is a planning aid and not a substitute for that reference.

Classification of each model entry into keep, rewrite, opt in or rebuild.

How to classify vLLM, Anthropic, Vertex AI, Cohere and custom providers

Each model entry in a 0.21 configuration needs one outcome in 0.22: an OpenAI-compatible engine, an opt-in LangChain provider, or a custom LLMModel implementation. Classify every entry before you change dependencies, and have the application owner and the platform owner confirm each result.

vLLM and OpenAI-compatible servers

Inspect entries that point at a self-hosted vLLM server or another endpoint that speaks the OpenAI API, and note the base URL, model name and API key source. In 0.22 these entries move to the engine openai setting, so they should not depend on LangChain. Confirm the exact engine value and key names in the 0.22 documentation before editing. The team that runs the inference server should confirm the endpoint and model identifier, because a mismatch can route traffic to the wrong model without an obvious error.

NeMo Guardrails docs

Anthropic models

Inspect entries that name Anthropic as the provider and record which model identifiers and parameters they use. LangChain is now opt-in, so Anthropic entries stay on LangChain only if the runtime sets NEMOGUARDRAILS_LLM_FRAMEWORK=langchain and the 0.22 documentation's provider package is installed. The platform team should confirm where that variable is set, since it applies to the whole process and can affect other providers in the same deployment. Application owners should confirm the model identifiers still resolve.

Vertex AI models

Inspect entries that use Vertex AI, including project, location, model name and how Google Cloud credentials are supplied. Vertex AI entries also need the LangChain opt-in in 0.22, so the same environment variable and provider package checks apply. Confirm the exact provider name and credential keys in the 0.22 documentation. The cloud team should review which service account or workload identity the runtime uses, because the account's scope determines what the guardrails process can call.

Cohere models

Inspect entries that use Cohere, noting the model name, any embedding or rerank use and where the API key is stored. Cohere entries follow the same LangChain opt-in path in 0.22, so confirm the provider name and the installed package against the 0.22 documentation. Check that the key comes from a secrets store and not from a configuration file committed to source control. Security engineers should confirm the key's rotation process before the upgrade changes how it is loaded.

Custom Python providers

Inspect custom classes that call a model directly, wrap a LangChain class or call an HTTP API from an action. In 0.22 these must satisfy the LLMModel protocol, so compare each class's methods, return types and async behavior against the protocol definition in the 0.22 documentation. Application engineers own this review. Run the custom provider tests against both a mock endpoint and one real model call in a staging environment before any production change.

Entries for retired services

Inspect any entry that points at a NeMo Guardrails microservice or NeMo Microservices endpoint. NVIDIA's NGC catalog states that NeMo microservices has been sunset as of October 1, 2026, with no new releases or support for the artifact. These entries are not a provider setting that 0.22 can rewrite, so they need a separate plan. Platform engineering and procurement should confirm the next step with the NVIDIA account team and decide whether the guardrails run as a library in your own deployment.

NGC guardrails container

What the LangChain opt-in changes in your environment

LangChain integration is now opt-in. In NeMo Guardrails 0.22, it is enabled only when the NEMOGUARDRAILS_LLM_FRAMEWORK environment variable is set to langchain. Any shell profile, systemd unit, container spec, Kubernetes manifest or CI job that relied on LangChain being active without saying so will now run without it. Before you upgrade, search every deployment definition and pipeline for the variable and for code paths that load Anthropic, Vertex AI or Cohere models through LangChain. Those are the places where the behavior change will surface, and they are easy to miss because nothing in the application code has to change.

Set the variable in the same place you set other runtime configuration for each environment. For a shell session or script, export it before the process starts. For a systemd service, add it under the unit's [Service] section with Environment=. For a container, set it in the image's ENV instruction or in the run command, and in Kubernetes, add it to the container's env list in the Deployment or StatefulSet, so every replica and every rollout inherits it. Keep the value identical across development, staging and production, and make sure CI test jobs set it too, or tests that exercise those providers will fail or silently skip. Treat the setting as part of the release artifact rather than an operator's manual step.

Verify the setting at startup instead of trusting the manifest. Log the resolved value of NEMOGUARDRAILS_LLM_FRAMEWORK in your service's startup output, and add a readiness or smoke test that sends one request to each model entry that depends on LangChain. Confirm the exact 0.22 behavior, including which framework packages must be installed for each provider and what error appears when the variable is missing, against the NeMo Guardrails documentation and the release notes for the version you are installing. Record the result in your change ticket so the auditor or reviewer can see that the opt-in was checked, not assumed.

What to prepare before the NeMo Guardrails upgrade starts

Preparation for the 0.21 to 0.22 move is mostly inventory and backup work. Each item below gives you a known starting point, a way to compare behavior before and after, and a clear list of what the upgrade can break. Finish them in order, since the provider inventory depends on knowing exactly which configuration you run today.

Back up the configuration folder

Copy the full config folder, including config.yml, every Colang file, Python action modules and environment files, into version control or a separate store before any change. Keep the copy outside the running server's directory so a rollback does not overwrite it. Store the environment files with secrets removed or encrypted, and record which file holds each provider key. Without this copy, you cannot reproduce the 0.21 behavior when a provider or action fails after the upgrade.

Inventory every model entry

List each entry under models in config.yml, with its type, engine and any LangChain-era provider name. Mark which entries point to vLLM, other OpenAI-compatible servers, Anthropic, Vertex AI, Cohere or a custom class. This list decides which entries you rewrite to engine: openai and which need an explicit LangChain opt-in. Note each entry's endpoint and model name so you can compare them in testing.

Inventory custom providers and actions

List every custom LLM class, every Python action registered in the config folder and every helper module those actions import. For each one, record whether it imports LangChain classes directly. Custom providers that must follow the LLMModel protocol need review, and actions that depend on LangChain packages need those packages pinned in the target environment. Keep this list next to the model inventory so both are checked together.

Record current Python and nemoguardrails versions

Capture the exact Python interpreter version and the installed nemoguardrails version, along with the full output of a dependency freeze. Include langchain and provider SDK packages, since the 0.22 change affects which of them load. Store the record with the backup so you can rebuild the current environment exactly. Check the target interpreter against the release you plan to use, because NeMo Guardrails 0.25.0 requires Python 3.11, 3.12 or 3.13.

Build a test environment that mirrors model endpoints

Stand up a staging copy of the server with the same configuration folder and endpoints that production uses, or the closest equivalent your organization can reach. Use real provider endpoints or a faithful stand-in for vLLM and other OpenAI-compatible servers, since a mock can hide differences in response format. Run the same prompts through the old and new versions and keep the outputs, so changes in blocking, streaming or tool behavior show up before production is affected.

List consumers of the guardrails server

Identify every application, gateway and script that calls the guardrails HTTP server, and the endpoints and request shapes each one uses. Ask each owner whether they depend on specific response fields or on the chat completions behavior. Assign a named contact for each consumer who will test after the upgrade. Also check any deployment still built on the NGC guardrails microservice container, which NVIDIA sunset as of October 1, 2026, because it needs a separate migration plan rather than an in-place upgrade.

The NeMo Guardrails 0.21 to 0.22 upgrade sequence

This sequence moves an existing NeMo Guardrails 0.21 deployment to 0.22 in a controlled way, so each model entry is classified, only the providers that need LangChain keep it, and custom providers are ported before anything is promoted. Each step ends with a check and a rollback point.

  1. Freeze the current version and inventory models

    The platform owner records the exact 0.21 version in use, the Python version, the pinned dependencies and every running environment that loads the configuration. The team then lists each model entry in config.yml and tags it as an OpenAI-compatible endpoint (including vLLM), a LangChain-backed provider (such as Anthropic, Vertex AI or Cohere), or a custom provider. Done means a written inventory that every entry is assigned to one of these three groups and that a change freeze is announced for the configuration. Rollback point: the frozen version is unchanged, so the current deployment keeps running as is.

  2. Back up and version-control configuration

    The team copies the complete configuration folder, including config.yml, Colang files, Python actions and any custom LLM provider modules, into a version-controlled repository and tags the 0.21 state. Secrets stay in the environment or the secrets store, not in the repository. Done means the tagged commit can be checked out and the 0.21 server started from it with no changes. Rollback point: the tag, which is the reference for every later comparison.

  3. Record a 0.21 test baseline

    Before any upgrade, the team runs the existing test suite and a fixed set of representative requests against 0.21, and saves the responses and the blocked or allowed outcome for each rail. The team should confirm the exact test commands and output format with the project's own test layout and the 0.22 release notes. Done means a stored baseline with a pass or fail result per test and per sample request. Rollback point: none is needed because nothing has changed yet.

  4. Install 0.22 in an isolated environment

    An engineer creates a new virtual environment or container image that uses a supported Python version and installs the 0.22 release of nemoguardrails, leaving the 0.21 environment untouched. Dependency pins are reviewed so that LangChain packages are installed only where a provider needs them. Done means the application starts against the unchanged configuration and the server reports the 0.22 version. Rollback point: the 0.21 environment remains available for side-by-side comparison and immediate fallback.

  5. Rewrite OpenAI-compatible model entries

    For each entry classified as OpenAI-compatible, including vLLM and other endpoints that accept the OpenAI API, the engineer changes the model entry to use engine: openai and keeps the base URL and model name explicit. The change is made in a branch of the tagged repository and reviewed against the 0.22 configuration documentation for the exact keys. Done means every compatible entry validates when the configuration loads. Rollback point: the 0.21 tag, which can be restored in one step.

  6. Opt in to LangChain only where required

    The engineer sets the NEMOGUARDRAILS_LLM_FRAMEWORK=langchain environment variable only in the deployments that host Anthropic, Vertex AI, Cohere or other LangChain-backed providers, and records which environments set it. Environments that use only OpenAI-compatible endpoints run without it. The team confirms the variable name and any related provider settings against the 0.22 documentation. Done means each environment's variables are listed in the repository and the LangChain-backed model loads in a test run. Rollback point: removing the variable and reverting the branch returns that environment to its prior behavior.

  7. Port custom LLMModel implementations

    Each custom provider written against the earlier interface is rewritten to implement the LLMModel protocol that 0.22 expects, and its unit tests are updated to call the new methods. Custom actions that call these providers are checked for the same behavior. Done means the provider tests pass in the isolated 0.22 environment and a sample call returns output that matches the baseline. Rollback point: the unchanged provider module in the 0.21 tag, kept beside the new version until promotion.

  8. Run tests and comparison requests

    The team runs the full test suite and the same sample requests from the baseline against 0.22, then compares the rail decisions, blocked messages and model responses to the stored 0.21 results. Any difference is classified as expected (for example, a documented change) or a defect to fix. Done means every test passes or each deviation has a recorded decision signed off by the platform owner. Rollback point: the 0.21 environment is still running in parallel for direct comparison.

  9. Promote 0.22 and keep the rollback path

    After sign-off, the 0.22 environment is promoted to production with the tagged configuration, and the 0.21 environment is kept on standby for a period the organization sets in its change policy. The team monitors logs and error rates after the switch and confirms the server health endpoint responds. Done means production runs 0.22 with a recorded change ticket, and the rollback procedure has been written down and tested. Rollback point: redeploying the 0.21 image and the tagged configuration.

NeMo Guardrails upgrade testing and rollback

Treat the 0.21 to 0.22 move as a change you must prove before you trust it, and keep the old build runnable until the new one has passed. Start by testing model loading for every entry in your config.yml. Each model entry you classified during the upgrade should load under the new release, and the check should confirm which provider path each one took, including whether engine: openai resolved correctly for vLLM and other OpenAI-compatible endpoints and whether any LangChain-backed provider loaded only because NEMOGUARDRAILS_LLM_FRAMEWORK=langchain was set. A model that loads with a silent fallback is a finding, not a pass.

Next, run a fixed set of prompts through every input rail, dialog rail and output rail your application uses, and record the outcome for each: allowed, blocked, rewritten or errored. Keep the prompt set, the expected outcomes and the rail configuration under version control so the comparison is repeatable against the 0.21 baseline. If you run the guardrails server, also exercise each HTTP endpoint your clients call and confirm request and response shapes are unchanged. Compare latency and error rates against the 0.21 baseline under similar load. Ask your team to agree in advance what counts as an unacceptable change, because any regression in blocked or allowed outcomes is a release blocker.

Your rollback plan should keep the 0.21 container image, the 0.21 Python dependency lock and the 0.21 configuration folder available until the 0.22 build has passed every check above. Store them as a pair. Configuration and dependency changes must be rolled back together, since a 0.21 configuration may depend on provider behavior that 0.22 changed, and a 0.22 configuration may not load on 0.21. Rehearse the rollback in a non-production environment and time it. Confirm with your platform team where the previous image is retained and how long your registry keeps it, because that retention window limits how long you can roll back.

What drives the effort of a NeMo Guardrails upgrade

This table lists the factors that change how much work the move from 0.21 to 0.22 takes, how each one affects effort, and the first thing to check. Read it before estimating, because a small configuration with a clean test suite can be far cheaper to move than a large one with custom providers and several environments. The main takeaway is that model entries, LangChain-backed providers and custom LLMModel code set most of the work, so inventory them first.

DriverEffect on effortFirst thing to check
Number of model entriesMore entries mean more classification, more config edits and more tests to run after the change.Count every model entry in config.yml and mark each as native, OpenAI-compatible or LangChain-backed.
Providers that need LangChainAnthropic, Vertex AI and Cohere entries need the opt-in path, which adds environment setup and dependency checks.Confirm which providers in use require the NEMOGUARDRAILS_LLM_FRAMEWORK=langchain setting.
Custom LLMModel implementationsEach custom class must be reviewed against the new LLMModel protocol, and its behavior tested under real calls.List every custom model class and check whether it still matches the protocol interface in 0.22.
Custom actions importing LangChain or provider SDKsActions that import LangChain or vendor SDKs may fail once LangChain is no longer loaded by default.Search action modules for langchain and provider SDK imports and note which environments install them.
Colang files and rail definitionsFlows that call model entries by name or depend on provider behavior need review, and Colang changes need their own tests.Identify which rails reference specific model names and which Colang version each file uses.
Number of deployments and environmentsEach deployment, including development, staging and production, repeats the dependency, configuration and test work.Confirm the list of environments and whether their Python packages and environment variables match.
Server and client consumersApplications calling the guardrails server over HTTP may need coordinated changes or a staged rollout of server and clients.Map every service that calls the server and which API version or response fields each one reads.
State of the test suiteA suite that covers model loading, rails and provider calls shortens verification, while gaps mean manual testing of each path.Run the existing tests on 0.21 first and record which provider paths and rails have no automated coverage.

Questions teams ask before a NeMo Guardrails 0.22 upgrade

What does a NeMo Guardrails 0.22 upgrade cost?

The cost is set by the written scope, because DeployOpen does not publish a price list. The main components are the inventory of model entries, custom actions and Colang files, changes to config.yml and Python code, environment work for supported Python versions, test runs, a staged rollout and handover. The upgrade itself is one-time work. Ongoing upgrades, testing or support can be added as a retainer, which recurs. Cost rises with the number of model entries, custom providers under the LLMModel protocol, environments and the amount of test coverage that must be built. Ask for a quote that lists each component separately, the assumptions about access to your repositories and environments, and what is excluded.

How long does a NeMo Guardrails upgrade take?

No duration can be stated from the researched facts, so the timeline depends on the scope you agree in writing. The work depends on how many configurations and providers you run, how many custom actions need changes, how complete your existing tests are and how many environments must be updated in sequence. Teams with an inventory and automated tests usually shorten the verification stage. Ask for milestones with a named owner for each: inventory, conversion and rewrites, testing in staging, approval and production cutover.

What must our team provide before an upgrade starts?

Your team provides access and decisions that only your organization can give. The list usually includes read access to the repository holding your configurations, a list of deployed NeMo Guardrails versions, every model provider in use, custom actions and their dependencies, and any existing test cases. You also need a Python 3.11, 3.12 or 3.13 environment for the target release, since 0.25.0 requires one of these versions, and a staging environment that resembles production. Name an approver who can accept test results and sign off the cutover.

Can our internal team run the NeMo Guardrails upgrade alone?

Yes, an internal team can run the upgrade if it has the skills and time to do so. The work needs Python, YAML configuration, Colang, the APIs of each model provider you call and a way to run regression tests. NVIDIA provides a nemoguardrails convert tool for Colang 1.0 to 2.x migration, but NVIDIA says converted configurations still need manual review, so someone must check the output. A partner is most useful when the team lacks capacity, has few tests or must meet a fixed cutover date. Ask yourself whether you can maintain the result after the handover.

Can we skip 0.22 and upgrade straight to 0.25?

You can plan a direct move to the current release, but you must review every release between your version and 0.25.0 as one change set. The current release, 0.25.0, was published on 19 November 2026 and requires Python 3.11, 3.12 or 3.13. It also deprecates the LLMRails class in favor of Guardrails, with removal planned no earlier than 0.27.0. Read the release notes for each intermediate version, and use the separate upgrade pages for 0.22 to 0.23 and 0.23 to 0.24 to find changes that affect your code. Test the combined result in staging before you commit to a date.

What happens to our LangChain model providers after the upgrade?

In this release, LangChain becomes optional. Each model entry must be classified. Anthropic, Vertex AI and Cohere entries keep working through LangChain only if you opt in by setting the environment variable NEMOGUARDRAILS_LLM_FRAMEWORK=langchain. vLLM and other OpenAI-compatible endpoints should be rewritten to use engine: openai. Custom providers must follow the new LLMModel protocol. Test each provider against a real call in staging, because a configuration that loads can still fail at inference. Check the release notes on the NeMo Guardrails releases page for any changes to the list of supported providers.

What should we do if we run NeMo Microservices or the NGC container?

Do not plan an in-place upgrade. NVIDIA's NeMo Guardrails microservice container on NGC says NeMo microservices has been sunset as of October 1, 2026, with no new releases and no support for the artifact. NVIDIA's archived documentation asks existing users to contact their NVIDIA account team about next steps. The NeMo Platform repository now points to NeMo Helix, which runs guardrails as an inference gateway plugin. Moving to the library or to another platform is a migration with its own scope, so treat it as a separate project and confirm your support position with NVIDIA first.

How DeployOpen scopes and delivers a NeMo Guardrails upgrade

DeployOpen treats the move from NeMo Guardrails 0.21 to 0.22 as a written, fixed-scope change to your configurations, provider entries and custom code. We start from an inventory of every model entry and custom provider, then build and test the change in an environment you control before it reaches production.

How we scope

  • We inventory every model entry in config.yml and classify each as OpenAI-compatible, LangChain-backed or custom.
  • The written scope lists which providers move to engine: openai, which stay on LangChain, and which custom LLMModel code needs rewriting.
  • Fixed-scope agreements set deliverables and timelines in writing before any upgrade work starts, and we confirm the Python version in your environment first.

How we build

  • We pin the target release in a staging branch, then rewrite vLLM and other OpenAI-compatible entries to the new engine setting.
  • We enable LangChain only for the providers that need it, using the NEMOGUARDRAILS_LLM_FRAMEWORK=langchain environment variable.
  • We run existing rails, actions and provider tests against the new configuration and record every behavior change for review.

How we hand over

  • You receive the updated configuration, a classification table of every model entry and the reasons for each engine choice.
  • The handover includes a rollback record that restores the previous pinned version and configuration if a provider behaves differently.
  • We document each custom LLMModel change and the test commands your team should run before any future release upgrade.

How we support

  • Ongoing support covers retesting after provider updates and later NeMo Guardrails releases, available as a retainer.
  • We can rerun the provider test suite when you add a model, change a vLLM deployment or move to a newer release.
  • Continuous testing and upgrade planning for later versions are scoped separately in writing, with no prices stated until a quote follows the agreed scope.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.