Skip to content

Connection billing, subscription routing, and usage (0.4.0) - #17

Merged
BitL8-ByteShort merged 16 commits into
mainfrom
codex/connection-billing-usage
Sep 12, 2026
Merged

BitL8-ByteShort merged 16 commits into
mainfrom
codex/connection-billing-usage

Conversation

@BitL8-ByteShort

@BitL8-ByteShort BitL8-ByteShort commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Connecting a subscription-backed model could show “Available” alongside “Unknown — Blocked” because public API pricing was being used as the access gate. Empty SDK-default endpoints and provider-owned authentication transports also caused identity conflicts.

This 0.4.0 change separates configured connection access, billing evidence, public prices, and recorded usage:

  • Configured Paid policy permits eligible loaded connections when public estimates are unavailable. Free policy still requires verified zero-price evidence. Existing Paid users retain legacy verified-price behavior until explicitly adopting configured Paid access.
  • Empty SDK-default URLs are treated as unspecified; custom endpoints cannot inherit another route's prices. Provider-owned authentication fetch is supported without a subscription-to-API fallback. Revoked, missing, or changed explicit bindings stop dispatch.
  • The panel exposes connection billing declarations and provenance, exact role bindings, quota when reported, and historical captured usage grouped by billing kind, binding, and currency. Missing values remain unreported. Refresh and conflicts preserve drafts.
  • Planner and MCP reload connection evidence. New explicit pins, binding edits, and billing declarations require current connection revisions. Historical assistant usage is immutable, queued work and retention are bounded, and host disposal flushes pending accounting with a deadline.
  • Settings schema 4 and managed surface 3 preserve disabled models and requested pins. Plugin upgrades retain the explicit Connect/update and restart boundary. Exact public 0.3.0 Free/Paid migration checks cover private backups and guarded update/recovery; 0.2.1 coverage remains.

Final pre-merge review added per-model route fingerprints for mixed-endpoint providers. Endpoint/SDK changes and swaps invalidate pins and retained repairs, and discard old quota. Homogeneous shared-endpoint additions remain stable. Two independent reviews assessed the original issue and the resulting fix; no unresolved blockers remain.

Local full verification for 060320f: 348 tests passed with zero failures/skips, plus type check and production build on Node 24.14.0 with exact OpenCode 1.18.22. Fresh CI run 34688494703 passed all source, package, and four OS/Node acceptance jobs for this head. CodeQL also passed. Historical candidate CI 34304377304 passed the four OS/Node combinations but predates this correction; its tarball will not be published.

Merged through protected main as 942a94c5eb354da877b22ddc6eb37b098a598f7c with DCO sign-offs. Final artifact CI 34688784337 passed all seven jobs, including Linux/macOS × Node 22.12.0/24.x acceptance. Main CodeQL passed.

Published npm 0.4.0 and immutable GitHub v0.4.0 on 2026-09-12. The release tag resolves to the merge commit. One final tarball was built and published to both channels: SHA-256 1ee2d3ab864f2615ec3f8c750a400694ac8587129bdef78b0d1b275793f0828b.

Public verification completed: independent credential-free npm and GitHub downloads match the final bytes; npm SHA-512/SHA-1 integrity also matches. A fresh version-pinned npm install reports 0.4.0 and matches all 83 package files. Each public download separately passed full installed-package acceptance on Linux / Node 24.14.0: OpenCode 1.18.22 and 1.18.28 each passed 20 scenarios / 57 loopback requests; browser 14/14; 0.3.0 Free/Paid migration, private backups, guarded updates, restart, disconnect, and recovery passed. Zero real-provider inference requests. Release assets contain the four-way final acceptance and public npm evidence; this receipt records the subsequent public GitHub acceptance.

Limits: synthetic loopback credentials and transports do not prove any real account's entitlement. Opaque host transports are host-managed; quota and unreported token semantics are not invented. Captured history is partial and is not added to aggregate host costs. Final-artifact and public-download gates passed; real-account entitlement remains outside synthetic acceptance.

Raw '', absent, and null provider URLs are unspecified SDK defaults
instead of invalid identity. Public rates still require an exact
provider/model/endpoint match, so a missing public URL cannot certify
a custom gateway and CLI cost cannot override a route mismatch.

Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
Persist nonsecret connection identities per configured host slot.
Existing Paid settings migrate to verified-pricing so unpriced
routes are not newly authorized without an explicit adoption.

Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
Unknown public prices no longer block a configured paid route after
the user adopts configured-connections. Free and migrated verified-
pricing Paid keep the previous verified-price gate.

Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
OpenCode subscription auth loaders attach an opaque fetch. Allow it
on provider options when Paid policy is active and the exact model
binding matches. Task and model route overrides stay rejected.

Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
Report tokens separately from OpenCode-recorded cost, keep missing
values null, and store private HMAC attribution. The panel splits
connection, access, and pricing, and existing Paid users must adopt
configured-connection access. Bump package 0.4.0 and managed surface 3.

Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
Repair keeps the original connection ID/revision and stops before a
provider call if billing binding changes. Browser and package
acceptance now expect settings schema 4 and managed surface 3.

Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
…etch

Observe connections during catalog refresh, block revoked or missing
pinned connections at eligibility and dispatch, complete HMAC usage
records after successful owned replies, and add a host scenario that
attaches an auth-loader-shaped fetch on Paid routes.

Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
Live observation no longer clears reported-revoked. Host acceptance
requires the auth-loader fetch wrapper to handle the provider request.
Attribution waits for completion instead of a timer, and packaged
acceptance expects 20 host scenarios.

Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
Host acceptance now stores synthetic omctest OAuth and requires the
plugin auth-loader fetch to stamp every provider request. Routing
completion updates workflow state before queued attribution writes.

Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
Signed-off-by: Chris <51251284+BitL8-ByteShort@users.noreply.github.com>
@BitL8-ByteShort
BitL8-ByteShort merged commit 942a94c into main Sep 12, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant