From 0db55069051db927d48c52398350336461110ff9 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Fri, 24 Jul 2026 08:05:17 +0000 Subject: [PATCH] docs: document local model workflows The sandbox docs only described local models through Docker Model Runner. Document the experimental --model workflows for llmman and Ollama, including model swaps, and link them from the Claude Code page. --- .../ai/sandboxes/agents/claude-code.md | 50 ++++++++++++++++--- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/content/manuals/ai/sandboxes/agents/claude-code.md b/content/manuals/ai/sandboxes/agents/claude-code.md index c61ab2ae686a..0c223d6b718f 100644 --- a/content/manuals/ai/sandboxes/agents/claude-code.md +++ b/content/manuals/ai/sandboxes/agents/claude-code.md @@ -2,9 +2,9 @@ title: Claude Code weight: 10 description: | - Use Claude Code in Docker Sandboxes with authentication, configuration, and - YOLO mode for AI-assisted development. -keywords: docker sandboxes, claude code, anthropic, ai agent, sbx + Use Claude Code in Docker Sandboxes with authentication, local models, + configuration, and YOLO mode for AI-assisted development. +keywords: docker sandboxes, claude code, anthropic, ai agent, sbx, local models, llmman, ollama --- Official documentation: [Claude Code](https://code.claude.com/docs) @@ -112,8 +112,44 @@ this base. ## Use a local model -To run Claude Code in a sandbox against a local model on your host through -Docker Model Runner, see +The `--model` flag routes Claude Code's Anthropic API requests to a model +served on your host. This feature is experimental. + +Enable the feature: + +```console +$ sbx settings set platform.allowExperimentalFeatures true +$ sbx settings set feature.model true +``` + +To use the bundled `llmman` model server, pass a GGUF model reference or short +name: + +```console +$ sbx run --model gemma4 claude +``` + +On first use, `sbx` starts `llmman`, pulls the model, and leaves the server +running on your host. Later sandboxes reuse the server and its model store. + +To use an existing Ollama installation instead, prefix the model name with +`ollama/`: + +```console +$ sbx run --model ollama/gemma4 claude +``` + +Ollama must already be installed and running. `sbx` connects to it but doesn't +start or manage the Ollama process. + +You can also change the model for an existing sandbox: + +```console +$ sbx run --name --model +``` + +Changing the model recreates the sandbox container. The workspace and +kit-owned volumes persist. + +To use Docker Model Runner instead, see [Run Claude Code in a Docker Sandbox with Docker Model Runner](/guides/claude-code-sandbox-model-runner/). -For the host-only version without a sandbox, see -[Use Claude Code with Docker Model Runner](/guides/claude-code-model-runner/).