You are working on the hyperswitch repository (Rust payment processing system).…
- User
You are working on the hyperswitch repository (Rust payment processing system).
REPOSITORY SETUP:
- Repository: juspay/hyperswitch
- Working directory: ./repos/hyperswitch_pool_2 (already cloned)
- Base commit: 8a7590cf60a0610863e7b6ef8a3c4b780ba03a85
- Task ID: juspay__hyperswitch-8612
- Version: v1.115.0
TASK DESCRIPTION: Bug: Add support to pass fallback_configs for PL routing in the /routing/evaulate request from hyperswitch
DETAILED CONTEXT & HINTS:
Type of Change
- Bugfix
- New feature
- Enhancement
- Refactoring
- Dependency updates
- Documentation
- CI/CD
Description
Decision engine does not have the concept of fallback connectors, so we recently added support to handle the default connectors by allowing them to be passed in the evaluate request. As part of this PR we are making the necessary changes to pass fallback connectors to decision engine
Additional Changes
- This PR modifies the API contract
- This PR modifies the database schema
- This PR modifies application configuration/environment variables
Motivation and Context
How did you test it?
On making a payment from hyperswitch, with the routing rules defined and activated already. We will be passing the fallback_output to the decision engine
Checklist
- I formatted the code
cargo +nightly fmt --all - I addressed lints thrown by
cargo clippy - I reviewed the submitted code
- I added unit tests for my changes where possible
Assistant
I need to understand the task better. Let me break down what's needed:
- The task is to add support for passing fallback_configs for PL routing in the /routing/evaluate request
- This involves making changes to pass fallback connectors to the decision engine
- There's a screenshot showing how this should work with routing rules and fallback_output
Let me start by exploring the routing-related code to understand the current implementation.
Assistant
Let me first explore the routing-related code to understand the current structure:
Assistant
(no content)
Assistant
Let me examine the main routing route file:
Assistant
Now let me look for the
/routing/evaluateendpoint which seems to be the key target for this task. Let me search for it:Assistant
Let me check what OpenAPI definitions are available for routing:
Assistant
I need to find the evaluate endpoint, which might be under a different name. Let me search for routing evaluation in the codebase:
Assistant
Let me look at the core routing modules:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.