This commit is contained in:
2026-07-10 17:09:14 +08:00
parent ad2e40bc67
commit d07cd508ee
54 changed files with 7111 additions and 619 deletions
@@ -116,6 +116,8 @@ async def create_chat_generation_task_for_module(
record_id=task_id,
gen_type="image",
image_size=size,
image_px=px,
aspect_ratio=proportion,
engine_id=engine.id,
project_name=billing_project_name,
description_prefix=billing_description_prefix,
@@ -126,6 +128,7 @@ async def create_chat_generation_task_for_module(
source_step_id=billing_source_step_id,
source_step_code=billing_source_step_code,
billing_scene=billing_scene,
media_references=refs,
)
snapshot = _build_image_snapshot(engine, size, proportion, px)
task = ChatGenerationTask(
@@ -142,6 +145,7 @@ async def create_chat_generation_task_for_module(
pipeline_stage="queued",
engine_id=engine.id,
engine_snapshot_json=_json(snapshot),
current_billing_attempt_no=1,
media_references=_json(refs) if refs else None,
credits_cost=round(media_billing.total_charged, 2),
idempotency_key=backend_idempotency_key,
@@ -170,6 +174,8 @@ async def create_chat_generation_task_for_module(
gen_type="video",
duration=selected_duration,
resolution=selected_resolution,
aspect_ratio=ratio,
fps=24,
engine_id=engine.id,
project_name=billing_project_name,
description_prefix=billing_description_prefix,
@@ -180,6 +186,7 @@ async def create_chat_generation_task_for_module(
source_step_id=billing_source_step_id,
source_step_code=billing_source_step_code,
billing_scene=billing_scene,
media_references=refs,
)
snapshot = _build_video_snapshot(engine, ratio, selected_resolution, selected_duration)
task = ChatGenerationTask(
@@ -199,6 +206,7 @@ async def create_chat_generation_task_for_module(
pipeline_stage="queued",
engine_id=engine.id,
engine_snapshot_json=_json(snapshot),
current_billing_attempt_no=1,
media_references=_json(refs) if refs else None,
credits_cost=round(media_billing.total_charged, 2),
idempotency_key=backend_idempotency_key,