Fixed AI Studio discarding answers of the AI written in an unexpected JSON form (#1109)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-25 20:13:02 +01:00
1 parent d26139936a
commit c7be04b727
11 files changed
+443 -256

No files matched your search

@@ -45,8 +45,8 @@ internal sealed class LauncherTextsResponse
error = LuaResponseParseError.NONE;
technicalDetails = string.Empty;
var json = LuaResponse.ExtractJson(modelResponse);
if (string.IsNullOrWhiteSpace(json))
var json = ModelAnswerJson.ExtractObject(modelResponse);
if (json.IsWhiteSpace())
{
error = LuaResponseParseError.MISSING_JSON_OBJECT;
return false;