gendesign/backend/app/api/v1
Light1YT fceaaf9a2c
All checks were successful
CI / changes (push) Successful in 6s
CI / frontend-tests (push) Has been skipped
CI / changes (pull_request) Successful in 5s
CI / frontend-tests (pull_request) Has been skipped
Deploy / changes (push) Successful in 5s
Deploy / build-frontend (push) Has been skipped
Deploy / build-backend (push) Successful in 2m41s
CI / backend-tests (push) Successful in 6m24s
CI / backend-tests (pull_request) Successful in 6m23s
Deploy / build-worker (push) Successful in 3m26s
Deploy / deploy (push) Successful in 1m12s
feat(chat): LLM tool-loop + §19 redaction wiring for #957 (Step 2+3)
Add the LLM prose-composition path for the parcel-forecast chat, layered
over the deterministic Step-1 fallback which stays the safety net.

- chat/tools.py: 5 read-only section tools (exec_summary, product_recommendation,
  forecast, risks, scenarios) — pure slices of the loaded report dict, no DB/
  recompute, graceful on missing sections. market_now (raw analyze blob) and meta
  are deliberately NOT exposed -> highest-PII data cannot reach the LLM.
- chat/safe_payload.py: the §19 gate — single place that builds the outbound
  SafePayload from a section-aggregate allowlist; honors is_confidential hard-block.
- chat/orchestrator.py: manual tool-call loop with call-cap/termination, real
  grounded_in provenance; any LLMResult.ok=False (disabled/timeout/rate_limited/
  redaction_refused/call_cap/provider_error/empty) degrades to the deterministic answer.
- llm/prompts.py: versioned chat_system@v1 — answer only from sections, never
  fabricate numbers, advisory tone, decline out-of-scope.
- api/v1/chat.py: branch on settings.llm_enabled; sync complete bridged via
  run_in_threadpool. Default-off -> deterministic path, no provider built.
- Tests: fake provider only (no network), planted-secret redaction-boundary +
  per-reason fallback + call-cap + numbers-from-report coverage.

Refs #957
2026-06-08 17:45:01 +05:00
..
__init__.py init 2026-04-25 13:45:19 +03:00
admin_cadastre.py refactor(security): убрать X-Admin-Token (Caddy basic_auth достаточен) (#437) 2026-05-23 10:41:22 +00:00
admin_etl.py refactor(security): убрать X-Admin-Token (Caddy basic_auth достаточен) (#437) 2026-05-23 10:41:22 +00:00
admin_jobs.py refactor(security): убрать X-Admin-Token (Caddy basic_auth достаточен) (#437) 2026-05-23 10:41:22 +00:00
admin_leads.py refactor(security): убрать X-Admin-Token (Caddy basic_auth достаточен) (#437) 2026-05-23 10:41:22 +00:00
admin_scrape.py refactor(security): убрать X-Admin-Token (Caddy basic_auth достаточен) (#437) 2026-05-23 10:41:22 +00:00
admin_weight_profiles.py refactor(security): убрать X-Admin-Token (Caddy basic_auth достаточен) (#437) 2026-05-23 10:41:22 +00:00
analytics.py feat(recommend): horizon-aware recommend_mix opt-in overlay (#982, 953-A) (#1014) 2026-06-03 07:40:33 +00:00
chat.py feat(chat): LLM tool-loop + §19 redaction wiring for #957 (Step 2+3) 2026-06-08 17:45:01 +05:00
concepts.py init 2026-04-25 13:45:19 +03:00
custom_pois.py feat(#254): user_custom_pois — backend schema + CRUD + scoring integration 2026-05-17 09:34:33 +03:00
insights.py feat(insights): manual-entry Insight entity CRUD + §19 audit (#948 part A) 2026-06-08 12:41:39 +05:00
landing.py feat(sf-fe-a12): Landing redesign + PilotCTA с real B3/B4 data (v2 rebased) (#367) 2026-05-18 05:16:57 +00:00
locations.py feat(location): district-level Location entity + indices (#948 part B) 2026-06-08 13:28:19 +05:00
me.py feat(rbac): role-based access control via X-Authenticated-User middleware (#585) 2026-05-26 06:18:40 +00:00
own_projects.py feat(site-finder): own-portfolio data source for §25.3 cannibalization (#1169 PR1) 2026-06-08 16:21:53 +05:00
parcels.py feat(sf): вшить parcel_reservations в ИРД-блок analyze (#1127) 2026-06-07 11:09:26 +00:00
photos.py fix ui 2026-04-27 20:42:18 +03:00
pilot.py fix(pilot): drop pydantic EmailStr — email-validator dep missing → backend startup crash (#337) 2026-05-17 21:32:23 +00:00
ping.py feat(backend): add /api/v1/ping liveness endpoint (#634) 2026-05-29 15:53:29 +00:00
trade_in.py feat(trade-in): TI-2 PDF export 4-page + frontend enable button (#319) 2026-05-17 17:16:48 +00:00
users.py feat(sf-b2): GET /users/me/recent-parcels — stub endpoint (auth TODO) (#329) 2026-05-17 21:04:16 +00:00