Description
Hyperswitch is adding orchestration-owned preferred-connector routing (juspay/hyperswitch#14412): it remembers the connector behind a customer's last successful interac payment and sends it on the hybrid routing request as the existing optional PaymentInfo.preferredGateway field.
Today that field only influences a decision in the (preferredGateway, dynamicSwitchingEnabled=false) corner — on the V2 path dynamicSwitchingEnabled is synthesized as eligible_list.len() > 1, so with two or more eligible connectors the preference has no effect and SR ranking decides.
Proposed behavior
When a decide request carries preferredGateway and it is present in the post-enforcement functional list:
- front the priority order with it (static order otherwise preserved),
- skip the SR-v3 reorder; multi-objective and volume-commitment post-steps stand down,
- keep outage and elimination scoring fully active — a demoted preferred connector must lose to the next connector in the static order,
- label the decision
PREFERRED_CONNECTOR_ROUTING (downtime variants keep the token so feedback admission survives elimination events),
- leave
update-gateway-score untouched so pinned traffic keeps training success-rate windows and elimination scores.
A preference that is absent or not functional must behave exactly like today's no-preference flow — including not hard-failing the single-entry-list corner.
🤖 Generated with Claude Code
Description
Hyperswitch is adding orchestration-owned preferred-connector routing (juspay/hyperswitch#14412): it remembers the connector behind a customer's last successful interac payment and sends it on the hybrid routing request as the existing optional
PaymentInfo.preferredGatewayfield.Today that field only influences a decision in the
(preferredGateway, dynamicSwitchingEnabled=false)corner — on the V2 pathdynamicSwitchingEnabledis synthesized aseligible_list.len() > 1, so with two or more eligible connectors the preference has no effect and SR ranking decides.Proposed behavior
When a decide request carries
preferredGatewayand it is present in the post-enforcement functional list:PREFERRED_CONNECTOR_ROUTING(downtime variants keep the token so feedback admission survives elimination events),update-gateway-scoreuntouched so pinned traffic keeps training success-rate windows and elimination scores.A preference that is absent or not functional must behave exactly like today's no-preference flow — including not hard-failing the single-entry-list corner.
🤖 Generated with Claude Code