Use BlockRun as an OpenAI-compatible provider in Zed's assistant
Point Zed's OpenAI provider api_url at the blockrun-litellm sidecar and the assistant can chat and edit with any catalog model — fast for inline edits, frontier for the agent.
How it works
Zed configures language-model providers in settings.json, and its OpenAI provider accepts a custom api_url with a list of available models. With the URL set to the blockrun-litellm sidecar, the assistant panel can name any catalog model, and the sidecar signs an x402 payment for each request from your wallet.
Nothing about Zed's inline assist, threads or agent panel changes; the endpoint that answers does. Because each model is one entry in the list, a fast model for inline edits and a frontier model for the agent panel sit side by side in the same picker.
Behind it is the BlockRun catalog: 78 chat models plus image, video, music and speech generation, search, market data and multi-chain RPC, priced per call. 6 open-weight models are free and need no wallet.
Setup
1. Start the sidecar
pip install 'blockrun-litellm[proxy]'\nexport BLOCKRUN_WALLET_KEY=0x<base wallet key>\nblockrun-litellm-proxy --port 40012. settings.json
{
"language_models": {
"openai": {
"api_url": "http://127.0.0.1:4001/v1",
"available_models": [
{ "name": "anthropic/claude-sonnet-5", "display_name": "Claude Sonnet 5 via BlockRun", "max_tokens": 200000 }
]
}
}
}Questions
- How do I use BlockRun in Zed?
- Start the sidecar, set the OpenAI provider's api_url to it in settings.json and list the catalog models you want, as in the setup. Set the OpenAI API key in Zed to any placeholder; the sidecar ignores it.
- Which models can Zed's assistant use through BlockRun?
- Any catalog id you add to available_models — one entry per model, each with the context length you want Zed to assume.
- Does Zed's agent panel work through the sidecar?
- Yes. The agent panel uses the same provider; tool calls and streaming pass through the sidecar unchanged.
- Does the sidecar need to run before Zed?
- Yes, or the first request fails to connect. Run it as a background service on the machine Zed runs on.
- Zed on BlockRun vs Zed's own model access?
- Zed's built-in providers keep working. BlockRun adds every catalog model under one provider with no key, priced per call.
- What does a call cost through this integration?
- The provider's published token rate with no markup on tokens, plus a flat per-call fee, quoted in dollars in the 402 before the call runs. Image, video and speech calls are priced per unit the same way. The live rate card is on the models page.
- Do I need an API key or an account?
- No. On the pay-per-call door the request carries its own payment from a wallet the SDK or MCP server creates on first run; there is nothing to sign up for. Teams that prefer keys get an API key and a monthly invoice instead.