Add margin configuration via UI
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 157
- Forks
- 32
- Avg merge
- 1h 25m
- Merged PRs (30d)
- 145
Description
AISIX currently does not support configuring provider margins directly through the interface. This improvement would allow administrators to set percentage or fixed margins on provider costs without editing configuration files, making the process more user‑friendly.
Reference: LiteLLM Proxy Provider Margins
Motivation
- Simplify margin management for non‑technical users
- Enable resellers to apply margins transparently
- Improve cost control and pricing flexibility
Proposed Implementation
- Add a Margin field in the provider settings screen
- Support both percentage (e.g.,
10%) and fixed values (e.g.,+0.002) - Validate inputs to prevent formatting errors
- Display applied margins in reports and metrics
Acceptance Criteria
- Margin field available in provider configuration UI
- Support for percentage and fixed values
- Correct application of margins in cost calculations
- Input validation and clear error messages
- Documentation updated with usage instructions
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the provider settings UI, provider cost-calculation paths, and report or metrics code in the Rust project. Use the LiteLLM Provider Margins reference to clarify percentage and fixed-value behavior. Done means the UI accepts and validates both formats, applied margins affect costs and reporting, and usage documentation is updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100