---
id: pr-sglang-6803
repo: sgl-project/sglang
pr: 6803
title: Correctly abort the failed grammar requests & Improve the handling of abort
author: merrymercy
date: '2025-06-02'
url: https://github.com/sgl-project/sglang/pull/6803
source_category: upstream-code
architectures:
- sm100
tags:
- gemm
techniques: []
hardware_features: []
kernel_types: []
languages:
- cuda-cpp
- python
captured_at: '2026-04-27'
status: merged
merge_sha: 20fd53b8f66358c922064c466b49604ea0b8fba9
inclusion_reason: kernel file changes
changed_paths:
- python/sglang/srt/constrained/base_grammar_backend.py
- python/sglang/srt/constrained/llguidance_backend.py
- python/sglang/srt/constrained/outlines_backend.py
- python/sglang/srt/constrained/xgrammar_backend.py
- python/sglang/srt/entrypoints/http_server.py
- python/sglang/srt/managers/schedule_batch.py
- python/sglang/srt/managers/scheduler.py
- python/sglang/srt/managers/tokenizer_manager.py
- python/sglang/srt/managers/utils.py
- python/sglang/srt/metrics/collector.py
- python/sglang/srt/model_executor/cuda_graph_runner.py
- python/sglang/srt/model_executor/model_runner.py
- python/sglang/srt/utils.py
- python/sglang/test/send_one.py
- python/sglang/test/test_utils.py
- scripts/killall_sglang.sh
head_ref_oid: b1a6beeb71730f57c2f73938d669c02f3a74fbe0
artifact_dir: evidence/pull-bundles/sglang/gh-6803
---
# Correctly abort the failed grammar requests & Improve the handling of abort

- Repository: `sgl-project/sglang`
- PR: [6803](https://github.com/sgl-project/sglang/pull/6803)
- Decision: `kernel file changes`
- Reason: kernel file changes

## Changed Paths

- `python/sglang/srt/constrained/base_grammar_backend.py`
- `python/sglang/srt/constrained/llguidance_backend.py`
- `python/sglang/srt/constrained/outlines_backend.py`
- `python/sglang/srt/constrained/xgrammar_backend.py`
- `python/sglang/srt/entrypoints/http_server.py`
- `python/sglang/srt/managers/schedule_batch.py`
- `python/sglang/srt/managers/scheduler.py`
- `python/sglang/srt/managers/tokenizer_manager.py`
- `python/sglang/srt/managers/utils.py`
- `python/sglang/srt/metrics/collector.py`
- `python/sglang/srt/model_executor/cuda_graph_runner.py`
- `python/sglang/srt/model_executor/model_runner.py`
- `python/sglang/srt/utils.py`
- `python/sglang/test/send_one.py`
- `python/sglang/test/test_utils.py`
- `scripts/killall_sglang.sh`

## Evidence Bundle

`evidence/pull-bundles/sglang/gh-6803`
