• Your Name's avatar
    Fix: Expand broken tool call repair patterns · f6c2bf8e
    Your Name authored
    Added 3 new repair patterns to handle additional hallucinated formats:
    
    1. Pattern -1: Fix <tool_call> wrapper format
       - Converts <tool_call><list_files></list_files> to proper <tool> wrapper
       - Handles nested <tool_call><tool>...</tool></tool_call> format
    
    2. Pattern -2: Handle wrong wrapper tags
       - Fixes when model uses tool name as wrapper: <fetch_instructions>...</fetch_instructions>
       - Converts to proper JSON format: {"name": "tool_name", "arguments": {...}}
       - Supports all known tools (read_file, list_files, etc.)
    
    3. Pattern -3: Handle incomplete tool calls with missing parameters
       - Detects <tool><list_files></list_files> (no parameters)
       - Provides sensible defaults: list_files gets path='.' and recursive=False
       - Prevents extraction failures due to missing required parameters
    
    These patterns fix the hallucination issues observed in debug.log where the model
    produces broken XML formats despite --ggg (grammar-guided generation) being enabled.
    f6c2bf8e
Name
Last commit
Last update
.vscode Loading commit data...
codai Loading commit data...
.gitignore Loading commit data...
LICENSE.md Loading commit data...
README.md Loading commit data...
build.sh Loading commit data...
coder Loading commit data...
coderai Loading commit data...
requirements-nvidia.txt Loading commit data...
requirements-vulkan.txt Loading commit data...
requirements.txt Loading commit data...