Norbert 786a72c06d feat: unified model selector below mode toggle
- Model dropdown below mode switch applies to active agents
- In work mode: changes model for Rex/Maddy/Coder/Research + subagents
- In lab mode: changes model for Eric
- /api/apply-model endpoint: swap model + VRAM in current mode
- /api/switch accepts optional model param
- Removed separate lab model card (consolidated into one selector)
2026-02-18 19:51:02 +00:00
2026-02-18 17:16:35 +00:00
2026-02-18 17:16:35 +00:00

Ollama GPU Switcher

A simple web UI to toggle OpenClaw agents between work mode (local ollama inference) and lab mode (cloud fallback), so experiments get exclusive GPU access.

The Problem

With a single GPU (RTX 3090), loading different models causes VRAM swaps. When the lab agent (Eric) loads granite4 while other agents are using qwen3, both tasks fail. This tool lets you switch all non-lab agents to cloud (groq) with one click.

Modes

Mode GPU Agents Lab Agent GPU Status
🛠️ Work qwen3-128k:14b (ollama) granite4 (ollama) Shared
🧪 Lab groq (cloud) granite4 (ollama) Exclusive for lab

Features

  • One-click mode switching (work ↔ lab)
  • Real-time agent status display
  • Lab model selector (change what Eric runs)
  • Auto-refresh every 30s
  • Dark theme, mobile-friendly
  • No LLM involved — pure config switching via OpenClaw gateway API

Setup

pip install -r requirements.txt

Usage

# Set your gateway token (from openclaw.json)
export OPENCLAW_GATEWAY_TOKEN="your-token-here"

# Run on port 8585 (default)
python app.py

# Or custom port
PORT=9090 python app.py

Then open http://localhost:8585 in your browser.

Environment Variables

Variable Default Description
OPENCLAW_GATEWAY_URL http://127.0.0.1:18789 Gateway API endpoint
OPENCLAW_GATEWAY_TOKEN (empty) Gateway auth token
PORT 8585 Web UI port

How It Works

The app reads and patches the OpenClaw gateway config via its REST API:

  1. Status: GET /api/status → reads agent model assignments
  2. Switch: POST /api/switch → patches agent models (qwen3 ↔ groq)
  3. Lab model: POST /api/lab-model → changes Eric's model

Config changes trigger an automatic gateway restart.

License

MIT

Description
Web UI to toggle OpenClaw agents between work and lab mode for exclusive GPU access
Readme 51 KiB
Languages
HTML 56%
Python 44%