install
source · Clone the upstream repo
git clone https://github.com/Najia-afk/Aria_moltbot
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/Najia-afk/Aria_moltbot "$T" && mkdir -p ~/.claude/skills && cp -r "$T/aria_skills/llm" ~/.claude/skills/najia-afk-aria-moltbot-llm && rm -rf "$T"
manifest:
aria_skills/llm/SKILL.mdsource content
aria-llm — LLM Fallback Chain Skill
Layer: 2 (Infrastructure) | Category: LLM | Status: Active (S-45 Phase 3)
Purpose
Provides resilient LLM completions with per-model circuit breakers and automatic fallback through the priority chain defined in
aria_models/models.yaml. Never hardcodes model names — all routing comes from routing.fallbacks in models.yaml.
Model Chain
Loaded dynamically at startup from
aria_models/models.yaml (routing.fallbacks).Tier order:
local → free → paid
| Priority | Tier | Model Source |
|---|---|---|
| 1 | local | (MLX on Mac) |
| 2+ | free | OpenRouter free tier models |
| last | paid | (Moonshot) |
Circuit Breaker
Each model has an independent circuit breaker:
- Opens after
consecutive failures (default: 3)circuit_failure_threshold - Resets after
(default: 60s)circuit_reset_seconds - When a model is tripped, the skill automatically tries the next in chain
Configuration (env vars)
| Variable | Default | Description |
|---|---|---|
| | LiteLLM proxy base URL |
| | API key for LiteLLM |
Tools
| Tool | Description |
|---|---|
| Completion via fallback chain |
| Bypass chain — use specific model |
| Inspect current chain (from models.yaml) |
| Reset all circuit breakers to closed |
Usage
# Via run_skill.py python3 aria_mind/skills/run_skill.py llm complete '{"messages": [{"role": "user", "content": "Hello"}]}' # Via api_client (preferred) aria-llm.complete({"messages": [{"role": "user", "content": "Summarise this text"}]})
Dependencies
— HTTP client for LiteLLM proxyhttpx
— readsaria_models.loader
for fallback chainmodels.yaml- LiteLLM proxy service running at
LITELLM_URL