mirror of
https://github.com/HeyPuter/puter.git
synced 2026-10-26 16:50:46 +00:00
Mocks the replicate SDK and util/secureHttp at the module boundary (real network egress points), boots a real PuterServer for the wired MeteringService. Covers construction (missing-key throw), model catalog (flux-schnell default + verbatim list), test_mode bypass, prompt validation, the credit gate (402 before SDK), per-image billing (replicateId routing, aspect_ratio gcd formatting, single-output metering, string vs array output extraction, missing URL → 400), megapixel billing (run + output_mp batched components), the param-aliasing/transform/filter machinery (drops disallowed keys, renames steps→num_inference_steps + response_format→output_format, injects go_fast=true default for flux-2-dev, appends ' MP' suffix to flux-2-pro resolution), and the costs_go_fast pricing branch. closes #2986