# Codescout retrieval stack — copy to .env and customize as needed.
#
# Three profiles are supported:
# - AMD route (recommended on this workstation): reuse the llm-infra stack
# at ~/agents/llm via `llm up`. Copy `.env.amd` instead of this file.
# - GPU profile: self-contained docker-compose with nvidia. Copy `.env.gpu`.
# - CPU profile: self-contained docker-compose, CPU-only. Copy `.env.cpu`.
#
# This example shows the CPU/GPU shape (default ports 48081/48083/48084/6334).
# The AMD route uses 43300/43400/43501/43600 — see .env.amd.
# URLs the codescout MCP server uses to talk to the stack.
CODESCOUT_QDRANT_URL=http://127.0.0.1:6334
CODESCOUT_EMBEDDER_URL=http://127.0.0.1:48081
CODESCOUT_SPARSE_EMBEDDER_URL=http://127.0.0.1:48084
CODESCOUT_RERANKER_URL=http://127.0.0.1:48083
# Profile in use. Must match `docker compose --profile <x> up`.
# Values: cpu | gpu | amd
CODESCOUT_RETRIEVAL_PROFILE=cpu
# Embedding dim — must match the model being served.
# CodeRankEmbed = 768, jina-v2-base-code = 768, bge-small = 384, jina-v2-small = 512.
CODESCOUT_MODEL_DIM=768
# Tuning knobs.
# See docs/research/2026-05-06-retrieval-stack-benchmark.md for the full table.
#
# AST chunk size in chars. 1200 ≈ one well-scoped function. Default: 1200.
# CODESCOUT_CHUNK_TARGET=1200
#
# Sparse-leg candidate pool multiplier in RRF fusion. Tuned to 3.0 — sparse-dominant
# fusion gave +4 pts over balanced (1.0) on the 20-TC v2 suite. Default: 3.0.
# CODESCOUT_BM25_BOOST=3.0
#
# Skip the sparse leg entirely (pure dense ANN). The dense-only "lite" stack
# (in-process sqlite-vec + remote OpenAI embeddings, no Qdrant) relies on this.
# Default: off.
# CODESCOUT_DISABLE_SPARSE=0
# Dense embeddings are always OpenAI-compatible (`POST {url}/v1/embeddings`):
# llama-server, vLLM, Ollama, OpenAI proper, or a corporate gateway. Just set the
# model name the endpoint expects.
# CODESCOUT_EMBEDDER_MODEL_NAME=CodeRankEmbed
# Rerank-leg protocol (Stack A / hybrid only). `tei` (default) targets text-
# embeddings-inference's native `/rerank`. `llama-server` (alias: infinity, cohere)
# targets the Cohere-compatible `/rerank` exposed by llama-server's `--reranking` mode.
# CODESCOUT_RERANKER_PROTOCOL=tei