Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

docs: Update for 0.8.1 (#8213)

Akarshan Biswasf02216b0d66a
diff --git a/docs/src/components/Download/CardDownload.tsx b/docs/src/components/Download/CardDownload.tsx
index 51653d91d..c2a3891fa 100644
--- a/docs/src/components/Download/CardDownload.tsx
+++ b/docs/src/components/Download/CardDownload.tsx
@@ -31,6 +31,13 @@ const systemsTemplate: SystemType[] = [
logo: FaWindows,
fileFormat: 'Jan_{tag}_x64-setup.exe',
},
+ {
+ name: 'Linux (Flatpak)',
+ label: 'Flatpak',
+ logo: FaLinux,
+ fileFormat: '',
+ href: 'https://flathub.org/apps/ai.jan.Jan',
+ },
{
name: 'Linux (AppImage)',
label: 'AppImage',
@@ -63,6 +70,9 @@ export default function CardDownload({ lastRelease }: Props) {
: lastRelease.tag_name
const updatedSystems = systems.map((system) => {
+ if (!system.fileFormat) {
+ return system
+ }
const downloadUrl = system.fileFormat.replace('{tag}', tag)
// Find the corresponding asset to get the file size
diff --git a/docs/src/components/DropdownDownload/index.tsx b/docs/src/components/DropdownDownload/index.tsx
index 757b5136a..978c36921 100644
--- a/docs/src/components/DropdownDownload/index.tsx
+++ b/docs/src/components/DropdownDownload/index.tsx
@@ -35,6 +35,12 @@ const systemsTemplate: SystemType[] = [
logo: FaWindows,
fileFormat: 'Jan_{tag}_x64-setup.exe',
},
+ {
+ name: 'Download for Linux (Flatpak)',
+ logo: FaLinux,
+ fileFormat: '',
+ href: 'https://flathub.org/apps/ai.jan.Jan',
+ },
{
name: 'Download for Linux (AppImage)',
logo: FaLinux,
@@ -63,8 +69,8 @@ const DropdownDownload = ({ lastRelease }: Props) => {
// windows user
setDefaultSystem(systems[1])
} else if (userAgent.includes('Linux')) {
- // linux user
- setDefaultSystem(systems[3])
+ // linux user - prefer Flatpak (Flathub)
+ setDefaultSystem(systems[2])
} else if (userAgent.includes('Mac OS')) {
setDefaultSystem(systems[0])
} else {
@@ -130,6 +136,9 @@ const DropdownDownload = ({ lastRelease }: Props) => {
: lastRelease.tag_name
const updatedSystems = systems.map((system) => {
+ if (!system.fileFormat) {
+ return system
+ }
const downloadUrl = system.fileFormat.replace('{tag}', tag)
// Find the corresponding asset to get the file size
diff --git a/docs/src/components/ui/dropdown-button.tsx b/docs/src/components/ui/dropdown-button.tsx
index 15e80d9cd..9b60b4fa0 100644
--- a/docs/src/components/ui/dropdown-button.tsx
+++ b/docs/src/components/ui/dropdown-button.tsx
@@ -29,6 +29,13 @@ const downloadOptionsTemplate: DownloadOption[] = [
size: '',
href: '#',
},
+ {
+ id: 'linux-flatpak',
+ name: 'Download for Linux (Flatpak)',
+ icon: <FaLinux className="size-5" />,
+ size: '',
+ href: 'https://flathub.org/apps/ai.jan.Jan',
+ },
{
id: 'linux-appimage',
name: 'Download for Linux (AppImage)',
@@ -52,6 +59,8 @@ const fileFormatMap: { [key: string]: string } = {
'linux-deb': 'Jan_{tag}_amd64.deb',
}
+const FLATHUB_URL = 'https://flathub.org/apps/ai.jan.Jan'
+
interface DropdownButtonProps {
size?: 'default' | 'sm' | 'lg' | 'xl' | 'icon' | 'xxl'
className?: string
@@ -88,8 +97,8 @@ export function DropdownButton({
const windowsOption = systems.find((opt) => opt.id === 'windows')
if (windowsOption) setCurrentOption(windowsOption)
} else if (userAgent.includes('Linux')) {
- // linux user - prefer deb package
- const linuxOption = systems.find((opt) => opt.id === 'linux-deb')
+ // linux user - prefer Flatpak (Flathub)
+ const linuxOption = systems.find((opt) => opt.id === 'linux-flatpak')
if (linuxOption) setCurrentOption(linuxOption)
} else if (userAgent.includes('Mac OS')) {
// mac user - always use universal build
@@ -111,6 +120,9 @@ export function DropdownButton({
const updatedOptions = downloadOptionsTemplate.map((option) => {
const fileFormat = fileFormatMap[option.id]
+ if (!fileFormat) {
+ return { ...option, href: FLATHUB_URL, size: '' }
+ }
const fileName = fileFormat.replace('{tag}', tag)
// Find the corresponding asset to get the file size
diff --git a/docs/src/pages/changelog/2026-05-29-jan-v0.8.1.mdx b/docs/src/pages/changelog/2026-05-29-jan-v0.8.1.mdx
new file mode 100644
index 000000000..4a01c73c7
--- /dev/null
+++ b/docs/src/pages/changelog/2026-05-29-jan-v0.8.1.mdx
@@ -0,0 +1,101 @@
+---
+title: "Jan v0.8.1: Anthropic-Compatible Custom Providers, Per-Message Errors & llama.cpp Settings Overhaul"
+version: 0.8.1
+description: "Jan v0.8.1 adds Anthropic-compatible custom providers, OS-native TLS trust, a composer-anchored sampler popover with capability gating, persistent per-thread and per-message errors, and a major llama.cpp settings overhaul with split version/backend selectors, file-backed persistence, and per-model context sizing."
+date: 2026-05-29
+---
+
+import ChangelogHeader from "@/components/Changelog/ChangelogHeader"
+
+<ChangelogHeader
+ title="Jan v0.8.1: Anthropic-Compatible Custom Providers, Per-Message Errors & llama.cpp Settings Overhaul"
+ date="2026-05-29"
+/>
+
+# Highlights
+
+**Anthropic-Compatible Custom Providers**
+
+You can now point Jan at any endpoint that speaks the Anthropic Messages API wire format, including LiteLLM, Bedrock proxies, and self-hosted Claude gateways. The Add Provider dialog gained an API-format selector (OpenAI or Anthropic), and the built-in Anthropic provider is backfilled by an automatic store migration. The dialog also now requires an API key up front, matching backend gates that previously refused to register or list models for key-less providers.
+
+**OS-Native TLS Trust**
+
+Desktop HTTP clients now use the operating system's native trust store (macOS Keychain, Linux `/etc/ssl/certs`, Windows certificate store) instead of a bundled Mozilla CA list. HTTPS endpoints signed by private or corporate CAs (homelab vLLM, internal LiteLLM gateways, etc.) now work without manual certificate wrangling.
+
+**llama.cpp Settings Overhaul**
+
+The llama.cpp engine's configuration surface has been rewritten:
+
+- The composite `version_backend` setting is split into independent `llamacpp_version` and `llamacpp_backend` selectors, with an automatic migration from prior values.
+- Backend settings now live in `<jan_data>/llamacpp/settings.json` with atomic writes, so they survive localStorage wipes and can be inspected or edited as a file.
+- A new `check_for_updates` toggle (on by default) gates background release fetches. `auto_update_engine` now requires it. The manual "Check for Updates" button always hits the network.
+- Backend dependency verification gained a user-facing toggle (on by default) and is scoped to GPU backend libraries (CUDA, Vulkan) only, eliminating noisy false positives from probing `llama-server` itself. Verification is auto-skipped on Linux Flatpak builds where sandbox layout made the checker unreliable.
+- Recommended backend hints are now computed only from upstream releases, so side-loaded "Install from File" backends no longer skew the recommendation.
+- The macOS "Install from File" picker now accepts `.tar.gz` backend archives.
+
+**Per-Model Context Sizing**
+
+Auto-fit context sizing is off by default on all platforms. Per-model `ctx_len` now owns context sizing and defaults to 8192. A persist migration seeds empty `ctx_len` values, replacing the older v2/v3 fit migration paths.
+
+**Provider-Aware Sampler Popover**
+
+The sampler editor moved out of the model sidebar into a composer-anchored popover scoped to the active assistant. New behavior:
+
+- A categorized "Add parameter" menu, with grouped blocks for coupled samplers (mirostat, dry, xtc, dynatemp).
+- A provider/model capability table gates which parameters are exposed, with live mutual-exclusion handling (mirostat shadows top-k / top-p / min-p, Anthropic's temperature and top_p are mutually exclusive, etc.).
+- Family-specific rejections are encoded for OpenAI o-series and gpt-5* (which reject temperature, top_p, and penalties), and for grok-3-mini and grok-4 quirks.
+- Unsupported sampler keys are stripped at the dispatch chokepoint. If an upstream still rejects a request as a sampling error, Jan retries once with all injected sampling params stripped and shows a toast explaining what happened.
+- The sampler UI and stored overrides are now hidden and stripped for predefined remote providers (like Gemini) that reject unknown JSON fields, preventing local-model overrides from leaking into remote requests.
+- The popover trigger is disabled while the assistant is still hydrating, so edits cannot land on hardcoded defaults and get clobbered when persisted assistants load from disk.
+
+**Per-Thread and Per-Message Error Persistence**
+
+OOM and backend error banners now persist per-thread across restart by stamping `metadata.oomError` and `metadata.backendError` onto the last user message. This fixes the lost-banner-on-restart bug and the cross-thread banner leak.
+
+Per-message inline error cards now render under the user message that triggered a failure, with a wired Regenerate button, replacing the old transient global error banner. Successful regeneration strips the prior `metadata.error` so resolved failures stop showing the card, and editing a user message also clears it.
+
+Errored generations no longer persist as empty assistant rows on disk, and existing empty assistant rows from previous versions are cleaned up on thread load. Message persistence now upserts on `modify_message` and dedupes on `create_message`, fixing a JSONL race where error metadata stamped immediately after sending could be silently dropped.
+
+**llama.cpp Error Scoping**
+
+The llama.cpp router error banner, implicit stop, and Reload button now only fire on llama.cpp-backed threads. A router-side Metal crash no longer surfaces on top of working MLX, OpenAI, or Anthropic chats.
+
+**Media-Only Messages**
+
+Multimodal models can now be sent image-only or audio-only messages without requiring placeholder text in the prompt.
+
+**Bug Fixes**
+
+- Updating settings like `ctx_size`, `n_gpu_layers`, and `flash_attn` now correctly triggers a router restart. Previously they were persisted but never applied to the running router until next launch.
+- Multimodal VRAM precheck now includes the size of the sibling `mmproj.gguf` projector file, preventing OOM crashes on multimodal models that previously slipped past the gate.
+- The router's `models_max` slot accounting caps the embedding bonus at +1, so installed embedders no longer prevent eviction of stale chat models.
+- The startup backend update check is skipped when auto-update is disabled, so the BackendUpdater dialog no longer hits the network behind the user's back.
+- Imported GGUF models now use the `general.name` field from GGUF metadata for display, falling back to the filename and then to the model id.
+- Extension logger formats `Error` and object arguments properly instead of writing `[object Object]` to the log file.
+- The MCP auto-reconnect health probe interval was raised from 2 seconds to 30 seconds, cutting probe spam in the log.
+- STDIO MCP stderr lines are now routed through the level token the server itself prints (defaulting to INFO), so Python MCP servers no longer flood the log with WARN entries.
+- The model picker in MCP and router flows deduplicates entries by provider and id, fixing duplicate React keys when a model appears in both the registry and as a local import.
+- Provider refetches no longer carry stale `recommended` or `options` metadata across requests; only the user's selected `value` is preserved.
+- Dropdowns with a single option now render as inert plain text without a chevron or popover.
+- The model dropdown's compatibility indicator switched from the heavy `isModelSupported` probe (which ran `read_gguf_metadata` on every selection change) to the lightweight `estimateModelFit` heuristic the Hub already uses, and the tooltip is now labeled as an estimate. The context value was removed from the tooltip to reduce noise.
+- The `refresh_system_info` Tauri command is now properly registered in the hardware plugin's ACL, fixing a "not allowed by ACL" error fired by the visibility-change handler.
+- A single failing extension `onLoad` no longer blocks the entire app from finishing setup. Load failures are isolated, logged by name, and other providers (MLX, OpenAI, Anthropic, etc.) continue to load.
+- The llama.cpp extension's `list()` is hardened so a single malformed `model.yml` or unreadable entry can no longer cause Settings to render zero models.
+- Soft-deleted local models that are later re-downloaded are scrubbed from the `deletedModels` tombstone list automatically, fixing an empty Settings > llama.cpp view after re-download.
+- The ThreadList no longer overwrites a newly created thread's in-memory messages with the empty array fetched from disk, fixing a wipe race on brand-new threads.
+- The chat input reasoning toggle was realigned to match its sibling icon buttons.
+- Dark mode now applies synchronously on launch, eliminating a brief light-theme flash before the saved theme loads.
+- NVIDIA and Vulkan GPU probes are skipped on macOS, where they cannot succeed and produced spurious errors in the hardware view.
+- User-message action buttons (edit, copy, delete) now reveal on hover only instead of always being visible.
+- `PromptProgress` no longer trips a router invariant when navigating between threads while a load is in flight.
+- The Attachments entry was restored to the Settings sidebar; the route had been left reachable only by URL after the recent settings-navigation reorg.
+
+**Localization**
+
+Italian translations were added across assistants, chat interface, common terms, the Hub, the no-logs message, MCP servers, model errors, providers, and settings.
+
+---
+
+Update your Jan or [download the latest](https://jan.ai/).
+
+For the complete list of changes, see the [GitHub release notes](https://github.com/janhq/jan/releases/tag/v0.8.1)
diff --git a/docs/src/pages/docs/desktop/_assets/add-provider-button.png b/docs/src/pages/docs/desktop/_assets/add-provider-button.png
new file mode 100644
index 000000000..c61a987cf
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/add-provider-button.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/add-provider-dialog.png b/docs/src/pages/docs/desktop/_assets/add-provider-dialog.png
new file mode 100644
index 000000000..38bf0c1f3
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/add-provider-dialog.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/api-key-fallbacks.png b/docs/src/pages/docs/desktop/_assets/api-key-fallbacks.png
new file mode 100644
index 000000000..d015afca7
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/api-key-fallbacks.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/custom-provider-models.png b/docs/src/pages/docs/desktop/_assets/custom-provider-models.png
new file mode 100644
index 000000000..3155e7410
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/custom-provider-models.png differ
diff --git a/docs/src/pages/docs/desktop/agents.mdx b/docs/src/pages/docs/desktop/agents.mdx
index 76a727f19..185443005 100644
--- a/docs/src/pages/docs/desktop/agents.mdx
+++ b/docs/src/pages/docs/desktop/agents.mdx
@@ -17,24 +17,42 @@ import { Callout } from 'nextra/components'
# Agents
-Jan supports autonomous AI agents that run entirely on your own hardware — no cloud required.
+You can run autonomous coding agents against a model served locally by Jan — keeping inference on
+your own hardware while using the agent tooling you already know.
-<Callout type="warning">
-The OpenClaw agent integration was removed in **Jan v0.7.9** due to resource usage and security concerns in local AI environments. Agent support is being redesigned for a simpler, safer experience in a future release.
+<Callout type="info">
+The **in-app** OpenClaw integration was removed in **Jan v0.7.9** due to resource usage and security
+concerns. Jan no longer runs agents inside the desktop app. Instead, agents run as **external
+programs** that you point at a local Jan model via the CLI, as described below.
</Callout>
-## Launch Agents via CLI
+## How It Works
+
+The `jan launch` command starts a local model server and then launches an agent CLI with everything
+pre-wired:
+
+1. Jan starts the model and serves it on a local OpenAI- and Anthropic-compatible endpoint.
+2. Jan sets the agent's connection details automatically — environment variables like
+ `OPENAI_BASE_URL` / `ANTHROPIC_BASE_URL`, the API key, and the model name (for OpenClaw, Jan
+ writes a provider entry to `~/.openclaw/openclaw.json` instead).
+3. The agent runs in your terminal, sending its requests to your local model.
+
+The agent itself (Claude Code, OpenClaw) is a **separate tool you install yourself** — Jan only
+supplies the model backend and the wiring.
-You can run agents directly from your terminal using the Jan CLI. The `jan launch` command starts a local model and wires it to an agent automatically — no manual configuration needed.
+## Launch an Agent
```bash
jan launch claude # pick a model, then run Claude Code against it
jan launch claude --model janhq/Jan-code-4b-gguf # use a specific model with Claude Code
-jan launch openclaw --model janhq/Jan-code-4b-gguf # wire openclaw to a local model
+jan launch openclaw --model janhq/Jan-code-4b-gguf # wire OpenClaw to a local model
```
-See the [Jan CLI](/docs/desktop/cli) documentation for full options.
+Run `jan launch` with no agent to pick one interactively. See the [Jan CLI](/docs/desktop/cli)
+documentation for full options (port, context size, GPU layers, and more).
-## What's Next
-
-We're exploring a simpler, safer approach to agentic workflows in Jan. Stay tuned for updates.
+<Callout type="warning">
+Install the agent CLI first. For example, install [Claude Code](https://docs.claude.com/en/docs/claude-code)
+or OpenClaw per their own instructions — `jan launch` runs them, but doesn't install them. (If
+OpenClaw isn't installed, Jan falls back to running it via `npx`.)
+</Callout>
diff --git a/docs/src/pages/docs/desktop/index.mdx b/docs/src/pages/docs/desktop/index.mdx
index 779bb37bc..f93864728 100644
--- a/docs/src/pages/docs/desktop/index.mdx
+++ b/docs/src/pages/docs/desktop/index.mdx
@@ -29,10 +29,10 @@ import { Rocket, Package, Bot, Plug, Monitor, Globe, Server, Brain, Terminal, La
# Overview
<Callout type="info">
-**Jan 0.8.0 is now live!** — LLaMA.cpp router mode, inline MCP approval, and smarter model management. [See the full changelog.](/changelog/2026-05-20-jan-v0.8.0)
+**Jan 0.8.1 is now live!** Anthropic-compatible custom providers, OS-native TLS trust, a provider-aware sampler popover, per-thread and per-message error persistence, and a llama.cpp settings overhaul. [See the full changelog.](/changelog/2026-05-29-jan-v0.8.1)
</Callout>
-Jan is an open-source replacement for Claude and ChatGPT. It comes with built-in foundation models and an application ecosystem that runs entirely on your hardware — keeping your data private and giving you full ownership over your AI.
+Jan is an open-source replacement for Claude and ChatGPT. It comes with built-in foundation models and an application ecosystem that runs entirely on your hardware, keeping your data private and giving you full ownership over your AI.
## Get Started
diff --git a/docs/src/pages/docs/desktop/install/linux.mdx b/docs/src/pages/docs/desktop/install/linux.mdx
index 45f266c8d..de9cfe460 100644
--- a/docs/src/pages/docs/desktop/install/linux.mdx
+++ b/docs/src/pages/docs/desktop/install/linux.mdx
@@ -28,46 +28,58 @@ twitter:
import { Tabs, Callout, Steps } from 'nextra/components'
import { Settings } from 'lucide-react'
-import { DownloadButton } from '@/components/DownloadButton'
# Linux Installation
Instructions for installing Jan on Linux.
## Install Jan
-<Steps>
+<Callout type="info">
+**Flatpak is the recommended way to install Jan on Linux.** It runs on any distribution and updates automatically through Flathub. Use the `.deb` or AppImage only if you can't use Flatpak.
+</Callout>
-### Download
+<Tabs items={['Flatpak (recommended)', '.deb (Ubuntu/Debian)', 'AppImage']}>
+<Tabs.Tab>
-<div className="inline-flex flex-col gap-3">
- <DownloadButton href="https://app.jan.ai/download/latest/linux-amd64-deb">Download Jan for Ubuntu / Debian</DownloadButton>
- <DownloadButton href="https://app.jan.ai/download/latest/linux-amd64-appimage">Download Jan AppImage</DownloadButton>
-</div>
+Install from [Flathub](https://flathub.org/apps/ai.jan.Jan):
-### Install
+```bash
+flatpak install flathub ai.jan.Jan
+```
-Installation commands:
+Then launch it:
-<Tabs items={['Ubuntu', 'Others']}>
-<Tabs.Tab>
+```bash
+flatpak run ai.jan.Jan
+```
-##### dpkg
+If you don't have the Flathub remote set up yet:
```bash
-sudo dpkg -i jan-linux-amd64-{version}.deb
+flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
```
-##### apt-get
+</Tabs.Tab>
+
+<Tabs.Tab>
+
+[Download the `.deb`](https://app.jan.ai/download/latest/linux-amd64-deb), then install it:
```bash
sudo apt-get install ./jan-linux-amd64-{version}.deb
```
+Or with `dpkg`:
+
+```bash
+sudo dpkg -i jan-linux-amd64-{version}.deb
+```
+
</Tabs.Tab>
<Tabs.Tab>
-From the terminal, run the following commands:
+[Download the AppImage](https://app.jan.ai/download/latest/linux-amd64-appimage), then run it:
```bash
chmod +x jan-linux-x86_64-{version}.AppImage
@@ -77,8 +89,37 @@ chmod +x jan-linux-x86_64-{version}.AppImage
</Tabs.Tab>
</Tabs>
-</Steps>
+## Updating Jan
+
+How Jan updates depends on which package you installed:
+
+<Tabs items={['Flatpak (recommended)', 'AppImage', '.deb (Ubuntu/Debian)']}>
+<Tabs.Tab>
+Flatpak updates through Flathub along with the rest of your system. The in-app updater is disabled — your package manager handles it:
+
+```bash
+flatpak update ai.jan.Jan
+```
+
+</Tabs.Tab>
+<Tabs.Tab>
+
+The AppImage supports Jan's **built-in auto-updater**. When a new release is available, Jan downloads and applies it in place, then restarts.
+
+</Tabs.Tab>
+<Tabs.Tab>
+
+The `.deb` package is **not updated by the in-app updater** — the auto-updater only ships the AppImage as the Linux update artifact. Update the `.deb` manually by downloading the latest package and reinstalling:
+
+```bash
+sudo apt-get install ./jan-linux-amd64-{version}.deb
+```
+
+Your data folder (`~/.local/share/Jan`) and configuration (`~/.config/Jan`) are preserved across reinstalls.
+
+</Tabs.Tab>
+</Tabs>
## Compatibility
@@ -181,7 +222,15 @@ Requires Vulkan support.
## Uninstall Jan
Removal commands:
-<Tabs items={['Ubuntu', 'Others']}>
+<Tabs items={['Flatpak', '.deb (Ubuntu/Debian)', 'AppImage']}>
+<Tabs.Tab>
+
+```bash
+flatpak uninstall ai.jan.Jan
+rm -rf ~/.local/share/Jan # data folder (models, threads, logs)
+rm -rf ~/.config/Jan # app configuration
+```
+</Tabs.Tab>
<Tabs.Tab>
```bash
diff --git a/docs/src/pages/docs/desktop/local-engine/mlx.mdx b/docs/src/pages/docs/desktop/local-engine/mlx.mdx
index 966d42092..4b4c70684 100644
--- a/docs/src/pages/docs/desktop/local-engine/mlx.mdx
+++ b/docs/src/pages/docs/desktop/local-engine/mlx.mdx
@@ -19,7 +19,13 @@ import { Callout } from 'nextra/components'
MLX is an inference engine for Apple Silicon (M1 and later). It uses Metal GPU acceleration for fast, efficient local inference — available on macOS 14+.
<Callout type="warning">
-MLX support in Jan is currently in beta and will be improved significantly over time.
+MLX support in Jan is **experimental** and will improve over time. Current limitations:
+- **Embeddings are unavailable** — use llama.cpp for embedding/RAG workflows.
+- **Reasoning is not yet wired** — reasoning-style output isn't surfaced separately.
+- **Some newer model architectures fail to load** — if a model won't start, try its llama.cpp (GGUF) version instead.
+
+For the broadest model support and feature set, use [llama.cpp](/docs/desktop/local-engine/llama-cpp).
+MLX is worth trying on Apple Silicon when you want Metal-tuned performance for a supported model.
</Callout>
## Requirements
@@ -27,12 +33,22 @@ MLX support in Jan is currently in beta and will be improved significantly over
- macOS 14 or higher
- Apple Silicon (M1, M2, M3, M4)
+<Callout type="info">
+MLX is macOS-only. On Windows and Linux it isn't shown — use [llama.cpp](/docs/desktop/local-engine/llama-cpp).
+</Callout>
+
## Accessing Engine Settings
Find MLX settings at **Settings** > **MLX** under Model Providers:
![MLX Settings](../_assets/mlx-settings.png)
+### Backend and Version
+
+MLX uses a separate **version** (the mlx-swift-lm server build) and **backend** selector. In most
+cases the default is correct; only change it if you're testing a specific build or troubleshooting a
+model that won't load.
+
## Model Management
MLX supports models in MLX-Swift format. Jan ships with MLX-compatible versions of its foundation models.
@@ -49,6 +65,31 @@ Click **Import** to link an MLX model file already on your computer. This is use
Click the trash icon next to any model to remove it. Linked files leave the original intact.
+## MLX or llama.cpp?
+
+Both run locally on Apple Silicon. Choose based on what you need:
+
+| | MLX | llama.cpp |
+| --- | --- | --- |
+| Platform | Apple Silicon only | All platforms |
+| Model format | MLX | GGUF |
+| Embeddings / RAG | Not available | Supported |
+| Reasoning output | Not wired yet | Supported |
+| Model coverage | Good, but some new architectures fail | Broadest |
+| Status | Experimental | Stable |
+
+If you're unsure, start with llama.cpp. Try MLX when you want Metal-tuned performance for a model
+that's available in MLX format.
+
+## Troubleshooting
+
+- **Model won't load:** Some newer architectures aren't supported yet — use the model's GGUF version
+ with llama.cpp instead.
+- **Need embeddings or RAG:** Not available on MLX; switch to llama.cpp.
+- **MLX provider missing:** You're on Windows or Linux — MLX is macOS-only.
+- **Slow or failing on large models:** The model may exceed available unified memory; try a smaller
+ or more quantized model. See [Troubleshooting](/docs/desktop/troubleshooting#model-wont-load-or-crashes-llamacpp).
+
## How It Works
Jan integrates MLX via [mlx-swift-lm](https://github.com/ml-explore/mlx-swift-lm), running a local inference server on top of it. The server is spawned and managed by Jan's MLX plugin, which handles model loading, lifecycle, and communication with the rest of the app.
diff --git a/docs/src/pages/docs/desktop/quickstart.mdx b/docs/src/pages/docs/desktop/quickstart.mdx
index c1db65585..c00dd536f 100644
--- a/docs/src/pages/docs/desktop/quickstart.mdx
+++ b/docs/src/pages/docs/desktop/quickstart.mdx
@@ -53,8 +53,45 @@ Try asking:
Jan comes pre-configured with [Exa](https://exa.ai) for web search. To enable it, add your Exa API key under **Settings > MCP Servers** and toggle the Exa server on. Once active, you can ask about the latest news and current events.
</Callout>
+### Download More Models
+
+The **Hub** is where you browse and download local models. Each model shows whether it fits your
+hardware, so you can pick one your machine can run comfortably.
+
+1. Open the **Hub** from the left sidebar
+2. Browse or search for a model, then click **Download**
+3. Once downloaded, select it from the model selector in any chat
+
+![Hub](./_assets/hub.png)
+
+Want help choosing? See [Manage Models](/docs/desktop/manage-models) and the
+[local engine guide](/docs/desktop/local-engine/llama-cpp).
+
</Steps>
+## Local or Cloud
+
+Jan runs models two ways, and you can mix both in the same app:
+
+- **Local models** run entirely on your machine — private, offline, no API key. This is the default.
+- **Cloud models** run on a provider's servers (OpenAI, Anthropic, Google, and more). They need an
+ API key but let you use the largest frontier models without local hardware.
+
+### Connect a Cloud Provider
+
+1. Navigate to **Settings** > **Model Providers**
+2. Select a provider (e.g. **OpenAI** or **Anthropic**) and paste your API key
+3. Select one of its models from the model selector and start chatting
+
+![Connect a provider](./_assets/provider-openai.png)
+
+<Callout type="info">
+Running your own server or using a provider Jan doesn't list? Connect any OpenAI- or
+Anthropic-compatible endpoint — see [Custom Endpoints](/docs/desktop/remote-models/custom-endpoint).
+</Callout>
+
+See all [Cloud Providers](/docs/desktop/remote-models/openai) for per-provider setup.
+
## App Features
Jan is more than a chat interface. Organize your work with Projects, build custom Assistants, run autonomous Agents, and connect external tools via MCP.
@@ -63,7 +100,7 @@ Jan is more than a chat interface. Organize your work with Projects, build custo
<DocCard title="Projects" href="/docs/desktop/projects" icon={<FolderOpen size={20} />}>Organize conversations with shared instructions and files.</DocCard>
<DocCard title="Assistants" href="/docs/desktop/assistants" icon={<Bot size={20} />}>Set up a personal AI assistant tailored to how you work.</DocCard>
<DocCard title="Agents" href="/docs/desktop/agents" icon={<Cpu size={20} />}>Autonomous AI that reads files, manages calendars, and takes actions.</DocCard>
- <DocCard title="Connectors (MCP)" href="/docs/desktop/mcp-examples" icon={<Plug size={20} />}>Extend your AI with web search, code execution, databases, and more.</DocCard>
+ <DocCard title="Connectors (MCP)" href="/docs/desktop/mcp" icon={<Plug size={20} />}>Extend your AI with web search, code execution, databases, and more.</DocCard>
</DocCards>
## Models
diff --git a/docs/src/pages/docs/desktop/remote-models/_meta.json b/docs/src/pages/docs/desktop/remote-models/_meta.json
index a21422d9d..26a099ce1 100644
--- a/docs/src/pages/docs/desktop/remote-models/_meta.json
+++ b/docs/src/pages/docs/desktop/remote-models/_meta.json
@@ -22,5 +22,8 @@
},
"huggingface": {
"title": "Hugging Face"
+ },
+ "custom-endpoint": {
+ "title": "Custom Endpoints"
}
}
diff --git a/docs/src/pages/docs/desktop/remote-models/custom-endpoint.mdx b/docs/src/pages/docs/desktop/remote-models/custom-endpoint.mdx
new file mode 100644
index 000000000..bf3df51d5
--- /dev/null
+++ b/docs/src/pages/docs/desktop/remote-models/custom-endpoint.mdx
@@ -0,0 +1,166 @@
+---
+title: Custom Endpoints
+description: Connect Jan to any OpenAI-compatible or Anthropic-compatible API endpoint, including self-hosted servers and proxies.
+keywords:
+ [
+ Jan,
+ custom endpoint,
+ OpenAI-compatible,
+ Anthropic-compatible,
+ self-hosted,
+ vLLM,
+ Ollama,
+ LiteLLM,
+ LocalAI,
+ proxy,
+ base URL,
+ API key,
+ large language models,
+ integration,
+ ]
+---
+import { Callout, Steps } from 'nextra/components'
+import { Settings, Plus } from 'lucide-react'
+
+# Custom Endpoints
+
+Beyond the built-in cloud providers, Jan can connect to **any endpoint that speaks the OpenAI or
+Anthropic wire format**. This covers self-hosted servers (vLLM, Ollama, LocalAI, llama.cpp server,
+TGI), gateways and proxies (LiteLLM, OpenRouter-style routers, Amazon Bedrock proxies), and any
+provider that exposes an OpenAI- or Anthropic-compatible API.
+
+## When to use a custom endpoint
+
+- You run your own inference server (vLLM, Ollama, LocalAI, TGI, llama.cpp `llama-server`) on your
+ machine or LAN.
+- You use a gateway/proxy (LiteLLM, a Bedrock or Vertex proxy, an internal company gateway).
+- You have a provider that isn't in Jan's built-in list but offers an OpenAI- or Anthropic-compatible API.
+
+## Add a custom provider
+
+<Steps>
+
+### Step 1: Open the Add Provider dialog
+
+1. Navigate to **Settings** (<Settings width={16} height={16} style={{display:"inline"}}/>) > **Model Providers**.
+2. Click the **Add Provider** (<Plus width={16} height={16} style={{display:"inline"}}/>) button next to the providers list.
+
+![Add Provider button](../_assets/add-provider-button.png)
+
+### Step 2: Choose the API format
+
+In the **Add Custom Provider** dialog, pick the **API format** your endpoint speaks:
+
+- **OpenAI-compatible** (default) — for vLLM, Ollama, LocalAI, TGI, llama.cpp server, LiteLLM in
+ OpenAI mode, and most third-party providers.
+- **Anthropic-compatible** — for endpoints that expose the Anthropic Messages API (Claude proxies,
+ LiteLLM in Anthropic mode, Bedrock/Vertex Anthropic gateways).
+
+<Callout type="info">
+The API format determines how Jan formats requests and parses responses. Picking the wrong one will
+cause requests to fail even if the base URL and key are correct. If you're unsure, your endpoint's
+docs will say whether it's "OpenAI-compatible" or exposes the "Anthropic Messages API".
+</Callout>
+
+![Add Custom Provider dialog](../_assets/add-provider-dialog.png)
+
+### Step 3: Fill in the details
+
+| Field | Description |
+| --- | --- |
+| **Provider name** | A unique name for this provider (shown in the model selector). |
+| **Base URL** | The root of the API. For OpenAI-compatible endpoints this is usually the URL ending in `/v1` (e.g. `http://localhost:8000/v1`). For Anthropic-compatible endpoints, use the base your gateway documents. |
+| **API key** | Required. For local servers that don't check auth, enter any non-empty placeholder (e.g. `sk-no-key`). |
+
+Click **Create** to add the provider.
+
+<Callout type="warning">
+**Base URL must include the version path your server expects.** A common mistake is entering
+`http://localhost:8000` instead of `http://localhost:8000/v1` for OpenAI-compatible servers — the
+request will 404. Trailing slashes are stripped automatically.
+</Callout>
+
+### Step 4: Add models
+
+Jan tries to fetch the available models from `{base_url}/models` when you save. If your endpoint
+doesn't expose that, add models manually: in the provider's **Models** section, click the **+**
+button and enter the model ID exactly as your server expects it (e.g. `llama-3.1-8b-instruct`).
+
+![Custom provider settings with model list](../_assets/custom-provider-models.png)
+
+<Callout type="info">
+Custom providers aren't capability-detected automatically — Jan can't infer whether a model supports
+tools, vision, or audio. Add each model manually and configure its capabilities per model.
+</Callout>
+
+</Steps>
+
+## Example base URLs
+
+| Server / gateway | API type | Typical base URL |
+| --- | --- | --- |
+| vLLM | OpenAI-Compatible | `http://localhost:8000/v1` |
+| Ollama | OpenAI-Compatible | `http://localhost:11434/v1` |
+| LocalAI | OpenAI-Compatible | `http://localhost:8080/v1` |
+| Text Generation Inference (TGI) | OpenAI-Compatible | `http://localhost:8080/v1` |
+| LiteLLM (OpenAI mode) | OpenAI-Compatible | `http://localhost:4000/v1` |
+| LiteLLM (Anthropic mode) | Anthropic-Compatible | `http://localhost:4000` |
+
+<Callout type="info">
+Ports and paths depend on how you launched the server — check its startup logs. The values above
+are defaults and may differ in your setup.
+</Callout>
+
+## API key fallbacks
+
+For remote providers you can configure **multiple API keys**. Jan uses the primary key first and
+automatically retries with the next key **only** on HTTP `401` (unauthorized), `403` (forbidden),
+or `429` (rate limited). Other errors do not trigger a retry.
+
+<Steps>
+
+### Configure fallback keys
+
+1. Open the provider in **Settings** > **Model Providers**.
+2. In the **API keys** section, click **Advanced**.
+3. Add keys with **+ Add key** as numbered entries — `#1` is the primary, `#2` and onward are fallbacks.
+4. Click **Test keys** to validate each one. Jan calls `{base_url}/models` per key and reports the
+ result: **OK**, **Invalid/revoked (401)**, **Forbidden (403)**, **Rate limited (429)**, or
+ **Network error**.
+
+![API key fallbacks in Advanced mode](../_assets/api-key-fallbacks.png)
+
+</Steps>
+
+<Callout type="info">
+If all keys fail with 401/403, Jan reports that key rotation is exhausted — every configured key is
+bad or unauthorized. A persistent 429 across all keys means you're being rate limited; wait or add
+more keys.
+</Callout>
+
+## Sampling parameters
+
+For local engines (llama.cpp, MLX) and **custom providers**, Jan exposes the full set of sampling
+parameters (temperature, top-K, top-P, min-P, repetition penalty, and more). For built-in cloud
+providers these controls are hidden, because those providers manage or ignore most samplers.
+
+<Callout type="warning">
+Custom endpoints are permissive: Jan sends whatever samplers you set, but **your server may silently
+ignore the ones it doesn't support.** If a parameter seems to have no effect, check whether your
+backend implements it.
+</Callout>
+
+## Troubleshooting
+
+| Symptom | Likely cause | Fix |
+| --- | --- | --- |
+| Requests fail immediately | Wrong **API type** for the endpoint | Match OpenAI- vs Anthropic-Compatible to what your server speaks |
+| `404` on every request | Base URL missing `/v1` (or wrong path) | Add the version path your server expects |
+| `401` / `403` | Bad or missing API key | Verify the key; for keyless local servers enter any non-empty placeholder |
+| `429` | Rate limited | Wait, or add fallback keys |
+| Connection refused / network error | Server not running, wrong host/port, or firewall | Confirm the server is up and reachable from your machine |
+| No models listed | Endpoint doesn't expose `/models` | Add the model ID manually |
+
+For deeper diagnosis, check [Jan's logs](/docs/desktop/troubleshooting#how-to-get-error-logs).
+
+Need more help? Join our [Discord community](https://discord.gg/FTk2MvZwJH).
diff --git a/docs/src/pages/docs/desktop/troubleshooting.mdx b/docs/src/pages/docs/desktop/troubleshooting.mdx
index f7bddf4a4..8fa94ca29 100644
--- a/docs/src/pages/docs/desktop/troubleshooting.mdx
+++ b/docs/src/pages/docs/desktop/troubleshooting.mdx
@@ -47,12 +47,40 @@ Error logs are essential for troubleshooting issues and getting help from Jan te
tail -n 50 ~/Library/Application\ Support/Jan/data/logs/app.log
```
-App, server, and engine messages are all written to the same `logs/app.log` file (look for the `[APP]` / `[SERVER]` / `[SPECS]` tags).
+App, server, and engine messages are all written to the same `logs/app.log` file (look for the `[APP]` / `[SERVER]` / `[SPECS]` tags). Local model output from llama.cpp appears prefixed with `[llamacpp-router]` and `[llamacpp-router stdout]` — these lines are the best source when a model fails to load or crashes.
+
+The `logs/app.log` file lives inside your Jan data folder:
+
+- **macOS:** `~/Library/Application Support/Jan/data/logs/app.log`
+- **Windows:** `%APPDATA%\Jan\data\logs\app.log`
+- **Linux:** `~/.local/share/Jan/data/logs/app.log`
<Callout type="warning">
Ensure to redact any private or sensitive information when sharing logs or error details. We retain your logs for only 24 hours.
</Callout>
+## Jan Won't Start or Crashes on Launch
+
+If Jan fails to open, closes immediately, or hangs on a blank window:
+
+**1. Corrupt settings/store file**
+
+A damaged `store.json` in the data folder can prevent Jan from starting. Fully quit Jan, then rename or delete `store.json` (Jan regenerates it on next launch):
+
+- **macOS:** `~/Library/Application Support/Jan/data/store.json`
+- **Windows:** `%APPDATA%\Jan\data\store.json`
+- **Linux:** `~/.local/share/Jan/data/store.json`
+
+This resets app preferences but keeps your models and chat history. If it still won't start, try a [clean reinstall](#broken-build).
+
+**2. Another Jan instance is already running**
+
+Jan is single-instance — launching it again just focuses the existing window. If you see no window at all, check for a stale process (system tray icon, or `ps aux | grep -i jan` / Task Manager) and quit it before relaunching.
+
+**3. Port 1337 already in use**
+
+Jan's Local API Server binds to `127.0.0.1:1337` and does **not** fall back to another port automatically. If that port is taken (often by a previous Jan process that didn't exit cleanly), the server fails to bind. See [Port Conflicts](#failed-to-fetch-or-somethings-amiss-errors) below to find and free the port, or change it in **Settings** > **Local API Server**.
+
## Broken Build
@@ -282,6 +310,104 @@ Ubuntu on Proxmox VM
- Some laptop GPUs may have reduced performance
- Hybrid graphics (Optimus) may need additional configuration
+## AMD and Apple GPUs
+
+Jan isn't limited to NVIDIA. It detects your hardware and picks a backend automatically, but a GPU
+backend is only preferred when a GPU reports **at least 6 GB of VRAM** — below that, Jan runs on CPU.
+
+**AMD / Intel (Vulkan):**
+- Requires up-to-date GPU drivers with Vulkan support.
+- If you see a `ggml_vulkan ... error` in the logs, update your drivers and confirm Vulkan is
+ installed (`vulkaninfo` on Linux).
+- Select the Vulkan backend under **Settings** > **Model Providers** > **Llama.cpp** > **Backend**.
+
+**Apple Silicon (Metal):**
+- Metal acceleration is used automatically on M-series Macs; no setup needed.
+- A `ggml_metal ... error` usually means the model is too large for available unified memory — use a
+ smaller or more heavily quantized model.
+
+**CPU requirement (all platforms):**
+- llama.cpp builds require **AVX2**. On very old CPUs without AVX2, pick a `noavx`/CPU-compatible
+ backend build; otherwise the model process will fail to start.
+
+**GPU not detected after sleep (Linux):**
+- After suspend/resume the driver state can go stale and Jan may report "No GPU detected." Restart
+ Jan to re-probe the hardware.
+
+## Model Won't Load or Crashes (llama.cpp)
+
+When a local model fails to load or crashes mid-generation, Jan surfaces the error in the chat (as a
+model error banner) and writes the underlying cause to [the logs](#how-to-get-error-logs). The most
+common causes:
+
+**Out of memory (RAM or VRAM)**
+- *Symptom:* The model fails to load, or generation stops with an out-of-memory error.
+- *Cause:* The model + context needs more memory than is available.
+- *Fix:* Use a smaller or more quantized model; reduce the **context size**; offload fewer layers to
+ the GPU (lower `ngl`); or switch to the CPU backend.
+
+**Out of context size**
+- *Symptom:* A banner says the model ran out of context size.
+- *Cause:* The conversation (prompt) is longer than the model's configured context window.
+- *Fix:* Click **Increase Context Size** in the banner, or raise **Context Size** in the model
+ settings (default `8192`, up to `131072`). Larger context uses more memory.
+
+**Model architecture not supported**
+- *Symptom:* "The model's architecture is not supported by this version of the backend."
+- *Cause:* The backend build is older than the model, or the file isn't a supported text model.
+- *Fix:* Update the llama.cpp backend (**Settings** > **Model Providers** > **Llama.cpp** >
+ **Backend**), or use a different model.
+
+**Model load timed out**
+- *Symptom:* "Router took too long to start and timed out."
+- *Cause:* A large model on a slow disk didn't finish loading within the timeout (default 60s).
+- *Fix:* Wait and retry, use a smaller model, or store models on faster storage.
+
+**Backend / driver error**
+- *Symptom:* "The model process encountered an unexpected error," or a `cuda error:` /
+ `ggml_vulkan`/`ggml_metal` line in the logs.
+- *Cause:* GPU driver/runtime problem or an unsupported operation on the selected backend.
+- *Fix:* Update drivers, or switch backends (CPU / Vulkan / CUDA). Check the logs for the exact line.
+
+### Common llama.cpp error messages
+
+These strings appear in `logs/app.log` (prefixed `[llamacpp-router]`) when a model fails:
+
+| Log message | Likely cause | Resolution |
+| --- | --- | --- |
+| `unknown model architecture: '<arch>'` | Backend too old, or not a supported text model | Update the backend; confirm the model is supported |
+| `error loading model` / `failed to load model` | Corrupt or truncated GGUF, or partial download | Re-download the model |
+| `missing tensor` / `wrong number of tensors` | Incomplete or mismatched GGUF | Re-download from a known-good source, or try another quantization |
+| `failed to allocate ... buffer` / `out of memory` / `cudaMalloc` | Not enough RAM/VRAM for the model or KV cache | Smaller model, lower context, fewer GPU layers |
+| `request (N tokens) exceeds the available context size (M)` | Prompt longer than the context window | Increase context size or shorten the conversation |
+| `GGML_ASSERT(...)` | Backend bug or unsupported op on this backend | Try a different backend; report upstream if it persists |
+
+<Callout type="info">
+For multi-shard (split) GGUF models, point the model file at **shard 1** (the standard llama.cpp
+convention) so the rest are picked up automatically.
+</Callout>
+
+## Cloud Provider and Network Errors
+
+Errors from cloud providers and custom endpoints surface as a chat error with the HTTP status:
+
+| Status | Meaning | Fix |
+| --- | --- | --- |
+| `401` Unauthorized | API key is missing, wrong, or revoked | Re-check the key; confirm the right provider is selected |
+| `403` Forbidden | Key lacks access to that model/endpoint | Verify the key's permissions and the model ID |
+| `429` Rate limited | Too many requests, or out of quota/credits | Wait and retry; add fallback keys; check your billing |
+
+If you've configured [API key fallbacks](/docs/desktop/remote-models/custom-endpoint#api-key-fallbacks)
+and see "key rotation exhausted," **every** configured key failed with 401/403 — they're all
+invalid or unauthorized.
+
+**Custom endpoint won't connect:**
+- Wrong **API type** (OpenAI- vs Anthropic-Compatible) makes requests fail even with a valid key.
+- A `404` on every request usually means the **base URL is missing `/v1`** (or the wrong path).
+- "Connection refused" / network errors mean the server isn't running or isn't reachable.
+
+See the [Custom Endpoints](/docs/desktop/remote-models/custom-endpoint#troubleshooting) guide for details.
+
## Permission Denied
When running Jan, you might encounter the following error message: