{"record":{"id":"e2f3556997a56735","repo":"sgl-project/sglang","slug":"sglang-srt-layers-attention-nsa-nsa-indexer-is-dep","errorCode":null,"errorMessage":"sglang.srt.layers.attention.nsa.nsa_indexer is deprecated; use sglang.srt.layers.attention.dsa.dsa_indexer instead.","messagePattern":"sglang\\.srt\\.layers\\.attention\\.nsa\\.nsa_indexer is deprecated; use sglang\\.srt\\.layers\\.attention\\.dsa\\.dsa_indexer instead\\.","errorType":"console","errorClass":"DeprecationWarning","httpStatus":null,"severity":"warning","filePath":"python/sglang/srt/layers/attention/nsa/nsa_indexer.py","lineNumber":4,"sourceCode":"# [Deprecated] Re-export shim for backward compatibility. Use dsa.dsa_indexer instead.\nimport warnings\n\nwarnings.warn(\n    \"sglang.srt.layers.attention.nsa.nsa_indexer is deprecated; \"\n    \"use sglang.srt.layers.attention.dsa.dsa_indexer instead.\",\n    DeprecationWarning,\n    stacklevel=2,\n)\nfrom sglang.srt.layers.attention.dsa.dsa_indexer import *  # noqa: F401, F403\n","sourceCodeStart":1,"sourceCodeEnd":11,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/attention/nsa/nsa_indexer.py#L1-L11","documentation":"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.","triggerScenarios":"Importing sglang.srt.layers.attention.nsa.nsa_indexer or classes like the sparse-attention indexer from the nsa namespace.","commonSituations":"Models or user code instantiating the NSA/DSA indexer using pre-rename import paths after a SGLang upgrade.","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"],"exampleFix":"# before\nfrom sglang.srt.layers.attention.nsa.nsa_indexer import NsaIndexer\n# after\nfrom sglang.srt.layers.attention.dsa.dsa_indexer import DsaIndexer","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Import indexer classes from sglang.srt.layers.attention.dsa.dsa_indexer","Avoid wildcard imports that hide the source module"],"tags":["deprecation","sglang","indexer","import"],"backgroundTag":"deprecation-warning","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}