← Catalog

@neilurk12/pi-free-models

Free model providers for Pi — Kilo and OpenCode with free/paid filtering

Extension

Install

Install with PiG

pig install npm:@neilurk12/pi-free-models

Install with Pi

pi install npm:@neilurk12/pi-free-models
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./dist/index.js"
  ]
}

README

Written by the package's publisher, shown as published in version 1.0.3 (README.md). PiG does not review it.

@neilurk12/pi-free-models

Free model providers for Pi — Kilo Gateway and OpenCode with automatic free/paid filtering.

What it does

Registers two AI model providers into Pi and defaults to showing only free models:

ProviderModelsAuth
Kilo300+ via Kilo Gateway (OpenRouter-compatible)Optional OAuth or API key
OpenCodeModels via OpenCode Zen gatewayAPI key from auth.json

Free model detection uses adaptive heuristics — cost-based for providers that expose pricing, name-based for those that don't.

Install

pi install npm:@neilurk12/pi-free-models

Requires Pi and Node ≥ 22.

Configuration

Config lives at ~/.pi/free-models.json (separate from Pi's built-in providers).

Options

KeyTypeDefaultDescription
free_onlybooleantrueShow only free models globally
kilo_show_paidbooleanfalseShow paid Kilo models
opencode_show_paidbooleanfalseShow paid OpenCode models
kilo_api_keystring—Kilo API key (env: KILO_API_KEY)
opencode_api_keystring—OpenCode API key (env: OPENCODE_API_KEY)
hidden_modelsstring[][]Model IDs to hide ("model-id" or "provider/model-id")

Environment variables take priority over the config file.

Commands

CommandDescription
/toggle-freeToggle global free-only mode across all providers
/toggle-kiloToggle Kilo between free and all models
/toggle-opencodeToggle OpenCode between free and all models
/free-providersShow free/paid model counts by provider
/login kiloOAuth login for Kilo (unlocks paid models)

How free detection works

The extension uses two routes:

  • Route A (pricing-exposed providers like Kilo): A model is free if cost.input === 0 && cost.output === 0, or its name contains "free". When pricing data is missing for a specific model, falls back to name-only.
  • Route B (non-pricing providers like OpenCode): A model is free if its name contains "free" (case-insensitive).

Logging

Logs go to ~/.pi/free-models.log (5 MB rotation). Control with env vars:

VariableDefaultDescription
LOG_LEVELerrorConsole log level (debug, info, warn, error)
PI_FREE_MODELS_LOG_LEVELdebugFile log level
PI_FREE_MODELS_LOG_PATH~/.pi/free-models.logLog file path
PI_FREE_MODELS_FILE_LOGtrueSet false to disable file logging

License

MIT