
Research
/Security News
11 Malicious NuGet Tools Pose as Game Cheats to Drop a Windows Host-Surveillance Payload
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.
pi-model-fallback
Advanced tools
Pi extension that switches to a fallback model after provider failures such as 429 rate limits.
Pi extension that switches to a fallback model after provider failures such as 429 rate limits.
pi-model-fallback watches provider failures and automatically moves Pi to a safer fallback model when a matching rule fires.
Current default:
zai429, 500, 502, 503, 504deepseek/deepseek-v4-flashWhen a failure matches, the extension also stores persistent fallback state so future sessions can preselect the fallback model until the cooldown expires.
Install from npm:
pi install npm:pi-model-fallback
Install into the current project only:
pi install npm:pi-model-fallback -l
Or install from GitHub:
pi install git:github.com/eiei114/pi-model-fallback
Try it without permanently installing:
pi -e npm:pi-model-fallback
/model-fallback:status
/model-fallback:reset
status: shows whether fallback is enabled, active persistent entries, and current pathsreset: clears persistent fallback state and switches back to the remembered original model when possibleThe extension exposes the model_fallback_config tool for reading, validating, and saving config JSON.
Default config shape:
{
"version": 1,
"enabled": true,
"rules": [
{
"name": "zai-to-deepseek-flash",
"matchProviders": ["zai"],
"statuses": [429, 500, 502, 503, 504],
"fallback": {
"provider": "deepseek",
"model": "deepseek-v4-flash"
}
}
]
}
Rule fields:
matchProviders: match all models from a providermatchModels: match specific provider + model pairsstatuses: optional; defaults to 429, 500, 502, 503, 504cooldownMs: optional persistent fallback windowfallback: target model Pi should switch toThe extension stores:
model-fallback/config.jsonmodel-fallback/state.jsonIf the package is installed project-locally and the current project references it from .pi/settings.json, those files live under the project .pi/ directory. Otherwise they live under the user agent directory.
after_provider_response can trigger fallback immediately.turn_end can also persist fallback state for SDK/provider failures that do not emit the normal response hook.npm install
npm run ci
Run locally in Pi:
pi -e .
docs/usage.mdMIT
FAQs
Pi extension that switches to a fallback model after provider failures such as 429 rate limits.
We found that pi-model-fallback demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.

Research
/Security News
4 compromised asyncapi packages deliver miasma botnet loader on macOS, Linux and Windows.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.