Repository navigation
feat: opt-in 0G Router brain (CompletionTransport seam, Direct default) - #6
Closed
alkautsarf wants to merge 1 commit into
Closed
alkautsarf wants to merge 1 commit into
alkautsarf wants to merge 1 commit into
Conversation
Adds the 0G Router (router-api.0g.ai, OpenAI-compatible, headless SIWE, prepaid Payment Layer credit) as a second inference door beside Direct, opt-in via brain.providerKind:'router'. Direct stays the default and is bit-identical (og-compute + all 8 brain tests unmodified). New CompletionTransport seam (Direct/Router transports), config + picker + 4 build sites, sealed sk-/mk- custody (operator-blob, env-redacted, never serialized), Payment Layer deposit + auto-topup + 'anima topup --router'. Review hardening: Router auto-topup is explicit opt-in (non-recoverable, never default-ON); topup --router gated on providerKind + mainnet; auto-topup deposit waits for receipt + in-flight guard (no double-deposit); compaction strips MiniMax <think> + reprovisions on 401; credit-error mapping scoped to 4xx (no false topup hint on 5xx); init shows Router funding guidance; status/Telegram surface the Router brain + credit errors; sub-minimum deposit amounts rejected; 'anima model' preserves brain tuning fields. Claude-Session: https://claude.ai/code/session_01PQ6KBM8gAanXLCFrm4zU7g
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
Shipped to main as commit a76b231 and tagged v0.25.0 (release CI publishing all 7 |
This branch was successfully deployed
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
Adds the 0G Router as an opt-in second inference door, behind a provider-agnostic
CompletionTransportseam. Direct (0G serving-broker) stays the default and is bit-identical —og-compute.testand all 8 brain tests are unchanged.brain.providerKind: 'router'):router-api.0g.ai/v1, OpenAI-compatible, Bearersk-, headless SIWE self-auth, prepaid Payment Layer credit.How it stays sovereign
The Router
sk-is agent-derived — the agent self-signs SIWE with its own private key → wallet JWT → mints its ownmk-/sk-keys → self-deposits on-chain to the Payment Layer. No human-dashboard key, no stored third-party secret beyond the regenerable, sealed-encryptedsk-.Safety theme (Router deposits are NON-recoverable)
The Payment Layer has no user withdraw (only admin
withdrawUnallocated), so every money path is conservative:economy.autoTopup.enabled), not default-on.topup --routerguards onproviderKind === 'router'+ mainnet-only.Verification
/code-review --fixpass (11 fixed, 3 deferred-non-fatal).anima initRouter tmux smoke (caught + fixed a phantom-ledger-prompt bug).Scope
Default OFF. Direct path untouched. specter (#4) + enigma (#6) unaffected until they deliberately
anima upgradeafter a release.https://claude.ai/code/session_01PQ6KBM8gAanXLCFrm4zU7g