Add BlockRun.AI as LLM Provider (x402 Micropayments)#1
Open
1bcMax wants to merge 1 commit intostormulv:mainfrom
Open
Add BlockRun.AI as LLM Provider (x402 Micropayments)#11bcMax wants to merge 1 commit intostormulv:mainfrom
1bcMax wants to merge 1 commit intostormulv:mainfrom
Conversation
BlockRun.AI is a pay-per-request AI gateway using x402 micropayments on Base chain. This PR adds support for BlockRun as an alternative payment method alongside traditional OpenAI API keys. Changes: - Add agents/blockrun_chat.py: LangChain-compatible ChatModel wrapper - Update executor.py: Support blockrun/ prefixed models - Update .env.example: Add BLOCKRUN_WALLET_KEY config - Update requirements.txt: Add blockrun-llm dependency - Update README.md: Document BlockRun payment option Usage: Use blockrun/ prefix in model name, e.g., "blockrun/openai/gpt-4o" and configure BLOCKRUN_WALLET_KEY in .env Benefits: - Pay-per-request in USDC (no monthly subscriptions) - Access GPT-4o, Claude, Gemini, DeepSeek via single integration - Private key never leaves machine (EIP-712 signing only)
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.
Summary
BlockRun.AI is a pay-per-request AI gateway using x402 micropayments on Base chain. This PR adds BlockRun as an alternative payment method alongside traditional OpenAI API keys.
Benefits:
Changes
agents/blockrun_chat.py: LangChain-compatibleBlockRunChatclassagents/application/executor.py: Support forblockrun/prefixed models.env.example: AddedBLOCKRUN_WALLET_KEYconfigurationrequirements.txt: Addedblockrun-llm>=0.1.0dependencyREADME.md: Documented BlockRun payment option with usage examplesUsage
Testing
openai/gpt-4o-miniLinks