- Remove Anthropic, Cohere, SageMaker, decisions, structured-decisions, rl, render-launcher and batch entrypoints; keep scale-out token routes - Drop the Swagger static bundle and the /docs, /redoc routes - Delete device-keyed tuning configs for fused_moe, quant utils, mamba select-state and helion; no sm86 entry ever existed for any of them - Remove ten unused rope variants plus the fbgemm_fp8 and fp_quant quantizers and their config, metrics and loader plumbing - Cut the CPU device build: csrc/cpu, cpu_extension.cmake, cpu requirements and the setup.py cpu target path - Delete 29 environment variables nothing reads and 14 chat-template fallbacks for models this fork no longer registers - Remove nine dead CUDA ops (deepseek_v4, kimi_k3, minimax, muse_spark, dsv3 gemm) with their kernels, bindings, wrappers and CMake entries - Delete the connector test suites that targeted removed connectors - Cut the Mistral tokenizer and parser stack, its tests, and the mistral_common and ijson dependency pins - Restore the Qwen4Exp registry rows and nvidia/mtp.py that an earlier cut deleted while keeping the model tree Co-authored-by: Hinata <hinata@idihore.id> Signed-off-by: MOVZX <movzx@yahoo.com>
57 lines
1.7 KiB
Python
57 lines
1.7 KiB
Python
# SPDX-License-Identifier: Apache-2.0
|
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
from argparse import Namespace
|
|
|
|
from fastapi import FastAPI
|
|
|
|
from vllm import envs
|
|
from vllm.config import ModelConfig
|
|
from vllm.tasks import SupportedTask
|
|
|
|
|
|
def register_api_routers(
|
|
args: Namespace,
|
|
app: FastAPI,
|
|
supported_tasks: tuple["SupportedTask", ...],
|
|
model_config: ModelConfig | None = None,
|
|
):
|
|
from vllm.entrypoints.serve import register_vllm_serve_api_routers
|
|
|
|
register_vllm_serve_api_routers(app)
|
|
|
|
from vllm.entrypoints.openai.models.api_router import (
|
|
attach_router as register_models_api_router,
|
|
)
|
|
|
|
register_models_api_router(app)
|
|
|
|
if envs.VLLM_SERVER_DEV_MODE:
|
|
from vllm.entrypoints.serve import register_vllm_dev_api_routers
|
|
|
|
register_vllm_dev_api_routers(app)
|
|
|
|
if "generate" in supported_tasks:
|
|
from vllm.entrypoints.generate.api_router import (
|
|
register_generate_api_routers,
|
|
)
|
|
|
|
register_generate_api_routers(app)
|
|
|
|
from vllm.entrypoints.scale_out.factories import register_scale_out_api_routers
|
|
|
|
register_scale_out_api_routers(app, supported_tasks)
|
|
|
|
if "transcription" in supported_tasks or "realtime" in supported_tasks:
|
|
from vllm.entrypoints.speech_to_text.factories import (
|
|
register_speech_to_text_api_routers,
|
|
)
|
|
|
|
register_speech_to_text_api_routers(app, supported_tasks)
|
|
|
|
if getattr(args, "enable_fault_tolerance", False):
|
|
from vllm.entrypoints.serve.fault_tolerance.api_router import (
|
|
register_fault_tolerance_api_router,
|
|
)
|
|
|
|
register_fault_tolerance_api_router(app)
|