架构:提供商、模型、模型组
FIM One 将 LLM 配置组织为三个层级:Adding a Provider
1
Open the Models page
Open Admin Panel from the user menu and select the Models tab.
2
Click Add Provider
Click the Add Provider button in the top-right area of the Providers section.
3
Select a preset or use a custom endpoint
The dialog offers presets for 16 providers — OpenAI, Anthropic (Claude), Google Gemini, DeepSeek, Mistral AI, xAI (Grok), OpenRouter, Ollama, and the China and Global endpoints of Qwen, GLM, Moonshot and MiniMax — plus OpenAI Compatible (custom endpoint). Clicking a preset auto-fills the provider name and base URL.Choose OpenAI Compatible if your provider is not listed (e.g., a third-party relay or any other OpenAI-compatible endpoint).
4
Enter credentials
Fill in the required fields:
- Provider Name — A friendly label (e.g., “My OpenAI Account”). This is for your reference only.
- Base URL — The API endpoint. Presets fill this automatically. For custom endpoints, enter the full URL (e.g.,
http://localhost:11434/v1for Ollama). - API Key — Your provider’s API key. With the Ollama preset the API key can be left empty.
5
Save
Click Create. The provider appears in the list, ready for you to add models under it.
Adding a Model
1
Expand a provider
On the Models page, click the chevron next to an existing provider to expand it and see its models.
2
Click Add Model
Click the Add Model button that appears under the expanded provider.
3
Enter model details
Fill in the two required fields:
- Display Name — A human-readable name shown in the UI (e.g., “GPT-4o”, “Claude Sonnet”). Can be anything you like.
- Model ID — The exact model identifier sent to the API (e.g.,
gpt-4o,claude-sonnet-4-6,deepseek-chat). This must match what your provider expects.
4
Configure advanced settings (optional)
Click the Advanced toggle to reveal additional settings: Max Output Tokens, Context Size, Temperature, Native Function Calling, JSON Mode, and Vision Support (whether the model accepts images; see Document Processing). See the Advanced Settings section below for details on each.
5
Save
Click Create. The model appears under its provider and is now available for assignment to model groups.
高级设置
每个模型都有高级设置,用于控制 FIM One 如何与提供商的 API 交互以进行结构化输出提取。这些设置位于模型创建/编辑对话框中的高级切换开关下。原生函数调用
设置名称: 原生函数调用(存储为tool_choice_enabled)
默认值: 开启
控制FIM One是否使用强制 tool_choice 进行结构化输出提取。这是结构化输出降级链中的第1级——当模型支持时最可靠的方法。
何时禁用:
- 您的模型返回类似
"tool_choice 'specified' is incompatible with thinking enabled"的错误。这是按提供商的规则而非思考模型的属性:deepseek-reasoner和思考型Kimi模型拒绝强制工具选择,而MiniMax在每次调用时进行思考并接受强制选择。提供商能力矩阵的表B列出了每个提供商的判决 - 结构化输出请求一致性地缓慢,每次调用约有10秒的延迟,随后无论如何都会回退到JSON Mode
tool_choice="auto",这适用于所有模型,无论此设置如何。
此设置仅影响用于结构化输出提取的强制工具选择(DAG规划、模式标注)。它不影响ReAct智能体,后者使用
tool_choice="auto" 自由决定何时调用工具。JSON 模式
设置名称: JSON 模式(存储为json_mode_enabled)
默认值: 开启
控制 FIM One 是否使用 response_format=json_object 进行结构化输出。这是降级链中的第 2 级。
何时禁用:
- 您的提供商拒绝助手消息预填充 — 主要是 AWS Bedrock 中继,会抛出
"This model does not support assistant message prefill"
Temperature
Default: 0.7 (inherited from the global setting if left unset) Controls the randomness of model output. Range: 0 (deterministic) to 2 (highly creative).When reasoning/extended thinking is enabled for Anthropic models, the system handles temperature: Claude 4.5 and older are sent 1.0, and Claude 4.6 and newer have the parameter removed. You do not need to set this manually.
最大输出令牌数
模型在单个响应中可以生成的最大令牌数。留空以使用系统默认值(64,000)。对于 VRAM 受限的本地模型,请明确设置为较低的值(例如 8192)。上下文大小
模型的上下文窗口大小(以令牌为单位)。留空以使用系统默认值(128,000)。将其设置为与您的模型实际能力相匹配 — 对于本地模型,这通常是 4K-32K,具体取决于模型和可用内存。推荐配置
大多数模型使用默认设置(两个开关均打开)即可正常工作。仅在遇到错误或不必要的延迟时进行调整。 下表涵盖常见提供商和模型。数据来源于UniAPI能力标签,并根据2026-03-22的运行时行为进行了验证。模型能力变化频繁——如果遇到错误,请查阅提供商的最新文档。 这是按模型操作员视图:添加模型时要设置的开关。它遵循的提供商级规则及实现它们的代码锚点位于提供商能力矩阵。如果两者有任何不一致,矩阵是权威的,此表需要更新。快速规则
- 原生 FC 开启 用于支持函数调用的模型(大多数现代模型)
- 原生 FC 关闭 用于始终启用思考模式且拒绝强制
tool_choice的模型 - JSON 模式开启 用于大多数模型(安全默认值)
- JSON 模式关闭 仅用于 AWS Bedrock 中继(前缀拒绝)
按提供商配置矩阵
OpenAI
Anthropic (Claude)
Google Gemini
DeepSeek
xAI (Grok)
Qwen (阿里云)
Zhipu (GLM)
Moonshot (Kimi)
MiniMax
ByteDance (抖音)
Meta (Llama)
最大输出中的”—” 表示提供商未报告限制。实际上,这些模型通常支持4K-16K输出令牌。如需特定值,请在模型的高级设置中明确设置最大输出令牌。
模型组
模型组允许您将模型分配给特定角色,并通过单击切换配置。Roles
FIM One uses three model roles. Each role serves a different purpose in the execution pipeline:创建模型组
1
打开Groups部分
在Admin > Models页面上,滚动到Model Groups部分。
2
点击Add Group
点击Add Group按钮。
3
为组命名
输入一个描述性名称(例如,“Production (OpenAI)”、“Budget (DeepSeek)”、“Local Dev”)。
4
为角色分配模型
对于每个角色(General、Fast、Reasoning),从下拉菜单中选择一个模型。下拉菜单显示来自活跃提供商的所有活跃模型,按提供商名称分组。您可以将某个角色保留为未分配状态——它将回退到General模型(或如果General也未分配,则回退到ENV配置的模型)。
5
保存
点击Create。该组现在可用于激活。
Activating a Group
To activate a model group, use the dropdown or activation control on the Models page. Only one group can be active at a time. Activating a group applies its model assignments to the next message in every conversation. To deactivate the current group (falling back to ENV-configured models), select the deactivate option.Domain-Aware Model Escalation
When the domain classifier detects a specialist domain — by default legal, medical, financial, tax, compliance, or patent (ESCALATION_DOMAINS) — the system automatically escalates model selection beyond the normal role assignments:
- ReAct mode: The general model is replaced by the reasoning model (
registry.get_by_role("reasoning")). This means the Reasoning slot in your Model Group is not only used for DAGmodel_hint="reasoning"steps — it also serves as the escalation target for domain-specific ReAct tasks. - DAG mode: Domain context is injected into the planner prompt, guiding it to assign
model_hint="reasoning"to steps requiring specialist accuracy.
REASONING_LLM_MODEL env var).
Related environment variables:
ENV 回退
当没有管理员配置的模型组处于活跃状态时,FIM One 会回退到基于 ENV 的配置:
管理员配置的模型始终优先于 ENV 变量。系统健康检查会考虑两个来源 — 只要配置了活跃的模型组或有效的 ENV 变量,LLM 子系统就会报告为健康状态。
有关完整的 ENV 参考,请参阅环境变量。
Export and Import
The Models page supports exporting your entire provider and model configuration (providers, models, and groups) as a JSON file, and importing it on another instance. This is useful for:- Migrating configuration between development, staging, and production environments
- Sharing a known-good model setup with team members
- Backing up your configuration before making changes