Sandbox — LSD is in active testing. All systems operational·payments are test-mode (no real charges).
Overview Use Cases News Docs Tool Store Support Community Get LSD
All docs
Docs/ API Reference/ Engine/ set_variant
Engine· method

Engine.set_variant

chooses which provider serves a node identity that has variants

Python
set_variant(identity, *, mode='replace', provider=None) -> int

Returns int — the number of live steps swapped to the chosen provider

Parameters#

name type default description
identity str the node identity that has variants (e.g. "mim.solid")
mode str "replace" "replace" makes provider win the identity; "coexist" reverts to the original
provider str | None None the winning step for "replace" mode

Example#

Python
engine.set_variant("mim.solid", provider="mim_openpit.solid")

Notes#

mode is "replace" (default) or "coexist". Replace makes provider win the identity and instantly swaps every live node using it; coexist reverts the identity to the original, leaving each override independently addable. The choice is persisted in the .lsd (package_state.variants).

See also#

API: run · save · Engine

Guides: Node variants

By LSD Team · Last updated Jul 17, 2026 Ask on Discord View as Markdown