fix(gateway): Case-insensitive key lookup in get-nested (OpenRouter response fix)
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 3s

This commit is contained in:
2026-04-19 17:35:25 -04:00
parent ec1f4af623
commit 63e7e9ce32

View File

@@ -70,7 +70,9 @@ A robust utility to navigate deeply nested JSON alists produced by `cl-json`, ha
;; Descend into arrays ;; Descend into arrays
(loop while (and (listp val) (listp (car val)) (not (keywordp (caar val)))) (loop while (and (listp val) (listp (car val)) (not (keywordp (caar val))))
do (setf val (car val))) do (setf val (car val)))
(let ((pair (assoc k val))) (let ((pair (or (assoc k val)
(assoc (intern (string-upcase (string k)) :keyword) val)
(assoc (intern (string-downcase (string k)) :keyword) val))))
(if pair (if pair
(setf val (cdr pair)) (setf val (cdr pair))
(return-from get-nested nil)))) (return-from get-nested nil))))