Configuration
spack-ai-test provides a layered configuration system that follows standard Spack conventions.
Configuration Precedence
Settings are resolved in the following order of precedence (highest to lowest):
Command-line flags (e.g.,
--model,--kb)Environment variables (e.g.,
SPACK_AI_TEST_MODEL,SPACK_AI_TEST_KB)Configuration file (
~/.spack/ai_test.yaml)Built-in defaults
Configuration File: ai_test.yaml
You can customize default behavior by creating or editing ~/.spack/ai_test.yaml:
ai_test:
# Default LLM model identifier
model: gemini-2.5-flash
# Default path for the persistent Knowledge Base
kb: ~/.spack/cache/ai_test/kb.json
# Compiler matrix used when queuing specs for external CI
ci_compilers:
- gcc@11.4.0
- gcc@12.3.0
- gcc@13.3.0
- clang@14.0.0
- clang@16.0.0
Configuration Options
Option |
Default Value |
Description |
|---|---|---|
|
|
Default LLM model string for spec generation. |
|
|
Path to the local JSON Knowledge Base. The file and any parent directories are created automatically on the first run if they do not exist. |
|
(List of GCC & Clang versions) |
The compiler matrix used when running without |
Environment Variables
The following environment variables are recognized:
API Keys
GEMINI_API_KEY: API authentication key for Google Gemini models.ANTHROPIC_API_KEY: API authentication key for Anthropic Claude models.OPENAI_API_KEY: API authentication key for OpenAI GPT models.
Extension Overrides
SPACK_AI_TEST_MODEL: Overrides the default model specified inai_test.yaml.SPACK_AI_TEST_KB: Overrides the Knowledge Base path specified inai_test.yaml.
Supported LLM Models
spack-ai-test includes built-in client support for leading model families:
Provider |
Model String ( |
Required Environment Variable |
|---|---|---|
Google Gemini |
|
|
Anthropic Claude |
|
|
OpenAI |
|
|