Repository navigation
feat(workflow): daily monitor of Databricks Foundation Model Serving pricing #38950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
leecoder
wants to merge
14
commits into
BerriAI:main
Choose a base branch
from
leecoder:feat/dbx-pricing-monitor-clean
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8aa1076
feat(workflow): daily monitor of Databricks Foundation Model Serving …
leecoder 6cf693e
fix(workflow): propagate scraper and PR-creation failures, pin action…
leecoder 937ed96
style(workflow): trailing newline
leecoder cf4ca7a
fix(workflow): authenticate git push with GITHUB_TOKEN (persist-crede…
leecoder 906cc70
fix(workflow): move scraper out of workflows dir, fix yml YAML block …
leecoder ca0375a
style(workflow): replace print with sys.stdout.write, ruff format (T2…
leecoder 5434a47
feat(workflow): monitor all published Databricks models, not a fixed …
leecoder acc4a41
ci(workflow): run monitor on the fork and open PRs against upstream
leecoder d7317b9
ci(workflow): fork-only schedule guard and script bootstrap
leecoder a0f5dda
fix(workflow): map gemini-3-pro and sonnet-4-1 to their page rows
leecoder 9bb64b1
ci(workflow): drop the PAT - use the built-in token per repo
leecoder 56d7dff
ci(workflow): accept repository_dispatch and let manual triggers run …
leecoder affdef5
feat(macos-usage): add gateway quota menu bar app
leecoder cf2f311
Revert "feat(macos-usage): add gateway quota menu bar app"
leecoder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| name: Monitor Databricks Pricing | ||
|
|
||
| # Runs on the leecoder/litellm fork on a daily schedule. When the official | ||
| # Databricks pricing pages drift from the registry, the monitor opens a PR | ||
| # against the upstream repo (BerriAI/litellm) from a fork branch. | ||
| on: | ||
| schedule: | ||
| - cron: "0 2 * * *" # daily 02:00 UTC | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| env: | ||
| FORK_REPO: leecoder/litellm | ||
| UPSTREAM_REPO: BerriAI/litellm | ||
| UPSTREAM_BASE: litellm_internal_staging | ||
|
|
||
| jobs: | ||
| monitor-db-pricing: | ||
| # Upstream runs the same checkout on schedule; skip there so only the | ||
| # fork drives the monitor. Manual dispatch still works on upstream. | ||
| if: github.repository == 'leecoder/litellm' || github.event_name == 'workflow_dispatch' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||
| with: | ||
| persist-credentials: false | ||
| fetch-depth: 0 | ||
| repository: ${{ env.UPSTREAM_REPO }} | ||
| ref: ${{ env.UPSTREAM_BASE }} | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| - name: Run monitor | ||
| id: monitor | ||
| shell: bash | ||
|
leecoder marked this conversation as resolved.
Resolved
|
||
| 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 on upstream if changed | ||
| if: steps.monitor.outputs.changed == 'true' | ||
| env: | ||
| GH_TOKEN: ${{ secrets.DBX_MONITOR_TOKEN }} # leecoder PAT with repo + workflow scopes | ||
|
veria-ai[bot] marked this conversation as resolved.
Resolved
|
||
| GITHUB_TOKEN_FOR_PUSH: ${{ secrets.DBX_MONITOR_TOKEN }} | ||
| run: | | ||
| BRANCH="monitor-dbx-pricing-$(date +'%Y-%m-%d')" | ||
| git config user.name "leecoder" | ||
| git config user.email "leecoder@aol.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 remote add fork "https://x-access-token:${GITHUB_TOKEN_FOR_PUSH}@github.com/${FORK_REPO}.git" | ||
| git push fork "HEAD:refs/heads/$BRANCH" | ||
| { | ||
| cat /tmp/dbx_monitor_pr_body.md | ||
| echo | ||
| echo "---" | ||
| echo "Auto-generated by the Databricks pricing monitor running on the ${FORK_REPO} fork. \`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 "$UPSTREAM_REPO" \ | ||
| --base "$UPSTREAM_BASE" \ | ||
| --head "leecoder:$BRANCH" \ | ||
| --title "chore(model_prices): refresh Databricks Foundation Model Serving rates" \ | ||
| --body-file /tmp/dbx_pr_body_final.md | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.