### Answer
Based on the available sources, the "Internal Server Error" when getting LLM responses can occur due to several issues [(1) ](
) [(2) ](
) .
According to community discussions, this error means the LLM call itself failed upstream, not your flow [(1) ](
) . To troubleshoot this issue:
Start with a clean test - disable Knowledge Base, MCPs, and Functions, then retry with just a short prompt .
Check your tokens - if your prompt shows around 3k tokens, trim it down or reduce KB chunks .
Upgrade model config - lower max_output_tokens (e.g. 512–1024) and try a known-good model .
Test your model directly - if it's still failing, it's usually a provider issue (quota, outage, or key) . Test the model directly with a curl call; if curl fails, swap the key/model .
The error can also occur when switching between states in conversation flows, particularly with transition conditions [(2) ](
) .
If you're using a custom LLM WebSocket setup, ensure your WebSocket server is properly configured and can handle the communication protocol as outlined in the setup guide [(3) ](
) [(4) ](
) .