feat(implement): rewrite reasoning-parser and tool-parser recipes#11
Merged
Conversation
… 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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.mdinitial_in_reasoningdecision guideskills/implement/tool-parser.mdTest Plan