Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Add Demon Route as an LLM provider (#20853)

Demon Route7730e077146e
diff --git a/conf/llm_factories.json b/conf/llm_factories.json
index 89573c456d..8f43acc691 100644
--- a/conf/llm_factories.json
+++ b/conf/llm_factories.json
@@ -3483,6 +3483,15 @@
"rank": "989",
"url": "https://openrouter.ai/api/v1"
},
+ {
+ "name": "Demon Route",
+ "logo": "",
+ "tags": "LLM",
+ "status": "1",
+ "llm": [],
+ "rank": "880",
+ "url": "https://api.demonroute.com/v1"
+ },
{
"name": "Opper",
"logo": "",
diff --git a/conf/model.md b/conf/model.md
index 8f6de839e8..93b20a4f16 100644
--- a/conf/model.md
+++ b/conf/model.md
@@ -178,6 +178,7 @@ The following providers are **aggregators** — they host models from multiple u
| **Baidu (Qianwen)** | Ernie + third-party models |
| **CometAPI** | Multi-provider aggregator |
| **DeepInfra** | Open-source model hosting |
+| **Demon Route** | OpenAI-compatible router |
| **FuturMix** | Multi-provider aggregator |
| **GiteeAI** | Chinese aggregator |
| **GreenPT** | GLM-based models |
diff --git a/conf/models/demonroute.json b/conf/models/demonroute.json
new file mode 100644
index 0000000000..d34f2c8a0b
--- /dev/null
+++ b/conf/models/demonroute.json
@@ -0,0 +1,12 @@
+{
+ "name": "Demon Route",
+ "url": {
+ "default": "https://api.demonroute.com/v1"
+ },
+ "url_suffix": {
+ "chat": "chat/completions",
+ "models": "models"
+ },
+ "class": "demonroute",
+ "models": []
+}
diff --git a/internal/entity/models/demonroute.go b/internal/entity/models/demonroute.go
new file mode 100644
index 0000000000..0b699b9828
--- /dev/null
+++ b/internal/entity/models/demonroute.go
@@ -0,0 +1,41 @@
+//
+// Copyright 2026 The InfiniFlow Authors. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+package models
+
+// DemonRouteModel drives Demon Route, an OpenAI-compatible LLM router
+// (https://api.demonroute.com/v1). Chat only; the embedded
+// OpenAIAPICompatibleModel covers every call.
+type DemonRouteModel struct {
+ *OpenAIAPICompatibleModel
+}
+
+// NewDemonRouteModel creates a Demon Route driver.
+func NewDemonRouteModel(baseURL map[string]string, urlSuffix URLSuffix) *DemonRouteModel {
+ return &DemonRouteModel{
+ OpenAIAPICompatibleModel: NewOpenAIAPICompatibleModel(baseURL, urlSuffix),
+ }
+}
+
+// Name returns the driver name.
+func (m *DemonRouteModel) Name() string {
+ return "demonroute"
+}
+
+// NewInstance returns a driver bound to the given base URL.
+func (m *DemonRouteModel) NewInstance(baseURL map[string]string) ModelDriver {
+ return NewDemonRouteModel(baseURL, m.baseModel.URLSuffix)
+}
diff --git a/internal/entity/models/factory.go b/internal/entity/models/factory.go
index e733c1af1e..93860f240a 100644
--- a/internal/entity/models/factory.go
+++ b/internal/entity/models/factory.go
@@ -119,6 +119,8 @@ func (f *ModelFactory) CreateModelDriver(providerName string, baseURL map[string
return NewTokenPonyModel(baseURL, urlSuffix), nil
case "tokenhub":
return NewTokenHubModel(baseURL, urlSuffix), nil
+ case "demon route":
+ return NewDemonRouteModel(baseURL, urlSuffix), nil
case "novitaai":
return NewNovitaModel(baseURL, urlSuffix), nil
case "avian":
diff --git a/web/src/constants/llm.ts b/web/src/constants/llm.ts
index 8b950d62b5..6d3f1ade1a 100644
--- a/web/src/constants/llm.ts
+++ b/web/src/constants/llm.ts
@@ -111,6 +111,7 @@ export enum LLMFactory {
ApiRoute = 'API-Route',
CheaperInference = 'Cheaper Inference',
Opper = 'Opper',
+ DemonRoute = 'Demon Route',
}
// Please lowercase the file name