Go to file
Woody 33b960f786 fix(backend): extract JSON from markdown code blocks in LLM responses
The LLM (Qwen3.5 via OpenRouter) returns JSON wrapped in markdown code blocks:

```json

["project manager", "limits", ...]

```

But the code was trying to parse this directly with json.loads(), causing:

- QueryDecomposer to return empty keywords

- RelevanceFilter to fail with "Expecting value: line 1 column 1"

Changes:

- Added _extract_json_from_markdown() helper function to both modules

- Strips markdown code block markers (```json and ```) before JSON parsing

- Added unit tests for markdown code block handling

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus \u003cclio-agent@sisyphuslabs.ai\u003e
2026-04-23 16:28:07 +08:00
.plans docs: update development plans with Phase 1 completion status 2026-04-23 13:27:52 +08:00
backend fix(backend): extract JSON from markdown code blocks in LLM responses 2026-04-23 16:28:07 +08:00
frontend feat(frontend): set top container to 30% height with scrollable bottom response panel 2026-04-23 15:11:32 +08:00
test materials test: add sample documents for manual testing 2026-04-23 13:28:13 +08:00
.env.txt init: project setup with AGENTS.md, test structure, and plan directory 2026-04-22 15:22:29 +08:00
.gitignore feat(backend): add rotating file logging to backend/app/log/ 2026-04-23 14:09:48 +08:00
AGENTS.md docs: add logging anti-patterns to AGENTS.md 2026-04-23 14:10:09 +08:00
development_plan.md docs: update development plans with Phase 1 completion status 2026-04-23 13:27:52 +08:00