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.
クイック選択マトリックス
この表に記載しているのは推奨する組み合わせであり、FIM Oneがサポートするプロバイダーの全リストではありません。xAI(Grok)、ByteDance Doubao、Mistral、およびOpenAI互換リレーもすべて動作します。完全なリストと各プロバイダーのルーティング方法については、プロバイダー機能マトリックスを参照してください。
構造化出力の互換性
FIM OneのDAGプランナーは、モデルがスキーマに一致する有効なJSON構造を返す必要があります。内部的には、以下の3つの抽出レベルを順番に試みます:- ネイティブ関数呼び出し — ツール呼び出しAPIを介してスキーマに一致するJSONを出力するようモデルに強制します。最も信頼性が高いです。
- JSONモード —
response_format: json_objectをリクエストします。有効なJSONを保証しますが、スキーマ準拠を強制しません。 - プレーンテキスト抽出 — 最後の手段として、自由形式のテキストからJSONを解析します。
tool_choiceを伴うネイティブFC)をサポートするモデルは、最高のプランニング信頼性を提供します。モデルがレベル2のみに対応している場合、出力品質はプロンプト指示にどの程度従うかに依存します。弱いモデルは、期待される構造に一致しない有効なJSONを生成する可能性があります。
このテーブルは選択の参考です。各プロバイダーが受け入れる
tool_choice状態と、いずれかが拒否された場合にFIM Oneが行うことを含む、権威あるコードアンカー版はプロバイダー機能マトリックスです。
思考 / 推理互換性
異なるプロバイダーは「思考」(思考の連鎖推論)を根本的に異なる方法で実装しています。これが重要な理由は、思考モードがツール呼び出しと競合する可能性があり、出力がプロバイダーによって異なる場所に表示されるためです。FIM One はこれらすべてを透過的に処理します — この表は、内部で何が起こっているかを理解するのに役立ちます。主要概念
- オプトイン — 思考はデフォルトでオフです。API パラメータ(例:
reasoning_effort)を使用して有効にします。呼び出しごとに選択的に無効にできます。 - 常時オン — モデルは常に思考します。オフにするための API パラメータはありません。これを回避するには、思考しないモデルバリアントに切り替える必要があります。
- モデルレベル — 思考は、パラメータではなく、選択するモデル ID(例:
deepseek-reasonervsdeepseek-chat)によって決定されます。
互換性マトリックス
このテーブルの背景にあるプロバイダー別の詳細情報 (各
effort レベルの変換方法や、推論が後続ターンで再生されるかどうかなど) は、プロバイダー機能マトリックスの表C に記載されています。
FIM One が各ケースを処理する方法
API レベルのreasoning_content(Claude、DeepSeek):推論フィールドは API レスポンスから直接読み込まれ、UI の Reasoning パネルに表示されます。後処理は不要です。
コンテンツ内の <think> タグ(MiniMax、Qwen、QwQ、およびその他のオープンソース派生モデル):FIM One は自動的にコンテンツフィールドから <think>...</think> タグを削除し、思考テキストを Reasoning パネルに転送します。これはストリーミングおよび非ストリーミングレスポンスの両方で機能します。
強制 FC + 思考の競合はプロバイダーごとであり、思考モデル全般の特性ではありません。Claude はこの組み合わせを拒否しますが、その思考はオプトインなので、FIM One はそのコール用に reasoning_effort=None を渡して思考をオフにし、ネイティブ関数呼び出しを進めます。Kimi も拒否しますが、その思考はパラメータではなくモデル ID で選択されるため、修正方法は思考モデルのネイティブ関数呼び出しを無効にすることです。MiniMax はすべてのコールで思考し、強制関数呼び出しを受け入れるため、それに対する回避策は適用されません。
フォールバックチェーン:強制関数呼び出しが何らかの理由で失敗した場合、FIM One は自動的にフォールバックします:ネイティブ FC → JSON モード → プレーンテキスト抽出。この 3 段階のアプローチにより、ツール呼び出しサポートが部分的なプロバイダーでもプランニングが機能することが保証されます。
Main LLM として常に思考するモデル(MiniMax M2.7、
deepseek-reasoner)を使用している場合、思考出力はすべてのエージェント反復の Reasoning パネルに表示されます。これは正常です——機能に影響を与えず、モデルの推論プロセスを確認できます。プロバイダーの詳細
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) oro3(best reasoning accuracy) - Fast:
gpt-5.4-mini($0.75/$4.50 per MTok) orgpt-5.4-nano(cheapest at $0.20/$1.25 per MTok) - Budget Fast:
gpt-5-mini($0.25/$2.00) andgpt-5-nano($0.05/$0.40) remain available at lower prices - Legacy:
gpt-4.1(still in API, 1M context, good for coding)
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)
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(高速)— 本番環境対応 - 最新版(プレビュー):
gemini-3.1-pro-preview(メイン)+gemini-3-flash-preview(高速)+gemini-3.1-flash-lite-preview(予算重視の高速)— 最高のパフォーマンス、ただしプレビュー状態
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を返す
https://api.deepseek.com
価格設定: $0.28/$0.42 per MTok(キャッシュヒット: $0.028)— 圧倒的に最も安いフロンティアクラスのAPI。
出力制限: deepseek-chatの最大出力は8Kトークン(max_tokensで明示的に設定する必要があります)。deepseek-reasonerの最大出力は64Kトークン(思考の連鎖を含む)。
V4は2026年4月予定: 1兆パラメータのマルチモーダルモデル、1Mコンテキストウィンドウ。起動時に新しいモデルIDが期待されます。
中国国内モデル
すべての主要な中国のモデルプロバイダーは、OpenAI互換のエンドポイントを公開しています。これらは中国語タスクに特に強く、競争力のあるローカル価格を提供しています。Qwen / 通义千問 (Alibaba Cloud)
Qwen 3.5(2026年2月)是最新一代 — 397B MoE旗艦版在MMLU-Pro上的表現超越GPT-5.2。最強的中文語言支持和最便宜的前沿級定價(~$0.11/MTok輸入)。- Base URL(中國):
https://dashscope.aliyuncs.com/compatible-mode/v1 - Base 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 International):
https://api.z.ai/api/paas/v4 - Main:
glm-4.7(強力なコーディング、Z.AI で $0.60/$2.20) - Fast:
glm-4.7-flash(無料ティア!) またはglm-4.7-flashx($0.07/$0.40、より高いスループット) - Reasoning:
glm-5(745B MoE フラッグシップ、$1.00/$3.20)
tool_choice はサポートされていません — "auto" のみが機能します。
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%)。- Base URL(グローバル):
https://api.moonshot.ai/v1 - Base 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 以上が強く推奨されます。
サードパーティリレープラットフォーム
多くのユーザーは、単一のリレー(プロキシ)サービスを通じて複数のモデルプロバイダーにアクセスしています。FIM Oneは、URLパスパターンに基づいて正しいAPIプロトコルを自動的に検出します。LLM_BASE_URLを入力するだけで動作します。
仕組み
ベースURLがサードパーティリレーを指している場合、FIM OneはURLパスを検査してどのプロトコルを使用するかを決定します:
解決順序: 明示的なDB プロバイダフィールド > ドメインマッチ(公式API) > URLパスヒント(リレープラットフォーム) > OpenAI互換フォールバック。
例:1つのリレー、3つのプロトコル
単一のリレーアカウントで、ベースURLパスを変更するだけで異なるプロバイダーにアクセスできます:ステップバイステップ: パス検出の仕組み
リレーを設定するときに内部で何が起こるかを示す具体例です:- FIM One は URL パスの
/claudeを認識 → Anthropic ネイティブプロトコルを検出 - モデルは LiteLLM ルーティング用に
anthropic/claude-sonnet-4-6としてプレフィックスが付与される - リクエストは Anthropic の
/v1/messagesフォーマットを使用し、x-api-key認証ヘッダーで認証 reasoning_effort=mediumは Anthropic のネイティブthinkingパラメータに変換される (OpenAI のreasoning_effortではない)
Why This Matters
- Anthropic native endpoint gives you proper
reasoning_contentsupport (extended thinking visible in the UI), correct tool-calling format, andx-api-keyauthentication — features lost when using OpenAI-compatible translation. - Google native endpoint gives you native Gemini parameters and
x-goog-api-keyauthentication. - 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 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 marksfastrun on the fast model — using a cheaper one saves significant cost. - Same model when your model is already cheap (e.g.,
deepseek-chatfor both). The overhead of managing two models isn’t worth it.
推論を有効にする時期
- 有効にする 複雑な分析タスク、複数ステップの計画、慎重な判断が必要なタスク
- 無効にする(デフォルト)ルーチンタスク、シンプルなQ&A、コスト効率を重視するデプロイメント
- 推論は通常、リクエストあたりのコストを2~5倍増加させます —
mediumの努力レベルが良い出発点です
コンテキストウィンドウサイジング
LLM_CONTEXT_SIZE をモデルの実際のウィンドウに合わせて設定します:
ローカルモデルの場合、
LLM_CONTEXT_SIZE と LLM_MAX_OUTPUT_TOKENS の両方を明示的に設定してください。デフォルト値はクラウド規模のコンテキストウィンドウを想定しており、ローカルモデルではサポートできません。