Chat context
Context size is the maximum number of conversation tokens (summary + messages) each chat call carries. When the conversation occupies the threshold fraction of it, the messages are compacted into an anchored note; the full transcript stays in your browser.
Context size
Compaction trigger
Save chat context
LLM proxy (CKB-owned)
Optional. When enabled, every cloud-model call CKB makes (search LLM, think LLM, embeddings, OpenRouter-channel OCR, LightRAG) is routed through ckb-llmproxy so per-call cost lands directly in CKB's usage table — including LightRAG, which has no client-side cost visibility otherwise. When disabled, calls go straight to OpenRouter and only CKB-side calls report cost (LightRAG spend is then not tracked).
Enabled No Yes
URL
Master key
Test LLM proxy
Save LLM proxy
OCR
Provider
Mistral primary
OpenRouter generic OCR
OpenRouter Mistral OCR BYOK
OpenRouter Processor (mistral-ocr)
Clarifai DeepSeek OCR
Name
Model
API key
Primary OCR path. Preserves structured OCR, tables, and extracted images when available.
OpenRouter URL
OpenRouter model
OpenRouter wrapper model ?
OpenRouter API key
OCR prompt
OpenRouter Mistral OCR uses the mistral-ocr engine and is normalized to the same app output: text, tables, images, HTML, then PDF.
Clarifai base URL ?
Clarifai model ?
Clarifai API key
Vision-only model. Accepts PNG/JPG; reject PDFs (use Mistral nativo or OpenRouter Mistral OCR for those). Pricing per Clarifai: ~$0.20 / 1M input tokens, ~$0.70 / 1M output tokens.
Test OCR
Save OCR
OCR post-processing
Removes lines that repeat on a large fraction of OCR'd pages (book titles, chapter headers, page numbers). Off by default. Only applies to scanned uploads — native DOCX/EPUB/text-PDF imports are never touched.
Strip repeating headers and footers No Yes
Minimum page count ?
Interventions per page ?
Minimum repetition ratio ?
Fuzzy similarity threshold ?
Max chrome text length ?
Save
LightRAG (knowledge-graph RAG)
Optional second retrieval channel queried in parallel with Qdrant. When enabled, the chat route POSTs each question to LightRAG's /query endpoint and forwards the returned context to the chat LLM alongside Qdrant hits. The chat LLM remains the answerer; LightRAG only contributes context. If LightRAG is unreachable, chat continues without it (logged, not surfaced).
Enable LightRAGNo restart needed for this toggle.
Base URL
Query mode
naive
local
global
hybrid
mix
Top-K
Timeout (s)
Max context chars
Ingest poll timeout (s) ?
LightRAG-side LLM & embedding
LightRAG itself uses an LLM (for entity extraction and graph queries) and an embedding model — independent from CKB's chat LLM. Saving this section automatically rewrites lightrag-managed.env and restarts the lightrag container — no SSH needed. The binding selects which API protocol LightRAG speaks; the host + model + API key determine which provider/model are actually called.
LLM binding ?
OpenAI-compatible (OpenRouter, DeepSeek, Together, vLLM, …)
Ollama (native protocol)
LoLLMs
Azure OpenAI
AWS Bedrock
LLM model
LLM host
LLM API key
Embedding binding ?
OpenAI-compatible (OpenRouter, DeepSeek, Together, vLLM, …)
Ollama (native protocol)
LoLLMs
Azure OpenAI
AWS Bedrock
Embedding model
Embedding host
Embedding API key
Embedding dim
Summary language ?
Español
English
Italiano
Français
Deutsch
Português
Català
Test LightRAG
Save LightRAG
Maintenance
Failed uploads can leave intermediate files under /data/uploads and /data/html. The canonical artifacts always live in WebDAV; anything here that does not match an indexed/pending book is debris and can be removed safely.
Refresh debris
Clean debris
LightRAG orphans
Documents present in LightRAG's graph that no CKB book row claims. Created by cancelled uploads, retries that overlapped with in-flight work, or books deleted from CKB without a paired LightRAG delete.
Scan LightRAG
Delete selected