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
feat: change default pricing fallback to openai/gpt-5 (then gpt-4o, then claude-3.5-sonnet); broaden token field keys; update README about fallback and tokens
Copy file name to clipboardExpand all lines: README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,10 @@ Examples:
37
37
The CLI automatically fetches model pricing from the public OpenRouter models API and estimates cost based on input/output tokens per model.
38
38
39
39
- API: `https://openrouter.ai/api/v1/models`
40
-
- If pricing is unavailable (offline or unknown model), cost shows as `$0.00` for those rows.
40
+
- Fallback: when a model name is missing (`unknown`), cxusage attempts a fallback chain: `openai/gpt-5` → `openai/gpt-4o` → `anthropic/claude-3.5-sonnet`. The first available price is used.
41
+
- Disable fallback with `--no-fallback`. With fallback disabled, unknown models show `$0.00`.
42
+
43
+
Notes about token counts: cxusage sums numeric fields commonly used for token counts (e.g., `input_tokens`, `output_tokens`, `promptTokenCount`, `completionTokenCount`, etc.). If older logs don’t include any of these fields, tokens will appear as zero even though events are counted. Use `--by model --debug` to inspect which model names are detected in your logs.
0 commit comments