Skip to content

feat(implement): rewrite reasoning-parser and tool-parser recipes#11

Merged
slin1237 merged 1 commit into
mainfrom
feat/parser-recipes-v2
Mar 3, 2026
Merged

feat(implement): rewrite reasoning-parser and tool-parser recipes#11
slin1237 merged 1 commit into
mainfrom
feat/parser-recipes-v2

Conversation

@slin1237
Copy link
Copy Markdown
Contributor

@slin1237 slin1237 commented Mar 3, 2026

Summary

Rewrite both the reasoning-parser and tool-parser recipes from vague descriptions into parameterized templates with concrete discovery guides referencing vLLM and SGLang.

Changes

skills/implement/reasoning-parser.md

  • Token discovery guide: vLLM (17 models), SGLang, HuggingFace tokenizer_config, model cards, API observation
  • Known token tables: 9 in SMG + 8 candidates from vLLM/SGLang
  • Parameterized Rust template with 7 tests
  • initial_in_reasoning decision guide

skills/implement/tool-parser.md

  • Format discovery guide: vLLM (34 parsers), SGLang (25 detectors)
  • 5 format type categories with reuse strategies
  • Known format tables: 13 in SMG + 12 candidates from vLLM/SGLang
  • JSON-with-tags parameterized template with streaming
  • 7 test case template
  • Non-standard field name mapping (Cohere, Llama)
  • Decision guide for when NOT to use the template

Test Plan

  • All GitHub reference links resolve correctly
  • Known format tables cover all existing SMG parsers

… guide

The old recipe described what to do but left the agent to figure out
the boilerplate and token discovery. Since adding a reasoning parser
is almost entirely mechanical (4 inputs → 4 files touched), the new
recipe provides:

Token discovery guide (6-step priority order):
1. Check vLLM (17 models) and SGLang implementations first — tokens
   already validated against real model output
2. HuggingFace tokenizer_config.json → added_tokens_decoder
3. HuggingFace tokenizer_config.json → chat_template Jinja2
4. HuggingFace model card / README
5. Provider API docs
6. Send test request and observe raw output

Reference tables:
- 9 model families currently in SMG with exact tokens and flags
- 8 model families in vLLM/SGLang not yet in SMG (candidates to add)
- initial_in_reasoning decision guide

Template:
- Complete parameterized Rust parser file with 7 tests
- Exact registration steps for mod.rs, lib.rs, factory.rs
- Custom logic section for MiniMax-style edge cases
- Common mistakes table with consequences and fixes

Also rewrites tool-parser.md with the same depth:
- Format discovery guide referencing vLLM (34 parsers) and SGLang (25)
- 5 format type categories with reuse strategies
- 13 known formats in SMG + 12 candidates from vLLM/SGLang
- Parameterized JSON-with-tags template (most common case)
- 7 test cases template
- Non-standard field name mapping table
- Decision guide for when NOT to use the template

Signed-off-by: Simo Lin <[email protected]>
Signed-off-by: Simo Lin <[email protected]>
@slin1237 slin1237 merged commit 5148674 into main Mar 3, 2026
2 checks passed
@slin1237 slin1237 deleted the feat/parser-recipes-v2 branch March 3, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant