feat: add BlockRun account API mode - #30
Merged
Merged
Conversation
The Lint & Typecheck job runs three steps and only the first was red: `npx prettier --check .` flagged 7 files. `eslint src/` and `tsc --noEmit` were already clean, and Build & Test, check and scanner all passed — so the red X on this PR was formatting, not the account API work. `prettier --write` on exactly those 7 files. No semantic change: the diff is whitespace, line wrapping and quote style. Verified after: prettier --check clean, eslint clean, tsc clean, and the suite at 562 passed / 3 skipped. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Je8JRrGK7mifyGbf8VjRM
Contributor
|
Pushed a formatting fix (b42ffc0) — Lint & Typecheck is green now. The red X on this PR was not the account API work. That job runs three steps and only the first was failing: Ran CI has since re-run: Lint & Typecheck pass, Build & Test pass, check pass. |
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.
XClawRouter currently requires wallet setup before the proxy can start, so BlockRun account customers cannot use the newly launched API. This adds an account billing mode that resolves
BLOCKRUN_API_KEY(or the sensitive OpenClawapiKeysetting), sends Bearer-authenticated requests tohttps://api.blockrun.ai, and never creates or consults a wallet in that mode.The local proxy preserves smart-routed chat and Messages behavior, streams other account API surfaces without buffering, polls async music/image-edit jobs, and keeps the existing video workflow. It strips all payment headers, reports account mode safely through
/health, points 401/402 errors to the keys/credits dashboards, and updates Doctor, CLI, README, configuration docs, and bundled output. Wallet settlement remains available, with Solana listed before Base in the updated docs.Validation:
npm run typechecknpm test— 562 passed, 3 skippednpm run lintnpm run buildnpm pack --dry-run/health, 227-model catalog, and non-streamingopenai/gpt-4.1-nanochat passed; the local placeholder Authorization header was overriddenProduction note: account Responses streaming and video submission remain gated on deploying/configuring BlockRunAI/enterprise#10. This PR forwards those contracts but does not deploy the account gateway.