fix(api): escape the model name in the unroutable model error
Build the error body with sjson instead of formatting the requested model name into a JSON literal. The name is client supplied and is echoed back verbatim, so a quote in it produced a malformed body and a crafted name could append fields that overwrote the error code clients branch on, for example turning model_not_found into insufficient_quota. Reported by the Codex reviewer on #4820.
S
sususu committed
b148af80bd771af5927c0f9404ab1e6aa7b0c3e5
Parent: 579f5e3
Committed by sususu98 <33882693+sususu98@users.noreply.github.com>
on 8/6/2026, 12:49:23 PM