mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	refactor(dynamic_routing): add support for shuffle on tie flag to success_based routing (#8241)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		| @ -1016,6 +1016,7 @@ impl Default for SuccessBasedRoutingConfig { | ||||
|                 }), | ||||
|                 specificity_level: SuccessRateSpecificityLevel::default(), | ||||
|                 exploration_percent: Some(20.0), | ||||
|                 shuffle_on_tie_during_exploitation: Some(false), | ||||
|             }), | ||||
|             decision_engine_configs: None, | ||||
|         } | ||||
| @ -1044,6 +1045,7 @@ pub struct SuccessBasedRoutingConfigBody { | ||||
|     #[serde(default)] | ||||
|     pub specificity_level: SuccessRateSpecificityLevel, | ||||
|     pub exploration_percent: Option<f64>, | ||||
|     pub shuffle_on_tie_during_exploitation: Option<bool>, | ||||
| } | ||||
|  | ||||
| #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, ToSchema)] | ||||
| @ -1173,6 +1175,9 @@ impl SuccessBasedRoutingConfigBody { | ||||
|         if let Some(exploration_percent) = new.exploration_percent { | ||||
|             self.exploration_percent = Some(exploration_percent); | ||||
|         } | ||||
|         if let Some(shuffle_on_tie_during_exploitation) = new.shuffle_on_tie_during_exploitation { | ||||
|             self.shuffle_on_tie_during_exploitation = Some(shuffle_on_tie_during_exploitation); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Chethan Rao
					Chethan Rao