claude-finops 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +361 -0
- package/bin/claude-finops.js +74 -0
- package/config/free_models.json +49 -0
- package/config/model_compare.json +13 -0
- package/config/pricing.json +232 -0
- package/config/settings.json +57 -0
- package/finops/__init__.py +0 -0
- package/finops/actions.py +671 -0
- package/finops/agents.py +296 -0
- package/finops/analytics.py +1579 -0
- package/finops/api.py +426 -0
- package/finops/classify.py +48 -0
- package/finops/cloud.py +336 -0
- package/finops/diagnose.py +1002 -0
- package/finops/etl.py +533 -0
- package/finops/paths.py +111 -0
- package/finops/playbook.py +229 -0
- package/finops/pricing.py +74 -0
- package/finops/procs.py +499 -0
- package/finops/report.py +169 -0
- package/package.json +52 -0
- package/run.cmd +4 -0
- package/run.py +210 -0
- package/run.sh +3 -0
- package/web/app.js +2923 -0
- package/web/charts.js +340 -0
- package/web/index.html +14 -0
- package/web/styles.css +387 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Model pricing in USD per 1,000,000 tokens. Kept SEPARATE from usage data so it can be updated without touching the dashboard. Any cost derived from these numbers is ESTIMATED, never actual billed cost.",
|
|
3
|
+
"currency": "USD",
|
|
4
|
+
"unit": "per_million_tokens",
|
|
5
|
+
"updated": "2026-09-18",
|
|
6
|
+
"source": "user-configurable list price table",
|
|
7
|
+
"default_model_pricing": {
|
|
8
|
+
"input": 3.0,
|
|
9
|
+
"output": 15.0,
|
|
10
|
+
"cache_write_5m": 3.75,
|
|
11
|
+
"cache_write_1h": 6.0,
|
|
12
|
+
"cache_read": 0.3
|
|
13
|
+
},
|
|
14
|
+
"models": {
|
|
15
|
+
"claude-opus-5": {
|
|
16
|
+
"display_name": "Claude Opus 5",
|
|
17
|
+
"tier": "frontier",
|
|
18
|
+
"input": 15.0,
|
|
19
|
+
"output": 75.0,
|
|
20
|
+
"cache_write_5m": 18.75,
|
|
21
|
+
"cache_write_1h": 30.0,
|
|
22
|
+
"cache_read": 1.5,
|
|
23
|
+
"context_window": 200000,
|
|
24
|
+
"provider": "anthropic"
|
|
25
|
+
},
|
|
26
|
+
"claude-opus-5[1m]": {
|
|
27
|
+
"display_name": "Claude Opus 5 (1M context)",
|
|
28
|
+
"tier": "frontier",
|
|
29
|
+
"input": 22.5,
|
|
30
|
+
"output": 112.5,
|
|
31
|
+
"cache_write_5m": 28.125,
|
|
32
|
+
"cache_write_1h": 45.0,
|
|
33
|
+
"cache_read": 2.25,
|
|
34
|
+
"context_window": 1000000,
|
|
35
|
+
"provider": "anthropic"
|
|
36
|
+
},
|
|
37
|
+
"claude-sonnet-5": {
|
|
38
|
+
"display_name": "Claude Sonnet 5",
|
|
39
|
+
"tier": "balanced",
|
|
40
|
+
"input": 3.0,
|
|
41
|
+
"output": 15.0,
|
|
42
|
+
"cache_write_5m": 3.75,
|
|
43
|
+
"cache_write_1h": 6.0,
|
|
44
|
+
"cache_read": 0.3,
|
|
45
|
+
"context_window": 200000,
|
|
46
|
+
"provider": "anthropic"
|
|
47
|
+
},
|
|
48
|
+
"claude-fable-5": {
|
|
49
|
+
"display_name": "Claude Fable 5",
|
|
50
|
+
"tier": "balanced",
|
|
51
|
+
"input": 3.0,
|
|
52
|
+
"output": 15.0,
|
|
53
|
+
"cache_write_5m": 3.75,
|
|
54
|
+
"cache_write_1h": 6.0,
|
|
55
|
+
"cache_read": 0.3,
|
|
56
|
+
"context_window": 200000,
|
|
57
|
+
"provider": "anthropic"
|
|
58
|
+
},
|
|
59
|
+
"claude-fable-5-1": {
|
|
60
|
+
"display_name": "Claude Fable 5.1",
|
|
61
|
+
"tier": "balanced",
|
|
62
|
+
"input": 3.0,
|
|
63
|
+
"output": 15.0,
|
|
64
|
+
"cache_write_5m": 3.75,
|
|
65
|
+
"cache_write_1h": 6.0,
|
|
66
|
+
"cache_read": 0.3,
|
|
67
|
+
"context_window": 200000,
|
|
68
|
+
"provider": "anthropic"
|
|
69
|
+
},
|
|
70
|
+
"claude-haiku-4-5-20251001": {
|
|
71
|
+
"display_name": "Claude Haiku 4.5",
|
|
72
|
+
"tier": "economy",
|
|
73
|
+
"input": 1.0,
|
|
74
|
+
"output": 5.0,
|
|
75
|
+
"cache_write_5m": 1.25,
|
|
76
|
+
"cache_write_1h": 2.0,
|
|
77
|
+
"cache_read": 0.1,
|
|
78
|
+
"context_window": 200000,
|
|
79
|
+
"provider": "anthropic"
|
|
80
|
+
},
|
|
81
|
+
"<synthetic>": {
|
|
82
|
+
"display_name": "Synthetic / local (no billed inference)",
|
|
83
|
+
"tier": "none",
|
|
84
|
+
"input": 0.0,
|
|
85
|
+
"output": 0.0,
|
|
86
|
+
"cache_write_5m": 0.0,
|
|
87
|
+
"cache_write_1h": 0.0,
|
|
88
|
+
"cache_read": 0.0,
|
|
89
|
+
"context_window": 0
|
|
90
|
+
},
|
|
91
|
+
"gpt-5.5": {
|
|
92
|
+
"display_name": "GPT-5.5 (Codex)",
|
|
93
|
+
"tier": "frontier",
|
|
94
|
+
"provider": "openai",
|
|
95
|
+
"input": 5.0,
|
|
96
|
+
"output": 30.0,
|
|
97
|
+
"cache_read": 0.5,
|
|
98
|
+
"cache_write_5m": 5.0,
|
|
99
|
+
"cache_write_1h": 5.0,
|
|
100
|
+
"context_window": 400000
|
|
101
|
+
},
|
|
102
|
+
"gpt-5.3-codex": {
|
|
103
|
+
"display_name": "GPT-5.3 Codex",
|
|
104
|
+
"tier": "balanced",
|
|
105
|
+
"provider": "openai",
|
|
106
|
+
"input": 1.75,
|
|
107
|
+
"output": 14.0,
|
|
108
|
+
"cache_read": 0.175,
|
|
109
|
+
"cache_write_5m": 1.75,
|
|
110
|
+
"cache_write_1h": 1.75,
|
|
111
|
+
"context_window": 400000
|
|
112
|
+
},
|
|
113
|
+
"gpt-5.2-codex": {
|
|
114
|
+
"display_name": "GPT-5.2 Codex",
|
|
115
|
+
"tier": "balanced",
|
|
116
|
+
"provider": "openai",
|
|
117
|
+
"input": 1.75,
|
|
118
|
+
"output": 14.0,
|
|
119
|
+
"cache_read": 0.175,
|
|
120
|
+
"cache_write_5m": 1.75,
|
|
121
|
+
"cache_write_1h": 1.75,
|
|
122
|
+
"context_window": 400000,
|
|
123
|
+
"_note": "Not on OpenAI's price list; priced as GPT-5.2"
|
|
124
|
+
},
|
|
125
|
+
"gpt-5.2": {
|
|
126
|
+
"display_name": "GPT-5.2",
|
|
127
|
+
"tier": "balanced",
|
|
128
|
+
"provider": "openai",
|
|
129
|
+
"input": 1.75,
|
|
130
|
+
"output": 14.0,
|
|
131
|
+
"cache_read": 0.175,
|
|
132
|
+
"cache_write_5m": 1.75,
|
|
133
|
+
"cache_write_1h": 1.75,
|
|
134
|
+
"context_window": 400000
|
|
135
|
+
},
|
|
136
|
+
"gpt-5.1": {
|
|
137
|
+
"display_name": "GPT-5.1",
|
|
138
|
+
"tier": "balanced",
|
|
139
|
+
"provider": "openai",
|
|
140
|
+
"input": 1.25,
|
|
141
|
+
"output": 10.0,
|
|
142
|
+
"cache_read": 0.125,
|
|
143
|
+
"cache_write_5m": 1.25,
|
|
144
|
+
"cache_write_1h": 1.25,
|
|
145
|
+
"context_window": 400000
|
|
146
|
+
},
|
|
147
|
+
"gpt-5": {
|
|
148
|
+
"display_name": "GPT-5",
|
|
149
|
+
"tier": "balanced",
|
|
150
|
+
"provider": "openai",
|
|
151
|
+
"input": 1.25,
|
|
152
|
+
"output": 10.0,
|
|
153
|
+
"cache_read": 0.125,
|
|
154
|
+
"cache_write_5m": 1.25,
|
|
155
|
+
"cache_write_1h": 1.25,
|
|
156
|
+
"context_window": 400000
|
|
157
|
+
},
|
|
158
|
+
"gpt-5-mini": {
|
|
159
|
+
"display_name": "GPT-5 mini",
|
|
160
|
+
"tier": "economy",
|
|
161
|
+
"provider": "openai",
|
|
162
|
+
"input": 0.25,
|
|
163
|
+
"output": 2.0,
|
|
164
|
+
"cache_read": 0.025,
|
|
165
|
+
"cache_write_5m": 0.25,
|
|
166
|
+
"cache_write_1h": 0.25,
|
|
167
|
+
"context_window": 400000
|
|
168
|
+
},
|
|
169
|
+
"gemini-2.5-flash": {
|
|
170
|
+
"display_name": "Gemini 2.5 Flash",
|
|
171
|
+
"tier": "economy",
|
|
172
|
+
"provider": "google",
|
|
173
|
+
"input": 0.3,
|
|
174
|
+
"output": 2.5,
|
|
175
|
+
"cache_read": 0.075,
|
|
176
|
+
"cache_write_5m": 0.3,
|
|
177
|
+
"cache_write_1h": 0.3,
|
|
178
|
+
"context_window": 1048576,
|
|
179
|
+
"_note": "Cache read: lower bound of Google's published range"
|
|
180
|
+
},
|
|
181
|
+
"gemini-2.5-pro": {
|
|
182
|
+
"display_name": "Gemini 2.5 Pro",
|
|
183
|
+
"tier": "frontier",
|
|
184
|
+
"provider": "google",
|
|
185
|
+
"input": 1.25,
|
|
186
|
+
"output": 10.0,
|
|
187
|
+
"cache_read": 0.3125,
|
|
188
|
+
"cache_write_5m": 1.25,
|
|
189
|
+
"cache_write_1h": 1.25,
|
|
190
|
+
"context_window": 1048576,
|
|
191
|
+
"_note": "<=200K prompt; $2.50/$15 above"
|
|
192
|
+
},
|
|
193
|
+
"gemini-3.5-flash": {
|
|
194
|
+
"display_name": "Gemini 3.5 Flash",
|
|
195
|
+
"tier": "balanced",
|
|
196
|
+
"provider": "google",
|
|
197
|
+
"input": 1.5,
|
|
198
|
+
"output": 9.0,
|
|
199
|
+
"cache_read": 0.375,
|
|
200
|
+
"cache_write_5m": 1.5,
|
|
201
|
+
"cache_write_1h": 1.5,
|
|
202
|
+
"context_window": 1048576
|
|
203
|
+
},
|
|
204
|
+
"gemini-3.8-flash": {
|
|
205
|
+
"display_name": "Gemini 3.8 Flash",
|
|
206
|
+
"tier": "economy",
|
|
207
|
+
"provider": "google",
|
|
208
|
+
"input": 0.75,
|
|
209
|
+
"output": 3.75,
|
|
210
|
+
"cache_read": 0.1875,
|
|
211
|
+
"cache_write_5m": 0.75,
|
|
212
|
+
"cache_write_1h": 0.75,
|
|
213
|
+
"context_window": 1048576,
|
|
214
|
+
"_note": "Promo price through 2026-12-31; $1.50/$7.50 after"
|
|
215
|
+
},
|
|
216
|
+
"cursor": {
|
|
217
|
+
"display_name": "Cursor (model not recorded)",
|
|
218
|
+
"tier": "none",
|
|
219
|
+
"provider": "cursor",
|
|
220
|
+
"input": 0,
|
|
221
|
+
"output": 0,
|
|
222
|
+
"cache_read": 0,
|
|
223
|
+
"cache_write_5m": 0,
|
|
224
|
+
"cache_write_1h": 0,
|
|
225
|
+
"_note": "Cursor bills by subscription and doesn't record the model locally: no cost is estimated"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"_sources": {
|
|
229
|
+
"openai": "https://developers.openai.com/api/docs/pricing (standard tier, 2026-09-18)",
|
|
230
|
+
"google": "https://ai.google.dev/gemini-api/docs/pricing (paid tier, 2026-09-18)"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Shared defaults. Your own budgets and limits go in settings.local.json (the Settings screen writes there; it is gitignored). account.label is auto-detected from ~/.claude.json. Account, billing period, plan limits and budgets. Anything set to null is reported by the dashboard as 'Unavailable from connected Claude data' rather than being invented.",
|
|
3
|
+
"account": {
|
|
4
|
+
"label": null,
|
|
5
|
+
"plan_name": null,
|
|
6
|
+
"plan_type": null
|
|
7
|
+
},
|
|
8
|
+
"billing_period": {
|
|
9
|
+
"mode": "calendar_month",
|
|
10
|
+
"anchor_day": 1
|
|
11
|
+
},
|
|
12
|
+
"limits": {
|
|
13
|
+
"_comment": "Set these ONLY from your real plan. null => dashboard shows the metric as unavailable instead of guessing.",
|
|
14
|
+
"monthly_cost_allowance_usd": null,
|
|
15
|
+
"monthly_token_allowance": null,
|
|
16
|
+
"monthly_request_allowance": null,
|
|
17
|
+
"remaining_credits_usd": null
|
|
18
|
+
},
|
|
19
|
+
"budgets": {
|
|
20
|
+
"_comment": "Set your real budgets here. null => the dashboard reports 'No budget configured' instead of scoring you against an invented number.",
|
|
21
|
+
"monthly_usd": null,
|
|
22
|
+
"daily_usd": null,
|
|
23
|
+
"monthly_tokens": null,
|
|
24
|
+
"per_project_usd": {},
|
|
25
|
+
"per_model_usd": {}
|
|
26
|
+
},
|
|
27
|
+
"alert_thresholds_pct": [
|
|
28
|
+
50,
|
|
29
|
+
75,
|
|
30
|
+
90,
|
|
31
|
+
100
|
|
32
|
+
],
|
|
33
|
+
"waste_rules": {
|
|
34
|
+
"long_prompt_chars": 6000,
|
|
35
|
+
"large_context_tokens": 150000,
|
|
36
|
+
"huge_session_tokens": 2000000,
|
|
37
|
+
"duplicate_window_minutes": 60,
|
|
38
|
+
"idle_gap_minutes": 45,
|
|
39
|
+
"simple_task_output_tokens": 400,
|
|
40
|
+
"frontier_tiers": [
|
|
41
|
+
"frontier"
|
|
42
|
+
],
|
|
43
|
+
"low_output_ratio_vs_median": 0.4,
|
|
44
|
+
"_low_output_note": "Sessions are flagged when their output/billable ratio falls below this fraction of YOUR median session ratio, rather than an absolute number, because a healthy ratio depends on how agentic your workload is."
|
|
45
|
+
},
|
|
46
|
+
"anomaly": {
|
|
47
|
+
"daily_zscore": 2.0,
|
|
48
|
+
"daily_ratio": 2.0,
|
|
49
|
+
"session_ratio": 3.0
|
|
50
|
+
},
|
|
51
|
+
"scorecard": {
|
|
52
|
+
"_comment": "Reference points the 0-100 dimension scores are graded against. Derived from your own data by default; override to hold yourself to a different bar.",
|
|
53
|
+
"target_output_ratio": 0.0088,
|
|
54
|
+
"target_cost_per_1k_output_usd": 0.3,
|
|
55
|
+
"frontier_cost_share_allowance_pct": 40
|
|
56
|
+
}
|
|
57
|
+
}
|
|
File without changes
|