Files
ragflow/docs/guides/models/supported_models.mdx

102 lines
5.7 KiB
Plaintext
Raw Normal View History

---
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 |
| --------------------- | ----------------------------------------------- |
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 17:50:14 +03:00
| 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` |
feat(stt): add FunASR / SenseVoice provider (#16473) ### Summary Adds FunASR as a self-hosted speech-to-text provider through its OpenAI-compatible `/v1/audio/transcriptions` endpoint. This is a focused replacement for #15526 by @Rene0422 and relates to #15448. The unrelated Markdown parser changes from the previous branch are intentionally removed so this PR contains only the FunASR provider integration. - register FunASR as a `SPEECH2TEXT` factory; - add `FunASRSeq2txt` with `sensevoice` and `http://localhost:8000/v1` defaults, an optional API key, URL normalization, and inherited transcription handling; - wire FunASR into the current local-provider schema with a prefilled local URL and official documentation link; - discover the server's `/v1/models` dynamically and expose every returned model as speech-to-text in the model picker; - use RAGFlow's existing default provider icon fallback instead of referencing a missing `funasr` asset; - list FunASR in the supported-provider documentation; - add focused backend and frontend regression tests. ### Validation - focused backend pytest suite -> `7 passed` - real CPU `funasr-server` + RAGFlow provider smoke test -> discovered `fun-asr-nano`, `sensevoice`, and `paraformer`; transcribed a real WAV as `我现在在录一段测试音频` (`10` tokens, `0.504s`) - `ruff check` and `ruff format --check` on the changed Python files - `python3 -m py_compile` on the provider and its test - JSON parse and a semantic assertion for exactly one enabled FunASR `SPEECH2TEXT` factory - focused frontend Jest test -> `2 passed` - ESLint and Prettier on all changed TypeScript files - `npm run build` -> production build succeeded (`14,181` modules transformed) - `git diff --check` ### Deployment Run FunASR separately and point the RAGFlow provider at it: ```bash pip install funasr funasr-server --device cuda --model sensevoice ``` The API key remains optional because the stock local server does not require authentication. A key can still be supplied when the endpoint is protected by a gateway. --------- Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com> Co-authored-by: LauraGPT <LauraGPT@users.noreply.github.com>
2026-07-15 19:02:05 +08:00
| 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.
:::