renderers/qwen: tolerate non-leading system messages (#17757)

Coding clients may insert runtime system messages after the initial user turn. The shared Qwen renderer rejected these transcripts before rendering, turning a potentially usable non-standard request into an HTTP 500.

Pass non-leading system turns through the existing raw ChatML path and warn when qwen3.8 encounters one. Extend the Anthropic tool-route integration scenario to cover this message pattern and remove the obsolete rejection test.
This commit is contained in:
Daniel Hiltgen
2026-08-14 14:12:50 -07:00
committed by GitHub
parent f427fa0753
commit 87abaa019e
3 changed files with 4 additions and 18 deletions
+1
View File
@@ -265,6 +265,7 @@ func runAnthropicToolRoute(t *testing.T, ctx context.Context, endpoint, model st
},
"messages": []any{
map[string]any{"role": "user", "content": []any{map[string]any{"type": "text", "text": "Call get_weather for Paris."}}},
map[string]any{"role": "system", "content": []any{map[string]any{"type": "text", "text": "Runtime token budget update."}}},
map[string]any{"role": "assistant", "content": []any{map[string]any{
"type": "tool_use",
"id": toolRoutePreviousID,