REFAC: Consolidate LLM providers into Unified Gateway

This commit is contained in:
2026-04-09 20:25:13 -04:00
parent 2a99517dc8
commit 3b21ae6f6c
19 changed files with 494 additions and 760 deletions

View File

@@ -43,9 +43,14 @@
(result (if model
(funcall backend-fn prompt system-prompt :model model)
(funcall backend-fn prompt system-prompt))))
(if (and (stringp result) (search ":LOG" result) (or (search "Failure" result) (search "missing" result)))
(kernel-log "SYSTEM 1: Backend ~a failed. Falling back..." backend)
(return-from ask-neuro result))))))
(cond
((listp result)
(if (eq (getf result :status) :success)
(return-from ask-neuro (getf result :content))
(kernel-log "SYSTEM 1: Backend ~a failed: ~a" backend (getf result :message))))
((and (stringp result) (search ":LOG" result) (or (search "Failure" result) (search "missing" result)))
(kernel-log "SYSTEM 1: Backend ~a failed. Falling back..." backend))
(t (return-from ask-neuro result))))))
"(:type :LOG :payload (:text \"Neural Cascade Failure\"))"))
;; --- Sovereign Service Fallbacks ---