feat: add pricing sync script and update model prices from OpenRouter (#27)
* fix: pin npm package versions in MCP integration templates Prevent supply chain attacks by pinning exact versions instead of using unpinned `npx -y @package` which pulls latest on every run. 23 of 25 integrations pinned. sqlite-mcp and aws skipped (packages not found on npm registry). * fix: use stable azure/mcp version instead of beta * feat: add pricing sync script and update model prices from OpenRouter API - scripts/sync-pricing.py fetches real-time pricing from OpenRouter - Updated 64 price fields across 13 provider files - Run periodically or in CI to keep prices current
This commit is contained in:
42 files changed
+1388
-64
No files matched your search
@@ -0,0 +1,42 @@
|
||||
name: Sync Model Pricing
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Run daily at 06:00 UTC
|
||||
- cron: '0 6 * * *'
|
||||
workflow_dispatch: # Allow manual trigger
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
sync-pricing:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Sync pricing from OpenRouter API
|
||||
run: python scripts/sync-pricing.py --create-missing
|
||||
|
||||
- name: Check for changes
|
||||
id: changes
|
||||
run: |
|
||||
git diff --quiet && echo "changed=false" >> "$GITHUB_OUTPUT" || echo "changed=true" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Create PR if prices changed
|
||||
if: steps.changes.outputs.changed == 'true'
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
commit-message: "chore: sync model pricing from OpenRouter API"
|
||||
title: "chore: sync model pricing from OpenRouter API"
|
||||
body: |
|
||||
Automated pricing sync from [OpenRouter API](https://openrouter.ai/api/v1/models).
|
||||
|
||||
Run by `sync-pricing.yml` cron job.
|
||||
branch: chore/auto-sync-pricing
|
||||
delete-branch: true
|
||||
Reference in new issue
Block a user