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

# Configuration

> Configure Qodo Context Engine for self-hosted deployments by setting up required embedding and agentic models, optional fast models, and monitoring integrations.

```toml theme={null}
[anthropic_api]
key = '...'

[openai_api]
api_key = '...'
```

The Context Engine uses a global config `.toml` file for configuration. You receive this file during initial installation. Below is a set of configurations that you can modify according to your needs.

## Models configuration (required)

The Context Engine requires at least:

* One embedding model
* One chat model capable of agentic (multi-step) execution

Additional fast models can improve performance but are **not required**.

## Model types

### 1. Embedding model (required)

Drives chunking and retrieval. May require tuning if replaced.

**Example:** `text-embedding-large-3`

### 2. Super-fast model (optional)

A lightweight model for very quick operations. If not provided, the agentic model will handle these tasks, but indexing may become slower. **Example:** `gpt-4.1-nano`

**Recommendation:** If no fast or super-fast model is available, it’s best to **disable code description** during indexing to avoid slowdowns.

> ```toml theme={null}
> [descriptor]
> enabled = false
> ```

### 3. Fast chat model (optional)

Used for quick, non-reasoning tasks. If not provided, the agentic model can be used instead, with some performance impact.

**Example:** `gpt-4.1-mini`

### 4. Agentic-capable chat model (required)

Runs the core agent workflows and multi-step reasoning.

**Example:** `claude-sonnet-4-5`

## Required models summary

| Purpose | Model Example | Required |
| :- | :- | :- |
| Embeddings | `text-embedding-large-3` | **Yes** |
| Agentic-capable chat | e.g.,`claude-sonnet-4-5` | **Yes** |
| Fast chat model | e.g.,`gpt-4.1-mini` | Optional |
| Super-fast model | e.g.,`gpt-4.1-nano` | Optional |

## Example model configurations

### OpenAI-only example

| Role | Model | Embedding |
| :- | :- | :- |
| Embedding | `openai/text-embedding-large-3` | **Yes** |
| Super-fast model | `openai/gpt-4.1-nano` | Optional |
| Fast chat model | `openai/gpt-4.1-mini` | Optional |
| Agentic-capable chat model | `openai/gpt-5.1` | **Yes** |

### Bedrock-only example

| Role | Model | Embedding |
| :- | :- | :- |
| Embedding | `bedrock/amazon.titan-embed-text-v2:0` | **Yes** |
| Super-fast model | `bedrock/anthropic.claude-haiku-4-5-20251001-v1:0` | Optional |
| Fast chat model | `bedrock/anthropic.claude-haiku-4-5-20251001-v1:0` | Optional |
| Agentic-capable chat model | `bedrock/global.anthropic.claude-sonnet-4-5-20250929-v1:0` | **Yes** |

### Default configuration

```toml theme={null}
[anthropic_api]
key = '...'

[openai_api]
api_key = '...'
```

### Bedrock configuration

Set this environment variable to enable Bedrock routing:

* AI\_MODELS\_FILE=ai\_models\_bedrock.py

```toml theme={null}
[aws]
AWS_ACCESS_KEY_ID = "KEY_ID"
AWS_SECRET_ACCESS_KEY = "SECRET"
AWS_REGION_NAME = "us-east-1"

[deep_ask_research_preview]
llm_model = "bedrock/global.anthropic.claude-sonnet-4-5-20250929-v1:0"
```

### LLM gateway support

Our product supports integration with custom LLM gateways, provided they implement the same API interfaces as the official OpenAI or Anthropic model endpoints.

Set this environment variable in all deployments to enable LLM gateway routing:

* AI\_MODELS\_FILE=ai\_models\_onprem.py

```toml theme={null}
[onprem_models]
[onprem_models.lite]
api_base = "<INSERT_GATEWAY_BASE_URL_HERE>"
[onprem_models.main]
api_base = "<INSERT_GATEWAY_BASE_URL_HERE>"
[onprem_models.remote_rag]
api_base = "<INSERT_GATEWAY_BASE_URL_HERE>"

[deep_ask_research_preview]
llm_base_url = "<INSERT_GATEWAY_BASE_URL_HERE>"
```

If you have unique integration needs, please reach out to the Qodo team.

## Monitoring config (recommended)

* [Sentry](https://sentry.io/) - We use Sentry for error tracking. When enabled, we only emit code crashes and traces.
* [Mixpanel](https://mixpanel.com/home/) - Used for analytics only. No user data is sent.
* CLIENT\_DISPLAY\_NAME - Name of your org e.g. `"qodo_ai"` used as identifier for the above tools

```toml theme={null}
CLIENT_DISPLAY_NAME = "N/A"


[sentry]
dsn = "..."
environment = "PRODUCTION"


[mixpanel]
token = "..."
api_secret = "..."
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.