Configuration Reference

Configuration Reference

This document contains the complete configuration reference for Kodit. All configuration is done through environment variables.

AppContext

Global context for the kodit project. Provides a shared state for the app.

Environment VariableTypeDefaultDescription
DATA_DIRPath~/.kodit
DB_URLstr<lambda>()
LOG_LEVELstrINFO
LOG_FORMATLogFormatLogFormat.PRETTY
DISABLE_TELEMETRYboolFalse
EMBEDDING_ENDPOINT`EndpointNone`None
EMBEDDING_ENDPOINT_BASE_URL`strNone`None
EMBEDDING_ENDPOINT_MODEL`strNone`None
EMBEDDING_ENDPOINT_API_KEY`strNone`None
EMBEDDING_ENDPOINT_NUM_PARALLEL_TASKSint10Number of parallel tasks to use for the endpoint
EMBEDDING_ENDPOINT_SOCKET_PATH`strNone`None
EMBEDDING_ENDPOINT_TIMEOUTfloat60Request timeout in seconds
EMBEDDING_ENDPOINT_MAX_RETRIESint5Maximum number of retries for the endpoint
EMBEDDING_ENDPOINT_INITIAL_DELAYfloat2.0Initial delay in seconds for the endpoint
EMBEDDING_ENDPOINT_BACKOFF_FACTORfloat2.0Backoff factor for the endpoint
EMBEDDING_ENDPOINT_EXTRA_PARAMS`dictNone`None
EMBEDDING_ENDPOINT_MAX_TOKENSint8000Conservative token limit for the embedding model
ENRICHMENT_ENDPOINT`EndpointNone`None
ENRICHMENT_ENDPOINT_BASE_URL`strNone`None
ENRICHMENT_ENDPOINT_MODEL`strNone`None
ENRICHMENT_ENDPOINT_API_KEY`strNone`None
ENRICHMENT_ENDPOINT_NUM_PARALLEL_TASKSint10Number of parallel tasks to use for the endpoint
ENRICHMENT_ENDPOINT_SOCKET_PATH`strNone`None
ENRICHMENT_ENDPOINT_TIMEOUTfloat60Request timeout in seconds
ENRICHMENT_ENDPOINT_MAX_RETRIESint5Maximum number of retries for the endpoint
ENRICHMENT_ENDPOINT_INITIAL_DELAYfloat2.0Initial delay in seconds for the endpoint
ENRICHMENT_ENDPOINT_BACKOFF_FACTORfloat2.0Backoff factor for the endpoint
ENRICHMENT_ENDPOINT_EXTRA_PARAMS`dictNone`None
ENRICHMENT_ENDPOINT_MAX_TOKENSint8000Conservative token limit for the embedding model
DEFAULT_SEARCHSearchprovider='sqlite'
DEFAULT_SEARCH_PROVIDERLiteralsqlite
PERIODIC_SYNCPeriodicSyncConfigenabled=True interval_seconds=1800 retry_attempts=3Periodic sync configuration
PERIODIC_SYNC_ENABLEDboolTrueEnable periodic sync
PERIODIC_SYNC_INTERVAL_SECONDSfloat1800Interval between periodic syncs in seconds
PERIODIC_SYNC_RETRY_ATTEMPTSint3Number of retry attempts for failed syncs
API_KEYSlist[]Comma-separated list of valid API keys (e.g. ‘key1,key2’)
REMOTERemoteConfigserver_url=None api_key=None timeout=30.0 max_retries=3 verify_ssl=TrueRemote server configuration
REMOTE_SERVER_URL`strNone`None
REMOTE_API_KEY`strNone`None
REMOTE_TIMEOUTfloat30.0Request timeout in seconds
REMOTE_MAX_RETRIESint3Maximum retry attempts
REMOTE_VERIFY_SSLboolTrueVerify SSL certificates
REPORTINGReportingConfiglog_time_interval=datetime.timedelta(seconds=5)Reporting configuration
REPORTING_LOG_TIME_INTERVALtimedelta0:00:05Time interval to log progress in seconds

Applying Configuration

There are two ways to apply configuration to Kodit:

  1. A local .env file (e.g. kodit --env-file .env serve)
  2. Environment variables (e.g. DATA_DIR=/path/to/kodit/data kodit serve)

How you specify environment variables is dependent on your deployment mechanism.

Docker Compose

For example, in docker compose you can use the environment key:

services:
  kodit:
    environment:
      - DATA_DIR=/path/to/kodit/data

Kubernetes

For example, in Kubernetes you can use the env key:

env:
  - name: DATA_DIR
    value: /path/to/kodit/data

Example Configurations

Enrichment Endpoints

Enrichment is typically the slowest part of the indexing process because it requires calling a remote LLM provider. Ideally you want to maximise the number of parallel tasks but all services have rate limits. Start low and increase over time.

See the configuration reference for full details. The following is a selection of examples.

Helix.ml Enrichment Endpoint

Get your free API key from Helix.ml.

ENRICHMENT_ENDPOINT_BASE_URL=https://app.helix.ml/v1
ENRICHMENT_ENDPOINT_MODEL=hosted_vllm/Qwen/Qwen3-8B
ENRICHMENT_ENDPOINT_NUM_PARALLEL_TASKS=1
ENRICHMENT_ENDPOINT_TIMEOUT=300
ENRICHMENT_ENDPOINT_API_KEY=hl-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Local Ollama Enrichment Endpoint

ENRICHMENT_ENDPOINT_BASE_URL=http://localhost:11434
ENRICHMENT_ENDPOINT_MODEL=ollama_chat/qwen3:1.7b
ENRICHMENT_ENDPOINT_NUM_PARALLEL_TASKS=1
ENRICHMENT_ENDPOINT_EXTRA_PARAMS='{"think": false}'
ENRICHMENT_ENDPOINT_TIMEOUT=300

Azure OpenAI Enrichment Endpoint

ENRICHMENT_ENDPOINT_BASE_URL=https://winderai-openai-test.openai.azure.com/
ENRICHMENT_ENDPOINT_MODEL=azure/gpt-4.1-nano # Must be in the format "azure/azure_deployment_name"
ENRICHMENT_ENDPOINT_API_KEY=XXXX
ENRICHMENT_ENDPOINT_NUM_PARALLEL_TASKS=5 # Azure defaults to 100K TPM
ENRICHMENT_ENDPOINT_EXTRA_PARAMS={"api_version": "2024-12-01-preview"}