Repository navigation
Conversation
Greptile SummaryThe PR adds a scheduled and manually dispatchable workflow that scrapes Databricks model-serving rates and updates both model-price maps when rates change.
Confidence Score: 4/5The PR is not yet safe to merge because detected pricing changes still cannot reach the pull-request creation step. The monitor writes a step output without declaring Files Needing Attention: .github/workflows/monitor_databricks_pricing.yml
|
| Filename | Overview |
|---|---|
| .github/workflows/monitor_databricks_pricing.yml | Adds the daily monitor and authenticated PR workflow, but the previously reported missing monitor step ID remains. |
| scripts/monitor_databricks_pricing.py | Adds fixed-page DBU parsing, price derivation, dual-map updates, and lint-compliant stdout output. |
Reviews (4): Last reviewed commit: "style(workflow): replace print with sys...." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 2 · PR risk: 0/10 |
|
@greptileai Please re-review the latest commit — the three flagged items (pipefail, PR-create failure propagation, action SHA pinning) are fixed in d66a4ea and 14439f1. |
|
@greptileai Re-review head d31b62b — git push now authenticates with GITHUB_TOKEN via x-access-token URL (persist-credentials: false was blocking the push). Please confirm the workflow wiring is correct. |
|
@greptileai Re-review head 1bf8f61 — T201 (print) violations fixed with sys.stdout.write and ruff format applied; YAML/scripts relocated per lint gates. All local lint checks pass. Please confirm. |
…pricing 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.
…s to SHAs - 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)
…ntials: false) 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'.
…scalar - .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
…01 gate) scripts/monitor_databricks_pricing.py violated T201 (print) which the LiteLLM Linting workflow gates; switch to sys.stdout.write and run ruff format so lint checks pass locally before CI re-run.
…pair
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 BerriAI#39714.
640c2bd to
5434a47
Compare
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
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 BerriAI#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 registry prices both models from rows shared with siblings, but the mapping only listed one key per row, so the monitor flagged them MISSING_FROM_PAGE every run: - 'Gemini 3.0 Pro, 3.1 Pro' also prices databricks-gemini-3-pro - 'Claude Sonnet 4' also prices databricks-claude-sonnet-4-1 Verified against upstream/staging values: all four entries match the page list rates (35.714/214.286/3.571 and 42.857/214.286/4.286 DBU).
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 BerriAI#38950 lands upstream. DBX_MONITOR_TOKEN secret is no longer referenced.
…on the fork - repository_dispatch (event_type: dbx-monitor) provides an external trigger for price-drift alerting to kick off a check - the job guard previously allowed only workflow_dispatch on the fork, which would have skipped repository_dispatch runs; now only the schedule event is pinned to upstream so cron never races, while both manual trigger types run on either repo
56d7dff to
c0d96ec
Compare
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 BerriAI#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 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 BerriAI#38950 lands upstream. DBX_MONITOR_TOKEN secret is no longer referenced.
7c1cea8 to
56d7dff
Compare
Summary
Adds a GitHub Action (daily 02:00 UTC) that keeps the Databricks Foundation Model Serving rates in
model_prices_and_context_window.jsonfresh - the one provider family the existingauto_update_price_and_context_window.ymldoes not cover (it only syncs OpenRouter and Vercel AI Gateway, both JSON APIs).How it works (registry-wide, not a fixed list)
The monitor parses every Standard Pay Per Token DBU table on both pricing pages (open, proprietary) and maps numeric columns by header text (Input / Output / Cache read / Cache write - column order differs per table). It then compares against every mapped
databricks/*registry entry and reports:UPDATED- list-rate entry drifted from the page: rate fields refreshed in place (metadata/context windows untouched)PROMO_SKIPPED/PROMO_ON_PAGE- promotional pricing (x0.8) involved; left for a human (e.g. gemini-2.5, gpt-5.6-terra, grok-4.6 promos)RATES_AVAILABLE/NOT_IN_REGISTRY/UNMAPPED_PAGE_MODEL- new-model signalMISSING_FROM_PAGE- retirement signalCache rates: page value wins; when a cache column is n/a the entry bills cache at the input rate (repo convention); custom conventions (gemini 0.1x reads) are preserved. Long-context tiers and image/audio token sub-rows are skipped.
NO_CHANGEshort-circuits PR creation.Runs where it lives - no PAT, no secrets
GITHUB_REPOSITORY), so the built-ingithub.tokencovers push andgh pr create- the same pattern as this repo's ownauto_update_price_and_context_windowworkflowworkflow_dispatch/repository_dispatchon the fork runs the whole pipeline against the upstream checkout (verified live: run 34196076779 - upstream checkout + script bootstrap + monitor,NO_CHANGEgreen in 1m05s)scheduletoBerriAI/litellm); the fork keeps manual triggers only, so the two never race on the same baserepository_dispatch(event_type: dbx-monitor) lets external price-drift alerting kick off a checkVerified locally and in Actions
NO_CHANGEwith correct classifications (PROMO_SKIPPEDx2,PROMO_ON_PAGEfor gpt-5.6-terra's live promo, 8 retired models flaggedMISSING_FROM_PAGE)gpt-5/gemma-3-12bin a scratch copy - monitor restored them to exactly the upstream-stored values and wrote the PR body report; second run was idempotent (NO_CHANGE)