⚠️ All API keys are saved only in your browser's localStorage — do not use on public computers. Some providers (e.g., Anthropic, OpenAI) require direct browser access; the corresponding headers are added automatically. For local models (Ollama), set OLLAMA_ORIGINS=* before launch to allow cross-origin requests.
Auto-detect tries /api/tags first — if found, uses Ollama native; otherwise falls back to OpenAI compatible.
Shown above your avatar and messages. The avatar uses the first character.
Shown above the assistant's avatar and messages.
Second-stage trimming on top of the message count above: the oldest messages are dropped until the estimated prompt fits. Estimation is rough (CJK about 1 char/token, other text about 4 chars/token). Set it somewhat below your model real context window.
Separate from the show-thinking switch below, which only controls display. For hybrid models such as Qwen3 this sends chat_template_kwargs.enable_thinking (vLLM / SGLang / llama.cpp --jinja) plus Ollama think - without it, hiding the thinking still pays for every thinking token.
Ollama silently drops whatever does not fit its context window, and the first thing to go is the system prompt / scenario memory - with no error at all. Set this to the window your model actually supports (8192 / 32768 ...).
Empty fields are not sent at all. These apply to OpenAI-compatible and local models only. Qwen3 recommends thinking mode: temp 0.6 / top_p 0.95 / top_k 20 / min_p 0; non-thinking: temp 0.7 / top_p 0.8 / top_k 20. presence_penalty 0.5-1.5 is the usual cure when a small local model starts looping.
Vision tokens depend on image resolution, not file size — downscaling is what actually saves input tokens. Standard is visually near-lossless for most photos and screenshots.
Images/files are never carried forward as "memory": once a message with an attachment falls outside this many most-recent messages, only its text is resent — the attachment itself is dropped from the request. 1 = only the newest attachment is ever sent; 0 = never send attachments to the model at all.
For 🎬 scenario chats: when the live context exceeds the size below, older messages are automatically summarized into long-term memory.
Hard limit on the compressed long-term memory itself — it is hard-truncated to this length after every compression, so memory can never grow without bound. Memory only ever stores text; attachments are never included.
When off: panel is hidden; for Gemini 2.5, thinkingBudget:0 is requested to save tokens; DeepSeek-R1's <think> blocks are still stripped so they don't leak.
Chatbox Lite — a single-file browser-based multi-model chat page.
Supports: OpenAI compatible / Claude / Gemini / Ollama / LM Studio · streaming · Markdown · code highlighting · KaTeX math · image vision · file upload (PDF/DOCX/TXT/code) · multi-session local persistence · light/dark theme · export/import.
Usage: open chatbox-lite.html in your browser, go to "Settings" and configure your API keys. All data is stored in localStorage and never uploaded.
CORS tip: browser-direct API calls are subject to same-origin policy. Official OpenAI/Claude/Gemini endpoints support CORS; if using a proxy, make sure CORS is enabled. For Ollama, set OLLAMA_ORIGINS=* before launch.
Shortcuts: Enter to send / Shift+Enter for newline / Ctrl+N for new chat.
P.S. Not a single line of this codebase was typed by the author — Claude wrote it all. I'm just the guy standing next to it, pointing fingers and waving hands. 🫠
New scenario chat
Every past memory version (from auto-compression or manual edits) is kept here so you can roll back if something important got summarized away. Restoring loads it into the box above — click Save to apply.