legco_ai_assistant/backend
Woody 3ab6fd102a fix: use vLLM-native guided_json for structured output
vLLM servers support JSON schema enforcement via extra_body (guided_json
or structured_outputs), not OpenAI's response_format protocol. LangChain's
with_structured_output(method='json_schema') sends response_format which
vLLM ignores, causing NoneType not iterable parsing errors.

- vLLM path: direct OpenAI SDK call with extra_body={guided_json|structured_outputs}
- OpenRouter path: unchanged with_structured_output(method='json_schema')
- Try new 'structured_outputs' format first, fall back to legacy 'guided_json'
- Update _SEED_DECOMPOSE with explicit JSON array instruction
- Add diagnostic logging: exc_info=True, schema preview, prompt template preview
- Add logging in _parse_legacy_json for fallback failure debugging
2026-04-29 16:49:14 +08:00
..
app fix: use vLLM-native guided_json for structured output 2026-04-29 16:49:14 +08:00
uploads chore: add .gitignore with Python, Node, env, and ChromaDB exclusions 2026-04-22 15:57:04 +08:00
.env.example docs: add LLM_ENABLE_THINKING and VLLM_ENGINE to env example and README 2026-04-28 13:32:41 +08:00
pytest.ini chore(backend): update config, env template, and pytest settings 2026-04-23 13:26:08 +08:00
requirements.txt fix: vLLM chat_template_kwargs breaks LangChain structured output 2026-04-29 16:07:44 +08:00