Version 1.5.0

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-06 21:45:32 +00:00
parent 9ca048fb9d
commit 52603f2deb
6 changed files with 109 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
# Billing Module
**Last Verified:** January 5, 2026
**Last Verified:** January 6, 2026
**Status:** ✅ Active (Simplified January 2026)
**Backend Path:** `backend/igny8_core/modules/billing/` + `backend/igny8_core/business/billing/`
**Frontend Path:** `frontend/src/pages/Billing/` + `frontend/src/pages/Account/`
@@ -195,6 +195,28 @@ CreditService.add_credits(
)
```
### Calculate Credits for Images (NEW v1.4.0)
```python
# Calculate credits needed for image generation based on model
credits = CreditService.calculate_credits_for_image(
model_name='dall-e-3', # Model with credits_per_image = 5
num_images=3
)
# Returns: 15 (3 images × 5 credits)
```
### Calculate Credits from Tokens by Model (NEW v1.4.0)
```python
# Calculate credits from token usage based on model's tokens_per_credit
credits = CreditService.calculate_credits_from_tokens_by_model(
model_name='gpt-4o-mini', # Model with tokens_per_credit = 10000
total_tokens=15000
)
# Returns: 2 (ceil(15000 / 10000))
```
---
## Plan Limits
@@ -303,3 +325,5 @@ Displays:
| Feature | Status | Description |
|---------|--------|-------------|
| ~~AI Model Config database~~ | ✅ v1.4.0 | Model pricing moved to AIModelConfig |
| Image model quality tiers | ✅ v1.4.0 | credits_per_image per quality tier |
| Credit service enhancements | 🔄 v1.5.0 | Model-specific calculation methods |