Tool calling
Multi-turn OpenAI-shape tool loops. Cline drop-in.Malibu ships a multi-turn OpenAI-compatible tool-calling surface for Qwen 2.5 and Llama 3.3 chat templates. First-turn emission, second-turn
role: "tool" acceptance, and assistant-history rendering all work. Anchor framework: Cline — Malibu is a drop-in target with no configuration beyond the OpenAI base URL.
Single-turn: emitting a tool call
function.arguments is a JSON-encoded string per OpenAI’s wire shape — json.loads(call.function.arguments) to get a dict.
Multi-turn: feeding the result back
After you execute the tool locally, feed the result back withrole: "tool" and the matching tool_call_id:
Streaming tool-call deltas
Setstream=True and reassemble tool_calls from the deltas the same way you would with OpenAI:
Limits
Requests that exceed a cap return a 400 with the field named.
Supported models
- Qwen 2.5 family
- Llama 3.3 family
tools in the request but fall back to normal assistant text — no tool_calls[] will be emitted.
Buyer-side validation
Emittedtool_calls[] reflect model output, not provider-verified intent. See Buyer-side validation.