Expand description
Parse-back helper — Phase 3 of action-grain unification (2026-04-20).
Inverse of the Phase 2 adapters: takes raw LLM output in one of 5 text/JSON formats and extracts structured tool-call records.
Provider coverage:
hermes:<tool_call>{...}</tool_call>llama31:<|python_tag|>{...}<|eom_id|>anthropic-tools:<function_calls>…<invoke name="…"><parameter name="…">…</parameter>…</invoke></function_calls>openai-tools: assistant message JSON withtool_calls: [...]markdown-tools:```json {...} ```
All regexes are compiled via regex::RegexBuilder::size_limit(1 MB)
to defend against ReDoS / oversized-pattern attacks, following the
Phase-1 validator precedent.
Structs§
- Parse
Error - A non-fatal parse error — a malformed tool call that was skipped. Multiple may appear alongside successfully-parsed calls.
- Parsed
Tool Call - A successfully parsed tool call.
Functions§
- parse
- Parse the LLM’s raw output for the given provider.