refactor(open_router): call elimination routing of open router if enabled instead of dynamo (#7961)

This commit is contained in:
Chethan Rao
2025-05-12 19:16:08 +05:30
committed by GitHub
parent 2cefac5cb3
commit bab64eefa7
6 changed files with 209 additions and 167 deletions

View File

@ -643,6 +643,17 @@ impl DynamicRoutingAlgorithmRef {
self.dynamic_routing_volume_split = volume
}
pub fn is_success_rate_routing_enabled(&self) -> bool {
self.success_based_algorithm
.as_ref()
.map(|success_based_routing| {
success_based_routing.enabled_feature
== DynamicRoutingFeatures::DynamicConnectorSelection
|| success_based_routing.enabled_feature == DynamicRoutingFeatures::Metrics
})
.unwrap_or_default()
}
pub fn is_elimination_enabled(&self) -> bool {
self.elimination_routing_algorithm
.as_ref()