[router] grpc router bootstraps (#9759)

This commit is contained in:
Simo Lin
2025-08-28 12:07:06 -07:00
committed by GitHub
parent fce7ae33f8
commit 5343058875
14 changed files with 366 additions and 20 deletions

View File

@@ -12,10 +12,9 @@ use std::fmt::Debug;
use crate::protocols::spec::{ChatCompletionRequest, CompletionRequest, GenerateRequest};
pub mod factory;
pub mod grpc;
pub mod header_utils;
pub mod pd_router;
pub mod pd_types;
pub mod router;
pub mod http;
pub use factory::RouterFactory;
@@ -77,6 +76,10 @@ pub trait RouterTrait: Send + Sync + Debug + WorkerManagement {
body: &CompletionRequest,
) -> Response;
async fn route_embeddings(&self, headers: Option<&HeaderMap>, body: Body) -> Response;
async fn route_rerank(&self, headers: Option<&HeaderMap>, body: Body) -> Response;
/// Flush cache on all workers
async fn flush_cache(&self) -> Response;