Skip to content

Instantly share code, notes, and snippets.

@quasoft
quasoft / qwen3.5_chat_template.jinja
Created March 9, 2026 19:45 — forked from sudoingX/qwen3.5_chat_template.jinja
Patched Jinja template for Qwen 3.5 27B - fixes developer role crash + preserves thinking mode (thinking = 1). Drop-in replacement for agent tools (OpenCode, Claude Code, Continue, Cursor, Aider). Without this patch, --chat-template chatml silently kills thinking mode.
{%- set image_count = namespace(value=0) %}
{%- set video_count = namespace(value=0) %}
{%- macro render_content(content, do_vision_count, is_system_content=false) %}
{%- if content is string %}
{{- content }}
{%- elif content is iterable and content is not mapping %}
{%- for item in content %}
{%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
{%- if is_system_content %}
{{- raise_exception('System message cannot contain images.') }}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Qwen3-Coder-30B-A3B vs Qwen3-Coder-480B-A35B Performance Comparison</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
* {