Commit Graph

3 Commits

Author SHA1 Message Date
john 441ba155cc Bill H5 usage by upstream cost × margin, not flat token rate
Flat 2分/1k input overcharged the DeepSeek relay ~20x (verified on 100:
H5-charged / goose accumulated_cost stayed at ~20x across every session).
The flat rate is decoupled from real provider cost, so it overcharges
cheap providers and would underbill expensive ones.

Extend the H5_USE_BACKEND_COST path with H5_MARGIN_MULTIPLIER: charge
upstream accumulated_cost(USD) × rate × margin, which tracks the provider
automatically. Falls back to the token path when the upstream omits
accumulatedCost, so the change is safe to ship dormant.

See docs/h5-metering-gateway.md for the metering-gateway design.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 14:25:47 +08:00
John 79457230c1 Improve MindSpace visual editor UX and default RMB billing.
Add color-coded edit highlights with an in-preview legend, strip CSP meta
for srcdoc editing, and simplify fullscreen preview to immersive visual edit
only. Default billing to CNY token rates unless H5_USE_BACKEND_COST=1.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 00:59:28 -07:00
John 2e14873f2d Initial commit: Memind H5 portal with MindSpace, Plaza, and agent jobs.
Track application source and tests; exclude local env, user workspaces, and runtime data via .gitignore.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 15:04:43 -07:00