mlx-bun library API
    Preparing search index...
    • OptiQ-style decoded-text tool parsing. Tool markup is parsed only after generation, and only when tools are active; tokenizer ids are model-family-specific and must not be used globally. Supports the OpenAI JSON <tool_call>...</tool_call> contract, Qwen-style <function=name><parameter=...>, GLM-5.2's name<arg_key>...<arg_value>..., and MiniCPM5's native <function name="..."><param name="...">... template shape.

      Parameters

      • text: string
      • tools: ToolSpec[]

      Returns ParsedToolCall[]