[Bugfix] Fix Gemma4 tool parser converting bare null to string "null" (#39679)

Signed-off-by: KimuGenie <baby11686@naver.com>
Signed-off-by: Chauncey <chaunceyjiang@gmail.com>
Co-authored-by: Chauncey <chaunceyjiang@gmail.com>
This commit is contained in:
김의진
2026-04-14 04:44:46 +00:00
committed by GitHub
co-authored by Chauncey
parent db8a6d66bf
commit b075604da1
2 changed files with 12 additions and 0 deletions
+4
View File
@@ -66,6 +66,10 @@ def _parse_gemma4_value(value_str: str) -> object:
if value_str == "false":
return False
# Null
if value_str.lower() in ("null", "none", "nil"):
return None
# Number (int or float)
try:
if "." in value_str: