AI Analysis
OPTIONAL BYOK. Model-assisted analysis is not required for local pixel comparison. Screenshot evidence is sent directly to the provider account you configure.
When a route exceeds your pixel or SSIM threshold, Frontguard can send cropped visual evidence (baseline, current, diff, and spatial cluster selectors) to your configured vision model to classify the change and explain what shifted.
Scope
Changed screenshots can be classified as regression, intentional, or content_update with a confidence score and explanation. AI analysis runs on every diff above threshold to explain visual changes, classify severity, and suggest candidate CSS fixes. AI annotations are advisory and never silently override pass/fail exit codes.
Providers
Supported providers include OpenAI (provider: 'openai', models such as 'gpt-4.1-mini' or 'gpt-4o', env FRONTGUARD_OPENAI_KEY), Anthropic (provider: 'anthropic', model 'claude-sonnet-4-20250514', env FRONTGUARD_ANTHROPIC_KEY), Google Gemini (provider: 'gemini', model 'gemini-2.5-flash', env FRONTGUARD_GEMINI_KEY), and OpenAI-compatible custom endpoints via baseUrl or FRONTGUARD_OPENAI_BASE_URL for OpenRouter, Ollama, and vLLM.
| Provider | Config provider | Default / Recommended Model | Environment Variable |
|---|---|---|---|
Google Gemini | 'gemini' | 'gemini-2.5-flash' | FRONTGUARD_GEMINI_KEY (or GEMINI_API_KEY) |
OpenAI | 'openai' | 'gpt-4.1-mini' or 'gpt-4o' | FRONTGUARD_OPENAI_KEY (or OPENAI_API_KEY) |
Anthropic | 'anthropic' | 'claude-sonnet-4-20250514' | FRONTGUARD_ANTHROPIC_KEY (or ANTHROPIC_API_KEY) |
OpenRouter / Ollama / vLLM | 'openai' + baseUrl | Any vision-capable model ID | FRONTGUARD_OPENAI_KEY + FRONTGUARD_OPENAI_BASE_URL |
Configuration examples
Evidence limits
Frontguard has not published a model precision/recall benchmark. The current validation run had AI disabled, so it cannot support an accuracy claim.
