api7 / api7/aisix

Add margin configuration via UI

Open
#788 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.