llmwire - v2.2.0
    Preparing search index...

    Function recoverLeakedToolCalls

    • Weak local models print <function=name>{json}</function> as text instead of a real tool call. Recovers those (first occurrence per tool wins) and strips the markup from the shown text. Only tools in tools are recovered; anything else is left as written.

      Parameters

      • text: string
      • tools: Tool[] | undefined

      Returns { text: string; toolCalls: ToolCall[] }