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

@letta-ai/codex-quota-router

v0.1.0

Published

Letta Code mod that routes Codex conversations around exhausted ChatGPT OAuth plan quotas.

Readme

Codex Quota Router

A Letta Code mod that automatically moves a conversation to another connected ChatGPT OAuth plan when its current Codex plan has exhausted its usage allowance.

Install

letta install npm:@letta-ai/codex-quota-router

Run /reload after installation.

Behavior

Before a Codex turn, the mod:

  1. Discovers connected non-base chatgpt_oauth providers and caches that verified set.
  2. Reads current usage for each verified plan.
  3. Checks that the conversation's selected provider is verified and has reached its limit.
  4. If needed, changes only the conversation-level model provider to the verified available plan with the most quota remaining.

Both sides of every route must be in the verified ChatGPT OAuth set. Base providers, non-OpenAI providers, unknown aliases, and stale manually injected names are ignored.

The model name is preserved. For example, an exhausted chatgpt-work/gpt-5.5 conversation may move to chatgpt-personal/gpt-5.5.

The agent's default model is not changed. In the TUI, a persistent transcript notification reports the quota error, mod name, replacement model, and reasoning effort. Like the Dreamed; no durable memory changes were needed. notification, it is local UI state and is never added to the agent's messages or context.

Commands

/codex-quota-router status
/codex-quota-router refresh
/codex-quota-router on
/codex-quota-router off
/codex-quota-router plans chatgpt-work,chatgpt-personal

Connected plans are discovered automatically on refresh. The plans command can restrict failover to a specific allowlist.

State and network access

The mod stores usage metadata and configuration in:

~/.letta/mods/codex-quota-router.state.json

It does not store OAuth tokens. Usage and provider metadata are read through the authenticated Letta client already used by Letta Code. The state file is written with owner-only permissions when created.

Desktop listener sessions cannot make general Letta client requests from mods. They use the most recently cached usage snapshot written by a CLI or another supported surface; run /codex-quota-router refresh in the CLI if that cache is missing or stale. On Letta Code 0.30.8 or newer, the mod also overrides the in-flight Desktop turn so the replacement plan takes effect immediately rather than only updating persisted conversation state.

Safety and recovery

Mods are trusted local code. Review the source before installing third-party mods.

Disable automatic switching with /codex-quota-router off. If a mod breaks startup or command handling, recover with:

letta --no-mods
# or
LETTA_DISABLE_MODS=1 letta

See MOD.md for agent-facing semantics and adaptation notes.