SurfSense/surfsense_backend/app/tasks/chat
CREDO23 b54b803dc9 refactor(chat): add streaming/flows/shared/ rate-limit recovery + stream loop
Two cooperating modules that wrap stream_agent_events with in-stream
recovery from provider 429s:

* rate_limit_recovery: can_recover_provider_rate_limit truth-table
  guard, reroute_to_next_auto_pin (selects the next eligible auto-pin
  config and reloads the LLM bundle), log_rate_limit_recovered.
* stream_loop: run_stream_loop drives stream_agent_events in a
  while-True loop, delegating recovery to a flow-supplied RecoverFn
  callback so new_chat and resume_chat can share the same loop while
  keeping their own nonlocal state.

Add-only; not yet wired into any orchestrator.
2026-05-25 21:49:27 +02:00
..
streaming refactor(chat): add streaming/flows/shared/ rate-limit recovery + stream loop 2026-05-25 21:49:27 +02:00
content_builder.py feat: improved document, folder mentions rendering 2026-05-09 22:15:51 -07:00
persistence.py feat: improved document, folder mentions rendering 2026-05-09 22:15:51 -07:00
stream_new_chat.py feat(chat): add model retry and stream lifecycle events 2026-05-22 17:48:43 +05:30