.env を使用して行われます。example.env をコピーして値を入力してください:
設定レベル
各統合には、その重要度を示す設定レベルがあります:注: 管理者が設定したモデル(Admin → Models ページ)は、LLM 環境変数の代わりになります。ヘルスチェックは両方のソースを考慮します。
フロントエンド(ローカル開発のみ)
フロントエンドにはローカル開発のみの別の環境ファイルがあります:frontend/.env.local。
このファイルは Docker では使用されません。 Docker コンテナ内では、Next.js が /api/* を Python バックエンドに内部的にプロキシします(ポート 8000 はコンテナ内部)ため、フロントエンド環境ファイルは不要です。
ローカル開発では、デフォルト設定がそのまま機能します — バックエンドがデフォルトポートで実行されている場合、frontend/.env.local を作成する必要はありません。
オーバーライドが必要な場合は、frontend/.env.local を手動で作成してください:
ビルド時の注意:NEXT_PUBLIC_*変数はpnpm build時に JS バンドルに埋め込まれます。実行時に変更する場合(例:ルート.env経由)は効果がありません — これが、ローカル開発のみでfrontend/.env.localに配置される理由です。
LLM (Required)
Resolution order: User Preference → Admin Models (DB) → ENV Fallback. If an admin model with role “General” is configured in Admin → Models, these ENV vars serve as fallback only. The health check considers both sources.
ENV フォールバックを管理パネルと同期させる
Admin → Models でモデルグループを有効にすると、ランタイムはそのグループからモデルを取得し、上記のLLM_* / FAST_LLM_* / REASONING_LLM_* の値はフォールバックとしてのみ使用されます。データベースを開かない補助経路では、これらの値が直接読み取られます。対象となるのは、scripts/translate.py(国際化の pre-commit フック)、evals/、Jina/OpenAI のリランカー、画像生成です。これらが古いプロバイダーを参照し続けるのを防ぐには、アクティブなグループを env ファイルにコピーします。
MarkItDown OCR Resolution
Theconvert_to_markdown built-in tool and the RAG ingestion pipeline both use Microsoft’s MarkItDown + the official markitdown-ocr plugin to extract text from documents — including OCR on embedded images and scanned PDF pages when a vision-capable LLM is available.
The tool reads two kinds of source: a file the calling user uploaded, named by its file_id, and an http:// or https:// URL. URLs are downloaded with the same restrictions as web_fetch and http_request (no private, loopback, link-local or metadata addresses, redirects included). Local paths, file://, data: and other schemes are refused.
Vision LLM resolution order (first match wins):
Reasoning models are never preferred for OCR. Reasoning tiers (
o1, o3-mini, DeepSeek-R1) historically lack vision support and are the wrong tool for OCR anyway — OCR is a perception task, not deliberation. If a workspace has only a reasoning model with supports_vision=True it will still be picked up via the primary-LLM path, but the resolver does not actively rank it above fast/general.
Zero-regression fallback: when no vision-capable model is found at any level, OCR is silently disabled and MarkItDown runs in text-only mode. Word/PowerPoint/Excel embedded-image OCR becomes unavailable (same as before this feature shipped), but all other text extraction (headings, tables, paragraph text) continues to work unchanged. There is never a case where adding this feature made extraction worse than the previous behavior.
Non-OpenAI providers (Anthropic, Google Gemini, etc.) are supported transparently: the resolved LLM is wrapped in a LiteLLMOpenAIShim that routes chat.completions.create(...) calls through litellm.completion(), which handles the provider-specific message format translation (e.g. Anthropic’s source.type="base64" image block). One shim covers every provider LiteLLM supports — adding a new provider costs zero code changes in FIM One.
拡張思考(推論)
LLM_REASONING_EFFORT が設定されると、FIM One はモデルの拡張思考機能を有効にし、内部の思考の連鎖を UI の「thinking」ステップで表示します。FIM One は LiteLLM を使用して、推論努力パラメータを各プロバイダーのネイティブ形式に自動的に変換します。
サポートされているプロバイダー
どのプロバイダーが思考を受け入れるか、それぞれがどのように有効にされるか、どのeffort値を取るか、推論テキストがどこに終わるかは、プロバイダー機能マトリックスの表Cにコードアンカー付きで一度記録されます。その表が信頼できるリストです。このページは変数のみを文書化しています。
FIM OneはLLM_BASE_URLからプロバイダーを解決し(1つが設定されている場合は明示的なプロバイダーフィールドを追加)、リクエストを正しいAPI形式にマップします。未知のURLはOpenAI互換として扱われます。
重要な注意事項
推理時の温度制約
推理がアクティブな場合、一部のプロバイダーはtemperatureを制限します。これらはすべて自動的に適用されます。LLM_TEMPERATUREは、ワークロードに適した値のままにしてください。
- Anthropic: 拡張思考が有効な場合、
temperature=1が必須です。リクエストビルダーはAnthropicルートで値をピン留めするため、設定された温度は拒否されるのではなく、これらの呼び出しでオーバーライドされます。 - Anthropic、厳密なモデル(Opus 4.7および4.8、Fable 5、Mythos 5): 思考の有無に関わらず、
temperature、top_p、top_kを完全に拒否します。FIM Oneはこれらのモデルのリクエストからtemperatureを削除します。 - OpenAI GPT-5.x:
temperature=1のみをサポートします。LiteLLMのdrop_paramsフィルタリングはサポートされていない値を削除します。
LLM_TEMPERATURE=1を設定することは不要であり、思考以外のすべての呼び出しでより低い温度を実行する能力を失うコストがかかります。
LLM_REASONING_BUDGET_TOKENS の動作
この変数はレガシーAnthropicシンキングパス上でのみ意味があります(Claude 4.5以前、anthropic/としてルーティング)。ここでは自動計算されたバジェットをオーバーライドし、thinkingパラメータ内のbudget_tokensとして送信されます。アダプティブシンキングモデル(Opus 4.6以降、Sonnet 4.6、Fable 5、Mythos 5)はバジェットの代わりにエフォートレベルを使用し、この変数は完全に無視されます。設定されていない場合、バジェットはLLM_MAX_OUTPUT_TOKENS x エフォート比率から導出されます:
最小バジェットは1,024トークン(Anthropicのハード最小値)です。
OpenAIおよびGeminiの場合、プロバイダーは
reasoning_effortレベルに基づいて内部的にトークン割り当てを処理します——LLM_REASONING_BUDGET_TOKENSは効果がありません。
エージェント実行
ReAct Agent
DAG Planner
ドメイン分類
ReAct と DAG 実行の前に実行される独立した LLM ベースのドメイン検出レイヤーを制御します。クエリが専門ドメインとして分類されると、システムはドメイン対応機能をアクティブ化します:モデルのエスカレーション、ドメイン固有の SOP 指示、および引用検証(DAG のみ)。Context Guard
Controls the automatic context window management that prevents conversations from exceeding the model’s limit.コンテンツガードレール
入力または出力のコンテンツを検査するガードレールのコンマ区切り名。ツール許可ゲート(core/hooks/*)およびセキュリティレイヤー(core/security/*)とは独立しています。全体像についてはコンテンツガードレールを参照してください。
エージェント ワークスペース
System
Web Tools (Optional)
Quick start tip: Setting justJINA_API_KEYenables the default web search stack, plus web fetch, embedding, and reranking — one key, four services. Switch search to Tavily, Brave, or Exa withWEB_SEARCH_PROVIDERand the matching API key.
RAG & ナレッジベース(推奨)
埋め込み
埋め込みはテキストをベクトルに変換し、ナレッジベース検索に使用します。FIM One は標準的な OpenAI互換の/v1/embeddings エンドポイントを使用するため、Jina だけでなく、このインターフェースを公開しているあらゆるプロバイダーで動作します。
プロバイダーの例 — 3 つの変数を設定するだけで切り替えられます:
検索
Reranker
Reranker re-scores retrieved documents to improve relevance. Three providers are supported — select viaRERANKER_PROVIDER or let the system auto-detect from available API keys.
Jina usesJINA_API_KEY(from Web Tools above). OpenAI reusesLLM_API_KEY/LLM_BASE_URL— no extra key needed (OPENAI_API_KEY, when set, takes precedence overLLM_API_KEYfor the reranker). Cohere requires its ownCOHERE_API_KEY.
Reranker is optional — knowledge base search works without it using fusion scoring. Embedding is recommended for knowledge base features.
ベクトルストア
Code Execution
Security:localruns AI-generated code inside the application container, as the application’s user: every user who can use the code tools can read and change what the application can. Its Python restrictions and shell word list are not a security boundary. Use it for single-user or development setups only. The application container is never given the Docker socket; if it can reach a container runtime anyway (a Docker, Podman or containerd socket, or aDOCKER_HOSTthat is a daemon),localcode execution and stdio MCP servers refuse to start. See Security → Code execution and the Docker socket.
Tool Output Truncation
Limits applied to what a built-in tool returns to the model.Tool Artifacts
Size limits for files produced by tool execution (code execution, template rendering, image generation).ドキュメント処理(オプション)
アップロードされたPDF/DOCXファイルがLLM消費用にどのように処理されるかを制御します。ビジョン対応モデル(GPT-4o、Claude 3/4、Gemini)は、より高い忠実度のためにレンダリングされたPDFページを画像として受け取ることができます。
注: モデルごとのビジョンサポートは、Admin → Modelsのsupports_visionトグルで設定されます。明示的に設定されていない場合、システムはモデル名からビジョン機能を自動検出します。
Image Generation (Optional)
Email (SMTP) (Recommended)
Used for login codes and email notifications. Theemail_send built-in tool is offered when SMTP_HOST, SMTP_USER, and SMTP_PASS are set and a recipient allowlist (SMTP_ALLOWED_DOMAINS or SMTP_ALLOWED_ADDRESSES) is configured, or EMAIL_TOOL_ENABLED=true. Without either, any user could mail any address from this account, so the tool is not offered.
Verification code limits
Emailed codes (sign-in, registration, password reset) allow five tries each. These settings bound how many codes are issued and tried;0 switches a rule off. Counting is done in the database, so the limits hold across workers and under simultaneous requests. Windows are aligned to the clock.
Addresses are compared without case and without a trailing dot of the domain (
name@example.com. counts as name@example.com). A request over a limit is answered with HTTP 429 (verification_rate_limited) before the address is looked up, so the answer is the same whether or not the address has an account. A signed-in request for a reset code is counted under the account, separately from anonymous requests for the same address. The client address is the one the application server sees: behind a reverse proxy, run the server so that it trusts the proxy’s forwarded address, otherwise all clients share one count.
Requests for a sign-in or reset code are answered the same way whether or not the address has an account; a code is mailed only to an active account’s address.
Password sign-in limits
0 switches a rule off. A locked account answers a password attempt exactly as a wrong password does; the lock is written to the server log and to the login history (account_locked_now, then account_locked for each refused attempt). A successful password or emailed-code sign-in, and any password reset (by the user, through the forgotten-password flow or by an administrator), clears the count; signing in with an emailed code is not blocked by a lock.
Connectors
Database connectors on internal networks
A database connector dials the host and port its creator entered, from the application server. So that a connector cannot be pointed at the application’s own database, at other services on the server’s network or at a cloud metadata address, the host is resolved by the application and every address it resolves to must be public. The check runs when a connector is saved, when a connection is tested and each time a connection pool is opened, and the driver then connects to the address that was checked. Private deployments usually do need internal databases. Allow them explicitly:- An address or network entry allows a target when all the internal addresses it resolves to fall inside the entry.
- A host-name entry allows that name as it is typed in the connector, whatever it resolves to.
*.suffixmatches any name ending in.suffix. - A
:portsuffix limits the entry to that port. - The rule applies to every user, administrators included: the allow-list is the one place where internal reach is granted.
- The hosts of
DATABASE_URLand ofREDIS_URL(also a?host=parameter and each host of a multi-host URL) are refused on every port, even when an entry covers them. They are compared by the addresses they resolve to; if one of them cannot be resolved, every database connector is refused and the server log names the host. - One entry that cannot be parsed refuses every database connector, public targets included, until it is corrected. Users are told that the setting is invalid; the entry itself is written to the server log.
- List the networks and hosts your databases are on. An entry such as
0.0.0.0/0or::/0allows every internal address, cloud metadata addresses included, and turns the check off.
user:password@, port, path or list of hosts.
Platform
Workflow Human Intervention Steps
A Human Intervention (approval) step stops the run until someone decides. The run is stored aswaiting and continued when the approval is decided, also after a restart and with several server processes. The step is off unless you enable it.
Workflow Run Recovery
Every server process stamps the runs it is executing. A run stillrunning whose stamp is stale was being executed by a process that no longer exists: it is closed as failed, its open approval requests are closed and its working directory is removed. The same sweep, which also runs at startup, continues waiting runs whose approval was decided or expired while no process was listening.
ワークフロー実行の保持
古いワークフロー実行を自動的に削除するバックグラウンドクリーンアップタスク。ワークフロー単位のオーバーライド(ワークフロー設定UIで設定)がこれらのグローバルデフォルトより優先されます。Audit Record Retention
A daily background sweep removes audit records older than their retention period, in small batches. Every sweep leaves oneaudit.retention_sweep entry in the audit log with the number of rows removed from each table. With several replicas, one of them sweeps: on PostgreSQL they agree through a session-level advisory lock, so DATABASE_URL must reach the database directly or through a pooler in session mode. Behind a pooler in transaction mode (PgBouncer’s pool_mode = transaction, a Supabase or Neon pooled port) the lock is taken and released on different server sessions; the sweeper then logs a warning and closes the connection. The usage ledger is never swept. The first sweep runs within ten minutes of the first start on a version that has it: set a variable to 0 beforehand to keep older records.
Channel Confirmation Request Expiry
Background sweeper that marks pending approval requests (chat confirmations, workflow approvals, Approval Playground cards) as expired once their own deadline has passed, so a click days later on a forgotten card doesn’t flip agent state that has already been torn down. The TTL applies only to requests recorded before the deadline column existed.OAuth (Optional)
When bothCLIENT_ID and CLIENT_SECRET are set for a provider, the login page automatically shows the corresponding OAuth button.
Prod = optional locally (defaults work), but required for any internet-facing deployment.
各プロバイダーに登録するOAuth コールバックURL
バックエンドは、コールバックURLを以下のように構成します:{API_BASE_URL}/api/auth/oauth/{provider}/callback
Cloudflare Tunnel(オプション)
Cloudflareのネットワークを通じてすべてのトラフィックをルーティングし、ポートを直接公開しません。Nginx、SSLサーティフィケート、ファイアウォールルールを開く必要がなくなります。セットアップ手順については、本番環境デプロイメントセクションを参照してください。Analytics (Optional)
すべての分析プロバイダーはオプションです。任意の組み合わせを設定できます — すべてのアクティブなプロバイダーが同時に読み込まれます。すべてを空白のままにすると、分析は完全に無効になります(ローカル開発では推奨)。
すべての NEXT_PUBLIC_* 分析変数はビルド時です — 変更を反映させるにはフロントエンドの再ビルドが必要です。
Stripe Billing (Optional)
Stripe powers paid subscriptions. Leave all three variables blank to disable billing — the rest of FIM One works unchanged. BothSTRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET must be set together; partial config raises an error at first use. Which access posture applies (no subscriptions, included + paid, or paid only) is chosen in the admin panel; see Billing.