Skip to content

docs: update model provider configuration guide - #17343

Closed
Yannnnnnny wants to merge 1 commit into
infiniflow:mainfrom
Yannnnnnny:md
Closed

Yannnnnnny wants to merge 1 commit into
infiniflow:mainfrom
Yannnnnnny:md

Conversation

@Yannnnnnny

Copy link
Copy Markdown
Contributor

Summary

Update the model provider configuration documentation.

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. 📖 documentation Improvements or additions to documentation labels Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The 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.

Changes

Model Provider Guide

Layer / File(s) Summary
Provider instance configuration
docs/guides/models/llm_api_key_setup.md
Reframes setup around provider management and documents selecting a provider, entering API Key and Base URL values, and verifying the connection.
Model registration and defaults
docs/guides/models/llm_api_key_setup.md
Describes adding provider-listed or custom models, configuring custom-model options, selecting required defaults, and assigning models by usage type.
Supported model reference
docs/guides/models/llm_api_key_setup.md
Updates the closing link to the supported-models documentation.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Poem

A rabbit hops through provider land,
With keys and URLs neatly in hand.
Models line up, defaults glow,
Rerankers help the answers flow.
“Connect!” it cheers, then bounds away.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: updating the model provider configuration guide.
Description check ✅ Passed The description satisfies the required Summary section with a brief statement of the PR’s purpose.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
docs/guides/models/llm_api_key_setup.md (1)

69-76: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Clarify provider-specific custom-model identifiers.

common/settings.py (Lines [429-443]) normalizes names to <model>@<factory>, while internal/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

📥 Commits

Reviewing files that changed from the base of the PR and between bd355de and 165f0ad.

⛔ Files ignored due to path filters (8)
  • docs/guides/models/image (1).png is excluded by !**/*.png
  • docs/guides/models/image (2).png is excluded by !**/*.png
  • docs/guides/models/image (3).png is excluded by !**/*.png
  • docs/guides/models/image (4).png is excluded by !**/*.png
  • docs/guides/models/image (5).png is excluded by !**/*.png
  • docs/guides/models/image-1.png is excluded by !**/*.png
  • docs/guides/models/image-2.png is excluded by !**/*.png
  • docs/guides/models/image.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • docs/guides/models/llm_api_key_setup.md

Comment on lines +10 to +14
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 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

Comment on lines +29 to +30
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

Comment on lines +98 to +116
## 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📖 documentation Improvements or additions to documentation size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant