vllm_omni.config.endpoint_policy ¶
Endpoint restriction policy for omni pipelines.
EndpointRestriction dataclass ¶
OmniServingCapability ¶
Bases: Enum
Serving capabilities that pipelines can shut down.
COMPLETIONS class-attribute instance-attribute ¶
COMPLETIONS = RouteTarget(
"/v1/completions", frozenset({"POST"})
)
IMAGE_EDITS class-attribute instance-attribute ¶
IMAGE_EDITS = RouteTarget(
"/v1/images/edits", frozenset({"POST"})
)
RouteTarget ¶
build_rejection_handler ¶
build_rejection_handler(reason: str)
Build a rejection handler for a given endpoint for the provided reason.
shutdown_unsupported_routes ¶
shutdown_unsupported_routes(
app: FastAPI,
endpoint_restrictions: tuple[EndpointRestriction, ...],
)
Given an initialized FastAPI server instance and a set of model specific endpoint restrictions, remove the restricted routes and patch a handler that returns 400.