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

openai-assistants-sunset

v0.1.0

Published

Scan JS/TS + Python for OpenAI Assistants & Threads API call-sites and gate CI on the Aug 26 2026 shutdown. Zero dependencies.

Downloads

173

Readme

openai-assistants-sunset

On August 26, 2026 OpenAI shuts down the Assistants API. /v1/assistants, /v1/threads, and /v1/threads/runs start returning errors — no grace period, no degraded mode. OpenAI has said it will not ship a migration tool, and Threads have no automatic migration to the Responses/Conversations API.

This finds every call-site that will break, with file and line number, and fails your CI build so a forgotten one can't ship. Zero dependencies, no config, one command:

npx openai-assistants-sunset
52 day(s) until the Assistants API sunset (2026-08-26).

Call-sites that break at sunset (7 in 2 file(s)):

  src/agent.ts
    41: const assistant = await openai.beta.assistants.create({ model: 'gpt-4o' });
      ↳ openai.beta.assistants.* — Assistants resource, removed at sunset
    58: const run = await openai.beta.threads.runs.create(thread.id, { ... });
      ↳ openai.beta.threads.* — no auto-migration to Conversations

  workers/ingest.py
    12: vs = client.beta.vector_stores.create(name="kb")
      ↳ client.beta.vector_stores.* — beta vector stores move to the top-level API surface

Why a scanner and not grep

A bare grep beta.assistants misses the raw-HTTP callers (fetch('/v1/threads')), the OpenAI-Beta: assistants=v2 header, and the Python SDK, while flagging every commented-out line and string that happens to contain the word. This scans JS/TS and Python, ignores commented-out code, separates the sure things from the maybes, and — the part grep can't do — gives you a CI gate keyed to the actual shutdown date.

What it catches

High confidence (these break at sunset):

  • openai.beta.assistants.* / client.beta.assistants.*
  • openai.beta.threads.* / client.beta.threads.* — including .runs, .messages, .runs.steps
  • openai.beta.vectorStores.* / client.beta.vector_stores.*
  • deep imports of openai/resources/beta/assistants and .../threads
  • raw /v1/assistants and /v1/threads URLs
  • the OpenAI-Beta: assistants=v2 header

Low confidence (reported separately, never fails CI on its own):

  • assistant_id / thread_id references — usually config or a stored Threads pointer worth a look, since Threads don't auto-migrate.

Gate CI on the deadline

--ci exits non-zero when any high-confidence call-site is found:

# .github/workflows/assistants-sunset.yml
name: assistants-sunset
on: [push, pull_request]
jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20 }
      - run: npx openai-assistants-sunset --ci

Once you've migrated a package, the gate keeps the API from creeping back in.

Options

npx openai-assistants-sunset [paths...] [options]

  --ci             Exit 1 if any high-confidence call-site is found
  --json           Machine-readable output
  --high-only      Hide the low-confidence assistant_id / thread_id list
  --ignore <dir>   Extra directory name to skip (repeatable)
  --no-color       Disable ANSI color
  -h, --help
  -v, --version

node_modules, .git, dist, build, .venv, venv, __pycache__ and the usual build dirs are skipped by default.

JSON

npx openai-assistants-sunset --json > assistants-inventory.json
{
  "sunset": "2026-08-26T00:00:00Z",
  "daysToSunset": 52,
  "scannedFiles": 214,
  "highCount": 7,
  "lowCount": 1,
  "filesWithHigh": 2,
  "findings": [ { "file": "src/agent.ts", "line": 41, "surface": "assistants", "confidence": "high", "hint": "..." } ]
}

Pipe it into a dashboard, a PR comment, or your own migration tracker.

What this does not do

It finds the call-sites; it does not rewrite them. The Assistants → Responses move is a real design change — Threads are stateful and Conversations are not — and there is no mechanical codemod for it. Use this to get an exact, shrinking punch-list and to make sure nothing slips past the date. The migration itself is on you: https://developers.openai.com/api/docs/assistants/migration

Programmatic use

const { scan } = require('openai-assistants-sunset');
const result = scan(['src'], { root: process.cwd() });
console.log(result.highCount, result.daysToSunset);

License

MIT


Built autonomously by an AI agent.