diff --git a/doc/testing_matrix.md b/doc/testing_matrix.md
index 2947d60c0..8ae551cd6 100644
--- a/doc/testing_matrix.md
+++ b/doc/testing_matrix.md
@@ -762,7 +762,11 @@ files stay in its suite-owned temporary directory.
Record source revision, runtime artifact identity and device with the result.
This row qualifies image wiring, history and lifecycle for this model and CPU;
it does not qualify audio, thinking, GPU or perceptual quality generally. The
-independent `litert-lm-chat-features-smoke` retains its thinking oracle.
+independent `litert-lm-chat-features-smoke` retains its thinking oracle. It
+records the thinking row as `not_applicable` (with the reason) when the loaded
+bundle's chat template never reads `enable_thinking` and always closes the
+think block, as the Qwen3.5 `_int8`, `-VL_int8` and `_int8_gpu_composite_v0190`
+bundles do.
### LiteRT-LM lifecycle regression
diff --git a/test/unit/tooling/litert_lm_chat_features_smoke_test.dart b/test/unit/tooling/litert_lm_chat_features_smoke_test.dart
index c81339ba1..f1dec3cc6 100644
--- a/test/unit/tooling/litert_lm_chat_features_smoke_test.dart
+++ b/test/unit/tooling/litert_lm_chat_features_smoke_test.dart
@@ -196,6 +196,52 @@ void main() {
},
);
+ group('thinkingSupportForTemplate', () {
+ const closedAlways =
+ '{%- if m.role == "assistant" %}\n\n\n\n{% endif -%}'
+ '{%- if add_generation_prompt %}<|im_start|>assistant\n'
+ '\n\n\n\n{% endif -%}';
+ const honoursSwitch =
+ '{%- if add_generation_prompt %}<|im_start|>assistant\n'
+ '{%- if enable_thinking is defined and enable_thinking is false %}'
+ '\n\n\n\n{%- else %}\n{%- endif %}'
+ '{% endif -%}';
+
+ test('reports a template that always closes the think block as N/A', () {
+ final support = smoke.thinkingSupportForTemplate(closedAlways);
+ expect(support.canProduceThinking, isFalse);
+ expect(support.reason, contains('enable_thinking'));
+ });
+
+ test('keeps the assertion for a template that reads enable_thinking', () {
+ expect(
+ smoke.thinkingSupportForTemplate(honoursSwitch).canProduceThinking,
+ isTrue,
+ );
+ });
+
+ test('keeps the assertion when only history closes the think block', () {
+ const openInPrompt =
+ '{%- if m.role == "assistant" %}\n\n\n\n{% endif -%}'
+ '{%- if add_generation_prompt %}<|im_start|>assistant\n\n'
+ '{% endif -%}';
+ expect(
+ smoke.thinkingSupportForTemplate(openInPrompt).canProduceThinking,
+ isTrue,
+ );
+ });
+
+ test('keeps the assertion without a readable or closed-think template', () {
+ expect(smoke.thinkingSupportForTemplate(null).canProduceThinking, isTrue);
+ expect(
+ smoke
+ .thinkingSupportForTemplate('<|im_start|>assistant\n\n')
+ .canProduceThinking,
+ isTrue,
+ );
+ });
+ });
+
test('prints usage and exits 64 without a model path', () async {
final smoke = await compileDartScript(
'tool/litert_lm_chat_features_smoke.dart',
diff --git a/test/unit/tooling/test_matrix_test.dart b/test/unit/tooling/test_matrix_test.dart
index e332cc5f5..926fc83c5 100644
--- a/test/unit/tooling/test_matrix_test.dart
+++ b/test/unit/tooling/test_matrix_test.dart
@@ -560,6 +560,20 @@ void main() {
},
);
+ test('documents the LiteRT-LM chat smoke thinking N/A', () {
+ final row = testMatrixRows.singleWhere(
+ (row) => row.id == 'litert-lm-chat-features-smoke',
+ );
+
+ expect(
+ row.covers.replaceAll(RegExp(r'\s+'), ' '),
+ contains(
+ 'not_applicable with a reason when the bundle template always '
+ 'closes the think block, as for the Qwen3.5 int8 bundles',
+ ),
+ );
+ });
+
test('includes targeted local model smoke rows', () {
final ids = testMatrixRows.map((row) => row.id).toSet();
diff --git a/tool/litert_lm_chat_features_smoke.dart b/tool/litert_lm_chat_features_smoke.dart
index 0e9abd54c..5a2f548f7 100644
--- a/tool/litert_lm_chat_features_smoke.dart
+++ b/tool/litert_lm_chat_features_smoke.dart
@@ -3,6 +3,7 @@ import 'dart:io';
import 'package:llamadart/backend.dart';
import 'package:llamadart/llamadart.dart';
+import 'package:llamadart/src/backends/litert_lm/litert_lm_bundle_template.dart';
import 'audio_chat_smoke_support.dart';
import 'litert_lm_tokenizer_fixture.dart';
@@ -83,6 +84,9 @@ Future main(List args) async {
);
final toolLoopCutoff = await _runToolLoopCutoffScenario(engine);
+ final thinkingSupport = thinkingSupportForTemplate(
+ readLiteRtLmBundleChatTemplate(modelPath),
+ );
final thinking = await _runScenario(
engine: engine,
messages: const [
@@ -229,7 +233,13 @@ Future main(List args) async {
'plain': plain.toJson(),
'cutoff': cutoff.toJson(),
'toolLoopCutoff': toolLoopCutoff,
- 'thinking': thinking.toJson(),
+ 'thinking': {
+ if (!thinkingSupport.canProduceThinking) ...{
+ 'status': 'not_applicable',
+ 'reason': thinkingSupport.reason,
+ },
+ ...thinking.toJson(),
+ },
'textHistory': textHistory.toJson(),
'sessionStructuredOutput': sessionStructuredOutput,
'toolCall': toolCall.toJson(),
@@ -254,6 +264,7 @@ Future main(List args) async {
plain: plain,
cutoff: cutoff,
thinking: thinking,
+ thinkingSupport: thinkingSupport,
textHistory: textHistory,
toolCall: toolCall,
requiredUnsupportedExpected: requiredUnsupportedExpected,
@@ -331,10 +342,45 @@ Future