The error message "server cancelled tool calls" is logged when the server receives a tool_call_cancellation event in LiveKit. This means that one or more pending function calls ("tools") were explicitly cancelled by the server. The framework then waits for any in-progress function calls to finish before completing the cancellation process.
The available information does not specify the root cause for server-initiated cancellations or provide a direct method to prevent them. These cancellations could be triggered by application logic, timeouts, or other internal server events. If this is interrupting critical functionality for you or you need guidance in tracing the source of these cancellations, please provide additional details about your setup and when these cancellations occur (such as the sequence of events, API calls, or custom logic in use).
Let me know if you can share more context or logs around when this error occurs, and I can help further troubleshoot or isolate possible causes.
Sources:
livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/experimental/realti...