The monitor used to run on the fork and open PRs against upstream,
which structurally requires a cross-repo PAT. Two changes remove it:
- PRs are created in whichever repo the workflow runs in
(GITHUB_REPOSITORY), so the built-in github.token covers both push
and pr create - same pattern as upstream's
auto_update_price_and_context_window workflow
- the job guard flips: upstream owns the merged schedule
(github.repository == BerriAI/litellm), the fork stays dispatch-only,
so the two never race on the same base
The script bootstrap from the fork branch stays until #38950 lands
upstream. DBX_MONITOR_TOKEN secret is no longer referenced.
Two fixes for the fork-run setup:
- the monitor audits upstream's registry (checkout pins
BerriAI/litellm@litellm_internal_staging), where the script does not
exist until #38950 lands - bootstrap it from the fork branch when
missing
- cron would fire on both repos once merged; guard the job to the fork
so only leecoder/litellm opens PRs and upstream never races
The monitor now executes on the leecoder/litellm fork:
- checkout pins the upstream repo and its litellm_internal_staging base,
so the monitor always audits upstream's registry, not the fork's
- schedule guard skips upstream's own checkout (only the fork runs it);
manual workflow_dispatch still works on upstream
- changed rates push to a dated branch on the fork and open the PR
against BerriAI/litellm with head leecoder:<branch>
- PR identity: leecoder / leecoder@aol.com
- auth uses the DBX_MONITOR_TOKEN secret (leecoder PAT with repo
scopes); the default GITHUB_TOKEN cannot create PRs across forks
- permissions trimmed to contents: write
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.
- .github/scripts/assert_workflow_dir_hygiene requires only .yml files in
.github/workflows/; relocate monitor_databricks_pricing.py to scripts/
- Fix YAML ScannerError by turning the multi-line git commit -m block into
a single line (YAML block scalar containment issue)
- update the run step path to scripts/monitor_databricks_pricing.py
actions/checkout runs with persist-credentials: false, so the previous
'git push origin' would fail with auth error. Push over HTTPS with an
x-access-token URL using GITHUB_TOKEN. Addresses Greptile review:
'authenticated Git push configuration'.
- Add set -o pipefail so a scraper exception fails the job instead of being
misread as a price change
- Drop the || true suppression so a failed PR creation fails the run
- Pin actions/checkout and actions/setup-python to immutable commit SHAs
(repo convention, addresses Greptile/veria-ai review comments)
Adds a GitHub Action (daily 02:00 UTC + manual dispatch) that:
- Scrapes the official DBU rates for DeepSeek V4 Flash (0731) / V4 Pro (0813)
from https://www.databricks.com/product/pricing/foundation-model-serving
- Derives per-token USD at $0.07/DBU and updates both
model_prices_and_context_window.json and the packaged backup
- Opens a PR (base litellm_internal_staging) only when a rate actually changed
Runs on the leecoder fork (no repo guard) so the fork stays current and can
feed an upstream PR on demand.