Skip to content

Add DNS-AID SVCB resolver for cloud endpoint discovery#18570

Open
IngmarVG-IB wants to merge 1 commit intopytorch:mainfrom
IngmarVG-IB:feat/dns-aid-resolver
Open

Add DNS-AID SVCB resolver for cloud endpoint discovery#18570
IngmarVG-IB wants to merge 1 commit intopytorch:mainfrom
IngmarVG-IB:feat/dns-aid-resolver

Conversation

@IngmarVG-IB
Copy link
Copy Markdown

@IngmarVG-IB IngmarVG-IB commented Mar 30, 2026

Summary

Adds a dns_aid resolver module to extension/llm/ enabling ExecuTorch edge agents to resolve cloud inference endpoints (vLLM, Ray Serve, remote MCP servers) via DNS-AID SVCB lookups (RFC 9460) rather than hard-coded URLs.

  • DnsAidResolver.resolve() queries the _agents subdomain and returns (host, port) of the best-matching endpoint
  • Optional min_context_len capability filter for endpoints publishing context_len:<int> capabilities
  • Falls back to a static fallback_url when no SVCB records are found
  • Zero overhead when dns-aid is not installed (lazy import guard — DnsAidResolverConfig works standalone)
  • Client-only: ExecuTorch does not publish DNS records

New files:

  • extension/llm/dns_aid/ — resolver module (config.py, resolver.py, __init__.py)
  • extension/llm/dns_aid/test_dns_aid_resolver.py — 9 unit tests
  • docs/llm/dns_aid.md — usage guide

Modified:

  • pyproject.toml — adds [project.optional-dependencies] entry: pip install executorch[dns-aid]

Test plan

  • python -m pytest extension/llm/dns_aid/test_dns_aid_resolver.py -v — 9/9 pass
  • Verified DnsAidResolverConfig importable without dns-aid installed
  • Verified DnsAidResolver() raises helpful ImportError without dns-aid
  • Verified resolve_sync() raises clear error when called inside a running event loop
  • Formatted with black; flake8 clean

cc @larryliu0820 @mergennachin @cccclai @helunwencser @jackzhxng

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Mar 30, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18570

Note: Links to docs will display an error until the docs builds have been completed.

❌ 11 Awaiting Approval, 1 Cancelled Job

As of commit fb1a0d9 with merge base 502d2de (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

CANCELLED JOB - The following job was cancelled. Please retry:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 30, 2026
@IngmarVG-IB
Copy link
Copy Markdown
Author

@pytorchbot label "release notes: none"

@pytorch-bot pytorch-bot bot added the release notes: none Do not include this in the release notes label Mar 30, 2026
@IngmarVG-IB
Copy link
Copy Markdown
Author

@pytorchbot label "release notes: misc"

@pytorch-bot pytorch-bot bot added the release notes: misc Miscellaneous label Mar 30, 2026
@nil-is-all nil-is-all added module: extension Issues related to code under extension/ module: llm Issues related to LLM examples and apps, and to the extensions/llm/ code labels Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: extension Issues related to code under extension/ module: llm Issues related to LLM examples and apps, and to the extensions/llm/ code release notes: misc Miscellaneous release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants