Skip to content

Commit 555f29d

Browse files
Louie Luclaude
andcommitted
Add pre-commit check that model_cost.json matches model_profiles.yaml
Runs scripts/pricing/build_model_cost.py --check whenever model_cost/ or scripts/pricing/ changes, locally and in the Pre-commit CI job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 9d798ff commit 555f29d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ repos:
6666
entry: tools/addlicense.sh
6767
pass_filenames: true
6868
files: '\.py$'
69+
- id: model-cost-in-sync
70+
name: model_cost.json is generated from model_profiles.yaml
71+
language: python
72+
entry: python scripts/pricing/build_model_cost.py --check
73+
additional_dependencies: [pyyaml]
74+
pass_filenames: false
75+
files: '^(model_cost/|scripts/pricing/)'
6976
# Add mypy hooks for both local runs and CI (manual stage)
7077
- repo: local
7178
hooks:

0 commit comments

Comments
 (0)