Skip to content

Fix Streaming, Memory, SQLAlchemy Cleanup and Reliability Issues Acro…#81

Merged
niralbhalodia merged 1 commit intodevelopfrom
low_issues_solved
Apr 6, 2026
Merged

Fix Streaming, Memory, SQLAlchemy Cleanup and Reliability Issues Acro…#81
niralbhalodia merged 1 commit intodevelopfrom
low_issues_solved

Conversation

@harshdesaii
Copy link
Copy Markdown
Collaborator

Description

This PR resolves low severity issues related to streaming correctness, memory consistency, configuration validation, SQLAlchemy design, and improves overall code quality.

Fixes # (issue)

  • Replaced fake streaming in HuggingFace model with true token-level streaming using TextIteratorStreamer
  • Fixed async-safe streaming execution without blocking the event loop
  • Fixed mutation of caller-provided kwargs in OpenAI model
  • Fixed chat_stream() to persist full streamed responses into memory
  • Implemented missing abstract methods in EntityMemory(add_message, get_messages, save, load)
  • Improved SQLAlchemy memory with proper use of a dynamic table model and removal of static model conflicts.
  • Replaced naive hallucination detection with score-based heuristic approach
  • Replaced non-deterministic and non-cryptographic hash() usage with sha256 for Integrity checks and Fingerprinting
  • Replaced print() and emoji outputs with structured logging
  • Fixed retry state leakage in router fallback logic

@niralbhalodia niralbhalodia merged commit 297ea9b into develop Apr 6, 2026
2 checks passed
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