vllm.entrypoints.openai.models.serving
¶
Classes:
-
OpenAIModelRegistry–Read-only view of the loaded base models with no engine dependency.
-
OpenAIServingModels–Shared instance to hold data about the loaded base model(s) and adapters.
OpenAIModelRegistry
¶
Read-only view of the loaded base models with no engine dependency.
Suitable for CPU-only / render-only contexts that have no engine client and no LoRA support.
Methods:
-
check_model–Return an ErrorResponse if model_name is not served, else None.
-
show_available_models–Show available models (base models only).
OpenAIServingModels
¶
Shared instance to hold data about the loaded base model(s) and adapters.
Handles the routes: - /v1/models - /v1/load_lora_adapter - /v1/unload_lora_adapter
Methods:
-
init_static_loras–Loads all static LoRA modules.
-
resolve_lora–Attempt to resolve a LoRA adapter using available resolvers.
-
show_available_models–Show available models. This includes the base model and all
init_static_loras()
async
¶
Loads all static LoRA modules. Raises if any fail to load
resolve_lora(lora_name)
async
¶
Attempt to resolve a LoRA adapter using available resolvers.
Parameters:
Returns:
-
LoRARequest | ErrorResponse–LoRARequest if found and loaded successfully.
-
LoRARequest | ErrorResponse–ErrorResponse (404) if no resolver finds the adapter.
-
LoRARequest | ErrorResponse–ErrorResponse (400) if adapter(s) are found but none load.
show_available_models()
async
¶
Show available models. This includes the base model and all adapters.