# LLM Fallback

**URL:** <https://community.mindstudio.ai/t/llm-fallback/2153>\
**Category:** MindStudio General\
**Created:** [September 29, 2026, 3:39am UTC](https://community.mindstudio.ai/t/llm-fallback/2153 "2026-09-29T03:39:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![buboylav](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@buboylav](https://community.mindstudio.ai/u/buboylav)\
**Post date:** [September 29, 2026, 3:39am UTC](https://community.mindstudio.ai/t/llm-fallback/2153/1 "2026-09-29T03:39:37Z")

</div>

I find that at times when I execute Generate Text, the AI model hangs. When I change to another AI model (Gemini to OpenAI), it proceeds. Can you help me implement a workflow to create a fallback option/alternative AI model in case that primary AI model hangs?

---

<div class="post-metadata">

**Author:** ![Alex\_MindStudio](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.mindstudio.ai/alex_mindstudio/32/27_2.png) [@Alex\_MindStudio](https://community.mindstudio.ai/u/Alex_MindStudio)\
**Post date:** [September 29, 2026, 3:25pm UTC](https://community.mindstudio.ai/t/llm-fallback/2153/2 "2026-09-29T15:25:58Z")

</div>

Hi @buboylav,

Gemini models have been unreliable this year and often return errors, so I’d generally recommend using a different provider.

As for fallback behavior, you can pair a Run Workflow block with a Router block. The Run Workflow block has an Error Behavior setting that lets the run continue even if the sub-workflow fails. The Router block can then check the Run Workflow block’s output variable to see whether the main model returned a result before triggering another workflow.

Here’s a remix link to a sample agent I built that demonstrates this approach:  
[https://app.mindstudio.ai/agents/image-generator-826dab3b/remix](https://app.mindstudio.ai/agents/image-generator-826dab3b/remix)

I included a short script in the Gemini workflow that fails on every run, so you can see the fallback in action.

One thing to keep in mind is that the Run Workflow block needs a JSON array for its input variable, which is why there’s a tiny custom function right before it.

---

<div class="post-metadata">

**Author:** ![benjaminrobinson](https://avatars.discourse-cdn.com/v4/letter/b/a587f6/32.png) [@benjaminrobinson](https://community.mindstudio.ai/u/benjaminrobinson)\
**Post date:** [November 12, 2026, 4:37pm UTC](https://community.mindstudio.ai/t/llm-fallback/2153/3 "2026-11-12T16:37:27Z")

</div>

The Error Behavior + Router approach works well for failures that actually return an error, but it’s worth checking what happens on a true hang. If the Generate Text block never resolves, the sub-workflow may not fail at all, so the Run Workflow block just sits there and the router never fires. If there’s a timeout setting on the block, setting it low is the safety net; otherwise the fallback only covers fast failures. Worth testing by pointing the primary at a deliberately stalled endpoint rather than one that errors immediately.
