mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
The monitor hard-coded MONITORED = {deepseek-v4-flash, deepseek-v4-pro},
so new page models were never detected and column reordering could
silently mis-map rates.
- Parse every "Standard Pay Per Token" table on both pricing pages (open
FMS + proprietary FMS); map numeric columns by header text (Input /
Output / Cache read / Cache write), which differs per table
- Compare against every mapped registry entry and report UPDATED /
PROMO_SKIPPED / PROMO_ON_PAGE / REVIEW / RATES_AVAILABLE /
NOT_IN_REGISTRY / UNMAPPED_PAGE_MODEL / MISSING_FROM_PAGE
- Refresh only rate fields in place; metadata (context windows,
capabilities, deprecation dates) is preserved
- Cache fields: page value wins; when the page shows n/a, entries bill
cache at the input rate; custom conventions (gemini 0.1x reads) kept
- Dash/n-a cells are placeholders, not row qualifiers (gpt-oss / bge /
gemma rows were silently dropped before)
- Skip long-context tier rows and image/audio token sub-rows
- Workflow: PR body now embeds the full monitor report from
/tmp/dbx_monitor_pr_body.md
Verified live: on the current branch registry the monitor reports 10
cache-field UPDATEDs matching the values upstream already stores, 8
retired models flagged MISSING_FROM_PAGE, 2 PROMO_SKIPPED (gemini 2.5),
and NOT_IN_REGISTRY for every new model awaiting #39714.
60 lines
2.4 KiB
YAML
60 lines
2.4 KiB
YAML
name: Monitor Databricks Pricing
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 2 * * *" # daily 02:00 UTC
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
monitor-db-pricing:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
with:
|
|
persist-credentials: false
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Run monitor
|
|
shell: bash
|
|
run: |
|
|
set -o pipefail
|
|
python scripts/monitor_databricks_pricing.py | tee /tmp/monitor_out.txt
|
|
if grep -q '^NO_CHANGE' /tmp/monitor_out.txt; then
|
|
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Open PR if changed
|
|
if: steps.monitor.outputs.changed == 'true'
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITHUB_TOKEN_FOR_PUSH: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
BRANCH="monitor-dbx-pricing-$(date +'%Y-%m-%d')"
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git checkout -b "$BRANCH"
|
|
git add model_prices_and_context_window.json litellm/model_prices_and_context_window_backup.json
|
|
git commit -m "chore(model_prices): refresh Databricks Foundation Model Serving rates - automated monitor detected changed DBU rates on the Databricks pricing pages; refreshed the mapped databricks/* entries."
|
|
git push "https://x-access-token:${GITHUB_TOKEN_FOR_PUSH}@github.com/${GITHUB_REPOSITORY}.git" "$BRANCH"
|
|
{
|
|
cat /tmp/dbx_monitor_pr_body.md
|
|
echo
|
|
echo "---"
|
|
echo "Auto-generated by the Databricks pricing monitor. \`PROMO_SKIPPED\`/\`REVIEW\`/\`MISSING_FROM_PAGE\` lines need human attention; \`UPDATED\` lines were applied automatically."
|
|
} > /tmp/dbx_pr_body_final.md
|
|
gh pr create --repo "${{ github.repository }}" \
|
|
--base litellm_internal_staging \
|
|
--head "$BRANCH" \
|
|
--title "chore(model_prices): refresh Databricks Foundation Model Serving rates" \
|
|
--body-file /tmp/dbx_pr_body_final.md
|