effect-uai-multi-model-fallback
Installation
SKILL.md
effect-uai multi-model-fallback
Try the primary provider; on RateLimited or Unavailable, advance
the loop state to the next tier and retry the same state.history.
Other typed AiError variants propagate to the caller.
Reach for this when the user says any of:
- "Fall back from OpenAI to Gemini if rate-limited"
- "Try a cheaper model first, expensive one if it fails"
- "Multi-tier provider failover"
State + tiers
import type { LanguageModelService } from "@effect-uai/core/LanguageModel"
import * as Items from "@effect-uai/core/Items"