Skip to content

Conversation

@gary149
Copy link
Collaborator

@gary149 gary149 commented Oct 13, 2025

No description provided.

Introduces maximum limits for tracked conversations and controllers in AbortRegistry, evicting the oldest entries when limits are reached. Also adds a cap to the AbortedGenerations cache, switching to a Map for storage and trimming oldest entries when the limit is hit. These changes help prevent unbounded memory growth in long-running processes.
Enhances resource management by ensuring file streams are properly destroyed after use in both downloadFile and uploadFile. This prevents potential memory leaks and ensures timeouts and errors are handled more robustly during file operations.
Refactored conversation and misc routes to use MongoDB aggregation pipelines for counting and paginating conversations, and for efficiently counting assistant messages. This reduces the number of database queries and improves performance, especially for endpoints that require both paginated data and total counts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants