Free-tier model routing for OpenClaw — sticky owner overrides, static routes, a deliberately-simple cheapest-default, structured audit, and privacy-safe local fleet cost attribution. Optional cost visibility reports per-model dollar estimates from dynamic public pricing (observe-only; unpriced-loud, never a false $0.00). Bring your own provider credentials; no benchmark engine or model registry included. PATENT PENDING. An optional, separately-licensed ToggleLogic Intelligence layer adds benchmark-driven automatic selection.
Install
openclaw plugins install clawhub:togglelogicToggleLogic (Free Tier) — model routing for OpenClaw
PATENT PENDING. Source-available under the ToggleLogic Free-Tier License (see LICENSE) — free, limited, revocable use; all rights reserved. Not open-source; not MIT/Apache. © 2026 Motherboard, Inc. · https://togglelogic.ai/
ToggleLogic routes each OpenClaw request to a model you control — bring your own provider credentials, declare intent, and let the plugin apply your choices. This free tier gives you:
- Owner overrides (sticky, held). Tell your assistant "use Opus for this" and the deployment-side switch writes an override that persists across every subsequent request — pins hold until you switch back.
- Static / intent routes. Map tasks to models in
configuredRoutes. - A deliberately-simple cheapest-default. Name the cheap model you want as the default; the plugin defaults to it unless an override or route says otherwise.
- A structured audit stream of every routing decision (NIST 800-53 AU-2/AU-3/AU-12 schema bar).
- Cost visibility (dollars) — observe-only. See what your calls cost, per model and per day, priced from live public data. Unpriced models are shown loudly, never a silent $0.00. Opt-in; reports only, never enforces. (See Cost visibility.)
It does not include — and never ships — the patented ToggleLogic Intelligence
engine (benchmark-driven automatic model selection) or the Toggle Registry. The
free cheapest-default is a dumb static preference: it never inspects your request,
never consults a model registry or benchmark, and embeds no model names or prices.
Automatic benchmark-driven selection is the separately-licensed Intelligence layer; if
installed, this plugin detects it and defers to it (see intelligence config). To
license it: https://togglelogic.ai/
Install (from ClawHub)
openclaw plugins install clawhub:togglelogic
Enable routing (opt-in) in ~/.openclaw/openclaw.json:
{
"plugins": {
"entries": {
"togglelogic": {
"enabled": true,
"hooks": { "allowConversationAccess": true },
"config": {
"mode": "cheap",
"cheapHeuristic": { "default": "anthropic/claude-haiku-4-5" },
"features": { "routing": { "enabled": true } }
}
}
}
}
}
Modes
| Mode | Behavior |
|---|---|
auto | Licensed Intelligence layer if present → else the cheap default if configured → else passthrough |
passthrough | Defer every selection to OpenClaw's default (log only) |
configured | Apply configuredRoutes (static task→model map) |
cheap | Apply the deployment-declared cheapest default (dumb, static) |
intelligence | Defer to the separately-licensed Intelligence layer (not included) |
Owner overrides apply above the mode in all cases.
Optional expiry. An override may include expires_at_ms (a numeric epoch-ms deadline).
After it passes, the override stops applying and routing returns to automatic — no file rewrite
needed. Writers SHOULD set expires_at_ms so a forgotten override cannot hold forever; omit it
only for a deliberately indefinite override. A present-but-non-numeric expires_at_ms is
rejected (fail-closed) and logged to the audit stream.
Cost visibility (dollars)
Opt-in features.costVisibility observes each model call (the llm_output hook,
observe-only) and reports per-model and per-day dollar cost to its own log
(~/.openclaw/logs/togglelogic-cost.jsonl). Prices are dynamic and public — fetched
live from Models.dev (MIT), cached locally and refreshed daily
(never per call, and never from any ToggleLogic/Motherboard endpoint), with a
bundled LiteLLM snapshot (MIT) as an offline fallback. It is curated to the major
providers' standard lineups (Anthropic, OpenAI, Google, xAI, Meta); anything else is
reported loudly as unpriced — model + token count — and never as a false $0.00. It
never blocks, halts, or downgrades a call. Enforcement and all-model /
guaranteed-current pricing are the paid tier.
Fleet attribution
Version 1.1 adds privacy-safe, local fleet attribution to every cost-log call and
summary. Configure a stable deployment slug and an optional cost-center slug; the
plugin writes them to the local JSONL ledger using schema
togglelogic.fleet-usage.v1. It does not transmit usage, identifiers, prompts, or
customer information to Motherboard or any ToggleLogic service. If deploymentId
is omitted, the local hostname is used.
Dollar values in this ledger are explicitly marked public-rate-estimate and
invoiceEligible: false. A fleet operator must reconcile deployment totals
against authoritative provider billing before creating an invoice.
Enable it (also requires hooks.allowConversationAccess, since llm_output is a
conversation hook):
{
"plugins": { "entries": { "togglelogic": {
"enabled": true,
"hooks": { "allowConversationAccess": true },
"config": {
"features": { "costVisibility": { "enabled": true } },
"costVisibility": {
"attribution": {
"deploymentId": "sam-andy",
"costCenter": "andy"
}
}
}
} } }
}
Config reference
See openclaw.plugin.json configSchema for every field: mode, logging,
configuredRoutes, cheapHeuristic, intelligence, ownerOverride, features,
audit, costVisibility.
License
Use of this Software is governed by the ToggleLogic Free-Tier License (LICENSE). It is free to use but revocable, reserves all of Motherboard, Inc.'s rights including its pending patents, and prohibits redistribution and competing use. It is not an open-source license.
