From 47ad0ebe0a754fa45a962202e1251105b5256adf Mon Sep 17 00:00:00 2001 From: Rob Ballantyne Date: Tue, 12 May 2026 11:40:51 +0100 Subject: [PATCH] Add --instance flag to null pyworker client Lets the demo target run-alpha.vast.ai (or candidate/local) without editing code. Defaults to prod; respects VAST_INSTANCE env var. Co-Authored-By: Claude Opus 4.7 (1M context) --- workers/null/client.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/workers/null/client.py b/workers/null/client.py index bf7c752..4b255fc 100644 --- a/workers/null/client.py +++ b/workers/null/client.py @@ -169,6 +169,12 @@ def build_arg_parser() -> argparse.ArgumentParser: f"session lands without queueing (default: {DEFAULT_SESSION_COST})" ), ) + p.add_argument( + "--instance", + choices=("prod", "alpha", "candidate", "local"), + default=os.environ.get("VAST_INSTANCE", "prod"), + help="Vast serverless instance to target (default: prod)", + ) return p @@ -176,11 +182,11 @@ async def main_async(): args = build_arg_parser().parse_args() print("=" * 60) - print(f"Endpoint: {args.endpoint}") + print(f"Endpoint: {args.endpoint} (instance: {args.instance})") print("=" * 60) try: - async with Serverless() as client: + async with Serverless(instance=args.instance) as client: if args.demo: await run_demo( client,