Docs / Reference7 min readEdit on GitHub

Constants#

Illume's tunables are module-level constants, not environment variables. Every Settings field is required and .env is gitignored, so a tunable in Settings would have to be set in every environment; a constant changes with a code change and a deploy, which is the intent. This page lists the constants that shape behaviour, grouped by area, with the file each lives in. Presentation strings and API base URLs are left out. Retrieval presets are configuration objects rather than constants and are listed on retrieval arms.

All paths are under server/app/ unless they say otherwise.

Terms used on this page#

  • Cap: an upper bound that silently truncates or skips beyond it. The page says which.
  • Free tier: requests that run on the operator's key; see BYOK and encryption.

Ingestion#

ConstantValueFileEffect
FILE_BATCH_SIZE500services/scanner.pyfiles inserted per flush during parse
DEPENDENCY_BATCH_SIZE1000services/dependency_resolver.pyedges inserted per batch
MAX_DOCSTRING_CHARS4000services/docstrings.pydocstrings are cut to this length
GIT_LOG_MAX_COMMITS500services/git_analyzer.pyonly the newest 500 commits are analysed
MAX_PRS200services/pr_fetcher.pymerged PRs fetched; PER_PAGE 100, REQUEST_TIMEOUT 20 s, MAX_RETRIES 3
MAX_FILES_PER_COMMIT30services/cochange.pylarger commits are ignored for co-change (bulk renames, formatting)
MIN_TOGETHER2services/cochange.pya pair must change together at least twice
MAX_PARTNERS_PER_FILE50services/cochange.pystrongest partners kept per file
CRITICAL_PATH_PATTERNSlistservices/criticality.pypath patterns that raise criticality; see criticality
LLM_MAX_WORKERS4services/_concurrency.pyconcurrent LLM calls inside one generation stage
parse progress intervalmax(50, total // 20) filesservices/scanner.pyhow often file_processed frames are published

Generation#

ConstantValueFileEffect
BATCH_SIZE25services/glossary_builder.pysymbols per glossary prompt
CANDIDATE_MULTIPLIER5services/glossary_builder.pyranked symbols fetched per entry, since same-named duplicates are trimmed
MAX_GLOSSARY_ENTRIES200services/glossary_builder.pyglossary size cap
MAX_ANNOTATED_FILES100services/onboarding.pyreading-order entries that get an LLM annotation
ANNOTATION_BATCH_SIZE10services/onboarding.pyfiles per annotation prompt
TOP_KEY_MODULES10services/architecture_brief.pykey modules given to the brief
DATA_FLOW_HOPS2services/architecture_brief.pydepth of the dependency paths the brief describes

Embeddings and retrieval#

ConstantValueFileEffect
MAX_CHUNK_TOKENS2048services/embedder.pylarger chunks are skipped, not truncated (tokens estimated as characters ÷ 4)
BATCH_SIZE100services/embedder.pytexts per embedding request
EMBED_BUILD_BATCH_SIZE500services/embedder.pysymbol chunks built per batch
EMBEDDING_MODELtext-embedding-3-smallservices/retrieval/embedding.pychanging it needs a migration (1536 dimensions)
TOP_K10services/rag.pyClassic chat's context size
NO_CONTEXT_ANSWERfixed textservices/retrieval/single_shot.pyreturned without calling the model when nothing is retrieved
MAX_OUTPUT_TOKENS8000services/retrieval/single_shot.pysingle-shot answer length
DEFAULT_CONTEXT_WINDOW250,000services/retrieval/config.pywhen the user has not set one; bounded by MIN_ 32,000 and MAX_CONTEXT_WINDOW 1,000,000
MAX_QUERY_TOKENS64services/retrieval/channels/lexical.pywords kept from the question for keyword search
MAX_PATTERN_LENGTH200services/retrieval/channels/grep.pyregex length cap; DEFAULT_MAX_RESULTS 200, DEFAULT_TIMEOUT_MS 2000
INTERNAL_RRF_K60services/retrieval/channels/history.pyfusion constant inside the history channel
SEED_RANK_CONSTANT60services/retrieval/channels/_files.pyrank constant for file seeds
MAX_HEADER_SYMBOLS15services/retrieval/channels/_files.pysymbol names in a file card's header
MAX_RENDERED_CHARACTERS8192services/retrieval/channels/_symbols.pyrendered symbol cap
WEIGHT_GAIN0.1services/retrieval/channels/graph.pyscore multiplier 1 + 0.1 × ln(1 + weight) for graph neighbours
MAX_COUNT1000services/retrieval/dates.pyupper bound on numbers in date phrases ("last N days")
MAX_VARIANT_CHARS2000services/retrieval/query.pyquery rewrite length
CALL_TIMEOUT_SECONDS30services/retrieval/llm_json.pyJSON-mode LLM calls (rewrites, listwise rerank)
SHORT_HASH_LENGTH8services/retrieval/citations.pycommit hash length in citation keys
COHERE_MODELcohere/rerank-5-fastservices/retrieval/rerank/cohere.pyvia OpenRouter; MAX_DOCUMENT_CHARS 4000, timeout 30 s
MAX_PARALLEL_REQUESTS4services/retrieval/rerank/jev.pyconcurrent Jev relevance calls
WINDOW_SIZE, MERGE_POOL20, 20services/retrieval/rerank/llm.pylistwise rerank windows; PASSAGE_CHARS 1500, 4 in parallel

Decisions and routing#

ConstantValueFileEffect
JEV_MODELtypesafe/jev-1.14services/decisions/openrouter.pythe decision model
MAX_REQUEST_BYTES32,000services/decisions/openrouter.pyrequest size cap; REQUEST_TIMEOUT_SECONDS 30
MAX_PARALLEL_REQUESTS4services/decisions/jev.py
MAX_STATE_CHARS40,000services/decisions/llm.pystate cap for the LLM decider; 4 calls in parallel
MAX_QUESTION_CHARS4000services/decisions/points.pyquestion cap in decision states
MAX_HISTORY_MESSAGE_CHARS500services/decisions/points.pyprevious question cap
MAX_STATE_CHARS12,000services/decisions/points.pyroute state cap
MAX_PASSAGE_CHARS1500services/decisions/points.pypassage cap for relevance decisions; question 1000
ROUTE_CONFIDENCE0.6services/decisions/points.pythe auto router's floor
ROUTE_TIMEOUT_SECONDS4.0services/agent/auto.pythe route decision's timeout
FALLBACK_PRESETstructuralservices/agent/auto.pywhat auto runs when it cannot route

The agent#

ConstantValueFileEffect
AGENT_MAX_OUTPUT_TOKENS16,000services/agent/deps.pyper agent turn
SYNTHESIS_MAX_OUTPUT_TOKENS8000services/agent/deps.pythe final answer; SYNTHESIS_EFFORT low
MAX_CONSECUTIVE_TOOL_ERRORS3services/agent/deps.pyturns in a row of only failed tool calls or empty replies, after which the run stops investigating
STEPS_PER_ITERATION, STEPS_OUTSIDE_LOOP2, 16services/agent/graph.pyLangGraph recursion limit = iterations × 2 + 16
OVERFLOW_KEEP_RECENT_TURNS1services/agent/nodes/agent.pyturns kept verbatim when the window overflows
SHOWN_OUTPUT_CHARS4000services/agent/nodes/tools.pytool output shown in events
MAX_RESULT_CHARS12,000services/agent/tools/output.pytool output given to the model
MAX_LINES_PER_CALL400services/agent/tools/read_file.pylines per read_file
CHARS_PER_TOKEN3.5services/agent/window.pytoken estimate; MIN_COMPACTED_CHARS 600
PROMPT_VERSIONagent-4services/agent/prompts.pystored on every run; SYNTHESIS_CONTEXT_CHARS 60,000
FINAL_ANSWER_GRACE_SECONDS120services/agent/runner.pytime allowed to write the answer after the hard timeout
CLASSIC_HISTORY_MESSAGES5services/agent/run_request.pyhistory for Classic; others MAX_HISTORY_MESSAGES 20
CLEANUP_TIMEOUT_SECONDS15services/agent/session.pyfinishing a run after the client leaves
MAX_CONCURRENT_RUNS2services/agent/slots.pyper user; SLOT_TTL_SECONDS 960
MAX_PAYLOAD_BYTES64 KiBservices/agent/persistence.pystep payload cap
MAX_STEPS, MAX_EVENTS400, 1500services/agent/persistence.pyper run
STALE_RUN_SECONDS300services/agent/persistence.pya running run silent for this long reads as interrupted
RETENTION_DAYS30services/agent/persistence.pystep rows older than this are pruned; runs are kept
DELTA_FLUSH_CHARS, DELTA_FLUSH_SECONDS160, 0.1services/agent/persistence.pyanswer-text events are batched to this
MAX_CITATION_CHARS4000services/agent/persistence.py
PRUNE_BATCH_SIZE5000tasks/agent_retention.pyrows deleted per prune batch
SSE_PING_SECONDS15api/v1/agent.pykeep-alive comments on the event stream

Full explanations: the agent.

Auto-update and the clone cache#

ConstantValueFileEffect
AUTO_UPDATE_ENABLEDTruetasks/autoupdate.pykill switch for the sweep
SWEEP_INTERVAL_MINUTES10tasks/autoupdate.pybeat schedule for the sweep
SYNC_LEASE_MINUTES60tasks/autoupdate.pyhow long a sync owns its row
SWEEP_BATCH_LIMIT50tasks/autoupdate.pyrepositories claimed per sweep
SWEEP_OFFSET_JITTER_SECONDS60tasks/autoupdate.pyspreads next-sync times
SYNC_FULL_MAX_FILES500tasks/autoupdate.pymore changed files than this, or
SYNC_FULL_MAX_RATIO0.5tasks/autoupdate.pymore than this share of the repository, runs a full rebuild
SYNC_MAX_CONSECUTIVE_FAILURES3tasks/autoupdate.pythen the toggle switches itself off and the UI shows it paused
SYNC_BACKOFF_BASE_MINUTES5tasks/autoupdate.pyexponential back-off base
CLONE_CACHE_MAX_BYTES2 GiBservices/repo_cache.pywhole cache, evicted least recently used
CLONE_CACHE_MAX_REPO_BYTES512 MiBservices/repo_cache.pylarger repositories are cloned ephemerally
CLONE_CACHE_ENABLEDTrueservices/repo_cache.py
GIT_FETCH_TIMEOUT_SECONDS60services/repo_cache.pyalso GIT_LS_REMOTE_TIMEOUT_SECONDS 20, GIT_RESET_TIMEOUT_SECONDS 30

The prune task is scheduled daily at 03:40 (crontab(hour=3, minute=40)) in the same beat schedule. Celery recycles worker processes after 10 tasks (worker_max_tasks_per_child in core/celery.py). See sync and the clone cache.

API limits and validation#

ConstantValueFileEffect
MAX_PAGE_SIZE200api/validation.pypagination cap
MAX_QUESTION_CHARS4000api/validation.pychat question length
MAX_HISTORY_ITEMS40api/validation.pyhistory entries accepted
MAX_HISTORY_CONTENT_CHARS20,000api/validation.pyper history entry
MAX_TITLE_CHARS120api/v1/conversations.pyrenamed conversation titles
TITLE_LIMIT60services/conversations.pyautomatic titles; DEFAULT_TITLE "New chat"
MAX_CHANGE_COMMITS20api/v1/chat.pycommits listed when explaining a stale answer
THUMBNAIL_MAX_FILES120api/v1/graph.pyrepository card graph
SEARCH_PAGE_SIZE, SEARCH_MAX_PAGES100, 10api/v1/github_proxy.pythe repository picker's search, timeout 15 s
MAX_FILE_BYTES2 MiBservices/github_files.pyfile contents fetched from GitHub; BINARY_SNIFF_BYTES 8192
DEFAULT_RETRY_AFTER_SECONDS60services/github_http.pyassumed when GitHub rate-limits without a header
PROBE_TIMEOUT_SECONDS1.5core/health.pyper dependency in the health check

Free tier, tokens and MCP#

ConstantValueFileEffect
FREE_INGESTIONS3services/entitlements.pyingestions on the operator's key per user
FREE_CHAT_MESSAGES10services/entitlements.pyanswered questions on the operator's key
ENVELOPE_PREFIXillume1.core/crypto.pymarks an encrypted value
MIN_KEY_LENGTH32core/crypto.pyfor CREDENTIAL_ENCRYPTION_KEY
TOKEN_PREFIXilm_services/mcp_tokens.pyMCP token prefix; DISPLAY_PREFIX_LENGTH 8
MAX_TOKENS_PER_USER10services/mcp_tokens.pyactive MCP tokens
MCP_PATH/mcpmcp/server.pymount point; MCP_ENABLED True
MCP_MAX_BODY_BYTES1 MiBmcp/server.pyrequest body cap
MCP_CALLS_PER_MINUTE60mcp/limits.pyall tool calls
MCP_MODEL_CALLS_PER_MINUTE20mcp/limits.pycalls that reach a model
MCP_FREE_CALLS_PER_DAY300mcp/limits.pyfree-tier daily cap
MCP_ASK_PER_HOUR20mcp/limits.pyask_illume calls
SHARE_REQUESTS_PER_MINUTE120services/share_limits.pyrequests to the public share routes per client address
SINGLE_SHOT_TIMEOUT_SECONDS120mcp/ask.pyquick and auto answers; agents get their own timeout plus AGENT_TIMEOUT_MARGIN_SECONDS 15
ANSWER_PROGRESS_SECONDS5mcp/ask.pyprogress notification interval
PUSH_TIMEOUT_SECONDS10services/push.pyExpo push delivery

server/.env.example says the free tier covers "their first five chat questions"; the constant is 10.

Design trade-offs and limits#

  • A deploy per change. Nothing here can be tuned per environment without editing code.
  • Duplicated names. BATCH_SIZE, MAX_STATE_CHARS, MAX_QUESTION_CHARS and MAX_PARALLEL_REQUESTS each exist in more than one module with different meanings; import them by module.
  • Literals not listed here. Some caps are inline literals rather than named constants, for example the .illume export's caps (see the export).