https://retellai.com/?utm_source=discord&utm_medium=seo logo
We're getting a LLM error whenever the custom func...
# ❓・ai-evy-support
n
@AI Evy We're getting a LLM error whenever the custom function dr_number gets called. The custom function runs, but it ends up running 3 times and doesn't effectively finish the flow.
a
Thanks for tagging me @nicole_10051. I'll look through relevant sources and get back to you shortly.
sue [(4) ]() [(5) ]() - Verify your endpoint returns proper 200-level status codes - Check your function timeout settings - Review the "Speak after execution" configuration for your function [(2) ]() - Examine your call logs for the specific error messages If the issue persists after checking these items, I recommend visiting [Contact Sales]() or [) for additional support.
n
okay, let me know if you want screenshots
a
### Answer Based on the available sources, there are a few potential issues when custom functions cause errors or run multiple times: Common Custom Function Issues: 1. **Request Timeout & Retries**: When a custom function request fails, it will be retried up to 2 times [(1) ]() . The request will timeout in your specified timeout period, or 2 minutes if not specified . If your function is taking too long or failing, this could explain why it's running 3 times (1 initial attempt + 2 retries) . 2. **Response Status Code**: Your endpoint must return a status code between 200-299 to indicate success . If your function isn't returning a proper success status, Retell may retry the request. 3. **Request Verification**: Verify that your endpoint is properly validating requests from Retell using the
X-Retell-Signature
header [(2) ]() [(1) ]() . Invalid signature handling could cause unexpected behavior. 4. **Speech Behavior Settings**: Check your "Speak after execution" setting [(2) ]() . If this is disabled when it should be enabled, the agent may not continue the conversation properly after the function executes . 5. **Known Issue**: There was a reported issue where Conversation Flow agents could stay silent after a function node when a function and response happen at the same time, due to a message order issue [(3) ]() . Troubleshooting Steps: - Test your custom function in the LLM Playground with mock responses to isolate whether it's a function implementation issue or flow configuration is
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[3] Conversation Flow agent potentially stay silent after function node](https://retell.discourse.group/t/conversation-flow-agent-potentially-stay-silent-after-function-node/135) [[4] Manually test your agent](https://docs.retellai.com/test/llm-playground) [[5] custom function works in Test LLM, but gives an error in a Voice Call](https://discord.com/channels/1186424376300679209/1343000139689754674) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.