Files
dify/api/core/workflow
L1nSn0w 4b4987c95c refactor(llm): harden first-token timeout and fix ms unit i18n
Follow-ups from code review:

- Transport: treat a non-positive timeout (0/negative) as disabled so a 0-second
  watchdog can never arm; add a post-stream backstop that raises
  FirstTokenTimeoutError when aborting the socket ends the stream with a clean EOF
  instead of a transport error; only raise when no token was delivered.
- Watchdog: make fire/disarm mutually exclusive with a lock, so a token arriving on
  the deadline is never both yielded and aborted and `fired` reliably means
  "timed out before the first token".
- Adapter: extract the shared set/reset-ContextVar logic into one helper.
- i18n: fix nodes.common.retry.ms, mistranslated as the "Ms./Mrs." honorific in
  9 locales (de/es/hi/th/pl/tr/vi/id/ro; uk lowercased).
- Tests: real-socket test proving socket.shutdown unblocks a blocked httpx
  iter_lines and surfaces a real RequestError; a clean-EOF backstop test; a
  0=disabled test; and NaN/negative-clamp + preserve-other-fields assertions.
2026-07-09 18:51:03 +08:00
..
2026-06-05 09:38:42 +00:00