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
- Switch imports to sglang.srt.layers.attention.dsa.dsa_indexer
- Search codebase for `nsa_indexer` and update all references
- 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
- Import indexer classes from sglang.srt.layers.attention.dsa.dsa_indexer
- Avoid wildcard imports that hide the source module
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
- sglang.srt.layers.attention.nsa.dequant_k_cache is deprecate
- sglang.srt.layers.attention.nsa.index_buf_accessor is deprec
- sglang.srt.layers.attention.nsa.nsa_backend_mtp_precompute i
- sglang.srt.layers.attention.nsa.quant_k_cache is deprecated;
- sglang.srt.layers.attention.nsa.tilelang_kernel is deprecate
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/e2f3556997a56735.
Report an issue: GitHub.