Skip to content

Fix GLM/Kimi returning 0 comments#55

Open
r-uben wants to merge 1 commit intoChicagoHAI:mainfrom
r-uben:fix/robust-json-parsing
Open

Fix GLM/Kimi returning 0 comments#55
r-uben wants to merge 1 commit intoChicagoHAI:mainfrom
r-uben:fix/robust-json-parsing

Conversation

@r-uben
Copy link
Copy Markdown
Contributor

@r-uben r-uben commented Apr 8, 2026

progressive and local methods parsed responses with re.search(r"\[.*\]") + json.loads(), which only works for bare JSON arrays. Models like GLM-5 and Kimi that wrap output in {"comments": [...]} or markdown fences got silently dropped → 0 comments.

Switched all 3 call sites to parse_comments_from_response(), which already handles these formats and was already used by zero_shot.

Closes #22

progressive and local methods used regex + json.loads to extract bare
JSON arrays from responses. Models that wrap output in objects or
markdown fences got silently dropped. Switch to parse_comments_from_response()
which already handles all these formats (and was already used by zero_shot).

Closes ChicagoHAI#22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Understand why it does not work for glm and kimi

1 participant