Fix chat_template.jinja — developer-role support + tool-argument mapping (stock template crashes agentic harnesses)

#2

Per your invite in club-3090 #662 — this replaces chat_template.jinja with the Unsloth-corrected Qwen3.6 template (drop-in for Tess; ~48-line delta vs stock).

What the stock template breaks:

  1. developer role → raise_exception. OpenAI-compat agent harnesses (Claude Code, opencode, many LangChain stacks) send developer messages; the stock template hard-crashes the request. The fix accepts developer alongside system.
  2. Tool-call arguments handling. Stock iterates tool_call.arguments|items, which crashes when a client (or a prior model turn replayed into history) supplies arguments as a JSON string instead of a mapping — mid-agent-loop, several turns in. The fix branches on arguments is mapping and passes strings through.

Why it matters here specifically: vLLM auto-loads chat_template.jinja from the model directory, so every vLLM user gets the crash silently — no flag they can see, just 500s once an agent harness touches the endpoint.

Quality evidence (so you can accept without a re-eval): we A/B'd this exact template against stock on the 2× RTX 3090 reference rig — full verifier-backed 8-pack (150 scenarios), both reasoning modes: totals within noise band both modes (template is quality-neutral; the value is purely that the crashes stop). Methodology + numbers: club-3090 #662 and #665.

Note: your FP8 repo ships the same stock template — the same file applies verbatim if you want to mirror this there.

migtissera changed pull request status to merged

Sign up or log in to comment