Configuration

Configuration

Configuration of Kodit is performed by setting environmental variables or adding variables to a .env file.

Note that updating a setting does not automatically update the data that uses that setting. For example, if you change a provider, you will need to delete and recreate all indexes.

Configuring Indexing

Default Indexing Provider

By default, Kodit will use small local models for semantic search and enrichment. If you are using Kodit in a professional capacity, it is likely that the local model latency is too high to provide a good developer experience.

Instead, you should use an external provider. The settings provided here will cause all embedding and enrichments request to be sent to this provider by default. You can override the provider used for each task if you wish. (Coming soon!)

OpenAI

Add the following settings to your .env file, or export them as environmental variables:

DEFAULT_ENDPOINT_BASE_URL=https://api.openai.com/v1
DEFAULT_ENDPOINT_API_KEY=sk-xxxxxx

Configuring the Database

Out of the box Kodit uses a local sqlite file to make it easier for users to get started. But for production use, it’s likely you will want to use a database that has dedicated semantic and keyword search capabilities for reduced latency.

VectorChord Database

VectorChord is an optimized PostgreSQL extension that provides both vector and BM25 search. (See Search)

Start a container with:

docker run \
  --name kodit-vectorchord \
  -e POSTGRES_DB=kodit \
  -e POSTGRES_PASSWORD=mysecretpassword \
  -p 5432:5432 \
  -d tensorchord/vchord-suite:pg17-20250601
Kodit assumes the database exists. In the above example I’m abusing the POSTGRES_DB environmental variable from the Postgres Docker container to create the database for me. In production setups, please create a database yourself.

Then update your .env file to include:

DB_URL=postgresql+asyncpg://postgres:mysecretpassword@localhost:5432/kodit

Configuring Search

Default Search Provider

By default, Kodit will use built-in implementations of BM25 and similarity search to improve the out of the box experience. If you are using Kodit in a professional capacity, it is likely that the search latency is too high to provide a good developer experience.

Instead, you should use the features included in your database. The settings provided here will cause all search functionality to use this database by default. You can override the database used for each search type if you wish. (Coming soon!)

VectorChord Search

Configure Kodit to use a VectorChord database.

Then update your .env file to include:

DB_URL=postgresql+asyncpg://postgres:mysecretpassword@localhost:5432/kodit
DEFAULT_SEARCH_PROVIDER=vectorchord

Configuring Enrichment

Default Enrichment Provider

The default enrichment provider is the same as the default indexing provider.