CodeDecay is deterministic by default. The default configuration does not call an LLM, does not require API keys, and does not use a hosted CodeDecay model.
Future or opt-in red-team commands can use user-owned providers for edge-case reasoning. Model output must be treated as untrusted suggestions, not commands to execute.
Today, codedecay analyze, codedecay redteam, codedecay agent, and
codedecay snapshot stay deterministic. codedecay llm-review is the explicit
opt-in path for user-owned provider suggestions.
That means this page is about preparing user-owned providers cleanly and explicitly, not about hidden default behavior.
The shortest local-first path is Ollama:
- Keep deterministic analysis as your default.
- Configure Ollama explicitly in
.codedecay/config.yml. - Run
codedecay llm-review --pingto validate the provider. - Run
codedecay llm-review --base main --head HEAD --format markdownwhen you want optional model suggestions on top of deterministic analysis.
llm:
provider: ollama
model: qwen2.5-coder
endpoint: http://127.0.0.1:11434
timeoutMs: 30000npx codedecay llm-review --ping
npx codedecay llm-review --base main --head HEAD --format markdownIf the provider config is incomplete, CodeDecay fails clearly instead of silently falling back to a hosted default.
llm:
provider: disabled
timeoutMs: 30000This is the default when no config file exists.
Ollama support is designed for local models running on the user's machine.
llm:
provider: ollama
model: qwen2.5-coder
endpoint: http://127.0.0.1:11434
timeoutMs: 30000CodeDecay only calls this provider from commands that explicitly opt into LLM
assistance. The current deterministic codedecay analyze command does not call
an LLM.
CodeDecay can construct a LiteLLM/OpenAI-compatible provider for local or BYOK setups. It does not default to a hosted endpoint; you must provide the endpoint and model explicitly.
llm:
provider: litellm
model: gpt-4.1-mini
endpoint: http://127.0.0.1:4000/v1
apiKeyEnv: LITELLM_API_KEY
timeoutMs: 30000apiKeyEnv is the name of an environment variable. Do not put literal API keys
in config files.
Common failure cases are explicit:
- missing
llm.model - missing
llm.endpointfor LiteLLM/OpenAI-compatible setups - missing API key environment variables when
apiKeyEnvis configured - provider connectivity failures when
codedecay llm-review --pingcannot reach the configured endpoint
The provider uses an OpenAI-compatible /chat/completions request. Responses
are parsed into untrusted suggestions when possible. CodeDecay must not execute
commands from model output.
The provider interface leaves room for additional adapters later. Those adapters should remain optional and must not change the default local-first behavior.