Intermittent Tool Invocation Failure in Chat Completion: Seeking Solutions

I’ve encountered an issue with a probabilistic failure when invoking tools through chat completion. Specifically, when I include the tool invocation command within the prompt and specify the tool in the tools parameter, the response occasionally reads, “I am currently unable to directly invoke [specific tool]”, with the probability of this issue occurring increasing alongside the length of the input tokens. I’ve attempted to alter the name of the tool, but this hasn’t resolved the issue. Below is a distribution chart of the failure probability I’ve tested. The x-axis represents the number of input tokens, and the y-axis represents the failure probability. Can anyone advise on how to address this problem?
79b95ddae78d0cd5ea8b99d5b2670b6