Files
DeepTutor/deeptutor/agents/loop
yaqi e5a20ba12e feat(chat): surface the provider's own retry waits
The 10-minute silence in #2693 does not come from the agent loop: a 401/429/5xx
is retried inside the provider on the configured schedule (5s → 120s per attempt,
8 attempts), and those sleeps emit no stream events at all. The turn looks
frozen until the final error.

- `LLMProvider` gains an optional async `retry_observer`, called before each
  retry sleep with the attempt number, total and delay. A failing observer is
  logged and ignored: visibility must never turn a retry into a failure.
- The agent loop attaches an observer before every model call and emits the same
  `provider_retry` notice the transport-retry path already used, now with the
  provider label, attempt count and `retry_delay_s` /
  `fallbacks_configured` in the trace metadata.
- Covered by unit tests for the observer contract (called once per retry, and
  inert when it raises).
2026-12-02 18:01:36 +08:00
..
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00