vllm.plugins ¶
Modules:
Functions:
-
load_endpoint_plugins–Discover, gate and instantiate
vllm.endpoint_pluginsentry points. -
load_general_plugins–WARNING: plugins can be loaded for multiple times in different
-
load_plugins_by_group–Load plugins registered under the given entry point group.
load_endpoint_plugins(supported_tasks=None) ¶
Discover, gate and instantiate vllm.endpoint_plugins entry points.
Endpoint plugins add HTTP routes to the API server, so they default to not loading. Unlike other plugin groups, a plugin here is only considered when it is explicitly named in VLLM_PLUGINS. This is a stricter posture than load_plugins_by_group which "load everything unless an allowlist says otherwise". This posture is taken to handle potentially larger exposed network surface.
A discovered plugin is loaded only if both hold
- it is named in
VLLM_PLUGINS(enforced by not calling the loader at all whenVLLM_PLUGINSis unset). Note thatVLLM_PLUGINS=""parses to[""], notNone, so it is treated as a (non strict) allowlist that matches no plugin name, not as "unset". - its
required_tasksisNoneor intersectssupported_tasks.
Parameters:
-
(supported_tasks¶tuple[SupportedTask, ...] | None, default:None) –Tasks the server supports.
Nonemeans no plugin with a nonNonerequired_taskswill be loaded.
Returns:
-
list[EndpointPlugin]–Instantiated plugins that passed gating in discovery order.
Source code in vllm/plugins/__init__.py
load_general_plugins() ¶
WARNING: plugins can be loaded for multiple times in different processes. They should be designed in a way that they can be loaded multiple times without causing issues.
Source code in vllm/plugins/__init__.py
load_plugins_by_group(group) ¶
Load plugins registered under the given entry point group.