Chainvet
Concepts

AI Features

Two optional, opt-in AI features backed by a local Ollama server — off by default so Chainvet stays offline and deterministic.

Chainvet has two optional AI features. Both are opt-in and no-ops by default — with them off, Chainvet runs fully offline and deterministically. When enabled, they call a local Ollama server (no data leaves your machine).

The two features

FeatureEnv varWhat it does
AI fallback parserCHAINVET_LLM_FALLBACK_PARSER=1AI-assisted parsing when both solc and tree-sitter fail to parse a file.
AI report reviewCHAINVET_LLM_REPORT=1An LLM reviews the findings: drops likely false positives and annotates the rest.

The fallback parser lives in the frontend; the report review runs in the orchestrator after findings are collected.

Configuration

export CHAINVET_LLM_REPORT=1
export CHAINVET_LLM_ENDPOINT=http://127.0.0.1:11434   # default
export CHAINVET_LLM_MODEL=qwen2.5-coder:7b            # default
chainvet scan contracts/
Env varDefaultPurpose
CHAINVET_LLM_ENDPOINThttp://127.0.0.1:11434Ollama endpoint
CHAINVET_LLM_MODELqwen2.5-coder:7bOllama model
CHAINVET_LLM_TIMEOUT_MSRequest timeout
CHAINVET_LLM_NUM_PREDICTToken budget per request
CHAINVET_LLM_DEBUGSet to 1 for LLM debug logging

There are additional fallback-parser tuning knobs (CHAINVET_LLM_FALLBACK_TIMEOUT_MS, CHAINVET_LLM_FALLBACK_NUM_PREDICT, CHAINVET_LLM_FALLBACK_MAX_SOURCE_BYTES, CHAINVET_LLM_FALLBACK_CHUNK_BYTES, CHAINVET_LLM_FALLBACK_MAX_CHUNKS, CHAINVET_LLM_FALLBACK_DEBUG) — see the Environment variables reference.

Reproducibility

Enabling AI review makes a scan's output depend on the model — turn it off for deterministic, reproducible results (for example in CI). The transport is provider-agnostic; Ollama is the implementation wired up today.

In the editor

The VS Code extension exposes both features as settings (chainvet.aiReports.enabled, chainvet.aiFallbackParser.enabled) and passes them to the language server as environment variables — see VS Code.

On this page