feat: add BlockRun / ClawRouter as native LLM provider with x402 micropayments#3477
Open
1bcMax wants to merge 1 commit intoNousResearch:mainfrom
Open
feat: add BlockRun / ClawRouter as native LLM provider with x402 micropayments#34771bcMax wants to merge 1 commit intoNousResearch:mainfrom
1bcMax wants to merge 1 commit intoNousResearch:mainfrom
Conversation
…opayments - hermes_cli/blockrun_provider.py: x402-aware httpx transport (sync + async) for Base (EIP-712) and Solana (Ed25519) chains; auto-detects chain from env vars; resolves provider config for hermes inference loop - tools/blockrun_tool.py: 10 tools — wallet setup/balance/address (Base + Solana), image generation (DALL-E 3, GPT Image 1, Flux, Nano Banana), and prediction market data (Polymarket, Kalshi, dFlow, Binance) - skills/blockrun/SKILL.md: full Skills Hub documentation - tests/test_blockrun.py: 51 tests — 37 unit (no network) + 14 live including multi-model suite covering NVIDIA, OpenAI, Anthropic, Google, streaming, tool calling, system prompts, multi-turn, and User-Agent header verification - hermes_cli/runtime_provider.py: route "blockrun"/"clawrouter" provider names - toolsets.py: register "blockrun" toolset with all 10 tools - pyproject.toml: optional [blockrun] and [blockrun-solana] extras - .env.example / cli-config.yaml.example: BlockRun configuration docs Payment signing is non-custodial — private key never leaves the user's machine.
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Adds BlockRun (blockrun.ai) as a first-class provider in hermes-agent, alongside OpenRouter, Nous, and Anthropic. BlockRun is an OpenAI-compatible model gateway that uses x402 micropayments instead of API keys — your crypto wallet IS your credential.
Why it's different from OpenRouter
Files added
Files modified (minimal)
How it works
Payment signing is non-custodial — the private key never leaves the user's machine. Only the cryptographic signature is transmitted to BlockRun's servers.
Every request carries
User-Agent: hermes-agent/blockrun-integration/1.0.0so BlockRun can track hermes traffic.User setup (3 steps)
Fund with $5–$20 USDC on Base: https://blockrun.ai/fund
Supported chains
BLOCKRUN_WALLET_KEY=0x...SOLANA_WALLET_KEY=<base58>Chain auto-detected from which env var is set. Override:
BLOCKRUN_CHAIN=solana.Tools included
Wallet management
blockrun_wallet_setupblockrun_wallet_balanceblockrun_wallet_addressblockrun_solana_wallet_setupblockrun_solana_wallet_balanceImage generation (x402, $0.02–$0.10/image)
blockrun_image_generateblockrun_image_editPrediction markets (x402, $0.001–$0.005/call)
blockrun_prediction_marketsTest coverage
Multi-model live tests (
TestLiveMultiModel)test_nvidia_basicnvidia/gpt-oss-20btest_openai_basicopenai/gpt-5-minitest_anthropic_basicanthropic/claude-haiku-4.5test_google_basicgoogle/gemini-2.5-flashtest_system_promptopenai/gpt-5-minitest_multi_turnopenai/gpt-5-minitest_streamingopenai/gpt-5-minitest_tool_callingopenai/gpt-5-minitest_models_endpoint/modelslists all 4 familiestest_user_agent_header_sentnvidia/gpt-oss-20bhermes-agentin User-AgentAll 51 tests pass.
Dependencies
New optional extras (zero impact on existing installs):