Configuration Validation
--test-config performs static configuration validation.
Local binary
./target/release/ai-firewall --config configs/ai-firewall.conf --test-config
Or, if not built yet:
cargo run -- --config configs/ai-firewall.conf --test-config
Expected output:
configuration OK
Docker Compose
docker compose run --rm firewall \
--config /configs/ai-firewall.conf \
--test-config
What it checks
- syntax
- required directives
- value formats and ranges
- semantic cache settings
- model validation configuration
What it does not check
It does not connect to Redis, Qdrant, embedding providers, or upstream providers. Runtime startup and reload diagnostics perform dependency initialization separately.
Print masked configuration
./target/release/ai-firewall --config configs/ai-firewall.conf --print-config
Docker Compose:
docker compose run --rm firewall \
--config /configs/ai-firewall.conf \
--print-config
Examples of provider URL validation errors:
configuration error: invalid upstream_base_url 'http://ollama:11434/v1/chat/completions': configure a base URL, not a full endpoint path
configuration error: invalid embedding_base_url 'http://ollama:11434/v1/embeddings': configure a base URL, not a full endpoint path
For local providers without authentication, upstream_api_key and embedding_api_key should still be present but may use placeholder values such as dummy, none, null, or -.
Version validation
After starting the service, use /version to confirm that the running binary is the expected v0.2.0 release:
curl -s http://localhost:8080/version