跳转到主要内容
FIM One 是提供商无关的 — 任何 OpenAI 兼容的端点都可以工作。本页面帮助您为您的用例选择最佳的模型组合。有关配置详情,请参阅 环境变量。

How FIM One Uses Models

FIM One has three model roles: Fast and Reasoning fall back to General if not configured. For production deployments, splitting into at least two models (General + Fast) gives the best cost/quality balance. These roles can be configured via ENV variables or through the admin UI’s Model Groups feature, which allows one-click switching between model sets. See Model Management for the full admin UI guide.

快速选择矩阵

视觉表示模型是否接受图像输入。对于智能文档处理(IDP),这是一项必要能力——如果你的模型不支持视觉,IDP将回退到仅文本提取。标记为⚠️的提供商仅部分模型支持视觉;请确认你使用的具体模型。聊天附件遵循相同的开关:使用仅支持文本的模型时,不会发送附加图像,模型只会收到其文件名。聊天编辑器会在发送前根据该轮实际使用的模型告知你这一点(依次为智能体设置、当前激活的模型组,然后是系统默认模型)。文档文本不受影响——PDF或DOCX仍会提取其内容并注入。
此表列出的是我们推荐的组合,并非FIM One支持的全部提供商。xAI(Grok)、字节跳动Doubao、Mistral以及任何兼容OpenAI的中继服务均可使用;完整列表及每种提供商的路由方式,请参阅提供商能力矩阵。

结构化输出兼容性

FIM One的DAG规划器需要模型返回有效的结构化JSON。在内部,它按顺序尝试三个提取级别:
  1. 原生函数调用 — 通过工具调用API强制模型输出与模式匹配的JSON。最可靠。
  2. JSON模式 — 请求response_format: json_object。保证有效的JSON,但不强制执行模式合规性。
  3. 纯文本提取 — 作为最后手段从自由格式文本中解析JSON。
支持第1级(带强制tool_choice的原生FC)的模型能提供最佳的规划可靠性。如果模型仅达到第2级,其输出质量取决于它遵循提示指令的程度——较弱的模型可能产生有效的JSON但不匹配预期结构。 此表是选择辅助工具。权威的、代码锚定的版本(包括每个提供商接受哪些tool_choice状态以及FIM One在被拒绝时的处理方式)在提供商能力矩阵中。
如果看到错误”failed to generate a valid task plan”,说明模型的结构化输出能力不足以进行DAG规划。将主LLM切换到评级为⭐⭐⭐或⭐⭐及以上的模型,或禁用DAG模式并改用更简单的ReAct智能体。

思维/推理兼容性

不同的提供商以根本不同的方式实现”思维”(思维链推理)。这很重要,因为思维模式可能与工具调用冲突,并且输出根据提供商的不同而出现在不同的位置。FIM One 透明地处理所有这些——此表可帮助您了解底层发生的情况。

关键概念

  • 可选启用 — 思考功能默认关闭;你可以通过 API 参数(例如 reasoning_effort)启用它。可以按调用选择性地禁用。
  • 始终启用 — 模型始终进行思考;没有 API 参数可以关闭它。你需要切换到非思考模型变体才能避免它。
  • 模型级别 — 思考功能由你选择的模型 ID 决定(例如 deepseek-reasoner vs deepseek-chat),而不是由参数决定。

兼容性矩阵

此表后的各提供商详情,包括每个effort级别的转换方式以及推理是否在后续轮次中重放,位于提供商能力矩阵的表C。

FIM One 如何处理每种情况

API级别的 reasoning_content(Claude、DeepSeek):推理字段直接从API响应读取并在UI的推理面板中显示。无需后处理。 内容中的 <think> 标签(MiniMax、Qwen、QwQ及其他开源衍生版本):FIM One自动从内容字段中移除 <think>...</think> 标签,并将思考文本重新路由到推理面板。这对流式和非流式响应都适用。 强制FC与思考冲突是按提供商划分的,而不是思考模型的通用属性。Claude拒绝这种组合,但其思考是可选的,因此FIM One通过传递 reasoning_effort=None 为该次调用关闭思考,原生函数调用继续进行。Kimi也拒绝这种组合,其思考由模型id而非参数选择,因此解决方案是为思考模型禁用原生函数调用。MiniMax在每次调用时都进行思考,并且接受强制函数调用,这就是为什么没有解决方案适用于它。 回退链:如果强制函数调用因任何原因失败,FIM One自动回退:原生FC → JSON模式 → 纯文本提取。这种三层方法确保规划即使在工具调用支持不完整的提供商上也能工作。
如果您使用始终进行思考的模型(MiniMax M2.7、deepseek-reasoner)作为主LLM,思考输出将出现在每个智能体迭代的推理面板中。这是正常的——它不会影响功能,您可以看到模型的推理过程。

提供商详情

OpenAI

The most battle-tested option. OpenAI models have the best native function calling (tool-calling) support, which directly impacts agent reliability. The GPT-5 family (August 2025+) is a major generational leap over GPT-4. Recommended models:
  • Main: gpt-5.4 (latest flagship, Mar 2026 — 1M+ context, computer use) or o3 (best reasoning accuracy)
  • Fast: gpt-5.4-mini ($0.75/$4.50 per MTok) or gpt-5.4-nano (cheapest at $0.20/$1.25 per MTok)
  • Budget Fast: gpt-5-mini ($0.25/$2.00) and gpt-5-nano ($0.05/$0.40) remain available at lower prices
  • Legacy: gpt-4.1 (still in API, 1M context, good for coding)
Reasoning: Set LLM_REASONING_EFFORT=medium — works natively with o-series and GPT-5.x models. GPT-5.4 supports reasoning_effort with levels none, low, medium, high, xhigh. The o-series requires max_completion_tokens instead of max_tokens, which LiteLLM handles automatically. Note: /v1/chat/completions rejects GPT-5.x requests that combine tools with reasoning, so FIM One talks the Responses API directly for GPT-5.x, where both work together. That path also carries each turn’s encrypted reasoning into the next one, so an agent building a multi-step answer keeps what it already worked out instead of re-deriving it at every tool call. Endpoints without a /v1/responses route fall back to chat completions with an explicit reasoning_effort: "none" during agent tool-use steps, and FIM_GPT5_RESPONSES_MODE can force either fallback by hand. Other model families on OpenAI-compatible endpoints stay on chat completions: they gain nothing from Responses, and proxy shims for it can badly buffer streaming. GPT-5 and later accept only the default temperature; FIM One removes any other value from the request and sends max_completion_tokens instead of max_tokens.

Anthropic (Claude)

Claude excels at nuanced reasoning and complex multi-step tasks. FIM One connects via LiteLLM, which routes Anthropic models through their native API automatically. The current generation is Claude 4.6 (February 2026). Recommended models:
  • Main: claude-sonnet-4-6 (best balance of capability and cost — $3/$15 per MTok)
  • Fast: claude-haiku-4-5 (fast and cheap — $1/$5 per MTok)
  • Premium: claude-opus-4-6 (most capable, 128K max output — $5/$25 per MTok)
Base URL: https://api.anthropic.com/v1/ Opus 4.6 and Sonnet 4.6 have a 1M context window (GA since March 13, 2026 — no beta header needed). Haiku 4.5 has a 200K context window. Reasoning: Set LLM_REASONING_EFFORT=medium. LiteLLM routes Anthropic models through the native API, so reasoning_content (extended thinking) is fully returned and visible in the UI “thinking” step. Claude 4.6 and newer use Adaptive Thinking (thinking: {type: "adaptive"} plus output_config.effort) in place of a manual budget_tokens, which FIM One emits directly rather than relying on LiteLLM’s mapping. Anthropic requires temperature=1 while thinking is active, and the system enforces that for you: with thinking on, Claude 4.5 and older are sent temperature=1.0, and adaptive-thinking models (4.6 and newer) have temperature removed from the request; models that reject sampling parameters outright have it removed whether or not thinking is on. Do not set LLM_TEMPERATURE=1 by hand. See Extended Thinking for details.

Google Gemini

Gemini 模型通过 Google 的 OpenAI 兼容端点提供强大的性能和具有竞争力的定价。3.x 代(2025 年末及以后)是一个重大飞跃 — Gemini 3 Flash 的性能超越 2.5 Pro,同时速度快 3 倍。注意:gemini-3-pro-preview 已于 2026 年 3 月 9 日关闭 — 请改用 gemini-3.1-pro-preview。 推荐模型:
  • 稳定版 (GA):gemini-2.5-pro(主要)+ gemini-2.5-flash(快速)— 生产就绪
  • 最新版 (Preview):gemini-3.1-pro-preview(主要)+ gemini-3-flash-preview(快速)+ gemini-3.1-flash-lite-preview(预算快速)— 最佳性能,但处于预览状态
基础 URL: https://generativelanguage.googleapis.com/v1beta/openai/ 推理: 兼容性端点支持 reasoning_effort — 设置 LLM_REASONING_EFFORT=medium 即可开箱即用。

DeepSeek

DeepSeek 提供市场上最佳的成本/性能比。V3.2(2025年12月)将聊天和推理系列统一为单一模型,定价极低。 模型 ID(均由 V3.2 支持):
  • deepseek-chat — 通用目的(非思考模式)
  • deepseek-reasoner — 链式思考推理模式,返回 reasoning_content
基础 URL: https://api.deepseek.com 定价: $0.28/$0.42 每百万令牌(缓存命中:$0.028)— 迄今为止最便宜的前沿级 API。 输出限制: deepseek-chat 最大输出为 8K 令牌(必须通过 max_tokens 显式设置)。deepseek-reasoner 最大输出为 64K 令牌(包括链式思考)。
V4 预计 2026 年 4 月:万亿参数多模态模型,具有 1M 上下文窗口。发布时预期会有新的模型 ID。

中文国内模型

所有主要的中文模型提供商都提供 OpenAI 兼容的端点。这些模型特别擅长处理中文任务,并提供具有竞争力的本地定价。

Qwen / 通义千问 (阿里云)

Qwen 3.5(2026年2月)是最新一代——397B MoE旗舰模型在MMLU-Pro上的表现超越GPT-5.2。提供最强的中文语言支持和最便宜的前沿级定价(约$0.11/MTok输入)。
  • 基础URL(中国): https://dashscope.aliyuncs.com/compatible-mode/v1
  • 基础URL(全球): https://dashscope-intl.aliyuncs.com/compatible-mode/v1
  • 主力: qwen3.5-plus(旗舰,1M上下文,$0.11/$0.66 per MTok)或 qwen3-max(256K,最强)
  • 快速: qwen3.5-flash($0.055/$0.22 per MTok)或 qwen-turbo($0.04/$0.08 per MTok)
  • 推理: qwen3-max 配合 enable_thinking: true 参数(没有单独的 qwen3-max-thinking 模型ID)

ChatGLM / 智谱

GLM-4.7 和 GLM-5(2026)是最新的模型。GLM-5 是 745B MoE 旗舰模型,在编码/智能体任务上接近 Claude Opus 级别。
  • Base URL(国内): https://open.bigmodel.cn/api/paas/v4
  • Base URL(Z.AI 国际): https://api.z.ai/api/paas/v4
  • 主要: glm-4.7(强大的编码能力,Z.AI 上 $0.60/$2.20)
  • 快速: glm-4.7-flash(免费层级!)或 glm-4.7-flashx($0.07/$0.40,更高吞吐量)
  • 推理: glm-5(745B MoE 旗舰模型,$1.00/$3.20)
不支持强制 tool_choice — 仅 "auto" 有效。
某些 HTTP 客户端会自动在 base URL 后追加 /v1。智谱使用 /v4 — 确保您的客户端不会强制使用 OpenAI 风格的路径后缀,否则会出现 404 错误。

MiniMax

MiniMax M2.7(2026年3月18日)是最新模型,开放权重,在SWE-Bench上得分80.2%。M2.5仍可作为快速/预算选项使用。 MiniMax为不同地区提供两个独立的API端点:
  • Base URL(全球/海外版): https://api.minimax.io/v1 — 用于中国大陆以外的用户
  • Base URL(中国/国内版): https://api.minimaxi.com/v1 — 用于中国大陆用户(注意minimaxi中多了一个i)
  • 主要: MiniMax-M2.7
  • 快速: MiniMax-M2.5
  • 速度: MiniMax-M2.7-highspeed(成本提高2倍,延迟更低)

Kimi / 月之暗面 (Moonshot)

Kimi K2.5(2026年1月)具有256K上下文和强大的编码性能(在开源模型中SWE-Bench达到76.8%)。
  • 基础URL(全球): https://api.moonshot.ai/v1
  • 基础URL(中国): https://api.moonshot.cn/v1
  • 主要: kimi-k2.5
  • 快速: kimi-k2(非思考模式,函数调用有效)
  • 推理: kimi-k2-thinking($0.47/$2.00 per MTok)
强制tool_choice仅在思考模式关闭时有效。启用思考模式时,仅支持"auto"。

本地模型 (Ollama)

在自己的硬件上完全运行模型 — 无需 API 密钥,完全离线。Ollama 开箱即用地暴露一个 OpenAI 兼容的端点。开源生态已经发生了巨大变化 — Qwen 3.5、Llama 4 和 GPT-OSS(OpenAI 的首批开放权重模型)都已可用。 基础 URL: http://localhost:11434/v1 按 VRAM 推荐的模型: 最适合工具调用: Qwen 3/3.5 (32B+)、GLM-4.7、GPT-OSS、Mistral — 这些模型具有明确的函数调用训练。参数为 14B+ 的模型是可靠工具调用的最低要求;强烈推荐 32B+ 及以上。
工具调用质量在本地模型中差异很大。 并非所有模型都能可靠地生成有效的函数调用。在生产环境中使用之前,请使用智能体工作流测试您选择的模型。一般规则:14B 最低要求,32B+ 推荐用于智能体任务。

第三方中继平台

许多用户通过单个中继(代理)服务访问多个模型提供商。FIM One 根据 URL 路径模式自动检测正确的 API 协议 — 只需填入 LLM_BASE_URL 即可工作。

工作原理

当您的基础 URL 指向第三方中继时,FIM One 检查 URL 路径以确定要使用的协议: 解析顺序: 显式数据库提供商字段 > 域名匹配(官方 API) > URL 路径提示(中继平台) > OpenAI 兼容回退。

示例:一个中继,三个协议

使用单个中继账户,您可以通过简单地更改基础 URL 路径来访问不同的提供商:
无需额外配置 — 身份验证标头、参数格式和响应解析都会自动切换。

步骤详解:路径检测如何工作

以下是一个具体示例,展示了配置中继时内部发生的情况:
  1. FIM One 在 URL 路径中看到 /claude → 检测到 Anthropic 原生协议
  2. 模型被前缀为 anthropic/claude-sonnet-4-6 用于 LiteLLM 路由
  3. 请求使用 Anthropic 的 /v1/messages 格式和 x-api-key 认证头
  4. reasoning_effort=medium 被转换为 Anthropic 的原生 thinking 参数(不是 OpenAI 的 reasoning_effort)
如果相同的中继 URL 改为 https://my-relay.example.com/v1,则会缺少 /claude 提示 — FIM One 会回退到 OpenAI 兼容协议,向 Claude 原生端点发送 /v1/chat/completions 请求,这会失败。URL 路径很重要。

Why This Matters

  • Anthropic native endpoint gives you proper reasoning_content support (extended thinking visible in the UI), correct tool-calling format, and x-api-key authentication — features lost when using OpenAI-compatible translation.
  • Google native endpoint gives you native Gemini parameters and x-goog-api-key authentication.
  • OpenAI compatible is the universal fallback and works with any relay, but provider-specific features (like extended thinking output) may be unavailable.
If your relay platform uses non-standard path conventions (e.g., no /claude or /anthropic in the URL), FIM One falls back to OpenAI compatible protocol — which works for most use cases. For full native protocol support, use a base URL whose host or path identifies the protocol (/claude, /anthropic, /gemini); the admin model UI has no protocol selector.
Relays also fail in ways a direct provider does not, and most of those failures are silent: a dropped parameter, a stripped cache breakpoint, a buffered stream that never errors. The symptom-by-symptom list is in Relay/proxy gotchas.
Relays are best-effort. FIM One’s documented behaviour is guaranteed for first-party endpoints, meaning OpenAI, Anthropic, Google, and other vendors serving their own models directly. Relays work and are widely used, including for models that are only reachable that way, but what a relay does to a request is outside our control, so they carry no such guarantee. Nothing is blocked by hostname: capability is probed per endpoint, and unsupported behaviour falls back on its own. Before reporting a model-layer bug, reproduce it against the first-party endpoint.

配置策略

Main vs Fast: When to Split

  • Split when your main model is expensive or slow (e.g., gpt-5.4 + gpt-5.4-nano). Tool-decision iterations, compaction, and the DAG steps the planner marks fast run on the fast model — using a cheaper one saves significant cost.
  • Same model when your model is already cheap (e.g., deepseek-chat for both). The overhead of managing two models isn’t worth it.

何时启用推理

  • 启用 用于复杂分析任务、多步骤规划和需要仔细判断的任务
  • 禁用(默认)用于日常任务、简单问答和成本敏感的部署
  • 推理通常会使每个请求的成本增加 2-5 倍 — medium 工作量是一个很好的起点

上下文窗口大小调整

设置 LLM_CONTEXT_SIZE 以匹配您的模型实际窗口: 对于本地模型,请明确设置 LLM_CONTEXT_SIZE 和 LLM_MAX_OUTPUT_TOKENS — 默认值假设云规模的上下文窗口,本地模型无法支持。