> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vectorlint.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment variables

> Complete reference for all environment variables that configure VectorLint's runtime behavior.

VectorLint reads configuration from environment variables at runtime. You can set them in two places:

* **`~/.vectorlint/config.toml`**: global defaults that apply across all projects
* **`.env` in your project root**: project-level overrides that take precedence over the global config

In CI, pass them directly as pipeline environment variables or secrets. See [CI Integration](/ci-integration) for examples.

<Note>
  Never commit API keys to version control. Add `.env` to your `.gitignore`.
</Note>

## LLM provider

| Variable                       | Required           | Description                                                                                                  |
| ------------------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------ |
| `LLM_PROVIDER`                 | Yes                | The LLM provider to use. Accepted values: `openai`, `anthropic`, `azure-openai`, `gemini`, `amazon-bedrock`. |
| `OPENAI_API_KEY`               | If using OpenAI    | API key for OpenAI.                                                                                          |
| `ANTHROPIC_API_KEY`            | If using Anthropic | API key for Anthropic.                                                                                       |
| `GEMINI_API_KEY`               | If using Gemini    | API key for Google Gemini.                                                                                   |
| `AZURE_OPENAI_API_KEY`         | If using Azure     | API key for Azure OpenAI.                                                                                    |
| `AZURE_OPENAI_ENDPOINT`        | If using Azure     | Your Azure OpenAI resource endpoint URL.                                                                     |
| `AZURE_OPENAI_DEPLOYMENT_NAME` | If using Azure     | Your Azure OpenAI deployment name.                                                                           |
| `AZURE_OPENAI_API_VERSION`     | No                 | Azure OpenAI API version. Defaults to `2024-02-15-preview`.                                                  |
| `AWS_REGION`                   | If using Bedrock   | AWS region for Bedrock.                                                                                      |
| `AWS_ACCESS_KEY_ID`            | No (Bedrock)       | AWS access key. Optional with an IAM role or `~/.aws/credentials`.                                           |
| `AWS_SECRET_ACCESS_KEY`        | No (Bedrock)       | AWS secret key. Optional with an IAM role or `~/.aws/credentials`.                                           |
| `BEDROCK_MODEL`                | No                 | Bedrock model ID. Defaults to `global.anthropic.claude-sonnet-4-5-20250929-v1:0`.                            |

## Search provider

Required only for rules that use the `technical-accuracy` evaluator. If not set, rules that depend on external lookup return reduced-confidence results.

| Variable             | Required                    | Description                                           |
| -------------------- | --------------------------- | ----------------------------------------------------- |
| `SEARCH_PROVIDER`    | If using technical-accuracy | Search provider to use. Accepted value: `perplexity`. |
| `PERPLEXITY_API_KEY` | If using Perplexity         | API key for Perplexity search.                        |

## Review behavior

| Variable               | Default | Description                                                                                                                                                        |
| ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `CONFIDENCE_THRESHOLD` | `0.75`  | Confidence gate. Controls how strictly raw model candidates are filtered before surfacing violations. Accepted range: `0`–`1`. Invalid values fall back to `0.75`. |

Lower values surface more findings (higher recall, more noise). Higher values surface fewer findings (higher precision, fewer false positives). See [Handling false positives](/handling-false-positives) for guidance on when to adjust this.

## Example configurations

### OpenAI: global config.toml

```toml theme={null}
[env]
LLM_PROVIDER = "openai"
OPENAI_API_KEY = "sk-..."
```

### Anthropic: project .env

```bash theme={null}
LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-...
```

### With search provider

```toml theme={null}
[env]
LLM_PROVIDER = "openai"
OPENAI_API_KEY = "sk-..."
SEARCH_PROVIDER = "perplexity"
PERPLEXITY_API_KEY = "pplx-..."
```

### CI environment with higher confidence threshold

```bash theme={null}
LLM_PROVIDER=openai
OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
CONFIDENCE_THRESHOLD=0.85
```

## Precedence

When the same variable is set in multiple places, VectorLint resolves it in this order (highest precedence first):

1. Shell / CI environment variables
2. Project `.env` file
3. Global `~/.vectorlint/config.toml`
4. Built-in defaults

## Related

* [LLM Providers](/llm-providers): configure your provider with full setup examples
* [CI Integration](/ci-integration): pass environment variables securely in pipelines
* [Handling false positives](/handling-false-positives): when and how to adjust `CONFIDENCE_THRESHOLD`
