npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

modelis-openai

v0.1.0

Published

Drop-in OpenAI-compatible local proxy for the Modelis Auto Chat API on RapidAPI. Use Modelis in Aider, Cline, Continue, or any OpenAI SDK with one base_url.

Readme

modelis-openai

Use Modelis in Aider, Cline, Continue, or any OpenAI SDK — with one base_url and zero migration.

Modelis auto-routes every request to the best model (GPT / Claude / Gemini) and bills a flat, predictable price per call — not per token. It's distributed through RapidAPI, which uses an X-RapidAPI-Key header instead of the Authorization: Bearer header that coding tools expect.

This is the ~120-line bridge: a zero-dependency local proxy that speaks the OpenAI wire protocol on 127.0.0.1, rewrites the auth, and forwards to Modelis. Point any OpenAI-compatible tool at it and you're done.

your tool ──OpenAI(Bearer)──▶ modelis-openai (localhost) ──X-RapidAPI-Key──▶ Modelis on RapidAPI ──▶ best model

Quickstart

You need a RapidAPI key. Subscribe to the free tier here and copy your key from the Endpoints tab: 👉 https://rapidapi.com/chenxiao5580/api/modelis-auto-chat

Run with Node (18+):

npx modelis-openai
# or:  node modelis-openai.mjs

Run with Docker (no Node needed):

git clone https://github.com/modelishub/modelis-openai
cd modelis-openai
docker build -t modelis-openai .
docker run --rm -p 8787:8787 modelis-openai

Then point your tool at:

| Setting | Value | |-----------|--------------------------------| | Base URL | http://127.0.0.1:8787/v1 | | API key | your RapidAPI key | | Model | modelis-auto |

That's it. Verify it's alive:

curl http://127.0.0.1:8787/health

Tool recipes

Aider

export OPENAI_API_BASE=http://127.0.0.1:8787/v1
export OPENAI_API_KEY=<your-rapidapi-key>
aider --model openai/modelis-auto

Cline / Roo Code (VS Code)

  • API Provider: OpenAI Compatible
  • Base URL: http://127.0.0.1:8787/v1
  • API Key: your RapidAPI key
  • Model ID: modelis-auto

Continue (~/.continue/config.yaml)

models:
  - name: Modelis
    provider: openai
    model: modelis-auto
    apiBase: http://127.0.0.1:8787/v1
    apiKey: <your-rapidapi-key>

Any OpenAI SDK

from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:8787/v1", api_key="<your-rapidapi-key>")
print(client.chat.completions.create(
    model="modelis-auto",
    messages=[{"role": "user", "content": "Hello"}],
).choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "http://127.0.0.1:8787/v1", apiKey: "<your-rapidapi-key>" });
const r = await client.chat.completions.create({
  model: "modelis-auto",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(r.choices[0].message.content);

Cursor: Cursor sends requests from its own servers, so a localhost endpoint won't reach this proxy. Use Cursor only if you expose the proxy on a public URL you control. The local setup above is for tools that call the API from your machine (Aider, Cline, Continue, scripts).


How it works

Streaming (stream: true) is piped straight through, so token-by-token output in your tool works exactly as with the OpenAI API. The proxy:

  1. reads the key from Authorization: Bearer <key> (or MODELIS_RAPIDAPI_KEY),
  2. rewrites the request model to modelis-auto (configurable),
  3. forwards to the RapidAPI gateway with X-RapidAPI-Key / X-RapidAPI-Host,
  4. streams the response back unchanged.

It also answers GET /v1/models and GET /health so tools that probe on startup don't error.


Configuration

All optional — sensible defaults work out of the box.

| Env var | Default | Purpose | |------------------------------|--------------------------------------|---------| | MODELIS_PORT | 8787 | Local listen port | | MODELIS_HOST | 127.0.0.1 | Local bind address (0.0.0.0 in Docker) | | MODELIS_RAPIDAPI_KEY | (unset) | Fallback key if your tool can't send one | | MODELIS_MODEL | modelis-auto | Model sent upstream; set "" to pass the tool's model through | | MODELIS_RAPIDAPI_HOST | modelis-auto-chat.p.rapidapi.com | RapidAPI gateway host (from your Code Snippet) | | MODELIS_UPSTREAM_PATH | /v1/chat/completions | Upstream endpoint path |


Privacy & trust

  • Runs entirely on your machine; the only outbound connection is to the RapidAPI gateway over HTTPS.
  • It does not log, store, or inspect message contents — it only swaps the auth header and forwards bytes.
  • ~120 lines, no third-party dependencies. Read it.

Develop

node --test     # unit + in-process integration tests, zero deps

License

MIT