DaoXE Multi-Model Chat with Automatic Model Fallback
Loading workflow…
Workflow Description
A manually triggered workflow that sets a system message, a user prompt, and two model IDs, then sends an OpenAI-compatible chat completion request to the DaoXE gateway with the primary model. If that request fails, the error output routes the same prompt to a fallback model, and the final Set node extracts the answer along with the serving model name and the path taken (primary or fallback).
How it works
- 1.The 'When clicking Test workflow' manual trigger starts the run on demand.
- 2.The 'Set inputs' node defines prompt, system, primary_model, and fallback_model as string values.
- 3.The first HTTP node POSTs to https://daoxe.com/v1/chat/completions with the primary model and Header Auth credentials supplying the Authorization header.
- 4.On success the main output goes to 'Answer (primary)'; on error the continueErrorOutput branch goes to the fallback HTTP node.
- 5.The fallback HTTP node resends the same system and user messages with the fallback model and feeds 'Answer (fallback)'.
- 6.Each Answer node extracts answer from choices[0].message.content, served_model from model, and tags via as primary or fallback.
Use cases
- Keeping text generation available through a backup model when the primary model request errors.
- Comparing or validating two DaoXE models against the same prompt through one API key.
- Prototyping a resilient chat step that can be extended into a larger assistant workflow.
Requirements
- A Header Auth credential in n8n named Authorization with value Bearer <DAOXE_API_KEY>, selected in both HTTP nodes.
- Replacing YOUR_DAOXE_MODEL_ID and YOUR_DAOXE_FALLBACK_MODEL_ID with two exact model IDs available to your account (from the DaoXE dashboard or GET /v1/models).
- Access to daoxe.com (not available in mainland China) and an n8n instance allowed to make outbound HTTP requests.
Setup and testing in n8n
- Create the Header Auth credential, select it in both HTTP nodes, and enter two real model IDs in 'Set inputs'.
- Click Test workflow and confirm execution reaches 'Answer (primary)' with via equal to primary and a text answer.
- Set an invalid primary model ID, rerun, and verify execution flows through 'Answer (fallback)' with via equal to fallback.
- Inspect each node's input and output in the execution log to confirm answer and served_model are extracted correctly.
Service Value
Ready-made workflow template for automation delivery and service execution.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (7)
Sticky Note
Sticky Note
When clicking 'Test workflow'
Manual Trigger
Set inputs
Set
Primary model (DaoXE)
HTTP Request
Fallback model (DaoXE)
HTTP Request
Answer (primary)
Set
Answer (fallback)
Set
Source and license
Sticky Note
Fresh workflows, straight to your inbox
Get newly published DROPIDEA workflows, a clear overview of what they do, and a link to explore them.
- New workflows
- Clear overviews
- Setup guides