Repository navigation
Releases: elecnix/infra-cost-model
Release list
v0.3.0
Install this release with:
pip install infra-cost-model==0.3.0Highlights
-
Compare a model with the bill:
reconcilereads an AWS Cost Explorer export and reports which groups of nodes drift from the bill lines their usage is billed on. It reads theTimePeriodand two-key groups of a raw payload, and keeps quarterly or annual charges off the run-rate (#444, #442, #467, #468, #466). -
A diffable cost snapshot:
compute --format jsonreports each metric's quantity, unit price, cost and price source, so two revisions of a model differ only where the model did (#443). -
Pinned price sources:
--pricing live|seedand--pricing-dbselect where prices come from.--pricing livestops on any metric without a synced row. Every command that prices a model,reconcileincluded, takes both pins (#446, #472). -
Labels, parameters and coverage: a node can state labels, and
--group-byand--exclude-labelread them. A metric value can be arithmetic over the workflow's parameters, such ascustomers * 40.coveragecounts the IaC addresses a node claims (#445, #448, #449). -
Azure and GCP: ARM templates extract. The handlers price the product the resource settings select:
- Azure App Service and Function Apps on every plan, Cosmos DB autoscale and database throughput, Blob retrieval, early deletion and Premium accounts, and OpenAI tokens by model.
- GCP multi-region and dual-region Cloud Storage, and 1st gen Cloud Functions with a warning where GCP sells none.
- Egress for each Azure zone and GCP continent.
See #222, #374, #383, #371, #415, #417, #418, #416, #419 and #389.
-
Live AWS prices:
sync-pricingnow stores live rows for the AWS metrics it skipped before, among them API Gateway, CloudFront, DynamoDB, Fargate, RDS, S3, SNS and SQS. An empty answer keeps the stored rows (#479, #484). -
Free tiers and pooled prices: tier boundaries apply to a month of usage and to the account's total. Account-wide and shared free allowances, global services and shared meters each bill once (#287, #294, #336, #338, #378, #424).
-
Vendors as data: SaaS prices are rows in
vendors/<id>/prices.yaml, and a row can bill in blocks withblock_size(#246, #369). -
On PyPI and documented: the package is on PyPI as
infra-cost-model, and the documentation site is https://elecnix.github.io/infra-cost-model/ (#243).
Prices that change
These models price differently from 0.2.0, because 0.2.0 billed them wrong:
- An Application Load Balancer with two or more LCU dimensions bills the largest one, not the sum (#483).
- A Multi-AZ RDS instance bills twice the Single-AZ instance and storage price. PostgreSQL bills its own rates (#485).
- DynamoDB subtracts its free 25 GB and 25 RCUs and WCUs per Region (#479).
- Cosmos DB bills a container's own throughput inside a shared database, and multi-region autoscale at the write rate (#474).
- A Blob early deletion bills the days left in its window, set with
earlyDeleteDaysStored(#476). - The seed prices match AWS us-east-1 (#311).
Breaking changes
whatif,sensitivity,what-ifandanalyzeprice from the catalog by default, ascomputedoes. A model withoutprovideron its nodes needs--no-catalog(#429).- The engine raises
SilentZeroErrorfor a model that would price as a silent $0. A metric without avalueis one example (#433). - A frequency, an edge rate and a metric value must be finite numbers of at least 0, and a frequency must be a number. A malformed model or IaC file stops with one error line (#475, #478).
- A
percentagenode refuses a rate key it doesn't read, and a node with only a per-call or per-transaction fee prices (#476, #478). - The AWS handlers name logical usage metrics, such as
readRequestsfor DynamoDB. A catalog row name still prices, andvalidatewarns about it (#428, #472). - The
flat_subscription,per_unit_flatandfree_tiershapes are gone.validaterejects them, and CONTRIBUTING.md shows how to move each one to price rows (#246). - The resource modules lost their
_*_costhelpers,apply_free_tierandget_lambda_free_tier_limits.ResourceRegistry.from_addresstakes only an address. Thecodegenpackage is gone (#437, #473, #439, #431). - A snapshot number below 1 keeps six digits from its first nonzero one (#474).
Known issues
- An RDS instance on Oracle, SQL Server, Aurora or Db2 is reported unpriced, with a warning.
- Live sync has no rows for Bedrock tokens and Secrets Manager API calls. The seed rows price them.
- An ALB that states LCUs as a
fixedmonthly total adds its dimensions. Keep LCU dimensions usage-driven, or state only the largest.
What's Changed
- chore(sdk/ts): set the TypeScript SDK version to 0.2.0 by @elecnix in #291
- fix(engine): apply catalog tier boundaries to a month of usage (#287) by @elecnix in #292
- fix(cli): report a missing or foreign vendors package on one line (#289) by @elecnix in #297
- fix(engine): apply catalog tiers to the account total (#294) by @elecnix in #301
- fix(pricing): seed-pricing loads every service in the seed file (#293) by @elecnix in #298
- fix(saas): price shapes on a month of usage and charge the percentage per transaction by @elecnix in #299
- fix(pricing): sync-pricing fallback loads every seed service (#303) by @elecnix in #306
- fix(engine): per-second fixed costs and shapes across workflows (#304, #305) by @elecnix in #307
- fix(examples): price the AWS nodes from the seed catalog (#296) by @elecnix in #302
- refactor(vendors): move vendor data into infra_cost_model.vendors (#290) by @elecnix in #300
- refactor(pricing): one function loads seed rows (#308) by @elecnix in #309
- ci: bump the Cite review action to v0.10.0 by @elecnix in #310
- chore: fix stale comments and drop unused _fetch_live arg (#314) by @elecnix in #315
- fix(engine): price Bedrock tokens from the seed catalog (#312) by @elecnix in #316
- chore: add the MIT license and a PyPI publish workflow (#243) by @elecnix in #317
- fix(bedrock): price imported Bedrock nodes and make test files pass alone (#320) by @elecnix in #321
- fix(engine): count each call once per edge type (#313) by @elecnix in #318
- fix(pricing): match seed rows to A...
v0.2.0
Install this release with:
pip install "git+https://github.com/elecnix/infra-cost-model@v0.2.0"Highlights
- Engine version pin: models can set
requiresEngine: ">=0.2.0", and an older engine refuses to price them (#262). - Vendor prices as data: SaaS prices live in
vendors/<id>/prices.yaml. The identity providers and the GitHub Copilot plans use this format (#249, #254, #244). A price row can scale its tiers per seat withper(#248). - SaaS pricing shapes: a usage metric can use
flat_subscription,per_unit_flat,free_tierortransactional(#242, #252). - Warnings for unpriced metrics:
compute,analyzeand the what-if commands list every metric they couldn't price.--exit-on-unpricedturns that into a failure (#271). - Pricing fixes:
- Packaging: the wheel includes the JSON schema and the seed prices, so
validateandseed-pricingwork afterpip install(#269). - New resources: a WAFv2 web ACL handler and a blanket importer for Infracost breakdowns (#235, #238).
Breaking changes
infra_cost_model.pricing.identity_providersis gone. Its prices are invendors/(#254).- A usage metric with a key the schema doesn't declare fails validation, and an unknown
shaperaises an error instead of pricing at $0 (#252). validatefails a node that needs catalog prices but has noproviderorregion(#283).transactionVolumeon apercentagenode is now the value of one transaction. Models that set a monthly total must divide it by the transaction count (#281).- The resource cost helpers require a
regionargument (#264). - The seed price file moved to
infra_cost_model/pricing/seed/aws_pricelist_seed.json(#269). - An install without this project's
vendorspackage fails when the price cache opens (#286). aws_fallback_prices([])raisesValueError, andNonemeans every service (#280).- The TypeScript
Providertype isstring(#251). The TypeScriptparseYamlDslerror text for a model with neitherworkflownorworkflowsmatches the Python text (#282).
Known issues
- Tiered prices compare monthly boundaries with per-second quantities, so a metric with a monthly free allowance, such as SQS requests, prices at $0 (#287).
- The TypeScript SDK's
package.jsonin this tag says0.1.0. #291 sets it to0.2.0onmain. - The
transactionalpricing shape charges the percentage fee once per time step, whatever the transaction count (#288).
What's Changed
- feat(#234): add AWS WAFv2 web ACL (aws_wafv2_web_acl) resource handler by @elecnix in #235
- feat(#234): wire live Infracost pricing for WAFv2 web ACL metrics by @elecnix in #236
- feat(#237): blanket resource pricing via an Infracost breakdown importer by @elecnix in #238
- fix: remap KMS live prices to "AWSKMS" via store_service by @elecnix in #239
- ci: switch to arc-runners (self-hosted Hetzner Cloud) by @v2nic in #240
- feat(engine): pluggable SaaS pricing shapes — flat_subscription, per_unit_flat, free_tier, transactional (#241) by @elecnix in #242
- chore(ci): upgrade GitHub Actions to checkout@v7 and setup-python@v7 by @elecnix in #245
- Add PR body format check to CI by @elecnix in #256
- ci: add/upgrade cite review to v0.4.0 by @elecnix in #257
- ci: add cite code review action (v0.5.0) by @elecnix in #258
- ci: move PR workflows back to GitHub-hosted runners by @elecnix in #259
- ci: bump cite code review action to v0.8.0 by @elecnix in #260
- Hermetic test isolation for pricing catalog by @elecnix in #247
- feat(pricing): wire up per-scaling end-to-end by @elecnix in #248
- Phase 3 — vendors/ directory + glob loader + conformance test by @elecnix in #249
- feat(schema): open provider enum by @elecnix in #250
- feat(schema): add shape to usageMetric, additionalProperties false, unknown shape hard error by @elecnix in #252
- Regenerate TS types and add CI staleness check by @elecnix in #251
- Phase 7: Port identity providers to vendors and remove dead code by @elecnix in #254
- docs: add CONTRIBUTING.md + pricing notes + reviewer cleanups by @elecnix in #255
- feat(engine): let a model pin the engine version it needs by @elecnix in #262
- fix(#164): remove region defaults that came back in later handlers by @elecnix in #264
- ci: run PR Tests on every pull request so they can be required checks by @elecnix in #263
- add GitHub Copilot Pro, Pro+, Max and Enterprise price rows by @elecnix in #244
- fix(schema): drop credit_pool from the shape description examples by @elecnix in #267
- fix(packaging): ship the schema and seed prices in the wheel by @elecnix in #269
- fix(examples): make every example compute a non-zero monthly total by @elecnix in #275
- fix(#266): price CloudFront nodes from the global seed rows by @elecnix in #268
- fix(engine): warn about usage metrics that have no price by @elecnix in #271
- fix(pricing): fail when the vendors package is missing or foreign by @elecnix in #286
- fix(pricing): treat services=None as every AWS service by @elecnix in #280
- fix(tests): build the test wheel without pip when uv is present (#279) by @elecnix in #284
- fix(#273): make validate and compute agree on provider and region by @elecnix in #283
- fix(engine): charge the percentage fee on every transaction (#272) by @elecnix in #281
- fix(engine): price Lambda nodes from requests and GB-seconds (#276) by @elecnix in #285
- fix(sdk/ts): accept a workflows array in parseYamlDsl by @elecnix in #282
New Contributors
Full Changelog: v0.1.0...v0.2.0
v0.1.0 — First release
What's Changed
- Expand design principles: dual-IR, DAG-first UX, type-safe codegen, three surfaces by @elecnix in #2
- Add Principle 12: the cost engine is Python by @elecnix in #10
- Add .pi agent and chain configuration by @elecnix in #22
- Add Principle 13: Pricing is queried, not hardcoded by @elecnix in #23
- Implement AWS Lambda resource model (Issue #11) by @elecnix in #26
- Implement DynamoDB resource model (Issue #13) - Updated by @elecnix in #27
- Implement API Gateway HTTP API v2 resource model (Issue #12) - Updated by @elecnix in #28
- Implement Bedrock/LLM Model resource model (Issue #21) by @elecnix in #29
- Implement pricing catalog: SQLite cache + Infracost API + AWS Price List fallback (Issue #24) - Updated by @elecnix in #25
- Add loop.py for concurrent design-principles and issue pipeline loops by @elecnix in #30
- Implement core infrastructure: engine, SDK, registry, external nodes, sensitivity by @elecnix in #48
- fix: compute defaults to catalog pricing, shows source (#82) by @elecnix in #94
- fix: sensitivity sweep spans 0.5x-2.0x, not 0.5x-1.5x (#90) by @elecnix in #93
- fix: use topological sort for workload derivation (#64) by @elecnix in #95
- fix: use derived invocation_count for flat/tiered/token cost models (#68) by @elecnix in #96
- fix: add coherent per-second to per-month time basis conversion (#71) by @elecnix in #97
- refactor: single --provider/--model with proper quoting by @elecnix in #98
- fix(loop): remove '--' sentinel, split prompts into argv elements by @elecnix in #99
- fix: validate entry node exists before deriving usage (#73) by @elecnix in #101
- fix: validate frequency unit, reject unknown units (#77) by @elecnix in #103
- fix: warn when nodes are unreachable from entry node (#72) by @elecnix in #102
- feat: implement tiered pricing computation in engine (#70) by @elecnix in #104
- fix: prefer pricing catalog over embedded pricingRates (#66) by @elecnix in #105
- fix: implement --json flag in analyze command by @elecnix in #115
- fix: remove hardcoded aws/us-east-1 defaults from cost engine (DP#6) by @elecnix in #117
- feat: wire symbolic parameters through cost engine and sensitivity analyzer (DP#4) by @elecnix in #118
- feat: add Pulumi and CDK code generation to SDK (DP#10) by @elecnix in #119
- feat: add token flow propagation and token-based pricing to DAG (DP#8) by @elecnix in #120
- feat: add perWeek and perMonth frequency units (fixes #87) by @elecnix in #121
- docs: align code docstrings with UBIQUITOUS_LANGUAGE.md (fixes #67) by @elecnix in #122
- feat: accept ASCII '->' as arrow alternative in YAML DSL (fixes #86) by @elecnix in #123
- feat: add ParametricSensitivityAnalyzer for efficient parametric analysis (fixes #65) by @elecnix in #124
- feat: separate resource and cost model representations (fixes #75) by @elecnix in #125
- fix: remove unused edge-degree map from CostAggregator.aggregate() by @elecnix in #126
- fix: replace hardcoded external-service prefix list with data-driven registry by @elecnix in #127
- feat: add whatif and sensitivity CLI commands by @elecnix in #128
- feat: add identity/auth provider pricing models (8 providers) by @elecnix in #129
- feat: add TypeScript SDK for cost model declaration (Principle 11) by @elecnix in #130
- fix(#131): make standalone cost functions private per DP#1 by @elecnix in #134
- fix(#83): replace hand-rolled argv parsing with argparse by @elecnix in #138
- feat(#14): add Amazon S3 Bucket resource handler by @elecnix in #137
- feat(#133): add multi-cloud provider dispatch with GCP and Azure resource handlers by @elecnix in #135
- feat(#132): add codegen pipeline from terraform provider schemas by @elecnix in #136
- feat: add resource definitions for SQS, SNS, EventBridge, CloudFront, RDS by @elecnix in #139
- fix(#141): move Lambda free tier limits from hardcoded defaults to seed data (DP#4) by @elecnix in #142
- docs(#140): clarify identity_providers.py scope as pricing catalog, not DAG engine by @elecnix in #143
- feat(#6): multi-workflow support with data pipeline stack example by @elecnix in #144
- feat(#3): serverless API stack with entry branching and shared DynamoDB leaf by @elecnix in #147
- feat(#5): event-driven fan-out stack with SNS multi-queue fan-out by @elecnix in #148
- feat(#8): e-commerce microservices stack with shared-node accumulation and Stripe pricing by @elecnix in #146
- feat(#9): LLM-augmented API stack with token-based cost validation by @elecnix in #145
- fix(#150): remove orphaned dataOut storage from both DSL parsers by @elecnix in #151
- feat(#149): generate TypeScript types from cost-model.schema.json by @elecnix in #152
- fix(#153): move SQS, SNS, EventBridge free tier thresholds to pricing catalog by @elecnix in #154
- Add pi-less-yolo sandbox documentation by @elecnix in #50
- fix(#156): remove hardcoded Bedrock cached token discount fallback by @elecnix in #158
- fix(#155,#157): regenerate TypeScript types from JSON Schema by @elecnix in #159
- fix(#161): warn in engine when flatOverride conflicts with incoming DAG edges by @elecnix in #168
- fix(#163): query catalog for RDS Multi-AZ multiplier instead of hardcoding 2.0 by @elecnix in #166
- fix(#160): query catalog for Lambda provisioned concurrency rate by @elecnix in #167
- fix(#165): add provider parameter to all cost helper functions by @elecnix in #169
- fix(#164): remove region="us-east-1" defaults from resource cost helpers by @elecnix in #171
- fix(#162): query currency conversion fee from catalog instead of hardcoding by @elecnix in #172
- fix(#173): add perWeek/perMonth frequency units to TypeScript YAML parser by @elecnix in #174
- fix: restore subagent tool access for fanout chain agents by @elecnix in #179
- feat(#176): add --monthly flag to compute CLI subcommand by @elecnix in #177
- feat(#175): add --monthly time basis to whatif, sensitivity, and compute CLI commands by @elecnix in #178
- feat(#180): add what-if subcommand with explicit value sweep and A/B comparison by @elecnix in #181
- feat: CloudWatch Logs resource handler (#185) by @elecnix in #188
- feat: Budget assertion / cost threshold for CI gating (#187) by @elecnix in #193
- feat: ECS Fargate resource handler (#182) by @elecnix in #192
- feat: Application Load Balancer resource handler (#183) by @elecnix in #189
- feat: NAT Gateway and VPC Endpoint resource handlers (#184) by @elecnix in #190
- feat: Secrets Manager, ECR, Route53 resource handlers (#186) by @elecnix in https://github.com/elecni...