rag-quick is NOT permanently broken. Primary deployments work right now (5/5 test calls succeeded via zai glm-4.7-flash). The problem is the fallback chain is permanently broken: when ALL 11 primary deployments simultaneously fail (rate limits, timeouts, local down), LiteLLM falls to 2 dead fallbacks. It's intermittent/fragile, not dead.
The rag-quick fallback chain (stored in LiteLLM PostgreSQL DB, not the YAML) is:
rag-quick → chutes/Qwen/Qwen3-32B-TEE → llmgateway-free
Both fallbacks are permanently dead:
| Fallback | Error | Root Cause |
|---|---|---|
chutes/Qwen/Qwen3-32B-TEE |
402 "Quota exceeded and account balance is $0.0, please pay with fiat or send tao to ..." | Chutes.ai account has $0 balance. "An active plan is required" = Chutes.ai message when no active subscription. |
llmgateway-free |
"api_key client option must be set" | No API key configured — litellm_credential_name: null, api_key: null in DB. |
When all 11 primary deployments are down simultaneously → fallback to chutes (dead) → fallback to llmgateway-free (dead) → 403.
~/Documents/Projects/bhd/llm-configuration/config/litellm/24001/config.yaml(lines 1-80) — LiteLLM primary config. Key:store_model_in_db: true→ models live in PostgreSQL, NOT in YAML.master_key: sk-litellm-asdwasdq. Admin UI athttp://100.114.135.99:24001/ui.~/Documents/Projects/bhd/llm-configuration/config/models.jsonnet(lines 270-300, 485) — Source of truth for model definitions + fallback chains. Line 485:{ "rag-quick": ["chutes/Qwen/Qwen3-32B-TEE", "llmgateway-free"] }.~/Documents/Projects/bhd/verifier-loop/src/acp/adapters.rs(lines 167-175) —pi-rag-quickadapter spawnspi --model bhd-litellm/rag-quick --mode json.~/.pi/agent/auth.json—bhd-litellmprovider key:sk-litellm-asdwasdq(this IS the master key).~/.verifier-loop/config.json— Live config:dumpAdapter: "pi-rag-quick",smartAdapter: "pi".~/.verifier-loop/health.jsonl— 13 unhealthy events (Aug 9-10), zero on Aug 11.
"pi-rag-quick" => Ok(Adapter {
spawn: "pi --model bhd-litellm/rag-quick --mode json".to_string(),
resume: "pi --session {sid} --model bhd-litellm/rag-quick --mode json".to_string(),
..Default::default()
}),| # | Model | API Base | Status |
|---|---|---|---|
| 1-6,9 | glm-4.7-flash |
api.z.ai/api/paas/v4 |
✅ Working (zai-free, zhipu-key1/key2) |
| 7-8 | glm-4.5-flash |
api.z.ai/api/coding/paas/v4 |
✅ Working |
| 3 | openai/claude-haiku-4-5-free |
api.llmgateway.io/v1 |
llmgateway-free group has NONE |
| 10 | cyankiwi/Qwen3.5-4B-AWQ-4bit |
http://100.114.135.99:8032/v1 |
✅ Local TabbyAPI UP |
| 11 | Qwen/Qwen3.5-9B |
api.featherless.ai/v1 |
chutes/Qwen/Qwen3-32B-TEE → llmgateway-free
- config.yaml fallbacks (lines 52-66) do NOT include rag-quick — the DB has a different config than the YAML.
- The running fallback list (from error output) includes:
role-smart,role-smart-rev,role-smart-kimi,rag-quick,rag-long.
jewilo (dumpAdapter=pi-rag-quick)
→ spawns: pi --model bhd-litellm/rag-quick --mode json
→ pi reads auth.json: bhd-litellm.apiKey = sk-litellm-asdwasdq
→ pi sends to LiteLLM proxy at 100.114.135.99:24001
→ LiteLLM routes "rag-quick" model group
→ tries 11 primary deployments (round-robin)
→ if ALL fail → fallback chain: chutes (dead: $0) → llmgateway-free (dead: no key)
→ if fallbacks also fail → 403/402 error bubbles up to pi → jewilo marks V* as unhealthy
- chutes: Add funds to Chutes.ai account (send tao/pay fiat) — external billing action.
- llmgateway-free: Add API key via Admin UI (
http://100.114.135.99:24001/ui) → edit model groupllmgateway-free→ set credential.
Via LiteLLM Admin UI or API (POST /model/update), change rag-quick fallback from:
["chutes/Qwen/Qwen3-32B-TEE", "llmgateway-free"]
to something that actually works, e.g.:
["role-quick", "glm-4-flash/fallback"]
Then sync the change back to config/models.jsonnet:485 (source of truth).
If the 11 primary deployments are sufficient, remove the fallback chain. Risk: when all primaries rate-limit simultaneously, no safety net.
~/Documents/Projects/bhd/llm-configuration/config/models.jsonnet line 485 — the fallback chain source of truth. The live config is in the LiteLLM PostgreSQL DB (manage via Admin UI at http://100.114.135.99:24001/ui or /v1/model/info API). Fix must be applied in BOTH places.
curl -H "Authorization: Bearer sk-litellm-asdwasdq" rag-quick→ works (5/5, returned valid completions via glm-4.7-flash)curl chutes/Qwen/Qwen3-32B-TEE→ 402 "Quota exceeded and account balance is $0.0"curl llmgateway-free→ 500 "api_key client option must be set" (no credential)- Local TabbyAPI
:8032→ UP (servingcyankiwi/Qwen3.5-4B-AWQ-4bit) store_model_in_db: true→ YAML model_list is IGNORED; models in PostgreSQL- Goal
c3e4243f(completed successfully) useddumpAdapter: "pi-rag"(not pi-rag-quick) — different adapter - Latest goal
d4cc0a75hasdumpAdapter: null— using default backend, not rag-quick
- chutes.ai billing: Who owns the Chutes account? Is it intended as a free tier or paid? Balance needs top-up or removal.
- llmgateway-free key: Was the API key ever configured? The
openai/claude-haiku-4-5-freemodel exists under rag-quick WITH a key, but the standalonellmgateway-freegroup has no credential — they may share the same upstream but different DB entries. - jsonnet → DB sync: How does
models.jsonnetget loaded into the PostgreSQL DB? (Is there a register script? The jsonnet comments mentionregister_all_models.py.) Any DB-side fix needs to be reflected in the jsonnet source to survive re-registration.