AI API receipt · sgl-project/sglang

Qwen3CoderDetector streaming parser fabricates tool calls from prose

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

✓ Badgr rejects this response

Plain prose mentioning <parameter=...> produced a nameless tool call (tool_index=-1).

Outcome contract verdict: tool call has no function name. The attempt is recorded as failed (invalid_outcome) instead of a verified success, so it is not billed as a good answer and can fall back to another route.

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.

data: {"choices": [{"index": 0, "delta": {"content": "The format is "}, "finish_reason": null}]}
data: {"choices": [{"index": 0, "delta": {"tool_calls": [{"index": -1, "function": {"arguments": "{\"location\": \"Boston\""}}]}, "finish_reason": null}]}
data: {"choices": [{"index": 0, "delta": {"content": " okay?"}, "finish_reason": "stop"}]}
data: [DONE]

Badgr receipt

Written by Badgr’s receipt ledger and read back from GET /v1/receipts/replay-sglang-43151-prose-becomes-tool-call.

{
  "request_id": "replay-sglang-43151-prose-becomes-tool-call",
  "status": "failed",
  "endpoint": "/v1/chat/completions",
  "stream": true,
  "failure_stage": "stream_contract",
  "error_code": "invalid_outcome",
  "error_message": "Stream did not complete a valid response: tool call has no function name",
  "retryable": true,
  "provider_mode": "replay",
  "routing_decision": "replayed_upstream_output",
  "created_at": "2026-10-09T02:14:36Z"
}

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