This repository contains a small Bash-based monitor for new models listed on OpenRouter. It periodically checks the OpenRouter models API and sends a Slack notification whenever new models are detected.
Files
-
- Fetches models from
https://openrouter.ai/api/v1/models. - Maintains a local state file:
.openrouter_models_last.json. - Uses environment-based configuration loaded from
.env(see.env.example). - On each run:
- Compares current model IDs with the previous run.
- If new models exist:
- Resolves display name and slug.
- Sends a Slack message (via Incoming Webhook) listing:
- Model name
- Model ID
- Direct link:
https://openrouter.ai/models/{slug}
- First run only initializes baseline (no notification).
- Fetches models from
-
- Ignores:
.openrouter_models_last.json(local state).env(local secrets/config)
- Ignores:
-
- Example configuration file.
- Shows how to set:
SLACK_WEBHOOK_URLfor Slack notifications.
Requirements
bashcurljqcomm(typically part of coreutils)
Setup
- Create your environment file:
cp .env.example .env
- Edit
.env:- Set
SLACK_WEBHOOK_URLto your real Slack Incoming Webhook URL.
- Set
- Make the script executable:
chmod +x ./monitor_openrouter_models.sh
- Run once manually to initialize the baseline:
./monitor_openrouter_models.sh
- Add a cron job (example: every 15 minutes):
*/15 * * * * /usr/bin/env bash /absolute/path/to/monitor_openrouter_models.sh >> /var/log/openrouter_models_monitor.log 2>&1