Commit graph

10 commits

Author SHA1 Message Date
leecoder
56d7dff551 ci(workflow): accept repository_dispatch and let manual triggers run 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
2026-09-08 15:34:22 +09:00
leecoder
9bb64b1120 ci(workflow): drop the PAT - use the built-in token per repo
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.
2026-09-08 14:57:05 +09:00
leecoder
d7317b9d7d ci(workflow): fork-only schedule guard and script bootstrap
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
2026-09-08 12:51:43 +09:00
leecoder
acc4a41f21 ci(workflow): run monitor on the fork and open PRs against upstream
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
2026-09-08 12:22:01 +09:00
leecoder
5434a47585 feat(workflow): monitor all published Databricks models, not a fixed 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 #39714.
2026-09-08 09:34:11 +09:00
leecoder
906cc70573 fix(workflow): move scraper out of workflows dir, fix yml YAML block 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
2026-09-08 09:34:11 +09:00
leecoder
cf4ca7ab13 fix(workflow): authenticate git push with GITHUB_TOKEN (persist-credentials: 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'.
2026-09-08 09:34:11 +09:00
leecoder
937ed96425 style(workflow): trailing newline 2026-09-08 09:34:11 +09:00
leecoder
6cf693e12e fix(workflow): propagate scraper and PR-creation failures, pin actions 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)
2026-09-08 09:34:11 +09:00
leecoder
8aa1076ad8 feat(workflow): daily monitor of Databricks Foundation Model Serving 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.
2026-09-08 09:34:11 +09:00