pi-openrouter-fallback

Pi extension for OpenRouter model scoping and automatic switch to openrouter/free on HTTP 403 with auto-resubmit

Package details

extension

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

$ pi install npm:pi-openrouter-fallback
Package
pi-openrouter-fallback
Version
0.1.2
Published
Apr 30, 2026
Downloads
not available
Author
cloveland
License
MIT
Types
extension
Size
7 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ]
}

Security note

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

README

pi-openrouter-fallback

Pi extension that:

  • scopes the OpenRouter model list to a curated subset so /model stays focused
  • watches for HTTP 403 responses from OpenRouter
  • switches to openrouter/free
  • auto-resubmits the last prompt as a follow-up
  • shows OpenRouter model pricing in the footer status area as input/output cost per 1M tokens

Local test

pi -e ./pi-packages/pi-openrouter-fallback

Install from local path

pi install ./pi-packages/pi-openrouter-fallback