vllm - ✅(Solved) Fix feat: DNS-AID SVCB endpoint capability advertisement [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#38511Fetched 2026-04-08 01:53:43
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #38513: feat(serving): DNS-AID SVCB endpoint registration

Description (problem / solution / changelog)

Summary

Closes #38511

When --dns-aid-enabled is set, the vLLM OpenAI-compatible server publishes a DNS-AID SVCB ServiceMode record on startup encoding model capabilities. This enables AI agents implementing the DNS-AID standard (RFC 9460 SVCB/HTTPS profile) to discover vLLM endpoints via DNS without a bootstrap API call.

  • Opt-in: disabled by default, no behavior change for existing deployments
  • Optional dependency: pip install vllm[dns-aid]
  • Rank-aware: only global rank 0 registers in TP/PP/DP configurations
  • Graceful lifecycle: registers after socket bind, deregisters on SIGTERM/ASGI shutdown

Published hints

HintSource
modelmodel_config.model
context_lenmodel_config.max_model_len
quantmodel_config.quantization or "none"
max_batchscheduler_config.max_num_seqs
framework"vllm"
api_base"/v1"

Files changed

FileChange
vllm/entrypoints/dns_aid.pyNew — registration lifecycle helper
vllm/entrypoints/openai/cli_args.pyAdd --dns-aid-enabled, --dns-aid-name, --dns-aid-zone
vllm/entrypoints/openai/server_utils.pyWire register/deregister into ASGI lifespan
setup.pyAdd dns-aid optional dependency
tests/entrypoints/test_dns_aid.pyNew — unit tests (all dns_aid calls mocked)
docs/serving/dns_aid.mdNew — usage guide

Test plan

  • ruff check and ruff format pass on all changed files
  • pytest tests/entrypoints/test_dns_aid.py -v — 25 unit tests covering all guard paths, happy path, error resilience, label truncation
  • Server starts normally without --dns-aid-enabled (no import, no side effects)
  • Server starts with --dns-aid-enabled but without dns-aid installed — logs warning, continues serving
  • python -m vllm.entrypoints.openai.api_server --help | grep dns-aid shows all 3 flags

Changed files

  • docs/serving/dns_aid.md (added, +140/-0)
  • setup.py (modified, +2/-0)
  • tests/entrypoints/test_dns_aid.py (added, +327/-0)
  • vllm/entrypoints/dns_aid.py (added, +235/-0)
  • vllm/entrypoints/openai/cli_args.py (modified, +11/-0)
  • vllm/entrypoints/openai/server_utils.py (modified, +16/-0)

Code Example

vllm serve meta-llama/Llama-3-70b-instruct \
  --dns-aid-enabled \
  --dns-aid-zone agents.example.internal

---

_meta-llama-llama-3-70b-instruct._agents.agents.example.internal  SVCB 1 serve.example.internal (
    alpn="h2" port=8000
    model="meta-llama/Llama-3-70b-instruct"
    context_len="131072" quant="fp8" max_batch="256"
    framework="vllm" api_base="/v1"
)
RAW_BUFFERClick to expand / collapse

Motivation

When deploying multiple vLLM instances (different models, quantizations, context windows), consuming AI agents currently need to know each endpoint URL in advance and call /v1/models to discover capabilities. This adds a bootstrap dependency and doesn't scale well with dynamic infrastructure.

Proposal

Add opt-in DNS-AID (RFC 9460 SVCB profile) support: when --dns-aid-enabled is set, vLLM publishes a DNS SVCB record on startup encoding model name, context window, quantization, max batch size, and transport. AI agents can then discover vLLM endpoints via a single DNS lookup.

Key properties:

  • Opt-in: disabled by default, zero behavior change for existing deployments
  • Optional dependency: pip install vllm[dns-aid]
  • Only global rank 0 registers in TP/PP configurations
  • Graceful deregistration on SIGTERM and ASGI shutdown

Example

vllm serve meta-llama/Llama-3-70b-instruct \
  --dns-aid-enabled \
  --dns-aid-zone agents.example.internal

Publishes:

_meta-llama-llama-3-70b-instruct._agents.agents.example.internal  SVCB 1 serve.example.internal (
    alpn="h2" port=8000
    model="meta-llama/Llama-3-70b-instruct"
    context_len="131072" quant="fp8" max_batch="256"
    framework="vllm" api_base="/v1"
)

Scope

  • New file: vllm/entrypoints/dns_aid.py (registration lifecycle)
  • Modified: cli_args.py (3 new flags), server_utils.py (lifespan hook), setup.py (optional dep)
  • Tests and docs included

I have an implementation ready and can open a PR once there's interest. Happy to adjust the approach based on maintainer feedback.

extent analysis

Fix Plan

To implement DNS-AID support in vLLM, follow these steps:

  • Install the optional dependency: pip install vllm[dns-aid]
  • Enable DNS-AID support by setting the --dns-aid-enabled flag when running vllm serve
  • Specify the DNS zone using the --dns-aid-zone flag

Example code:

# vllm/entrypoints/dns_aid.py
import dns.resolver

def register_dns_aid(model_name, context_window, quantization, max_batch_size, transport):
    # Create SVCB record
    record = f"_meta-{model_name}._agents.{dns_zone}  SVCB 1 {transport} ({get_svcb_params(model_name, context_window, quantization, max_batch_size)})"
    # Register record using DNS resolver
    dns.resolver.resolve(record, "SVCB")

def get_svcb_params(model_name, context_window, quantization, max_batch_size):
    return f"alpn=h2 port=8000 model={model_name} context_len={context_window} quant={quantization} max_batch={max_batch_size} framework=vllm api_base=/v1"

# server_utils.py
import atexit

def lifespan_hook():
    # Register DNS-AID on startup
    register_dns_aid(model_name, context_window, quantization, max_batch_size, transport)
    # Deregister on shutdown
    atexit.register(deregister_dns_aid)

# cli_args.py
import argparse

parser = argparse.ArgumentParser()
parser.add_argument("--dns-aid-enabled", action="store_true")
parser.add_argument("--dns-aid-zone", type=str)

Verification

To verify that the fix worked, check that the DNS SVCB record is correctly published and can be resolved by AI agents. Use tools like dig or dns.resolver to test the record.

Extra Tips

  • Make sure to handle errors and exceptions properly when registering and deregistering DNS-AID records.
  • Consider adding logging and monitoring to track DNS-AID registration and resolution issues.
  • Review the implementation for security and scalability concerns, such as ensuring that only authorized agents can resolve the DNS SVCB record.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING