Bluestep JS Documentation
    Preparing search index...

    Interface AiToolCallDecision

    Return shape for onToolCall: {action: "run"} runs the call (with arguments to run it with different arguments than the model wrote), {action: "deny", reason} refuses it and the model is shown the reason as an error result, {action: "defer"} leaves it unanswered so the call ends with outcome: "STOPPED_BY_HOOK" and lists it under deferred for a later resume. Returning nothing runs the call as requested. B.ai.streamingAgent honours run and deny and refuses defer: a live audio session has no resume to answer a deferred call with, so the turn ends there with an error saying so.

    Example: ```javascript onToolCall: (call) => { if (call.name === "archive_note") { return { action: "defer" }; } if (call.name === "delete_entry") { return { action: "deny", reason: "not permitted here" }; } return { action: "run", arguments: { ...call.arguments, source: "intake-agent" } }; }, ```

    interface AiToolCallDecision {
        action: "run" | "deny" | "defer";
        arguments?: object;
        reason?: string;
    }
    Index
    action: "run" | "deny" | "defer"

    "run", "deny" or "defer".

    arguments?: object

    With run only: the arguments to run the call with, replacing the model's. The transcript keeps the model's own; the result's toolCalls summary records these.

    reason?: string

    With deny, required: what the model is told, as an error tool result, about why the call was refused.