pi-nanogpt

NanoGPT provider extension for Pi coding agent — dynamic model discovery with reasoning, pricing, and modality metadata

Packages

Package details

extension

Install pi-nanogpt from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-nanogpt
Package
pi-nanogpt
Version
1.0.3
Published
Sep 26, 2026
Downloads
698/mo · 25/wk
Author
belovedemperor
License
MIT
Types
extension
Size
10.4 KB
Dependencies
0 dependencies · 0 peers
Pi manifest JSON
{
  "extensions": [
    "nanogpt/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-nanogpt

Access 100+ AI models via nano-gpt.com directly inside Pi coding agent.


Why NanoGPT?

NanoGPT gives you access to a wide range of models — Claude, GPT-4o, Gemini, DeepSeek, Llama, and more — all through a single API key, with both pay-as-you-go and subscription options.

This extension wires NanoGPT into Pi as a first-class provider, with automatic model discovery at startup so you always see the full, up-to-date list of available models.


Features

  • 🔑 Simple API key auth — login directly inside Pi, no environment variables needed
  • 🤖 Dynamic model list — fetched live from NanoGPT
  • ⚡ OpenAI-compatible — works seamlessly with Pi's standard completions pipeline
  • 🔁 Reasoning model support — flags all reasoning-capable models (not just :thinking), maps thinking levels (off/low/high/max) from the provider's declared reasoning efforts
  • 💰 Rich metadata — real pricing, context windows, max output, image-input flags
  • 🏷️ Subscription markers — subscription-included models show a " [sub]" suffix; set the NANOGPT_SUBSCRIPTION_ONLY environment variable to register only subscription-included models

Install

pi install npm:pi-nanogpt

Setup

1. Get your API key

Go to nano-gpt.com/api and copy your API key.

2. Login inside Pi

pi

Once Pi starts, set your API key with:

/login nanogpt

Paste your API key when prompted. Pi will save it automatically — you won't need to do this again.

NanoGPT models will appear automatically in /model (or Ctrl+L).


Selecting a model

Inside Pi, press Ctrl+L or type /model and search for any NanoGPT model by name:

/model
> deepseek         # filters DeepSeek models
> claude           # filters Claude models
> gpt              # filters GPT models

How it works

At startup, the extension:

  1. Reads your saved API key (stored by Pi after /login nanogpt)
  2. Fetches the full model list from https://nano-gpt.com/api/v1/models
  3. Registers all models under the NanoGPT provider in Pi
  4. Falls back to a minimal built-in list if the fetch fails (e.g. no internet)

Requirements


License

MIT