Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

fix(docker): adds mount for the litellm config dir (#2454)

derrik f64a661d5b489
diff --git a/headroom/install/runtime.py b/headroom/install/runtime.py
index 3be93ff76..0073fe4d5 100644
--- a/headroom/install/runtime.py
+++ b/headroom/install/runtime.py
@@ -118,7 +118,14 @@ def _runtime_env(manifest: DeploymentManifest) -> dict[str, str]:
def _ensure_host_dirs() -> None:
- for subdir in (".headroom", ".claude", ".codex", ".gemini", ".config/opencode"):
+ for subdir in (
+ ".headroom",
+ ".claude",
+ ".codex",
+ ".gemini",
+ ".config/opencode",
+ ".config/litellm",
+ ):
(Path.home() / subdir).mkdir(parents=True, exist_ok=True)
@@ -170,6 +177,8 @@ def build_runtime_command(manifest: DeploymentManifest) -> list[str]:
f"{_mount_source(home, '.gemini')}:{container_home}/.gemini",
"--volume",
f"{_mount_source(home, '.config/opencode')}:{container_home}/.config/opencode",
+ "--volume",
+ f"{_mount_source(home, '.config/litellm')}:{container_home}/.config/litellm",
]
docker_gpus = manifest.base_env.get("HEADROOM_DOCKER_GPUS", "").strip()
if docker_gpus:
diff --git a/tests/test_install/test_runtime.py b/tests/test_install/test_runtime.py
index 183e7a21c..3715230df 100644
--- a/tests/test_install/test_runtime.py
+++ b/tests/test_install/test_runtime.py
@@ -113,6 +113,10 @@ def test_build_runtime_command_for_docker_includes_deployment_env(
# the container.
assert "HEADROOM_WORKSPACE_DIR=/tmp/headroom-home/.headroom" in command
assert "HEADROOM_CONFIG_DIR=/tmp/headroom-home/.headroom/config" in command
+ assert (
+ f"{_mount_source(str(tmp_path), '.config/litellm')}:/tmp/headroom-home/.config/litellm"
+ in joined
+ )
def test_build_runtime_command_lets_the_host_dashboard_read_its_data(
@@ -306,6 +310,7 @@ def test_build_runtime_command_for_docker_matches_wrapper_parity(
assert (tmp_path / ".claude").is_dir()
assert (tmp_path / ".codex").is_dir()
assert (tmp_path / ".gemini").is_dir()
+ assert (tmp_path / ".config" / "litellm").is_dir()
assert "--env" in command
joined = " ".join(command)
assert "ANTHROPIC_API_KEY" in joined