I defined custom routing tiers in openclaw.json under plugins.entries.clawrouter.config.routing, but the proxy always starts with the default routing config. No errors or warnings, it just silently uses defaults.
After digging into the source, I found the cause: register(api) gets called twice during OpenClaw's gateway startup. The first call happens in a pre-gateway phase before openclaw.json has been read, so api.pluginConfig is empty. The proxy starts with DEFAULT_ROUTING_CONFIG at this point. Then proc.__clawrouterProxyStarted gets set to true, which causes the second register() call (the one that actually has the user's config in api.pluginConfig) to bail out immediately.
You can see this in the gateway log: the timestamp-less [plugins] lines (pre-gateway phase) appear before [gateway] loading configuration…, and all subsequent timestamped calls log "Proxy already started by earlier register() call - skipping".
This means plugins.entries.clawrouter.config.routing effectively does nothing for anyone.
Repro: Define any custom tiers in openclaw.json, restart the gateway, check blockrun/logs/usage-*.jsonl. Routed models will match DEFAULT_ROUTING_CONFIG, not the user config.
Version: @blockrun/clawrouter@0.12.139, OpenClaw 2026.4.9
I defined custom routing tiers in
openclaw.jsonunderplugins.entries.clawrouter.config.routing, but the proxy always starts with the default routing config. No errors or warnings, it just silently uses defaults.After digging into the source, I found the cause:
register(api)gets called twice during OpenClaw's gateway startup. The first call happens in a pre-gateway phase beforeopenclaw.jsonhas been read, soapi.pluginConfigis empty. The proxy starts withDEFAULT_ROUTING_CONFIGat this point. Thenproc.__clawrouterProxyStartedgets set totrue, which causes the secondregister()call (the one that actually has the user's config inapi.pluginConfig) to bail out immediately.You can see this in the gateway log: the timestamp-less
[plugins]lines (pre-gateway phase) appear before[gateway] loading configuration…, and all subsequent timestamped calls log "Proxy already started by earlier register() call - skipping".This means
plugins.entries.clawrouter.config.routingeffectively does nothing for anyone.Repro: Define any custom tiers in
openclaw.json, restart the gateway, checkblockrun/logs/usage-*.jsonl. Routed models will matchDEFAULT_ROUTING_CONFIG, not the user config.Version:
@blockrun/clawrouter@0.12.139, OpenClaw2026.4.9