Files
ragflow/docs/guides/models/supported_models.mdx
Eugene 6b11f62391 feat: add AIMLAPI (aimlapi.com) as a model provider (#17311)
### Summary

This PR adds **aimlapi.com** as a model provider, so a RAGFlow user can
enter one API key in the model settings and use AIMLAPI's models across
the app. AIMLAPI ([aimlapi.com](https://aimlapi.com)) is an
OpenAI-compatible aggregator that serves 700+ models (LLM, embedding,
vision, TTS, ASR) from many providers behind a single API.

The change mirrors the repo's existing "add provider" pattern (e.g.
FuturMix / OpenRouter): provider logic lives in the same files those
providers use, and shared / UI files get only registration entries.

**Backend**
- `conf/llm_factories.json` — the `aimlapi.com` factory entry.
- `rag/llm/__init__.py`, `rag/llm/{chat,embedding,cv}_model.py` —
LiteLLM adapters (chat, embedding, image2text) with a production base
URL, overridable via `AIMLAPI_API_URL`.
- `rag/llm/model_meta.py` — an `AIMLAPI` model-meta so the provider
lists its full `/v1/models` catalog dynamically (classified by the
endpoint `type`), the same way OpenRouter does.
- `api/apps/restful_apis/aimlapi_api.py` — an optional "Get API key"
flow using AIMLAPI's agent-authorization (OAuth 2.0 Device Authorization
Grant, RFC 8628). The device code is kept server-side (Redis); only the
issued key reaches the browser.

**Frontend (`web/`)**
- Provider registration (constant, icon allowlist, brand logo), the
model picker (`LIST_MODEL_PROVIDERS` + a `buildLocalConfig` entry), and
the "Get API key" button in the provider dialog. Locales added to `en`
and `zh`.

**Configuration** — production defaults are compiled in; endpoints and
the partner id are overridable through `AIMLAPI_*` environment
variables, so the same build works across environments.

**Testing** — the `web` build passes; chat, embedding and dynamic model
listing were smoke-tested against the live API.
2026-07-24 22:50:14 +08:00

102 lines
5.7 KiB
Plaintext

---
sidebar_position: 3
slug: /supported_models
sidebar_custom_props: {
categoryIcon: LucideBox
}
---
# Model providers
import APITable from '@site/src/components/APITable';
A complete list of model providers supported by RAGFlow, which will continue to expand.
```mdx-code-block
<APITable>
```
| Provider | URL |
| --------------------- | ----------------------------------------------- |
| aimlapi.com | `https://aimlapi.com` |
| Anthropic | `https://www.anthropic.com` |
| Astraflow | `https://astraflow.ucloud-global.com/en-us` |
| Astraflow-CN | `https://astraflow.ucloud.cn/` |
| Avian | `https://www.avian.io` |
| Azure-OpenAI | `https://azure.microsoft.com/en-us/products/ai-services/openai-service` |
| BaiChuan | `https://www.baichuan-ai.com` |
| BaiduYiyan | `https://yiyan.baidu.com` |
| Bedrock | `https://aws.amazon.com/bedrock/` |
| Cohere | `https://cohere.com` |
| DeepSeek | `https://www.deepseek.com` |
| Fish Audio | `https://fish.audio` |
| FunASR | `https://github.com/modelscope/FunASR` |
| FuturMix | `https://futurmix.ai` |
| Gemini | `https://gemini.google.com` |
| Google Cloud | `https://cloud.google.com` |
| GPUStack | `https://gpustack.ai` |
| Groq | `https://groq.com` |
| HuggingFace | `https://huggingface.co` |
| Jina | `https://jina.ai` |
| LocalAI | `https://localai.io` |
| LongCat | `https://longcat.chat` |
| LM-Studio | `https://lmstudio.ai` |
| MiniMax | `https://www.minimaxi.com` |
| MinerU | `https://mineru.net/` |
| Mistral | `https://mistral.ai` |
| ModelScope | `https://www.modelscope.cn` |
| Moonshot | `https://www.moonshot.cn` |
| NovitaAI | `https://novita.ai` |
| NVIDIA | `https://www.nvidia.com` |
| Ollama | `https://ollama.com` |
| OpenAI | `https://openai.com` |
| OpenAI-API-Compatible | N/A |
| OpenRouter | `https://openrouter.ai` |
| Perplexity | `https://www.perplexity.ai` |
| Replicate | `https://replicate.com` |
| PPIO | `https://ppio.com` |
| SILICONFLOW | `https://siliconflow.cn` |
| StepFun | `https://www.stepfun.com` |
| Tencent Hunyuan | `https://hunyuan.tencent.com` |
| Tencent Cloud | `https://cloud.tencent.com` |
| TogetherAI | `https://www.together.ai` |
| TokenPony | `https://tokenpony.cn` |
| Tongyi-Qianwen | `https://tongyi.aliyun.com` |
| Upstage | `https://www.upstage.ai` |
| VLLM | `https://vllm.ai` |
| VolcEngine | `https://www.volcengine.com` |
| Voyage AI | `https://www.voyageai.com` |
| Xinference | `https://github.com/xorbitsai/inference` |
| XunFei Spark | `https://xinghuo.xfyun.cn` |
| xAI | `https://x.ai` |
| ZHIPU-AI | `https://www.zhipuai.cn` |
| DeepInfra | `https://deepinfra.com` |
| 302.AI | `https://302.ai` |
| CometAPI | `https://cometapi.com` |
| DeerAPI | `https://deerapi.com` |
| Jiekou.AI | `https://jiekou.ai` |
```mdx-code-block
</APITable>
```
:::danger IMPORTANT
If your model is not listed here but has APIs compatible with those of OpenAI, click **OpenAI-API-Compatible** on the **Model providers** page to configure your model.
:::
## Example: AI Badgr (OpenAI-compatible)
You can use **AI Badgr** with RAGFlow via the existing OpenAI-API-Compatible provider.
To configure AI Badgr:
- **Provider**: `OpenAI-API-Compatible`
- **Base URL**: `https://aibadgr.com/api/v1`
- **API Key**: your AI Badgr API key (from the AI Badgr dashboard)
- **Model**: any AI Badgr chat or embedding model ID, as exposed by AI Badgr's OpenAI-compatible APIs
AI Badgr implements OpenAI-compatible endpoints for `/v1/chat/completions`, `/v1/embeddings`, and `/v1/models`, so no additional code changes in RAGFlow are required.
:::note
The list of supported models is extracted from [this source](https://github.com/infiniflow/ragflow/blob/main/rag/llm/__init__.py) and may not be the most current. For the latest supported model list, please refer to the Python file.
:::