メインコンテンツへスキップ
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)、ByteDance Doubao、Mistral、およびOpenAI互換リレーもすべて動作します。完全なリストと各プロバイダーのルーティング方法については、プロバイダー機能マトリックスを参照してください。

構造化出力の互換性

FIM OneのDAGプランナーは、モデルがスキーマに一致する有効なJSON構造を返す必要があります。内部的には、以下の3つの抽出レベルを順番に試みます:
  1. ネイティブ関数呼び出し — ツール呼び出しAPIを介してスキーマに一致するJSONを出力するようモデルに強制します。最も信頼性が高いです。
  2. JSONモード — response_format: json_objectをリクエストします。有効なJSONを保証しますが、スキーマ準拠を強制しません。
  3. プレーンテキスト抽出 — 最後の手段として、自由形式のテキストからJSONを解析します。
レベル1(強制的なtool_choiceを伴うネイティブFC)をサポートするモデルは、最高のプランニング信頼性を提供します。モデルがレベル2のみに対応している場合、出力品質はプロンプト指示にどの程度従うかに依存します。弱いモデルは、期待される構造に一致しない有効なJSONを生成する可能性があります。 このテーブルは選択の参考です。各プロバイダーが受け入れるtool_choice状態と、いずれかが拒否された場合にFIM Oneが行うことを含む、権威あるコードアンカー版はプロバイダー機能マトリックスです。
「有効なタスクプランの生成に失敗しました」というエラーが表示される場合、モデルの構造化出力機能は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 の 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) 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(高速)— 本番環境対応
  • 最新版(プレビュー): 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 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" のみが機能します。
一部の HTTP クライアントは base URL に自動的に /v1 を追加します。Zhipu は /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%)。
  • 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 以上が強く推奨されます。
ツール呼び出しの品質はローカルモデル全体で大きく異なります。 すべてのモデルが確実に有効な関数呼び出しを生成するわけではありません。本番環境で使用する前に、エージェントワークフローで選択したモデルをテストしてください。一般的なルール: 最小 14B、エージェントタスクには 32B 以上を推奨します。

サードパーティリレープラットフォーム

多くのユーザーは、単一のリレー(プロキシ)サービスを通じて複数のモデルプロバイダーにアクセスしています。FIM Oneは、URLパスパターンに基づいて正しいAPIプロトコルを自動的に検出します。LLM_BASE_URLを入力するだけで動作します。

仕組み

ベースURLがサードパーティリレーを指している場合、FIM OneはURLパスを検査してどのプロトコルを使用するかを決定します: 解決順序: 明示的なDB プロバイダフィールド > ドメインマッチ(公式API) > URLパスヒント(リレープラットフォーム) > OpenAI互換フォールバック。

例:1つのリレー、3つのプロトコル

単一のリレーアカウントで、ベースURLパスを変更するだけで異なるプロバイダーにアクセスできます:
追加の設定は不要です。認証ヘッダー、パラメータ形式、レスポンス解析がすべて自動的に切り替わります。

ステップバイステップ: パス検出の仕組み

リレーを設定するときに内部で何が起こるかを示す具体例です:
  1. FIM One は URL パスの /claude を認識 → Anthropic ネイティブプロトコルを検出
  2. モデルは LiteLLM ルーティング用に anthropic/claude-sonnet-4-6 としてプレフィックスが付与される
  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.

推論を有効にする時期

  • 有効にする 複雑な分析タスク、複数ステップの計画、慎重な判断が必要なタスク
  • 無効にする(デフォルト)ルーチンタスク、シンプルなQ&A、コスト効率を重視するデプロイメント
  • 推論は通常、リクエストあたりのコストを2~5倍増加させます — mediumの努力レベルが良い出発点です

コンテキストウィンドウサイジング

LLM_CONTEXT_SIZE をモデルの実際のウィンドウに合わせて設定します: ローカルモデルの場合、LLM_CONTEXT_SIZE と LLM_MAX_OUTPUT_TOKENS の両方を明示的に設定してください。デフォルト値はクラウド規模のコンテキストウィンドウを想定しており、ローカルモデルではサポートできません。