1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Sync model prices
# Pulls the latest LiteLLM community price registry every day and opens
# a pull request when prices have drifted. The release workflow ships
# whatever's currently in src/pricing_data.rs, so merging the auto-PR
# before cutting a tag picks up the freshest pricing.
on:
schedule:
- cron: "37 6 * * *" # daily at 06:37 UTC
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Regenerate src/pricing_data.rs from LiteLLM
run: python3 scripts/sync_prices.py
- name: Open PR if prices drifted
uses: peter-evans/create-pull-request@v7
with:
branch: chore/sync-prices
base: main
title: "chore: sync model price table"
body: |
Automated weekly sync of `src/pricing_data.rs` from
[LiteLLM's model_prices_and_context_window](https://github.com/BerriAI/litellm/blob/main/litellm/model_prices_and_context_window_backup.json).
Merge to refresh the bundled price table. Cost estimates
shipped in the next tagged release will reflect these prices.
commit-message: "chore: sync model price table"
delete-branch: true
add-paths: src/pricing_data.rs