feat: Add BlockRun as AI provider with x402 micropayments #24
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.
Summary
Adds BlockRun as a new AI provider option alongside OpenAI and Grok. BlockRun enables wallet-based pay-per-request AI access via x402 micropayments — no API keys required.
Key Benefits:
Changes
_shared/ai/callBlockRun.ts_shared/ai/types.tsevent-analysis-agent/index.tsevent-analysis-agent/types.tspaymentCostmetadata field.env.exampleBLOCKRUN_WALLET_KEYdocumentationUsage
BLOCKRUN_WALLET_KEYenvironment variable (Base chain private key, 0x-prefixed)blockrun/gpt-4o,blockrun/claude-sonnet-4,blockrun/grok-3Available BlockRun Models
blockrun/gpt-4o,blockrun/gpt-4o-miniblockrun/claude-sonnet-4,blockrun/claude-opus-4blockrun/grok-3,blockrun/grok-3-miniblockrun/gemini-2.5-pro,blockrun/gemini-2.5-flashblockrun/deepseek-chat,blockrun/deepseek-reasonerTest Plan
deno check)Links