calesthio/OpenMontage · warning · SystemExit

Refusing paid Atlas calls without --allow-paid

Error message

Refusing paid Atlas calls without --allow-paid

What it means

Raised by scripts/atlas_media_smoke.py's run() as SystemExit when the smoke script is invoked without --allow-paid. The script makes real Atlas Cloud calls that cost money, so it refuses to run by default; the flag is an explicit, deliberate opt-in to spending. This is a cost-safety interlock, not a detection of anything wrong with the environment.

Source

Thrown at scripts/atlas_media_smoke.py:167

)


def _result_record(case: dict[str, Any], result: Any) -> dict[str, Any]:
    return {
        "id": case["id"],
        "skill": case["skill"],
        "model": case["model"],
        "success": result.success,
        "error": result.error,
        "artifacts": result.artifacts,
        "cost_usd": result.cost_usd,
        "data": result.data,
    }


def run(project_dir: Path, *, images: bool, videos: bool, allow_paid: bool) -> int:
    if not allow_paid:
        raise SystemExit("Refusing paid Atlas calls without --allow-paid")

    project_dir.mkdir(parents=True, exist_ok=True)
    manifest_path = project_dir / "smoke_manifest.json"
    records: list[dict[str, Any]] = []
    if manifest_path.exists():
        previous = json.loads(manifest_path.read_text(encoding="utf-8"))
        records = [record for record in previous.get("records", []) if record.get("success")]

    def checkpoint() -> None:
        manifest = {
            "provider": "atlascloud",
            "endpoint_policy": "OpenMontage selectors -> Atlas Cloud tools -> Atlas Cloud HTTP API",
            "estimated_batch_cost_usd": 4.844,
            "records": records,
            "success": len({record["id"] for record in records if record["success"]}) == len(IMAGE_CASES) + len(VIDEO_CASES),
        }
        manifest_path.write_text(json.dumps(manifest, indent=2), encoding="utf-8")

View on GitHub (pinned to 95e1c3d0ab)

Solutions

  1. If spending real API credits is intended, rerun with --allow-paid.
  2. If not intended, use the zero-key demo path (render_demo.py) instead — it makes no paid calls.
  3. In CI, gate the --allow-paid invocation behind a job that only runs on demand with credentials and a budget.

Example fix

# shell — before
python scripts/atlas_media_smoke.py --images

# shell — after
python scripts/atlas_media_smoke.py --images --allow-paid
Defensive patterns

Strategy: validation

Validate before calling

if not args.allow_paid:
    raise SystemExit("This suite makes paid Atlas Cloud calls. Rerun with --allow-paid if that is intended.")

Prevention

When it happens

Trigger: Running the smoke script with any subset of its flags (images, videos, project dir) but omitting --allow-paid; wrapper scripts or CI jobs written before the interlock was added.

Common situations: New contributors running the smoke script casually; automated jobs that call the script without updating the flag; confusion between zero-key demos (which cost nothing) and this paid smoke suite.

Related errors


AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15). Data as JSON: /api/errors/5711653c52f3aeff. Report an issue: GitHub.