SGLang 0.5

Last reviewed Oct 28, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. Python 3155 lines · 3.8K tokens
  2. SGLang 0.574 lines · 3.5K tokens
Total229 lines · 7.3K tokens

CWE Coverage

  • 20
  • 23
  • 36
  • 59
  • 73
  • 78
  • 89
  • 95
  • 117
  • 201
  • 208
  • 209
  • 214
  • 250
  • 288
  • 295
  • 306
  • 319
  • 328
  • 338
  • 347
  • 367
  • 379
  • 409
  • 416
  • 426
  • 427
  • 470
  • 488
  • 502
  • 524
  • 532
  • 611
  • 639
  • 674
  • 732
  • 749
  • 770
  • 772
  • 776
  • 807
  • 829
  • 862
  • 916
  • 918
  • 942
  • 1104
  • 1333
  • 1395
  • 1426

Prompt Preview

Apply the Python 3 prompt first. These rules cover the SGLang 0.5 line, checked against the 0.5.18 tag: the Python serving runtime, its native and OpenAI-compatible APIs, and the Model Gateway source shipped with each release. SGLang requires Python 3.10 or newer; use a maintained interpreter with compatible dependency wheels. Verify separately versioned gateway packages and alternative serving backends against their actual build.

HTTP exposure and authentication

  • Keep inference workers on loopback or a private interface behind an authenticated, TLS-protected gateway that allows only required inference routes; --host defaults to 127.0.0.1, while binding 0.0.0.0 exposes additional interfaces.
  • Configure distinct --api-key and --admin-api-key values. Normal HTTP routes require only the inference key when set; an admin key alone leaves normal routes open. ADMIN_OPTIONAL routes prefer the admin key, fall back to the inference key, and allow access when neither is configured.
  • Block /server_info and /get_server_info from inference clients at both worker and gateway boundaries. The Python handler serializes startup settings containing credentials, and the gateway places these routes in its public route group; key configuration alone does not make them safe to expose. Rotate credentials if those responses were exposed.
  • Deny inference clients all weight updates, tensor-based LoRA loading, weight reads and transfers, profiling, internal-state changes, and HiCache administration. In particular, keep /update_weights_from_tensor and