{# Mirrors governor_web/templates/settings/llm.html. Audit persists the API key to the loopback-only ~/.governor-audit/config.json (mode 0600); the env vars (GEMINI_API_KEY / OPENAI_API_KEY / ANTHROPIC_API_KEY) remain a fallback for headless / CI use. #} {% extends "settings/layout.html" %} {% block settings_content %}

AI / LLM

Configure the language model used for the best-practices review on the top-N most expensive jobs.

{% if errors and errors.get('_general') %}
{{ errors['_general'] }}
{% endif %} {% if saved %}
Settings saved.
{% endif %}
{# Provider — read-only display + persisted-or-env status #}

Provider

{% if api_key_set %}

Configured

{% else %}

Not configured

{% endif %}
{# API Key — persisted to config.json (0600). Env var still works as fallback. #}

API Key

{% if api_key_masked %}

Current key: {{ api_key_masked }}

{% endif %}

Stored in ~/.governor-audit/config.json (file mode 0600). Falls back to GEMINI_API_KEY / OPENAI_API_KEY / ANTHROPIC_API_KEY when unset.

{# Model Configuration #}

Model Configuration

Used for generating best-practices findings.

Used for classification + lighter calls.

{# Parameters #}

Parameters

{# Audit-specific scope: top N + min confidence #}

Review Scope

Bounds LLM cost per scan.

Findings below this score are dropped.

{% endblock %}