{% extends "ui/templates/base/layout.html" %} {% block content %}

Accounting Intelligence · Phase 12

Server AI Semantic Layer

AI is a fallback only. Confirmed mappings, historical evidence and deterministic rules remain primary. AI can select only an existing Accounting Nature; it cannot create ledgers or post to Tally.

Back to Tally
Provider
{{ provider_status.provider or 'Not configured' }}
Model
{{ provider_status.model or '—' }}
AI Gate
< {{ provider_status.gate }}% deterministic confidence
Status
{{ 'Configured' if provider_status.configured else 'Disabled until server key/model are configured' }}

Server environment: ACCOUNTING_AI_PROVIDER, ACCOUNTING_AI_MODEL, OPENAI_API_KEY. API keys are never displayed in the ERP UI or sent to Local Agents.

{% for label,value in [('AI Calls',summary.total),('Completed',summary.completed),('Reviewed',summary.reviewed),('Accepted',summary.accepted),('Corrected',summary.corrected),('Acceptance %',summary.acceptance_rate)] %}
{{ label }}
{{ value }}
{% endfor %}

Recent AI decisions

Input tokens {{ summary.input_tokens }} · Output tokens {{ summary.output_tokens }}

{% for d in decisions %} {% else %}{% endfor %}
WhenSourceModelAIConfidenceReviewReason
{{ d.created_at_utc }} {{ d.source_type }} #{{ d.source_record_id }} {{ d.model_name }} {{ d.ai_nature_code or '—' }} {{ d.ai_confidence }}% AI · {{ d.combined_confidence }}% combined {% if d.suggestion_accepted is sameas true %}Accepted{% elif d.suggestion_accepted is sameas false %}Corrected{% elif d.status=='failed' %}Failed{% else %}Pending{% endif %} {{ d.concise_reason or d.error_message or '—' }}
No AI decisions yet.
{% endblock %}