data/usage_log.csv is a real file in your working directory: one row per API call, with the model name, token counts, and whether the call succeeded.
It is not clean. One request was logged twice, one model name has inconsistent casing, one failed call still has token counts recorded, and one row is missing its token counts entirely.
A pricing table is provided as PRICING: a dict of {model: {"prompt": $ per 1K prompt tokens, "completion": $ per 1K completion tokens}}.
Write total_cost_by_model() returning a dict[str, float] of total cost per model, counting only successful calls, with the duplicate counted once and model names normalised to lowercase before grouping.
Build the architecture on a canvas: place the components, configure them, connect them into a data flow, and write a short reason for each one. The AI reviewer grades your design against a rubric written specifically for this problem.
Minimum 5 components · needs a wide desktop screen