From 5c3e5d298fcb561fd0c18af5cbdf502f278c6a98 Mon Sep 17 00:00:00 2001 From: Sakib Khan Date: Mon, 24 Aug 2026 18:42:32 +0530 Subject: [PATCH] docs: document provider-neutral execution Signed-off-by: Sakib Khan --- .env.template | 10 +++++++++- .gitignore | 1 + README.md | 14 ++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.env.template b/.env.template index 2c19f95c..018f6557 100644 --- a/.env.template +++ b/.env.template @@ -2,12 +2,20 @@ # Model access (required) — one vision-language model backs the whole agent. # --------------------------------------------------------------------------- +# Select the provider used by the planner and model-consuming roles. +# Supported values: gemini, openai. Vertex AI is selected by credentials, not by this flag. +FATHOM_LLM_PROVIDER=gemini + # Direct Gemini API key. Get one from Google AI Studio and paste it here. GEMINI_API_KEY=your-api-key-here # Model id to drive. Set this to a model your key or project can actually access. GEMINI_MODEL=gemini-2.5-flash +# OpenAI settings — used when FATHOM_LLM_PROVIDER=openai. +# OPENAI_API_KEY=your-openai-api-key +# OPENAI_MODEL=gpt-4.1-mini + # --------------------------------------------------------------------------- # Vertex AI (optional) — use this instead of a direct key to run through GCP. # Leave GEMINI_API_KEY unset when you go this route. @@ -34,7 +42,7 @@ GEMINI_MODEL=gemini-2.5-flash # --------------------------------------------------------------------------- # FATHOM_ENSEMBLE_LOCALIZER=false -# FATHOM_ENSEMBLE_LOCALIZER_MEMBERS=gemini,ocr,icon +# FATHOM_ENSEMBLE_LOCALIZER_MEMBERS=vision_llm,document_ai_layout # --------------------------------------------------------------------------- # Priority / adaptive inference (optional) — let the model adapter shed load and diff --git a/.gitignore b/.gitignore index f7b28a7d..c9fb5680 100644 --- a/.gitignore +++ b/.gitignore @@ -214,3 +214,4 @@ research/ documents/ debugging/ tests/fixtures/ +.runs/ diff --git a/README.md b/README.md index cb4ad6a5..4c8ff5f8 100644 --- a/README.md +++ b/README.md @@ -409,6 +409,20 @@ Set your model key and pick a device serial (`adb devices` prints it): export GEMINI_API_KEY="..." # your Gemini API key ``` +To run with OpenAI, install the OpenAI dependency and select the provider: + +```bash +pip install -e . +export FATHOM_LLM_PROVIDER="openai" +export OPENAI_API_KEY="..." +export OPENAI_MODEL="gpt-4.1-mini" +``` + +Fathom maps its provider-neutral prompts, tool declarations, images, structured outputs, and usage +metrics through the OpenAI adapter. XML/accessibility grounding and the LLM-backed vision localizer +use the adapter bound to the run, so the execution path does not require Gemini. Embeddings remain +an optional provider capability and are enabled only when the selected adapter exposes one. + ### CLI — the fastest way ```bash