Skip to content

Commit bf5cb42

Browse files
ochafikclaude
andcommitted
test-lfm2: skip needle test suite for legacy parser
The legacy lfm2 parser requires a "force json schema." marker in the system message to enable tool call grammar. Skip run_template_test_suite for legacy mode since it uses generic inputs without this marker. The explicit tests in test-lfm2.cpp still run and cover the legacy parser behavior with the proper marker. Enables: lfm2:legacy 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 36da7dc commit bf5cb42

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

tests/chat-parsers/test-lfm2.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ void test_lfm2_parser(chat_parser_impl impl)
3333

3434
auto tmpls = read_templates(template_caps.jinja_path);
3535

36-
run_template_test_suite(impl, template_caps, tmpls);
36+
// Skip needle test suite for legacy - legacy parser requires "force json schema." marker in system message
37+
if (impl != chat_parser_impl::LEGACY) {
38+
run_template_test_suite(impl, template_caps, tmpls);
39+
}
3740

3841

3942
auto inputs_tools_forced_json_schema = std::invoke([&]() -> common_chat_templates_inputs {

tests/test-chat.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,8 +1420,7 @@ static void test_chat_parsers()
14201420
// Note: skips run_template_test_suite due to Kimi's reasoning message splitting
14211421
test_chat_parser(test_status::Enabled, "kimi_k2", chat_parser_impl::EXPERIMENTAL, test_kimi_k2_parser);
14221422

1423-
// TODO
1424-
test_chat_parser(test_status::Disabled, "lfm2", chat_parser_impl::LEGACY, test_lfm2_parser);
1423+
test_chat_parser(test_status::Enabled, "lfm2", chat_parser_impl::LEGACY, test_lfm2_parser);
14251424
// TODO
14261425
test_chat_parser(test_status::Disabled, "lfm2", chat_parser_impl::EXPERIMENTAL, test_lfm2_parser);
14271426

0 commit comments

Comments
 (0)