Summary
-------
1. **Backend**
• `controller/model_meta.go`
– For prefix/suffix/contains rules, aggregate endpoints, bound channels, enable groups, and quota types across all matched models.
– When mixed billing types are detected, return `quota_type = -1` (unknown) instead of defaulting to volume-based.
2. **Frontend**
• `web/src/helpers/utils.js`
– `calculateModelPrice` now handles `quota_type = -1`, returning placeholder `'-'`.
• `web/src/components/table/model-pricing/view/card/PricingCardView.jsx`
– Billing tag logic updated: displays “按次计费” (times), “按量计费” (volume), or `'-'` for unknown.
• `web/src/components/table/model-pricing/view/table/PricingTableColumns.js`
– `renderQuotaType` shows “未知” for unknown billing type.
• `web/src/components/table/models/ModelsColumnDefs.js`
– Unified `renderQuotaType` to return `'-'` when type is unknown.
• `web/src/components/table/model-pricing/modal/components/ModelPricingTable.jsx`
– Group price table honors unknown billing type; pricing columns show `'-'` and neutral tag color.
3. **Utilities**
• Added safe fallback colours/tags for unknown billing type across affected components.
Impact
------
• Ensures correct data aggregation for non-exact model matches.
• Prevents UI from implying volume billing when actual type is ambiguous.
• Provides consistent placeholder display (`'-'` or “未知”) across cards, tables and modals.
No breaking API changes; frontend gracefully handles legacy values.
| Name |
Last commit
|
Last Update |
|---|---|---|
| .github | Loading commit data... | |
| bin | Loading commit data... | |
| common | Loading commit data... | |
| constant | Loading commit data... | |
| controller | Loading commit data... | |
| docs | Loading commit data... | |
| dto | Loading commit data... | |
| i18n | Loading commit data... | |
| middleware | Loading commit data... | |
| model | Loading commit data... | |
| relay | Loading commit data... | |
| router | Loading commit data... | |
| service | Loading commit data... | |
| setting | Loading commit data... | |
| types | Loading commit data... | |
| web | Loading commit data... | |
| .dockerignore | Loading commit data... | |
| .env.example | Loading commit data... | |
| .gitignore | Loading commit data... | |
| Dockerfile | Loading commit data... | |
| LICENSE | Loading commit data... | |
| README.en.md | Loading commit data... | |
| README.md | Loading commit data... | |
| VERSION | Loading commit data... | |
| docker-compose.yml | Loading commit data... | |
| go.mod | Loading commit data... | |
| go.sum | Loading commit data... | |
| main.go | Loading commit data... | |
| makefile | Loading commit data... | |
| one-api.service | Loading commit data... |