From 6f99dc97f77049f793a87013dd3e01117572053e Mon Sep 17 00:00:00 2001 From: Simo Lin Date: Thu, 11 Dec 2025 07:42:47 -0800 Subject: [PATCH] [model-gateway] fix imports and delete unused code (#14911) --- sgl-model-gateway/src/core/workflow/steps/mcp_registration.rs | 4 ---- sgl-model-gateway/src/core/workflow/steps/worker_removal.rs | 4 +--- sgl-model-gateway/src/core/workflow/types.rs | 3 --- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/sgl-model-gateway/src/core/workflow/steps/mcp_registration.rs b/sgl-model-gateway/src/core/workflow/steps/mcp_registration.rs index fd386f43d..f7024bead 100644 --- a/sgl-model-gateway/src/core/workflow/steps/mcp_registration.rs +++ b/sgl-model-gateway/src/core/workflow/steps/mcp_registration.rs @@ -97,8 +97,6 @@ pub struct DiscoverMcpInventoryStep; #[async_trait] impl StepExecutor for DiscoverMcpInventoryStep { async fn execute(&self, context: &mut WorkflowContext) -> WorkflowResult { - use rmcp::{service::RunningService, RoleClient}; - let config_request: Arc = context.get_or_err("mcp_server_config")?; let app_context: Arc = context.get_or_err("app_context")?; @@ -143,8 +141,6 @@ pub struct RegisterMcpServerStep; #[async_trait] impl StepExecutor for RegisterMcpServerStep { async fn execute(&self, context: &mut WorkflowContext) -> WorkflowResult { - use rmcp::{service::RunningService, RoleClient}; - let config_request: Arc = context.get_or_err("mcp_server_config")?; let app_context: Arc = context.get_or_err("app_context")?; diff --git a/sgl-model-gateway/src/core/workflow/steps/worker_removal.rs b/sgl-model-gateway/src/core/workflow/steps/worker_removal.rs index 59e9607cf..325029614 100644 --- a/sgl-model-gateway/src/core/workflow/steps/worker_removal.rs +++ b/sgl-model-gateway/src/core/workflow/steps/worker_removal.rs @@ -9,7 +9,7 @@ //! 3. RemoveFromWorkerRegistry - Remove workers from worker registry //! 4. UpdateRemainingPolicies - Update cache-aware policies for remaining workers -use std::{collections::HashSet, sync::Arc}; +use std::{collections::HashSet, sync::Arc, time::Duration}; use async_trait::async_trait; use tracing::{debug, info}; @@ -239,8 +239,6 @@ impl StepExecutor for UpdateRemainingPoliciesStep { /// Create a worker removal workflow definition pub fn create_worker_removal_workflow() -> WorkflowDefinition { - use std::time::Duration; - WorkflowDefinition::new("worker_removal", "Remove worker from router") .add_step( StepDefinition::new( diff --git a/sgl-model-gateway/src/core/workflow/types.rs b/sgl-model-gateway/src/core/workflow/types.rs index 90739d00a..7eb55fe0b 100644 --- a/sgl-model-gateway/src/core/workflow/types.rs +++ b/sgl-model-gateway/src/core/workflow/types.rs @@ -269,9 +269,6 @@ pub enum WorkflowError { #[error("Context value not found: {0}")] ContextValueNotFound(String), - - #[error("Context value type mismatch: {0}")] - ContextTypeMismatch(String), } pub type WorkflowResult = Result;