mirror of
https://github.com/langgenius/dify.git
synced 2026-07-14 17:07:03 +08:00
pyrefly rejected flask.stream_with_context called with a generator (constrained AnyStr overload — "no-matching-overload"), failing the Python type-check CI. Switch the streaming endpoint to the repo's established SSE helper compact_generate_response (which wraps _stream_with_request_context), so it type-checks and still preserves request context during iteration. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>