| content |
{"Commits":[{"Sha1":"13fe10374 {"Commits":[{"Sha1":"13fe1037486e5d393f986446219e457190ec1863","Message":"fix(cost): record and cap online image generation invocations\n\nAdversarial acceptance found that generateConnectedImage — the online\nimage path for DASHSCOPE_WAN and OpenAI-compatible connections — called\nthe provider directly via postJson without withRecordedModelCall, the\none place that both writes a ModelInvocation and enforces the per-task\nbudget cap before dispatch. A real Wan 2.7 Pro custom-image generation\n(kind IMAGE / DESIGN_MASTER) therefore produced a genuine paid image\n(providerRequestId, ~28s, real PNG) but left no cost record, and the\nbrand's maxCostMicrosPerTask never applied. Every recorded wan2.7-image\ninvocation in the live DB came from ROLE/STILL (sidecar path); none from\nIMAGE — matching the gap. Video (sidecar) and text (connector) were\nalready wrapped and unaffected.\n\nWrap the online image call in withRecordedModelCall via a new\nconnectorImageCallPlan (modality IMAGE, connector-direct, external), map\nModelCostLimitError to the same COST_LIMIT_BLOCKED channel the text path\nuses, and report usage.images = 1 so the realized cost is ESTIMATED at\nthe catalog price, matching ROLE/STILL. Without an invocation context the\nwrapper passes through unchanged, so bare unit calls are unaffected.\n\nRegression in model-connector.client.test.ts: with a scope the online\nWan call records one IMAGE invocation (RUNNING -\u003e SUCCEEDED, 500000\nmicros, ESTIMATED); a per-task cap below the catalog price blocks before\ndispatch (COST_LIMIT_BLOCKED), the request never leaves the host, and one\nBLOCKED row is written.\n\nEvidence: acceptance-artifacts/adversarial-acceptance-2026-09-13/.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\n","AuthorEmail":"hillao@juhailaoluodeMacBook-Pro.local","AuthorName":"juhailaoluo pro","CommitterEmail":"hillao@juhailaoluodeMacBook-Pro.local","CommitterName":"juhailaoluo pro","Timestamp":"2026-09-14T10:01:08-07:00"}],"HeadCommit":{"Sha1":"13fe1037486e5d393f986446219e457190ec1863","Message":"fix(cost): record and cap online image generation invocations\n\nAdversarial acceptance found that generateConnectedImage — the online\nimage path for DASHSCOPE_WAN and OpenAI-compatible connections — called\nthe provider directly via postJson without withRecordedModelCall, the\none place that both writes a ModelInvocation and enforces the per-task\nbudget cap before dispatch. A real Wan 2.7 Pro custom-image generation\n(kind IMAGE / DESIGN_MASTER) therefore produced a genuine paid image\n(providerRequestId, ~28s, real PNG) but left no cost record, and the\nbrand's maxCostMicrosPerTask never applied. Every recorded wan2.7-image\ninvocation in the live DB came from ROLE/STILL (sidecar path); none from\nIMAGE — matching the gap. Video (sidecar) and text (connector) were\nalready wrapped and unaffected.\n\nWrap the online image call in withRecordedModelCall via a new\nconnectorImageCallPlan (modality IMAGE, connector-direct, external), map\nModelCostLimitError to the same COST_LIMIT_BLOCKED channel the text path\nuses, and report usage.images = 1 so the realized cost is ESTIMATED at\nthe catalog price, matching ROLE/STILL. Without an invocation context the\nwrapper passes through unchanged, so bare unit calls are unaffected.\n\nRegression in model-connector.client.test.ts: with a scope the online\nWan call records one IMAGE invocation (RUNNING -\u003e SUCCEEDED, 500000\nmicros, ESTIMATED); a per-task cap below the catalog price blocks before\ndispatch (COST_LIMIT_BLOCKED), the request never leaves the host, and one\nBLOCKED row is written.\n\nEvidence: acceptance-artifacts/adversarial-acceptance-2026-09-13/.\n\nCo-Authored-By: Claude Opus 4.8 \u003cnoreply@anthropic.com\u003e\n","AuthorEmail":"hillao@juhailaoluodeMacBook-Pro.local","AuthorName":"juhailaoluo pro","CommitterEmail":"hillao@juhailaoluodeMacBook-Pro.local","CommitterName":"juhailaoluo pro","Timestamp":"2026-09-14T10:01:08-07:00"},"CompareURL":"luoanwu/image-generation/compare/9f02b16c4968771143aee412b6f58291cbbe9dfb...13fe1037486e5d393f986446219e457190ec1863","Len":1}... |