For the complete documentation index, see llms.txt. This page is also available as Markdown.

ClawRouter with The Grid | Supported Routing Options

ClawRouter cannot route to The Grid as a backend; here's what works instead in OpenClaw.

ClawRouter is BlockRun's smart LLM router for OpenClaw. It runs a local proxy on port 8402, classifies requests by complexity, and routes them to BlockRun's API using x402 USDC micropayments. It does not support custom backend providers without code changes, and it does not route to The Grid.

Short answer

The Grid cannot plug into ClawRouter as a backend through configuration alone. ClawRouter's upstream API is hardcoded to BlockRun's endpoints, and its payment layer uses x402 micropayments that The Grid does not implement. If you want The Grid in OpenClaw, configure it as a separate provider alongside ClawRouter, or use Manifest as your router instead.

Why ClawRouter is not a direct fit

Three things make ClawRouter incompatible with The Grid as a backend:

  1. Hardcoded upstream. The proxy target (BLOCKRUN_API and BLOCKRUN_SOLANA_API) is a constant in proxy.ts, not a configurable env var. The startProxy({ apiBase }) option exists in code but is not exposed to CLI or plugin config; it's used for testing.

  2. x402 payment protocol. ClawRouter uses @x402/fetch to sign USDC micropayments for every request. The Grid uses standard API key authentication, not x402. Swapping this requires replacing the payment layer.

  3. BlockRun-specific model registry. BLOCKRUN_MODELS in models.ts lists model IDs, pricing, and capabilities for BlockRun's catalog. Grid instruments are not in this registry and would have to be added manually.

What works instead

Approach
Works?
Notes

The Grid as a ClawRouter backend

No

Upstream is hardcoded to BlockRun + x402

The Grid alongside ClawRouter in OpenClaw

Yes

Separate provider, same config file, switch per task

The Grid through Manifest

Yes

Manifest accepts custom OpenAI-compatible providers

The Grid directly in OpenClaw

Yes

Simplest path, no router needed

Keep ClawRouter installed. Add The Grid directly to openclaw.json and switch per task with /model thegrid/code-prime or /model blockrun/auto. Full setup in Use The Grid with OpenClaw. Instrument IDs live in the current instruments list.

Option 2: replace ClawRouter with Manifest

Uninstall ClawRouter, install Manifest, connect The Grid as a backend. You get tier-based routing without x402 or crypto wallets. See Use The Grid with Manifest.

Option 3: skip the router entirely

If you don't need smart routing, add The Grid as a provider in openclaw.json and select instruments manually. The simplest path.

When ClawRouter still makes sense

  • You need x402 USDC payments (no credit card, no API key billing).

  • You want ClawRouter's smart routing applied specifically to BlockRun's catalog.

For everything else, route OpenClaw to The Grid directly or through Manifest.

Troubleshooting

Community fork (cgaeking/ClawRouter). A fork removes x402 and uses direct API keys plus an OpenRouter fallback. It could in theory point to The Grid, but it's unverified and unsupported by either project.

startProxy({ apiBase }) workaround. Exists in code but is not exposed as an env var or plugin config. Even if you set it programmatically, The Grid does not implement x402, so the payment handshake fails.

Last updated

Was this helpful?