[model-gateway] convert workflow system to type-safe workflow data (#16970)

This commit is contained in:
Simo Lin
2026-01-12 10:06:36 -08:00
committed by GitHub
parent 559ff9ecaf
commit fa51b85466
38 changed files with 1789 additions and 746 deletions
+6 -6
View File
@@ -358,12 +358,12 @@ pub async fn create_test_context(config: RouterConfig) -> Arc<AppContext> {
// Initialize WorkflowEngine and register workflows
use smg::{
core::steps::{create_worker_registration_workflow, create_worker_removal_workflow},
core::steps::{create_local_worker_workflow, create_worker_removal_workflow},
workflow::WorkflowEngine,
};
let engine = Arc::new(WorkflowEngine::new());
engine
.register_workflow(create_worker_registration_workflow(&config))
.register_workflow(create_local_worker_workflow(&config))
.expect("worker_registration workflow should be valid");
engine
.register_workflow(create_worker_removal_workflow())
@@ -491,12 +491,12 @@ pub async fn create_test_context_with_parsers(config: RouterConfig) -> Arc<AppCo
// Initialize WorkflowEngine and register workflows
use smg::{
core::steps::{create_worker_registration_workflow, create_worker_removal_workflow},
core::steps::{create_local_worker_workflow, create_worker_removal_workflow},
workflow::WorkflowEngine,
};
let engine = Arc::new(WorkflowEngine::new());
engine
.register_workflow(create_worker_registration_workflow(&config))
.register_workflow(create_local_worker_workflow(&config))
.expect("worker_registration workflow should be valid");
engine
.register_workflow(create_worker_removal_workflow())
@@ -624,12 +624,12 @@ pub async fn create_test_context_with_mcp_config(
// Initialize WorkflowEngine and register workflows
use smg::{
core::steps::{create_worker_registration_workflow, create_worker_removal_workflow},
core::steps::{create_local_worker_workflow, create_worker_removal_workflow},
workflow::WorkflowEngine,
};
let engine = Arc::new(WorkflowEngine::new());
engine
.register_workflow(create_worker_registration_workflow(&config))
.register_workflow(create_local_worker_workflow(&config))
.expect("worker_registration workflow should be valid");
engine
.register_workflow(create_worker_removal_workflow())