Skip to content

Comments

fix: strip thinking tags before all JSON parse strategies#209

Open
haosenwang1018 wants to merge 1 commit intoHKUDS:mainfrom
haosenwang1018:fix/strip-think-tags-before-parse
Open

fix: strip thinking tags before all JSON parse strategies#209
haosenwang1018 wants to merge 1 commit intoHKUDS:mainfrom
haosenwang1018:fix/strip-think-tags-before-parse

Conversation

@haosenwang1018
Copy link

Closes #159

When using reasoning models (qwen2.5-think, deepseek-r1, etc.), the <think>...</think> tags were only stripped in _extract_all_json_candidates(), meaning the regex fallback strategy (_extract_fields_with_regex) still operated on the raw response including thinking content. This could cause it to extract content from the thinking section rather than the actual analysis.

This fix moves the think-tag stripping to the top of _robust_json_parse() so all downstream strategies work with clean model output.

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.

[Bug]: Analyzed data of tables not complete

1 participant