Finalizing DeepSeek hierarchy

This commit is contained in:
2026-04-30 18:04:06 +00:00
parent 712a8125aa
commit 706ba17054

View File

@@ -87,14 +87,14 @@ DIRETRIZES:
try:
res_dict = await call_llm(provider, current_model, system_prompt + current_history)
# Lógica de FALLBACK: Se o Llama falhar, tenta o Qwen
# Lógica de FALLBACK: Se o DeepSeek falhar, tenta o Qwen
if (res_dict.get("content", "").startswith("Erro OpenRouter") or "error" in res_dict.get("content", "").lower()) and provider == "openrouter":
backup_model = "qwen/qwen-2.5-72b-instruct"
print(f"⚠️ [FALLBACK] Falha no DeepSeek. Tentando {backup_model}...")
res_dict = await call_llm("openrouter", backup_model, system_prompt + current_history)
except Exception as e:
# Lógica de EMERGÊNCIA: Se houver exceção no Llama, tenta o Qwen
# Lógica de EMERGÊNCIA: Se houver exceção no DeepSeek, tenta o Qwen
print(f"⚠️ [EMERGENCY FALLBACK] Exceção no DeepSeek ({str(e)}). Tentando {backup_model}...")
try:
backup_model = "qwen/qwen-2.5-72b-instruct"