Giter Site home page Giter Site logo

fry69 / orw Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 1.26 MB

Watch for changes in OpenRouter models API and store changes in a SQLite database. Includes a simple web interface.

License: MIT License

TypeScript 90.58% HTML 1.41% CSS 2.89% Python 0.52% Shell 3.35% JavaScript 1.25%

orw's Introduction

orw: OpenRouter API Watcher

The OpenRouter API Watcher is a tool that monitors changes in OpenRouter models and stores those changes in a SQLite database. It queries the model list via the API every hour and includes a simple web interface for viewing the changes.

Installation

For details how to run the OpenRouter API Watcher as user systemd service, see the INSTALL.

Quick overview: To run the OpenRouter API Watcher, you'll need a recent Node.js (v22). The tools/start.sh script includes the necessary installtion steps (assuming you are running on Mac or Linux):

  • install a recent Node.js version via fnm
  • install the necessary dependencies via npm
  • generate the webclient and server code via tsc
  • start the watcher

Note that tools/start.sh will not work if you have not setup a local production environment (see INSTALL).

Web Interface

The OpenRouter API Watcher includes a simple web interface that allows you to view the list of models and the changes that have been detected. By default, the web interface starts on a random, available port. Check the console output for the URL.

RSS feed

The OpenRouter API Watcher also includes a RSS feed generator, available at the /rss endpoint. It will serve the last 50 recorded changes as formatted JSON encapsulated in a <code> tag, so it does not look like a garbled mess in RSS readers.

Testing

You can run a set of simple test cases with the following command:

npm run test

License

This project is licensed under the MIT License.

orw's People

Contributors

fry69 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

mkagit leafspark

orw's Issues

bug: removed models showing as a price change to "free"

hey! found this repo through the OR discord, looks slick! love the native RSS support

@spaceemotion brought up a great point about our main site lacking a good changelog for bulk model addition/changes/deletions, and then i remembered seeing your site posted

when we were looking through some of the recent change entries, we noticed that it detected our removal of airoboros as a price change:
image

after checking our /v1/models api result, i think i see the issue:
image

confusion probs comes from the fact that when we "remove" a model, we try to keep the model's config visible via API & frontend (for analytics purposes, SEO, etc). usually avoid yoinking the model from the API completely

so when a model is removed from the last provider, it's price will be set to -1


happy to try and knock out a quick pr for this here if you think its appropriate! but also feel free to take it on whenever if you would rather that

cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.