Per-call options handed to a tool's execute, separate from its parsed input.
signal is the AI SDK's own abortSignal for the tool call, which fires when the model's
turn is cancelled. Forward it to any @tomtom-org/maps-sdk/services call the tool makes
(as signal), so a cancelled turn also cancels its in-flight HTTP requests.
Do NOT forward it into work that outlives the turn, such as a monitor's recurring tick or any
deferred job. Those fire after the signal has aborted, and a monitor treats a rejected tick
as fatal (it clears its own interval), so a leaked signal kills the monitor rather than
cancelling a request.
Per-call options handed to a tool's
execute, separate from its parsed input.signalis the AI SDK's ownabortSignalfor the tool call, which fires when the model's turn is cancelled. Forward it to any@tomtom-org/maps-sdk/servicescall the tool makes (assignal), so a cancelled turn also cancels its in-flight HTTP requests.Do NOT forward it into work that outlives the turn, such as a monitor's recurring tick or any deferred job. Those fire after the signal has aborted, and a monitor treats a rejected tick as fatal (it clears its own interval), so a leaked signal kills the monitor rather than cancelling a request.