Skip to main content
Every LLM call in Optexity runs on Google Vertex AI: Gemini first, with Claude as the fallback. Calls are authenticated with Application Default Credentials, so there are no model API keys.

Setup

  1. In your Google Cloud project, enable the Vertex AI API.
  2. In Vertex AI → Model Garden, enable the Claude models used as fallbacks (claude-haiku-5-5, claude-sonnet-5-5, claude-opus-5-5).
  3. Sign in: gcloud auth application-default login locally, or set GOOGLE_APPLICATION_CREDENTIALS to a service-account key file on a server.

Environment Variables

Tiers

Model IDs

Use Vertex model IDs, such as gemini-3.6-flash, gemini-4-argon or claude-sonnet-5-5. Model strings saved in older automations keep working: gemini/gemini-2.5-flash and anthropic/claude-sonnet-4-6 are converted, and models Vertex no longer serves run on a current model of the same strength (for example gemini-2.5-pro runs on the pro tier). Models Vertex doesn’t offer, such as OpenAI models, run on the default models. Optexity logs a warning in both cases; update the saved value when you next edit the automation.

Resolution Order

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, dynamic_form_mapping_action, and interaction_action.captcha.
Captcha solving uses the pro tier unless the captcha action sets llm_model_name, because captcha grids need a stronger vision model.

Fallbacks

A call that hits a rate limit, an outage or a model that can’t serve it moves to the next model automatically:
  • A model chosen with llm_model_name or LLM_MODEL falls back to LLM_MODEL_FALLBACK if set, otherwise to the other models in its tier (the standard tier if the model isn’t in one).
  • Tier calls (default calls, captcha) fall back within their tier.
  • Temporary errors are retried once on the same model, and output that doesn’t match the requested format is retried up to twice, before moving on.

Cost Tracking

Token usage is reported per task from Vertex AI’s token counts. Cost is estimated from list prices (non-global locations such as us are priced 10% higher); the billed amount is in Google Cloud Billing, where calls are tagged with service, feature, environment and tier labels.

Migrating from LiteLLM

llm_provider is deprecated. Automations that still set it keep working.