passthrough / apassthrough check api_base from start to finish, so a public hostname canβt be pointed at an internal address when the connection is made.
The guard runs on the direct HTTP path: when the installed
litellm has no llm_passthrough_route, passthrough sends the request itself, and that path validates api_base. Other LLM and embedding calls are unaffected.Quick Start
1
Public endpoint β works
2
Localhost β rejected
How it works
- The
api_basehostname is resolved, and every A/AAAA record is checked. A public A record cannot hide a private AAAA record. - If any address is in a restricted class, the call raises
ValueErrorbefore anything is sent. - The connection is pinned to the checked IP. The
Hostheader and TLS SNI keep the original hostname, so DNS rebinding at connect time is blocked. - In
apassthrough, DNS resolution runs in a worker thread (asyncio.to_thread), so the event loop is not blocked.
Rejected address classes
Only
http and https schemes are accepted.
Error shape
Every error message starts withapi_base URL, so you can filter logs for it:
Can I point passthrough at a local Ollama or vLLM server?
Can I point passthrough at a local Ollama or vLLM server?
Not through this direct path. The block is intentional. Use the regular LLM integration for local model servers.
Is this the same check used for webhooks?
Is this the same check used for webhooks?
Yes. It reuses the same resolve-and-screen helper as job webhook URLs (
praisonai.jobs.models).Related
Capabilities
All LiteLLM-backed capabilities, including
passthrough.Robustness
Connection pooling and other wrapper guarantees.

