#9682[Bug] latest sglang cannot invoke openai function tool schema during sglang_rollout
Issue Details
Checklist
- 1. I have searched related issues but cannot get the expected help.
- 2. The bug has not been fixed in the latest version.
- 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
- 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/sgl-project/sglang/discussions/new/choose Otherwise, it will be closed.
- 5. Please use English, otherwise it will be closed.
Describe the bug
Hi there, I experienced a tool call bug (the async rollout is not actually invoking tools as defined in schema and just walk through with generated context) that latest sglang package (0.4.9.post6 and above) cannot inovke openai function tool schema as elder version can do. The problem is originated from new feature abort_request(qid,abort_all) syntax since sglang=0.4.6.post5 is not implemented.
Reproduction
I use search_r1 like training script as provided in verl official repo: https://github.com/volcengine/verl/blob/main/examples/sglang_multiturn/search_r1_like/run_qwen2.5-3b_instruct_search_multiturn.sh
and define tool call schema as below: https://github.com/volcengine/verl/blob/main/examples/sglang_multiturn/config/tool_config/search_tool_config.yaml
Environment
Package Version Editable project location
absl-py 2.3.1 accelerate 1.10.0 aiofiles 24.1.0 aiohappyeyeballs 2.6.1 aiohttp 3.12.15 aiohttp-cors 0.8.1 aiosignal 1.4.0 airportsdata 20250811 annotated-types 0.7.0 anthropic 0.64.0 antlr4-python3-runtime 4.9.3 anyio 4.10.0 asttokens 3.0.0 async-timeout 5.0.1 attrs 25.3.0 blobfile 3.0.0 build 1.3.0 cachetools 5.5.2 certifi 2025.8.3 cffi 1.17.1 charset-normalizer 3.4.3 click 8.2.1 cloudpickle 3.1.1 codetiming 1.4.0 colorful 0.5.7 compressed-tensors 0.10.2 cuda-bindings 13.0.0 cuda-pathfinder 1.1.0 cuda-python 13.0.0 datasets 4.0.0 debugpy 1.8.16 decorator 5.2.1 decord 0.6.0 dill 0.3.8 diskcache 5.6.3 distlib 0.4.0 distro 1.9.0 einops 0.8.1 exceptiongroup 1.3.0 executing 2.2.0 fastapi 0.116.1 filelock 3.18.0 flash_attn 2.8.0.post2 flashinfer-python 0.2.9rc2 frozenlist 1.7.0 fsspec 2025.3.0 gitdb 4.0.12 GitPython 3.1.45 google-api-core 2.25.1 google-auth 2.40.3 googleapis-common-protos 1.70.0 grpcio 1.74.0 h11 0.16.0 hf_transfer 0.1.9 hf-xet 1.1.7 httpcore 1.0.9 httpx 0.28.1 huggingface-hub 0.34.4 hydra-core 1.3.2 idna 3.10 importlib_metadata 8.7.0 interegular 0.3.3 ipython 8.37.0 jedi 0.19.2 Jinja2 3.1.6 jiter 0.10.0 jsonschema 4.25.0 jsonschema-specifications 2025.4.1 lark 1.2.2 latex2sympy2_extended 1.10.2 litellm 1.75.8 llguidance 0.7.30 lxml 6.0.0 Markdown 3.8.2 MarkupSafe 3.0.2 math-verify 0.8.0 matplotlib-inline 0.1.7 modelscope 1.28.2 mpmath 1.3.0 msgpack 1.1.1 msgspec 0.19.0 multidict 6.6.4 multiprocess 0.70.16 nest-asyncio 1.6.0 networkx 3.4.2 ninja 1.13.0 numpy 1.26.4 nvidia-cublas-cu12 12.6.4.1 nvidia-cuda-cupti-cu12 12.6.80 nvidia-cuda-nvrtc-cu12 12.6.77 nvidia-cuda-runtime-cu12 12.6.77 nvidia-cudnn-cu12 9.5.1.17 nvidia-cudnn-frontend 1.14.0 nvidia-cufft-cu12 11.3.0.4 nvidia-cufile-cu12 1.11.1.6 nvidia-curand-cu12 10.3.7.77 nvidia-cusolver-cu12 11.7.1.2 nvidia-cusparse-cu12 12.5.4.2 nvidia-cusparselt-cu12 0.6.3 nvidia-ml-py 12.575.51 nvidia-nccl-cu12 2.26.2 nvidia-nvjitlink-cu12 12.6.85 nvidia-nvshmem-cu12 3.3.20 nvidia-nvtx-cu12 12.6.77 omegaconf 2.3.0 openai 1.99.9 opencensus 0.11.4 opencensus-context 0.1.3 opentelemetry-api 1.36.0 opentelemetry-exporter-prometheus 0.57b0 opentelemetry-proto 1.36.0 opentelemetry-sdk 1.36.0 opentelemetry-semantic-conventions 0.57b0 orjson 3.11.2 outlines 0.1.11 outlines_core 0.1.26 packaging 25.0 pandas 2.3.1 parso 0.8.4 partial-json-parser 0.2.1.1.post6 peft 0.17.0 pexpect 4.9.0 pillow 11.3.0 pip 25.1 platformdirs 4.3.8 prometheus_client 0.22.1 prompt_toolkit 3.0.51 propcache 0.3.2 proto-plus 1.26.1 protobuf 6.31.1 psutil 7.0.0 ptyprocess 0.7.0 pure_eval 0.2.3 py-spy 0.4.1 pyarrow 21.0.0 pyasn1 0.6.1 pyasn1_modules 0.4.2 pybase64 1.4.2 pybind11 3.0.0 pycountry 24.6.1 pycparser 2.22 pycryptodomex 3.23.0 pydantic 2.11.7 pydantic_core 2.33.2 Pygments 2.19.2 pylatexenc 2.10 pynvml 12.0.0 pyproject_hooks 1.2.0 python-dateutil 2.9.0.post0 python-dotenv 1.1.1 python-multipart 0.0.20 pytz 2025.2 pyvers 0.1.0 PyYAML 6.0.2 pyzmq 27.0.1 ratelimit 2.2.1 ray 2.48.0 referencing 0.36.2 regex 2025.7.34 requests 2.32.4 rpds-py 0.27.0 rsa 4.9.1 safetensors 0.6.2 scipy 1.15.3 sentencepiece 0.2.1 sentry-sdk 2.34.1 setproctitle 1.3.6 setuptools 78.1.1 sgl-kernel 0.2.7 sglang 0.4.9.post6 six 1.17.0 smart_open 7.3.0.post1 smmap 5.0.2 sniffio 1.3.1 soundfile 0.13.1 stack-data 0.6.3 starlette 0.47.2 sympy 1.14.0 tenacity 9.1.2 tensorboard 2.20.0 tensorboard-data-server 0.7.2 tensordict 0.9.1 tiktoken 0.11.0 timm 1.0.16 tokenizers 0.21.4 tomli 2.2.1 torch 2.7.1 torch_memory_saver 0.0.8 torchao 0.9.0 torchaudio 2.7.1 torchdata 0.11.0 torchvision 0.22.1 tqdm 4.67.1 traitlets 5.14.3 transformers 4.54.0 triton 3.3.1 typing_extensions 4.14.1 typing-inspection 0.4.1 tzdata 2025.2 urllib3 2.5.0 uvicorn 0.35.0 uvloop 0.21.0 verl 0.5.0.dev0 virtualenv 20.33.1 wandb 0.21.1 wcwidth 0.2.13 Werkzeug 3.1.3 wheel 0.45.1 wrapt 1.17.3 xgrammar 0.1.21 xxhash 3.5.0 yarl 1.20.1 zipp 3.23.0