# Model Fallback Heuristic

Multi-provider heuristic model fallback and automatic failover routing across all configured providers.

- Type: Plugin
- Version: 0.3.0
- Updated: 25 Nov 2026
- Publisher: tomkubik
- Category: Models

[Contact us](https://www.ulpi.io/en/support#contact)

## What it does

Multi-provider heuristic model fallback and automatic failover routing across all configured providers (parameter count, context window, cost/budget ceiling, cross-provider diversity, release recency, flash tier, tool support, provider preference, and reasoning effort) — works seamlessly with or without an LLM call. Disclosure — session-start and API-error hooks rewrite fallback_providers and plugin settings in \~/.ulpi/config.yaml (primary model replacement is opt-in via auto_switch_primary_when_unavailable); queries public model catalog endpoints (models.dev/api.json, openrouter.ai/api/v1/models, and inference-api..com/v1/portal/models) to rank candidate models and check free-tier availability; optional interactive CLI setup saves user-entered provider API keys via ulpi_cli.config.save_env_value when explicitly requested.

## Tools it adds

The tools an agent gets once this plugin is installed.

- `fallback_heuristic_resolve`
- `fallback_heuristic_switch`
- `fallback_heuristic_configure`
- `fallback_heuristic_providers`

## Review notes

What an owner reads and accepts before the install is approved.

- Ulpi has not reviewed this version: it is listed in the public plugin catalog, and the install still fetches it at its pinned commit, checks its shape and scans it before you approve

## More in Models

- [Model Forge Image Backend](https://www.ulpi.io/en/marketplace/plugins/model-forge-image-backend): Model Forge local image-generation backend — routes Ulpi image_generate to any OpenAI-compatible images API (media gateway, vLLM-Omni, SGLang Diffusion, ComfyUI).
- [Model Forge Providers](https://www.ulpi.io/en/marketplace/plugins/model-forge-providers): Local engine model-provider profiles for Model Forge (Strata, Project Maya) — run Ulpi chat on local MoE engines and make their models selectable in /model.
- [Model Forge Video Backend](https://www.ulpi.io/en/marketplace/plugins/model-forge-video-backend): Model Forge local video-generation backend — routes Ulpi video_generate to any OpenAI-compatible video job API (media gateway, engines with /v1/videos).

[All listings →](https://www.ulpi.io/en/marketplace) · [Publisher's guide →](https://www.ulpi.io/en/docs) · [Report a problem →](https://www.ulpi.io/en/security#report)
