Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

Critical fix from llama.cpp JSON grammar to forbid un-escaped escape characters inside strings, which breaks parsing. (#3782)

Craig Hughesb84aea168532
diff --git a/llm/server.go b/llm/server.go
index 6cb01fa01..0a8157987 100644
--- a/llm/server.go
+++ b/llm/server.go
@@ -606,7 +606,7 @@ array ::=
string ::=
"\"" (
- [^"\\] |
+ [^"\\\x7F\x00-\x1F] |
"\\" (["\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]) # escapes
)* "\"" ws