{"record":{"id":"96824ce491d9ffb5","repo":"sgl-project/sglang","slug":"sglang-srt-layers-attention-nsa-backend-is-depreca","errorCode":null,"errorMessage":"sglang.srt.layers.attention.nsa_backend is deprecated; use sglang.srt.layers.attention.dsa_backend instead.","messagePattern":"sglang\\.srt\\.layers\\.attention\\.nsa_backend is deprecated; use sglang\\.srt\\.layers\\.attention\\.dsa_backend instead\\.","errorType":"console","errorClass":"DeprecationWarning","httpStatus":null,"severity":"warning","filePath":"python/sglang/srt/layers/attention/nsa_backend.py","lineNumber":5,"sourceCode":"# [Deprecated] nsa_backend.py is a thin re-export shim for backward compatibility.\n# Use dsa_backend.py instead. This file will be removed in a future release.\nimport warnings\n\nwarnings.warn(\n    \"sglang.srt.layers.attention.nsa_backend is deprecated; \"\n    \"use sglang.srt.layers.attention.dsa_backend instead.\",\n    DeprecationWarning,\n    stacklevel=2,\n)\nfrom sglang.srt.layers.attention.dsa_backend import *  # noqa: F401, F403\nfrom sglang.srt.layers.attention.dsa_backend import (  # noqa: F401\n    DeepseekSparseAttnBackend,\n    DeepseekSparseAttnMultiStepBackend,\n    DSAFlashMLAMetadata,\n    DSAIndexerMetadata,\n    DSAMetadata,\n    NativeSparseAttnBackend,\n    NativeSparseAttnMultiStepBackend,\n    NSAFlashMLAMetadata,\n    NSAIndexerMetadata,\n    NSAMetadata,\n)","sourceCodeStart":1,"sourceCodeEnd":23,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/attention/nsa_backend.py#L1-L23","documentation":"Import-time DeprecationWarning: nsa_backend.py is a shim that re-exports sglang.srt.layers.attention.dsa_backend (the NSA attention backend renamed to DSA backend). It will be removed in a future release.","triggerScenarios":"`from sglang.srt.layers.attention.nsa_backend import ...` — e.g. importing NSABackend/backend selection helpers — or `--attention-backend nsa` style code paths that import the module by name.","commonSituations":"Selecting the sparse attention backend with code or CLI flags referencing the old nsa_backend module after an SGLang upgrade.","solutions":["Import from sglang.srt.layers.attention.dsa_backend","Update backend-name strings from nsa to dsa where applicable","Pin SGLang to the last pre-rename version if you need time to migrate"],"exampleFix":"# before\nfrom sglang.srt.layers.attention.nsa_backend import NSABackend\n# after\nfrom sglang.srt.layers.attention.dsa_backend import DSABackend","handlingStrategy":"validation","validationCode":"null","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Import the backend from sglang.srt.layers.attention.dsa_backend","Update backend-name config strings from nsa to dsa"],"tags":["deprecation","sglang","attention-backend","import"],"backgroundTag":"deprecation-warning","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}