You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ npm run preview
60
60
3. The app will parse the report and compare request-based and AI Credits-based billing signals
61
61
4. Explore the visualizations and data views to preview how future bills may look after the AI Credits transition
62
62
63
-
Sample reports are available in the `examples/` directory. Older examples without `aiu_quantity` still load, but AI Credits will remain `0` for those rows.
63
+
Sample reports are available in the `examples/` directory. Older examples without `aic_quantity` still load, but AI Credits will remain `0` for those rows.
64
64
65
65
## CSV Report Format
66
66
@@ -81,9 +81,10 @@ The application expects CSV files with the following primary columns:
81
81
-`total_monthly_quota` - Monthly quota amount
82
82
-`organization` - Organization slug
83
83
-`cost_center_name` - Optional cost center identifier
84
-
-`aiu_quantity` - AI Credits for the same usage row
84
+
-`aic_quantity` - AI Credits for the same usage row
85
+
-`aic_gross_amount` - AI Credit gross cost for the same usage row
85
86
86
-
The viewer now supports both billing units. On `requests` rows, `quantity` and `applied_cost_per_quantity` drive PRU-based calculations, while `aiu_quantity` and `aiu_gross_amount` remain comparison values and stay `0` when those AI Credit fields are absent. On `ai-units` rows, Premium Requests and generic PRU gross/discount/net totals are counted as `0`; AI Credits are counted from the AI-specific credit fields (`aiu_quantity`, falling back to `quantity` only when the AI field is absent) and AI Credit gross cost comes from `aiu_gross_amount` (falling back to `gross_amount` only when the AI field is absent). Legacy token columns may still appear in older exports, but they are no longer used by the app.
87
+
The viewer now supports both billing units. On `requests` rows, `quantity` and `applied_cost_per_quantity` drive PRU-based calculations, while `aic_quantity` and `aic_gross_amount` remain comparison values and stay `0` when those AI Credit fields are absent. On `ai-units` rows, Premium Requests and generic PRU gross/discount/net totals are counted as `0`; AI Credits are counted from the AI-specific credit fields (`aic_quantity`, falling back to `quantity` only when the AI field is absent) and AI Credit gross cost comes from `aic_gross_amount` (falling back to `gross_amount` only when the AI field is absent). Legacy `aiu_*` column names from older exports are still accepted during parsing, but they are no longer the documented format.
87
88
88
89
See [docs/report-format.md](docs/report-format.md) for detailed format specifications.
Copy file name to clipboardExpand all lines: docs/report-format.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,21 +21,22 @@ Source examples: files in `examples/`. Some existing sample exports still use th
21
21
|`total_monthly_quota`| number | Monthly quota for the user or plan applicable to the row. |
22
22
|`organization`| string | Organization slug associated with the usage. |
23
23
|`cost_center_name`| string | Optional cost center or tagging field. |
24
-
|`aiu_quantity`| number | Same usage converted to AI Credits. |
24
+
|`aic_quantity`| number | Same usage converted to AI Credits. |
25
25
26
26
## Additional columns
27
27
28
28
| Column | Status | Notes |
29
29
| --- | --- | --- |
30
-
|`aiu_gross_amount`| Present in newer previews | Used for AI Credit gross cost when present. |
30
+
|`aic_gross_amount`| Present in newer previews | Used for AI Credit gross cost when present. |
31
31
|`total_input_tokens`| Legacy / optional | Older token-oriented export field; ignored by the app. |
32
32
|`total_output_tokens`| Legacy / optional | Older token-oriented export field; ignored by the app. |
33
33
|`total_cache_creation_tokens`| Legacy / optional | Older token-oriented export field; ignored by the app. |
34
34
|`total_cache_read_tokens`| Legacy / optional | Older token-oriented export field; ignored by the app. |
35
35
36
36
## Notes
37
37
- Header row is single-lined; subsequent rows are usage records. Values are comma-separated, double-quoted where needed.
38
-
- Monetary fields are decimals. `aiu_quantity` may also be fractional.
38
+
- Monetary fields are decimals. `aic_quantity` may also be fractional.
39
39
- The app streams the file, treats the first row as the header, and counts subsequent data rows without loading the entire file into memory.
40
-
- Current calculations support both row types: on `requests` rows, `quantity` and `applied_cost_per_quantity` describe PRU usage while `aiu_quantity` and `aiu_gross_amount` remain reference/comparison values and stay `0` when the AI Credit fields are absent; on `ai-units` rows, Premium Requests and generic PRU gross/discount/net totals are counted as `0`, while AI Credits and AI Credit gross cost are taken from the AI-specific fields (`aiu_quantity` / `aiu_gross_amount`, with fallback to `quantity` / `gross_amount` only when those AI-specific fields are absent).
41
-
- Reports without `aiu_quantity` still load, but AI Credit summaries will display `0`.
40
+
- Current calculations support both row types: on `requests` rows, `quantity` and `applied_cost_per_quantity` describe PRU usage while `aic_quantity` and `aic_gross_amount` remain reference/comparison values and stay `0` when those AI Credit fields are absent; on `ai-units` rows, Premium Requests and generic PRU gross/discount/net totals are counted as `0`, while AI Credits and AI Credit gross cost are taken from the AI-specific fields (`aic_quantity` / `aic_gross_amount`, with fallback to `quantity` / `gross_amount` only when those AI-specific fields are absent).
41
+
- Reports without `aic_quantity` still load, but AI Credit summaries will display `0`.
42
+
- Older exports that still use legacy `aiu_quantity` / `aiu_gross_amount` headers are accepted as parser fallbacks.
0 commit comments