From 1246f8ac5d2a861988b261f81ea1d90e79336940 Mon Sep 17 00:00:00 2001 From: "IGNY8 VPS (Salman)" Date: Sat, 10 Jan 2026 11:54:18 +0000 Subject: [PATCH] image strugles --- backend/igny8_core/ai/model_registry.py | 4 ++-- backend/igny8_core/modules/billing/serializers.py | 4 +++- .../src/components/Automation/CurrentProcessingCardV2.tsx | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/backend/igny8_core/ai/model_registry.py b/backend/igny8_core/ai/model_registry.py index c6a188ca..419030b2 100644 --- a/backend/igny8_core/ai/model_registry.py +++ b/backend/igny8_core/ai/model_registry.py @@ -118,9 +118,9 @@ class ModelRegistry: # Handle AIModelConfig instance if rate_type == 'input': - return model.input_cost_per_1m or Decimal('0') + return model.cost_per_1k_input or Decimal('0') elif rate_type == 'output': - return model.output_cost_per_1m or Decimal('0') + return model.cost_per_1k_output or Decimal('0') elif rate_type == 'image': return model.cost_per_image or Decimal('0') diff --git a/backend/igny8_core/modules/billing/serializers.py b/backend/igny8_core/modules/billing/serializers.py index 73e07ad1..9a821328 100644 --- a/backend/igny8_core/modules/billing/serializers.py +++ b/backend/igny8_core/modules/billing/serializers.py @@ -287,7 +287,9 @@ class AIModelConfigSerializer(serializers.Serializer): def get_pricing_display(self, obj): """Generate pricing display string based on model type""" if obj.model_type == 'text': - return f"${obj.input_cost_per_1m}/{obj.output_cost_per_1m} per 1M" + input_cost = obj.cost_per_1k_input or 0 + output_cost = obj.cost_per_1k_output or 0 + return f"${input_cost}/{output_cost} per 1K tokens" elif obj.model_type == 'image': return f"${obj.cost_per_image} per image" return "" diff --git a/frontend/src/components/Automation/CurrentProcessingCardV2.tsx b/frontend/src/components/Automation/CurrentProcessingCardV2.tsx index 899f6d84..d6614eed 100644 --- a/frontend/src/components/Automation/CurrentProcessingCardV2.tsx +++ b/frontend/src/components/Automation/CurrentProcessingCardV2.tsx @@ -276,7 +276,7 @@ const CurrentProcessingCard: React.FC = ({