[Bugfix][Frontend] Detect Anthropic inline-system merge against the resolved chat template (#58754)

Signed-off-by: Robert Shaw <robshaw@redhat.com>
Co-authored-by: Robert Shaw <robshaw@redhat.com>
This commit is contained in:
Robert Shaw
2026-09-26 14:00:56 +00:00
committed by GitHub
co-authored by Robert Shaw
parent d64f277c54
commit dfab504333
6 changed files with 83 additions and 13 deletions
@@ -651,9 +651,9 @@ async def test_messages_render_system_and_multi_turn(client):
async def test_messages_render_merges_inline_system(client):
"""Inline system messages merge into the leading system block.
Without a --chat-template arg the /v1/messages server path detects
merge_inline_system=True, so render must produce the same tokens as
the manually pre-merged request.
The model's chat template rejects non-leading system messages, so the
/v1/messages server path detects merge_inline_system=True and render must
produce the same tokens as the manually pre-merged request.
"""
inline = await client.post(
"/v1/messages/render",