Repository navigation
docs: update model provider configuration guide - #17343
Yannnnnnny wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughThe model setup guide now centers on provider instances rather than startup API-key configuration. It documents provider connection setup, model and custom-model registration, default model selection, model categories, usage patterns, and an updated supported-models reference. ChangesModel Provider Guide
Estimated code review effort: 1 (Trivial) | ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
docs/guides/models/llm_api_key_setup.md (1)
69-76: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winClarify provider-specific custom-model identifiers.
common/settings.py(Lines [429-443]) normalizes names to<model>@<factory>, whileinternal/dao/tenant_llm.go(Lines [238-270]) applies factory-specific suffix matching. Clarify whether users should enter the raw provider model ID or a provider-specific normalized identifier, especially for LocalAI, HuggingFace, and OpenAI-compatible providers.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/models/llm_api_key_setup.md` around lines 69 - 76, Clarify the custom-model naming guidance around the model-name instructions by documenting whether users should enter the provider’s raw model ID or the normalized <model>@<factory> identifier. Specify the expected format and matching behavior for LocalAI, HuggingFace, and OpenAI-compatible providers, while keeping the existing steps unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/guides/models/llm_api_key_setup.md`:
- Around line 29-30: Update the provider setup guidance around the
instance-saving flow to state the required order explicitly: save the API key
and Base URL, verify the connection successfully, then add models. Keep the
existing instance creation and configuration guidance unchanged.
- Around line 10-14: Rename the “Get model API key” heading in the model API key
setup guide to describe configuring model provider instances. Update the
surrounding introduction as needed to consistently direct readers to the current
provider-management workflow, removing references to the obsolete startup
API-key process.
- Around line 98-116: Add a Moderation row to the model types table, matching
the existing columns and the description in item 3, or explicitly clarify that
moderation is an optional policy check outside the registered model types. Keep
the table and the subsequent model-type guidance consistent.
---
Nitpick comments:
In `@docs/guides/models/llm_api_key_setup.md`:
- Around line 69-76: Clarify the custom-model naming guidance around the
model-name instructions by documenting whether users should enter the provider’s
raw model ID or the normalized <model>@<factory> identifier. Specify the
expected format and matching behavior for LocalAI, HuggingFace, and
OpenAI-compatible providers, while keeping the existing steps unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5a13cdbe-6a76-471a-b170-2e8aa40e0a70
⛔ Files ignored due to path filters (8)
docs/guides/models/image (1).pngis excluded by!**/*.pngdocs/guides/models/image (2).pngis excluded by!**/*.pngdocs/guides/models/image (3).pngis excluded by!**/*.pngdocs/guides/models/image (4).pngis excluded by!**/*.pngdocs/guides/models/image (5).pngis excluded by!**/*.pngdocs/guides/models/image-1.pngis excluded by!**/*.pngdocs/guides/models/image-2.pngis excluded by!**/*.pngdocs/guides/models/image.pngis excluded by!**/*.png
📒 Files selected for processing (1)
docs/guides/models/llm_api_key_setup.md
| RAGFlow model provider management allows you to connect online models, local models, and OpenAI-compatible models to RAGFlow for use in knowledge bases, chats, search, and agents. | ||
|
|
||
| ## Get model API key | ||
|
|
||
| RAGFlow supports most mainstream LLMs. Please refer to [Supported Models](../../guides/models/supported_models.mdx) for a complete list of supported models. You will need to apply for your model API key online. Note that most LLM providers grant newly-created accounts trial credit, which will expire in a couple of months, or a promotional amount of free quota. | ||
| RAGFlow supports most mainstream LLMs. Please refer to [Supported Models](../../guides/models/supported_models.mdx) for a complete list of supported models. You will need to apply for your model API key online. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Rename the stale “Get model API key” section.
This section now introduces provider management rather than the removed startup API-key workflow. Rename the heading to reflect the current provider-instance setup.
As per coding guidelines, remove stale documentation and converge on the current provider-based path.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/guides/models/llm_api_key_setup.md` around lines 10 - 14, Rename the
“Get model API key” heading in the model API key setup guide to describe
configuring model provider instances. Update the surrounding introduction as
needed to consistently direct readers to the current provider-management
workflow, removing references to the obsolete startup API-key process.
Source: Coding guidelines
| An instance stores a set of connection settings under a provider. You can create separate instances for test environments, production environments, local models, or proxy gateways to avoid mixing configurations for different purposes. | ||
| When you configure a provider for the first time, the right pane prompts you to create an instance first. After the instance is saved, you can continue to fill in **API Key** and **Base URL** and add models. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Do not tell readers to add models before verification.
Line [30] says users can add models after saving the instance, while Lines [51] and [57] make successful connection verification a prerequisite. Change this to explicitly say: save credentials, verify the connection, then add models.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/guides/models/llm_api_key_setup.md` around lines 29 - 30, Update the
provider setup guidance around the instance-saving flow to state the required
order explicitly: save the API key and Base URL, verify the connection
successfully, then add models. Keep the existing instance creation and
configuration guidance unchanged.
| ## Model types and usage | ||
|
|
||
| | Model type | Full name | Main function | Input | Output | Typical scenarios | | ||
| | --- | --- | --- | --- | --- | --- | | ||
| | LLM | Large Language Model | Understands, reasons over, and generates text | Text prompts | Text | Intelligent question answering, content generation, summarization, and information extraction | | ||
| | Embedding | Embedding model | Converts text into vector representations | Text | Vectors | Semantic retrieval, similarity calculation, and knowledge base indexing | | ||
| | Rerank | Rerank model | Scores and reorders initially retrieved candidate results by relevance | Query text and candidate text | Relevance scores and ranking results | Optimizing retrieval results and improving knowledge base Q&A accuracy | | ||
| | VLM | Vision-Language Model | Understands images and the text, objects, and scene information in them | Images, text, or images with text | Text | Image Q&A, chart understanding, and visual content analysis | | ||
| | ASR | Automatic Speech Recognition model | Converts speech into text | Audio | Text | Speech transcription, meeting records, and real-time captions | | ||
| | TTS | Text-to-Speech model | Converts text into speech | Text | Audio | Voice playback, audio content, and voice interaction | | ||
| | OCR | Optical Character Recognition model | Recognizes text in images or scanned documents | Images or scanned documents | Recognized text | Scanned document recognition and receipt recognition | | ||
|
|
||
| The following model types usually work together for retrieval and generation: | ||
|
|
||
| 1. **Embedding**, **Rerank**, and **LLM**: The embedding model converts queries and knowledge chunks into vectors, and the system recalls candidate chunks based on vector similarity. The rerank model scores and reorders the candidate chunks by relevance. The LLM understands the question based on the selected knowledge content and generates the answer. | ||
|
|
||
| 2. **VLM**, **ASR**, **TTS**, and **OCR**: VLM is used to understand images and image-text information. OCR recognizes text in images or scanned documents. ASR converts speech into text. TTS converts text into speech. Different model types jointly support multimodal scenarios such as image understanding, document recognition, and voice interaction. | ||
|
|
||
| 3. **Moderation**: The moderation model is used to identify non-compliant, harmful, or sensitive content in text or images. It can review user input and model output to reduce the risk of generating or spreading non-compliant content. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Keep the model-type table consistent with the moderation guidance.
The section describes Moderation as a model type, but the table has no Moderation row. Add it to the table or explicitly state that moderation is an optional policy check outside the registered model types.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/guides/models/llm_api_key_setup.md` around lines 98 - 116, Add a
Moderation row to the model types table, matching the existing columns and the
description in item 3, or explicitly clarify that moderation is an optional
policy check outside the registered model types. Keep the table and the
subsequent model-type guidance consistent.
Summary
Update the model provider configuration documentation.