Repository navigation
Conversation
The `ic` package gained a builder in 6.0.0 that prices every outcall with version 2 and takes the expectations that narrow its reservation, and a builder for `flexible_http_request`. Every statement that Motoko is version 1 only, or that the expectation setters and flexible outcalls are Rust only, is no longer true. The flexible example gains a Motoko tab, and the cycle costs section now describes one rule for both languages rather than a split. The warning against setting `pricing_version = 2` by hand goes with it: both builders overwrite the field, so it can no longer disagree with the amount attached.
The guide said the two byte expectations are the ones to leave alone, without the exception that matters most: a delivered byte costs about 15 times a downloaded one, so when a transform bounds its own output, declaring that bound is often the largest single saving, and it is the case lowering `max_response_bytes` cannot reach. It also said an under-sized attachment can fail partway without saying what that looks like. None of the four rejects mentions cycles, and the likeliest one is the same message a non-deterministic transform produces, so a reader who hits it has been sent to rewrite the transform instead of the reservation. Also drops a "in Rust" that the Motoko builder made wrong.
Pins .sources/examples to dfinity/examples@33af78a, the merge of dfinity/examples#1490. The HTTPS outcalls guide quotes the Motoko send_http_flexible regions from it, and the Motoko GET and POST regions now show the ic 6.0.0 builder.
|
🤖 Here's your preview: https://dpfyp-oaaaa-aaaam-ahcqa-cai.icp0.io |
There was a problem hiding this comment.
🟡 Changes recommended
The guide still misstates shared-budget behavior and cycle-error semantics and omits the required minimum compiler version.
4 open issues
What changed in this PR
Updates the HTTPS outcall documentation to cover Motoko support for version 2 pricing and flexible outcalls alongside Rust.
Changes:
- Adds Motoko tabs for flexible requests and response reconciliation.
- Updates both pages to describe version 2 pricing through the language wrappers.
- Expands guidance on transformed-response savings and insufficient cycle reservations.
Verified: Checked the reservation and error explanations against the local management-canister reference. Builds and snippet resolution were not rerun.
| File | Description |
|---|---|
docs/guides/backends/https-outcalls.mdx |
Adds Motoko examples and expands pricing and troubleshooting guidance. |
docs/concepts/https-outcalls.md |
Updates wrapper support for version 2 pricing and flexible outcalls. |
Review effort: Balanced
…rement Out of cycles fires once the committee's unspent allowance cannot pay for delivering any response, whether or not the nodes agreed. It is also the one reject that does name cycles. A transform that exceeds its declared output only fails the call when the rest of the budget cannot cover the delivery, and ic 6.0.0 needs moc 2.1.0.
|
🤖 Feedback addressed. All four Copilot comments were right:
|
There was a problem hiding this comment.
🔵 Needs a closer look
Unavailable examples and upstream package sources prevent verification of the new Motoko snippets, version requirements, pricing behavior, and rejection diagnostics, requiring maintainer review.
No open issues 🎉
4 resolved since last review
Review effort: Balanced

Summary
Callbuilder in theicmops package (6.0.0, which needsmoc2.1.0). The guide and the concepts page now describe both languages instead of calling version 2 Rust only.motoko/send_http_flexibleexample..sources/examplesto dfinity/examples@33af78a, the merge of feat(motoko): price HTTPS outcalls with pay-as-you-go pricing examples#1490. The other commits in that range (chore: bump the static-site recipe to v0.4.0 across all examples examples#1486, chore: bump recipes and @icp-sdk packages across all examples examples#1487, fix: drop hardcoded host from HttpAgent options in example frontends examples#1488, fix(cert-var): certify the initial value and relax the freshness check examples#1489) touch no file the docs quote.Verification
npm run buildpasses (Node 24, submodules at their pins), and everysnippet=region resolves.node scripts/validate.jspasses on both changed pages.