feat: pay Responses WebSocket through Tempo MPP#2
Open
gakonst wants to merge 10 commits into
Open
Conversation
gakonst
force-pushed
the
feat/mpp-integration
branch
from
July 21, 2026 00:03
cab7f02 to
80b239a
Compare
gakonst
marked this pull request as ready for review
July 21, 2026 00:04
gakonst
force-pushed
the
feat/mpp-integration
branch
4 times, most recently
from
July 22, 2026 03:48
33f9688 to
c560362
Compare
gakonst
force-pushed
the
feat/mpp-integration
branch
from
July 22, 2026 07:31
1df1725 to
6f7c22b
Compare
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
bin/nanocodexas a CLI-owned loopback WebSocket middleware; no Nanocodex library crate imports MPP, Alloy, Tempo wallet, or SQLite code--provider.openai, plus paid OpenAI-over-Tempo through--provider.tempoand--provider.tempo.*overrides~/.tempo/wallet/store.json; there is no raw-private-key flag or new signer trait~/.tempo/wallet/channels.dbwith MPPx and Wallet CLI, bootstrap server session state, reconcile TIP-1034 on-chain state, and continue cumulative vouchers from a cold clientalloy-transport-mppfor the HTTP payment probe, WebSocket authorization, in-band voucher requests, application frames, top-ups, and close-ready flowwss://openai.mpp.tempo.xyz/v1/responsesThe provider namespace is CLI configuration only. Nanocodex still supports the OpenAI Responses WebSocket model family and the core/service crates remain unchanged.
TIP-1034 and MPPx parity
The CLI pins merged mpp-rs main at
0c509633f9ebc97861ed89d85dbe62798b9bb981. That stack follows current MPPx behavior for:escrowContract/escrowhints, then the canonical native precompile fallbackvalidAfterUpstream dependencies
Validation
cargo test -p nanocodex-bin --all-targets: 120 passedcargo clippy -p nanocodex-bin --all-targets -- -D warningscargo fmt --all -- --checkLive mainnet result
The final compiled one-shot CLI loaded the existing Tempo Wallet access key and shared SQLite session, selected
gpt-5.6-sol, connected through the local MPP middleware to the hosted OpenAI Responses WebSocket, and returned exactlytip1034-final-ok.It reused TIP-1034 channel
0xdca07bd5d0808c10e8253a17c8c67192939cfd7045cfe8bf6ed17e63b1754d9b. The persisted cumulative voucher advanced from 650,791 to 728,735 atomic units, so this run paid exactly 77,944 atomic units ($0.077944). The response completed with 8,006 input tokens, 9 output tokens, one connection attempt, zero WebSocket reconnects, and zero response retries.