refactor(examples): move to USD per hour pricing - #34
Merged
Conversation
Track go-livepeer#3992: runners now advertise a single decimal USD per
hour price instead of price_per_unit / pixels_per_unit.
- runner.py (hello-world, tiles): replace --price/--pixels-per-unit
with a single float --price in USD per hour
- vllm/runners.json: price_info is now { "price": 0.01 }
- .env.example: PRICE replaces PRICE_PER_UNIT/PIXELS_PER_UNIT
- compose.onchain.yml: drop -pixelsPerUnit from the signer, move
-maxFaceValue to the orchestrator and retune -ticketEV for the new
price scale
- Dockerfiles: parameterize the SDK ref and bust the pip cache when
the branch moves
- READMEs: document the new pricing and /discovery output
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Refactors the example apps to match the updated on-chain pricing model: runners now advertise a single decimal USD/hour price instead of the legacy price_per_unit + pixels_per_unit scheme, and the on-chain compose/env/docs are updated accordingly.
Changes:
- Switch runner registration and example configs to
price(decimal USD/hour), removingpixels-per-unitusage. - Update on-chain compose/env templates and root docs to reflect the new pricing model and discovery output.
- Make the SDK git ref configurable in Dockerfiles via
SDK_REFand add a cache-busting mechanism to force SDK ref refreshes on rebuild.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| vllm/runners.json | Update static runner config to advertise { "price": ... }. |
| vllm/.env.example | Remove legacy pricing vars; document new runner price source and payer max-price cap. |
| tiles/runner.py | Update CLI args and runner registration to use price (USD/hour). |
| tiles/Dockerfile | Parameterize SDK ref and add cache-busting to refresh SDK dependency. |
| tiles/docker-compose.onchain.yml | Switch on-chain overlay to pass PRICE to --price. |
| tiles/.env.example | Replace legacy pricing vars with PRICE (USD/hour). |
| README.md | Update repo-level on-chain pricing explanation and /discovery verification notes. |
| hello-world/runner.py | Update CLI args and runner registration to use price (USD/hour). |
| hello-world/README.md | Update documentation to describe --price as USD/hour. |
| hello-world/Dockerfile | Parameterize SDK ref and add cache-busting to refresh SDK dependency. |
| hello-world/docker-compose.onchain.yml | Switch on-chain overlay to pass PRICE to --price. |
| hello-world/.env.example | Replace legacy pricing vars with PRICE (USD/hour). |
| echo/Dockerfile | Parameterize SDK ref and add cache-busting to refresh SDK dependency. |
| compose.onchain.yml | Remove legacy signer pixel scaling flag; retune/payment-related orchestrator flags and comments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rickstaa
marked this pull request as draft
July 24, 2026 20:50
…ntion Compose v2 canonical naming, matching the shared root files. Auto discovery and -f usage are unchanged; all README commands and file header comments updated to the new names. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VtVeDdep8i9UrNKbm9yr8G
A ticket faceValue must cover redeemGas (1.2M on Arbitrum) times the 3 gwei average gas price go-livepeer assumes, about 3.6e15 wei. With maxFaceValue below that the orchestrator rejects every session with insufficient sender reserve regardless of the actual reserve size. 4e15 clears it with headroom. The vllm overlay carries the same flag in the rename commit. Also documents PRICE in the vllm env example. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VtVeDdep8i9UrNKbm9yr8G
The reserve retry loop swallowed NoRunnerAvailableError silently for up to reserve-timeout seconds, which made a dead runner look like a hang. Each tile now logs one warning with the rejection reason on its first refused reserve. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VtVeDdep8i9UrNKbm9yr8G
The ADD of the commits API endpoint hit api.github.com on every image build and could fail on rate limits. Install the SDK from the branch ref directly; rebuild with --no-cache when a fresh SDK checkout is needed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VtVeDdep8i9UrNKbm9yr8G
-maxPricePerUnit caps per unit and a live runner unit is one second, so the old 0.10USD default meant about 360 USD/hour, effectively no cap. Ship 0.000111USD (about 0.40 USD/hour) and document the per-second unit. Verified against a third party orch at 0.34 USD/hour: passes at this cap, refused with HTTP 481 when the cap is set below its price. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VtVeDdep8i9UrNKbm9yr8G
Decimal USD was spec speak for "a plain number, not integer wei"; nobody reads it that way, so say USD with the 0.01 example carrying the format. The signer max price cap comments now simply say the cap applies per second of runtime, and the ticketEV and maxFaceValue comment essays in compose.onchain.yml are gone; the PR and git history keep the derivations. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rickstaa
marked this pull request as ready for review
July 27, 2026 13:46
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
Moves the examples to the pricing scheme from livepeer/go-livepeer#3992: runners advertise a single USD per hour
priceinstead ofprice_per_unit/pixels_per_unit.runner.py(hello-world, tiles):--priceis a float in USD/hour;--pixels-per-unitis gone.vllm/runners.json:price_infois now{ "price": 0.01 }..env.example:PRICEreplacesPRICE_PER_UNIT/PIXELS_PER_UNIT; the signer caps what it pays viaMAX_PRICE_PER_UNIT, applied per second of runtime.compose.onchain.yml: dropped-pixelsPerUnitfrom the signer, retuned-ticketEV, and raised-maxFaceValueto 4e15 so a ticket's faceValue can cover the redemption tx cost (~3.6e15 wei on Arbitrum); lower caps made the orchestrator reject every session with "insufficient sender reserve".ja/live-runnerbranch ref (rebuild with--no-cacheto refresh).docker-compose*.ymlrenamed tocompose*.yml(Compose v2 convention); docs updated.Testing
Verified end to end on Arbitrum mainnet: hello-world paid
/hellocall, tiles 9 tiles paid and stitched, vllm paid chat completion through the OpenAI gateway.Requires livepeer-python-gateway
ja/live-runnerat 89ac0f7 or later; older pins compute payments ~1e6 too large and fail with "numTickets exceeds maximum of 100".