sgl-project/sglang · warning · DeprecationWarning

sglang.srt.layers.attention.nsa.nsa_indexer is deprecated; u

Error message

sglang.srt.layers.attention.nsa.nsa_indexer is deprecated; use sglang.srt.layers.attention.dsa.dsa_indexer instead.

What it means

Import-time DeprecationWarning: the NSA indexer module moved to sglang.srt.layers.attention.dsa.dsa_indexer. The shim preserves behavior via star-import but is scheduled for removal.

Source

Thrown at python/sglang/srt/layers/attention/nsa/nsa_indexer.py:4

# [Deprecated] Re-export shim for backward compatibility. Use dsa.dsa_indexer instead.
import warnings

warnings.warn(
    "sglang.srt.layers.attention.nsa.nsa_indexer is deprecated; "
    "use sglang.srt.layers.attention.dsa.dsa_indexer instead.",
    DeprecationWarning,
    stacklevel=2,
)
from sglang.srt.layers.attention.dsa.dsa_indexer import *  # noqa: F401, F403

View on GitHub (pinned to 0132848349)

Solutions

  1. Switch imports to sglang.srt.layers.attention.dsa.dsa_indexer
  2. Search codebase for `nsa_indexer` and update all references
  3. Track the SGLang release notes for when the shim is deleted

Example fix

# before
from sglang.srt.layers.attention.nsa.nsa_indexer import NsaIndexer
# after
from sglang.srt.layers.attention.dsa.dsa_indexer import DsaIndexer
Defensive patterns

Strategy: validation

Prevention

When it happens

Trigger: Importing sglang.srt.layers.attention.nsa.nsa_indexer or classes like the sparse-attention indexer from the nsa namespace.

Common situations: Models or user code instantiating the NSA/DSA indexer using pre-rename import paths after a SGLang upgrade.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/e2f3556997a56735. Report an issue: GitHub.