AI API receipt · sgl-project/sglang

Consecutive user messages are mishandled when rendering the chat template

sgl-project/sglang#43155 · upstream bug reproduced by running the issue's own reproduction

Badgr cannot tell this response is wrong

The model answered, but the prompt it saw merged or dropped one of two consecutive user turns.

the reply is well-formed text; Badgr cannot tell which prompt the model actually received. The receipt therefore records success. This is a limit of what the contract can prove, shown here so it is not mistaken for protection.

What the upstream returned (replayed)

The output the bug produces, taken from the issue’s reproduction and fed to Badgr’s validators. Not a live provider call.

text: "Sure, here is the answer."
tool_calls: none

Badgr receipt

Written by Badgr’s receipt ledger and read back from GET /v1/receipts/replay-sglang-43155-consecutive-user-roles.

{
  "request_id": "replay-sglang-43155-consecutive-user-roles",
  "status": "success",
  "endpoint": "/v1/chat/completions",
  "stream": false,
  "failure_stage": null,
  "error_code": null,
  "error_message": null,
  "retryable": null,
  "provider_mode": "replay",
  "routing_decision": "replayed_upstream_output",
  "created_at": "1791524108.8916428"
}

Recorded 2026-10-09 in Badgr’s local development environment. Replay cases and verdicts are pinned by backend/test_ai_api_replay_cases.py.

← All AI API receipts