Skip to main content

RunPod vLLM Deployer

Python 3.11+ Apache-2.0 skills.sh

Spin up and tear down OpenAI-compatible vLLM servers on RunPod GPU Pods without leaking GPU bills or debugging 502 startup errors.

A lightweight Python CLI (httpx + typer, zero daemon, zero SSH) and portable AI Agent Skill built for RunPod REST API v2. Plan offline, confirm before anything billable, verify /health + /v1/models + a deterministic chat smoke test, and confirm the Pod is actually gone before local state is removed.

Project Site | Quickstart | Configuration | Security Model | Agent Skill

Billing note: RunPod GPU Pods are billable until terminated. Review RunPod's live GPU pricing before confirming a deploy.


Why this exists

Deploying vLLM on RunPod Pods by hand or letting an AI coding agent run raw API calls usually breaks in two ways:

  1. You spin up a Pod you did not mean to, or lose track of one that is still billing.
  2. RunPod reports RUNNING while vLLM is still downloading weights, so requests hit HTTP 502 on .proxy.runpod.net or fail later on bad vLLM flags.

runpod-vllm closes both gaps with a strict five-step lifecycle (plan -> deploy -> wait -> smoke-test -> destroy):

  • Offline planning first: plan validates every flag (model ID, GPU profile, tensor-parallel divisibility, disk/RAM/context bounds, non-latest image tag) and prints the exact redacted RunPod REST payload with no API key and no network call.
  • Approval gates before spend or teardown: Only deploy creates a billable Pod and only destroy deletes one. Both prompt interactively unless you explicitly pass --yes.
  • Teardown-first atomic state: Immediately after POST /pods returns a Pod ID, the CLI writes .runpod-vllm-state.json atomically with mode 0600 (never storing credentials). If creation times out, returns 5xx, or state saving fails, it never blindly retries the billable POST and prints an explicit recovery command.
  • Verified readiness and teardown: wait polls both /health and /v1/models, smoke-test sends a deterministic 4-token /v1/chat/completions request, and destroy polls RunPod until HTTP 404 or TERMINATED before deleting local state.
  • RunPod REST v2 native + 429 retries: Automatically targets RunPod REST API v2 (https://api.runpod.io/v2) following the 2026-11-15 v1 retirement, migrates older v1 state files on status/destroy, and retries HTTP 429 responses with Retry-After / jittered exponential backoff.
  • Built for humans and AI agents: Ships a portable Agent Skill and Claude Code project skill with hard safety boundaries and stable exit codes (0 OK, 2 Usage, 3 Config, 4 Auth, 5 Network, 6 API, 7 Timeout, 8 State).

Try it offline in 30 seconds

No RUNPOD_API_KEY required. Validate a config and inspect the exact RunPod REST v2 payload before spending a cent:

runpod-vllm plan \
  --model Qwen/Qwen3-8B \
  --gpu A40 \
  --max-model-len 8192

Example output (offline; no API call):

{
  "cloud": "SECURE",
  "disk": 50,
  "entrypoint": [
    "vllm",
    "serve",
    "Qwen/Qwen3-8B",
    "--host",
    "0.0.0.0",
    "--port",
    "8000",
    "--tensor-parallel-size",
    "1",
    "--max-model-len",
    "8192",
    "--gpu-memory-utilization",
    "0.9",
    "--dtype",
    "auto",
    "--kv-cache-dtype",
    "auto"
  ],
  "env": {},
  "gpu": {
    "count": 1,
    "id": "NVIDIA A40",
    "minRamPerGpu": 16,
    "minVcpuCountPerGpu": 4
  },
  "image": "vllm/vllm-openai:v0.19.1",
  "mounts": {
    "persistent": {
      "path": "/workspace",
      "size": 40
    }
  },
  "name": "vllm-server",
  "ports": [
    "8000/http"
  ]
}

Installation

Python 3.11 or newer is required.

Release wheel (v0.1.0)

Each release on the Releases page includes a wheel and source distribution:

python -m pip install https://github.com/1solomonwakhungu/runpod-vllm-deployer/releases/download/v0.1.0/runpod_vllm_deployer-0.1.0-py3-none-any.whl
runpod-vllm --help

PyPI (once published)

python -m pip install runpod-vllm-deployer
# Or run offline planning with uvx without creating a virtualenv:
uvx --from runpod-vllm-deployer runpod-vllm plan --model Qwen/Qwen3-8B --gpu A40

From source

git clone https://github.com/1solomonwakhungu/runpod-vllm-deployer.git
cd runpod-vllm-deployer
python3 -m venv .venv
source .venv/bin/activate
python -m pip install .
runpod-vllm --help

For development, run make setup instead of python -m pip install ..

Five-minute quickstart

  1. Create a local .env file (ignored by Git):

    cp .env.example .env
    # Set RUNPOD_API_KEY in .env (and optional HF_TOKEN for gated models).
    
  2. Plan offline (no API key, no network request):

    runpod-vllm plan \
      --model Qwen/Qwen3-8B \
      --gpu A40 \
      --max-model-len 8192
    
  3. Deploy (billable; prompts for confirmation):

    runpod-vllm --env-file .env deploy \
      --model Qwen/Qwen3-8B \
      --gpu A40 \
      --max-model-len 8192
    
  4. Wait for vLLM readiness and run the smoke test:

    runpod-vllm --env-file .env status
    runpod-vllm wait --timeout 900
    runpod-vllm smoke-test
    
  5. Call your OpenAI-compatible endpoint using the Base URL printed by status (https://<POD_ID>-8000.proxy.runpod.net):

    With curl:

    curl https://<POD_ID>-8000.proxy.runpod.net/v1/chat/completions \
      -H "Content-Type: application/json" \
      -d '{
        "model": "Qwen/Qwen3-8B",
        "messages": [{"role": "user", "content": "Hello from RunPod vLLM!"}]
      }'
    

    Or with the Python openai SDK:

    from openai import OpenAI
    
    client = OpenAI(base_url="https://<POD_ID>-8000.proxy.runpod.net/v1", api_key="EMPTY")
    response = client.chat.completions.create(
        model="Qwen/Qwen3-8B", messages=[{"role": "user", "content": "Hello from RunPod vLLM!"}]
    )
    print(response.choices[0].message.content)
    
  6. Tear down and verify the Pod is gone:

    runpod-vllm --env-file .env destroy
    

For unattended runs after reviewing the plan, pass --yes (-y) to deploy or destroy.

How it compares

Approach Setup footprint Offline plan + secret redaction vLLM readiness + smoke test Verified teardown AI Agent Skill
runpod-vllm-deployer 2 Python deps (httpx, typer), zero daemon Yes Yes (/health, /v1/models, chat completion) Yes (polls until 404 or TERMINATED) Yes (skills.sh + Claude Code)
RunPod Web UI / runpodctl Browser or Go CLI No Manual Manual No
SkyPilot / dstack Multi-cloud stack or control-plane server YAML config Custom script Orchestrator-managed No

Use runpod-vllm-deployer when you want a fast, auditable, RunPod-native CLI for ephemeral OpenAI-compatible vLLM Pods without standing up a multi-cloud orchestrator.

Commands

Global options (--state-path, --env-file, --api-url, --api-version) must appear before the subcommand.

Command Network Mutates RunPod Purpose
plan No No Validate configuration and print a redacted payload
deploy Yes Yes, billable Create a GPU Pod and immediately save teardown state
status Yes No Inspect the recorded Pod and display access URLs
wait Yes No Poll /health and /v1/models until ready
smoke-test Yes No Send a four-token deterministic chat request
list Yes No List active GPU Pods
destroy Yes Yes Delete, verify absence, then remove matching state

The default state file is .runpod-vllm-state.json. Pass --state-path PATH before the command to manage multiple Pods from the same directory.

Supported GPUs and configuration

Supported --gpu profiles: A40, L40S, A100 (SXM4 80GB), H100 (80GB HBM3), H200, and B200 (1 to 8 GPUs with validated --tensor-parallel-size).

  • Pinned default image: vllm/vllm-openai:v0.19.1. Override with --image REPOSITORY:TAG (:latest is rejected).
  • vLLM & placement options: --revision, --max-model-len, --gpu-memory-utilization, --dtype, --quantization, --kv-cache-dtype, --trust-remote-code, --reasoning-parser, --container-disk-gb, --volume-gb, --min-vcpu-per-gpu, --min-ram-per-gpu, --cloud-type (SECURE or COMMUNITY), repeatable --data-center, --port, and repeatable --env KEY=VALUE.
  • Sizing note: GPU profiles map to RunPod GPU type IDs and do not guarantee a checkpoint fits. Verify checkpoint VRAM, quantization, KV cache, and tensor-parallel requirements against model and vLLM documentation.

See docs/configuration.md for all flags and examples/ for single-GPU and multi-GPU commands.

RunPod REST API v2

RunPod retired REST API v1 (https://rest.runpod.io/v1) on 2026-11-15. The CLI automatically defaults to REST API v2 (https://api.runpod.io/v2) from that date onward and automatically moves older v1 state files to v2 on status and destroy using the same Pod ID. You can still set --api-version or RUNPOD_API_VERSION explicitly when needed. See docs/configuration.md#runpod-rest-api-version for field mappings.

AI agent skills

Give Claude Code or any Agent Skills-compatible coding agent safe RunPod GPU operations with built-in approval gates:

npx skills add 1solomonwakhungu/runpod-vllm-deployer --skill runpod-vllm-gpu-deploy

This installs the agent instructions, not the Python package. Install runpod-vllm first so the agent can invoke the CLI.

Architecture and security

flowchart LR
    CLI[Typer CLI] --> CFG[Validation and configuration]
    CFG --> PAYLOAD[Payload builder v1/v2]
    CLI --> API[RunPod REST client + 429 retry]
    API --> RUNPOD[RunPod Pods API]
    CLI --> STATE[Atomic 0600 teardown state]
    CLI --> READY[Readiness and smoke checks]
    READY --> VLLM[OpenAI-compatible vLLM endpoint]
  • Credentials are read only from RUNPOD_API_KEY, optional HF_TOKEN, optional VLLM_API_KEY (or --bearer-token-env), or an explicit --env-file.
  • Secrets are never written to state files; plans and network diagnostics redact sensitive keys, bearer tokens, and URL credentials on a best-effort basis.
  • Deep dives: Architecture | Lifecycle Safety | Security | Troubleshooting

Development and testing

No test contacts RunPod. The offline suite exercises mocked HTTP responses, REST v2 cutover, agent skill parity, and lifecycle fault injection (429, 502/503/504, timeouts, and state-save failures).

make setup
make check

Individual targets: make test, make lint, make format, make typecheck. Releases are automated; see RELEASING.md and CHANGELOG.md.

Contributing & License

Contributions are welcome. Read CONTRIBUTING.md and CODE_OF_CONDUCT.md, then run make check before opening a pull request. Report vulnerabilities via SECURITY.md.

Licensed under the Apache License 2.0. Copyright 2026 Solomon Wakhungu.

Metadata

Release files for runpod-vllm-deployer 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for runpod-vllm-deployer 0.2.0
File Size Uploaded Provenance Actions
runpod_vllm_deployer-0.2.0.tar.gz 75.6 kB With provenance Details for runpod_vllm_deployer-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for runpod-vllm-deployer 0.2.0
File Interpreter ABI Platform Actions
runpod_vllm_deployer-0.2.0-py3-none-any.whl Python 3 none any Details for runpod_vllm_deployer-0.2.0-py3-none-any.whl

Total release size: 112.0 kB

Release files / runpod_vllm_deployer-0.2.0.tar.gz

Download URL runpod_vllm_deployer-0.2.0.tar.gz
Size 75.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b1228ce5114f0f950322341980a0bc955020128d1184028b8647eeeb1ff329b0
BLAKE2b-256 checksum
How to use checksums
55003f61801c12b5e4de6b9f52b518ccbce87e15255693cf9de810f95f56608a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / runpod_vllm_deployer-0.2.0-py3-none-any.whl

Download URL runpod_vllm_deployer-0.2.0-py3-none-any.whl
Size 36.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6114f605efa82b0c27017c580c1e66809d5db30769b42a64e2355b4d31e10482
BLAKE2b-256 checksum
How to use checksums
c13747bcd7cf431b90cd496d86a80166e3859c4242c004b452bd80d2920c8d51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for runpod-vllm-deployer 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for runpod_vllm_deployer-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page