Files
sglang/python
laoyao0822 71872bb851 Expose empty chat messages behind conversion failures
The replay failure returns HTTP 400 before generation, so the next diagnostic point must be the chat-template conversion boundary rather than HiCache or scheduler paths. This adds a failure-only summary that records message roles, content shapes, empty indices, tool metadata, bootstrap room, and template mode without logging raw user content.

Constraint: Production replay traffic can contain large/private messages, so diagnostics must avoid full content dumps.

Rejected: Enable full request logging | too noisy and exposes complete prompt payloads.

Rejected: Normalize empty content immediately | would hide whether the malformed message is user, assistant, tool, or template-derived.

Confidence: high

Scope-risk: narrow

Directive: Keep this log failure-only; do not move it to the hot path or print raw content.

Tested: python -m py_compile python/sglang/srt/entrypoints/openai/serving_chat.py

Tested: remote docker py_compile after scp to g0034:/mnt/beegfs/cjy/sglang-dev

Not-tested: Full replay reproduction; requires user-driven traffic after service restart.
2026-05-31 04:06:50 +08:00
..