MicroFish/backend/app
LoryGlory 52c177fd66 feat(llm): add structured output reliability to LLMClient and refactor services
- chat_json() gains configurable retry (max_attempts), temperature backoff
  (temperature_step), optional retry delay, and a fallback_parser hook for
  service-specific rescue logic
- _clean_response_text: strip <think> tags and markdown code fences
- _fix_truncated_json: use unescaped-quote parity instead of last-char check
  to avoid spuriously quoting numeric values; fixes broken repair for arrays
- _try_fix_json: generic near-valid JSON salvage (newline normalisation,
  control-character stripping, greedy object extraction)
- simulation_config_generator: replace raw OpenAI client with LLMClient,
  remove duplicated local retry loop and truncated-JSON repair, pass
  service-specific config salvage as fallback_parser
- oasis_profile_generator: same refactor; keep rule-based profile fallback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 15:45:09 +01:00
..
api feat(SimulationAPI): add function to retrieve latest report ID for a given simulation 2026-01-09 16:04:35 +08:00
models Enhance backend functionality with OASIS simulation features 2025-12-01 15:03:44 +08:00
services feat(llm): add structured output reliability to LLMClient and refactor services 2026-03-23 15:45:09 +01:00
utils feat(llm): add structured output reliability to LLMClient and refactor services 2026-03-23 15:45:09 +01:00
__init__.py Implement Report Agent for automated report generation and interaction 2025-12-09 15:10:55 +08:00
config.py fix(config): enable overriding of environment variables when loading .env file 2026-01-23 16:20:24 +08:00