Skip to content

AI model and key

The root-cause analysis uses an AI model through the OpenAI API, or any service that speaks the same API, such as a model the bank hosts itself. Everything before the AI works without one: the evidence and the cause chains are found by code.

Each tenant chooses its service in Settings → AI. A tenant that has not chosen one uses the server’s default, set in the backend’s environment (below).

Open your name at the bottom of the menu, then Settings, tab AI (or AI settings in the menu, or Ctrl+K and Go to AI settings). Administrators change the settings; NOC accounts read them.

Provider What you enter Where the evidence goes
OpenAI Model (for example gpt-4o-2024-08-06), API key OpenAI’s cloud API, masked
Azure OpenAI Endpoint (https://<resource>.openai.azure.com or .cognitiveservices.azure.com), deployment name, API version (2024-10-21 when empty), API key The bank’s Azure resource, in the region it chose
OpenAI-compatible endpoint Base URL (usually ending in /v1), model, API key if the service needs one A model running inside the bank (vLLM, Ollama, LM Studio) or any service with OpenAI’s chat completions API

An http:// address needs Allow plain http ticked: the key and the evidence then cross the network unencrypted. Use https:// where the model offers it.

  1. Choose the provider and fill in its fields.
  2. Press Test connection. AVACOM sends one tiny request (“Reply with the word OK.”) with what you entered, waits at most 10 seconds and saves nothing. It shows how long the answer took, or what went wrong when the service answered like an OpenAI API (the key refused, no such model or deployment). Anything else gets one general message, so the button cannot be used to explore the network; the server’s log has the details. Each tenant may test 5 times a minute (AVACOM_AI_TESTS_PER_MINUTE).
  3. Press Save. The next AI request uses the new settings: the RCA, its drill-down, the incident report and AI incident suggestions.

Use the server’s AI removes the tenant’s settings and key, and the tenant goes back to the server’s default.

The key. It goes to the secret manager (SECRET_MANAGER_TYPE) and is never shown again: the page says whether one is saved and, for a key of 12 characters or more, its last four. Leave the field empty to hold the saved key. A key belongs to the service it was entered for: if you change the provider or the address, enter the new service’s key, or the saved one is removed. Test connection never sends the saved key to another address either. If the secret manager cannot delete the key, nothing is changed and the page says so.

Masked in everything sent to the AI, whatever the service: an RCA’s evidence, the incident report and AI incident suggestions. Passwords, keys and tokens wherever they appear, private keys, user names and passwords inside URLs, card numbers (Luhn-checked), IBANs (checksum-checked) and e-mail addresses. Also mask IP addresses replaces them with [IP] too; the AI then cannot name or query a host known only by its address. Host, service and user names, times and messages are sent as they are: the analysis needs them.

Drill-down turns the AI’s own queries off or on for the tenant at once (see The drill-down).

The address a tenant enters is checked again at every connection: AVACOM resolves the host name then, checks every address it resolves to, and connects only to a checked one. It follows no redirect, and it uses no proxy or .netrc from the server’s environment for a tenant’s service.

Addresses Reached
Private networks (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, fc00::/7) and public addresses Yes: a bank’s own model usually sits on a private address
Loopback (127.0.0.0/8, ::1): a model on the AVACOM server itself Only when AVACOM_AI_ALLOWED_NETWORKS lists it, for example 127.0.0.1/32,::1/128
Link-local (169.254.0.0/16, fe80::/10) and cloud metadata services (fd00:ec2::254, 168.63.129.16, 100.100.100.200, 192.0.0.192) Never
Unspecified, multicast and reserved addresses Never

An address written as one number or in hex or octal (2852039166, 0xa9fea9fe) is refused when saved; write IPv4 addresses as four decimal numbers.

Amazon Bedrock has no provider of its own yet. Bedrock also serves models through an OpenAI-compatible chat completions endpoint, so choose OpenAI-compatible endpoint with https://bedrock-runtime.<region>.amazonaws.com/openai/v1 and a Bedrock API key. This route has not been tested with AVACOM; the model must follow a JSON schema and call tools like any other.

  1. Put the key in the env file the backend reads (never in a Compose file):

    Terminal window
    OPENAI_API_KEY=<your key>

    Use a key with a spending limit. On the demo incident the first request of an RCA used about 5,000 tokens; the drill-down can use up to the token budget below.

  2. Restart the backend:

    Terminal window
    docker compose -f docker-compose.prod.yml --env-file .env.prod up -d avacom-backend
  3. Open an incident’s Root cause tab and press Analyze again. The report’s footer names the model that wrote it.

The frontend uses the same key for the incident assistant and AI Summary. Give it to the frontend container too if you want those. Settings → AI does not apply to them yet.

Variable Default What
OPENAI_MODEL_NAME gpt-4o-2024-08-06 The model for every AI feature
AVACOM_RCA_MODEL OPENAI_MODEL_NAME The model for the RCA only
AVACOM_AI_DISABLE_TEMPERATURE false true for models that refuse a temperature (reasoning models)

The RCA asks for a strictly structured answer (a JSON schema) and, for the drill-down, uses tool calls. The model must support both. A newer model generally follows the RCA’s rules (cite evidence, no placeholders in commands) more closely.

So that the evidence never leaves the bank, point the server’s default at your own OpenAI-compatible service, for example vLLM (a tenant can also choose one in Settings → AI):

Terminal window
OPENAI_BASE_URL=https://llm.bank.local/v1
OPENAI_API_KEY=<the service's key, or any non-empty value>
AVACOM_RCA_MODEL=<the model name the service expects>

OPENAI_BASE_URL is not in the Compose files: add it to the backend’s environment (and the frontend’s, for the assistant). The service must support structured outputs with a strict JSON schema and tool calling.

  • A dossier, not raw logs: the incident’s alerts, metric series reduced to first, last, peak and threshold crossing, log patterns with a few examples, the cause chains C1–C3, and up to five past incidents. Each item has an id the AI must cite.
  • Masked text: passwords, keys and tokens, card numbers, IBANs and e-mail addresses are replaced before anything is sent, and IP addresses too when the tenant asks for it.
  • Fenced evidence: log lines are marked as data, so a log line that reads like an instruction is not obeyed.

The server checks every citation in the answer. Claims that cite nothing are marked unsupported, citations to evidence that does not exist are removed, and commands with placeholders are not offered as runnable.

Variable Default What
AVACOM_INCIDENT_ANALYSIS_AUTO true Analyze each new incident by itself
AVACOM_INCIDENT_ANALYSIS_DELAY_S 60 Seconds after the incident opens
AVACOM_REANALYSIS_AUTO as AVACOM_INCIDENT_ANALYSIS_AUTO Analyse an incident again as it grows (Re-analysis)
AVACOM_RCA_MAX_PER_HOUR 30 AI analyses per hour, automatic and Analyze again together
AVACOM_RCA_AI true false collects evidence and cause chains but never calls the AI

While it writes, the AI may ask for more: logs, metrics, what a service depends on, or a past incident’s RCA. It may ask only about the incident’s own hosts, services and users, what those services depend on (three hops down the service topology), their direct callers, and the hosts that hints from people name (see Hints and questions for the on-call).

Variable Default What
AVACOM_RCA_DRILLDOWN true false turns it off for everyone; a tenant turns it off in Settings → AI
AVACOM_RCA_DRILLDOWN_ROUNDS 3 Rounds of questions
AVACOM_RCA_DRILLDOWN_CALLS 4 Questions a round
AVACOM_RCA_DRILLDOWN_RECORDS 400 Records a round
AVACOM_RCA_DRILLDOWN_ROUND_TOKENS 8000 Tokens of answers a round
AVACOM_RCA_DRILLDOWN_SECONDS 150 Seconds for the whole drill-down (at most 300)
AVACOM_RCA_TOKEN_BUDGET 200000 Tokens for all of one RCA’s AI requests
AVACOM_RCA_DRILLDOWN_NAMED_HOSTS false Also query hosts named only inside log lines (a log line is untrusted)

When a limit is reached, the AI writes the RCA with what it has, and the RCA says so under What the analysis could not establish.