Setup
- In your Google Cloud project, enable the Vertex AI API.
- In Vertex AI → Model Garden, enable the Claude models used as fallbacks (
claude-haiku-5-5,claude-sonnet-5-5,claude-opus-5-5). - Sign in:
gcloud auth application-default loginlocally, or setGOOGLE_APPLICATION_CREDENTIALSto a service-account key file on a server.
Environment Variables
Tiers
Model IDs
Use Vertex model IDs, such asgemini-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: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_nameorLLM_MODELfalls back toLLM_MODEL_FALLBACKif set, otherwise to the other models in its tier (thestandardtier 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 asus 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.