Skip to main content
Point Optexity at any LLM — Gemini, Claude, GPT, or a self-hosted endpoint — by setting one environment variable. Every LLM call routes through LiteLLM, so any model LiteLLM supports works without code changes.

Environment Variables

The primary and fallback models can live on different providers, each with its own key. Omit a key and LiteLLM reads the provider’s own environment variable instead (GEMINI_API_KEY / GOOGLE_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, …).

Model Strings

Write models as provider/model: See the LiteLLM provider list for the full set of supported prefixes.
Always include the provider prefix. A bare name like gemini-2.5-flash is passed to LiteLLM as-is and may resolve to a different provider than you expect.

Resolution Order

The model for any given LLM call is resolved from the most specific setting available:

Task-Level Override

Set the model once for the whole automation:

Action-Level Override

Give a single action a stronger (or cheaper) model than the rest of the automation:
Actions that accept llm_model_name: extraction_action.llm, extraction_action.pdf, extraction_action.locator, misc_action.llm_query, and interaction_action.captcha.
Captcha solving is the one exception to the resolution order — interaction_action.captcha defaults to gemini/gemini-2.5-pro rather than falling through to LLM_MODEL, because captcha grids need a stronger vision model. Override llm_model_name on the action to change it.

Fallbacks

When LLM_MODEL_FALLBACK is set, a failed primary call is retried once on the fallback model before the action errors. Each model uses its own key, so the fallback can be on a completely different provider — useful for surviving a single provider’s rate limits or outages.
Fallbacks apply to the environment-level models only. A per-task or per-action llm_model_name overrides the primary model; the same LLM_MODEL_FALLBACK still backs it up.

Cost Tracking

Token usage and cost are reported per task from LiteLLM’s pricing data. Reasoning and tool-use tokens are already counted inside completion tokens, so they are reported but never billed twice. If a model has no pricing entry in LiteLLM, tokens are still tracked and cost is reported as 0.

Migrating from llm_provider

llm_provider is deprecated. Existing automations that set it keep working — the provider and model are joined into a LiteLLM string — but new automations should use a single prefixed llm_model_name. The provider is no longer restricted to gemini, anthropic, or openai — any LiteLLM prefix is accepted.