fix(streaming): quota error detection, error persistence, stream_end session_id fix (#767)
- quota_exhausted error type: distinguishes credit exhaustion from rate limits - Streaming errors persisted to session file so they survive page reload - _error flag excludes persisted errors from subsequent LLM API calls - stream_end and title SSE events use original session_id (not s.session_id which rotates during context compaction) Fixes #739, #652, #653
This commit is contained in:
@@ -156,8 +156,10 @@ class TestIssue495TitleStreaming(unittest.TestCase):
|
||||
)
|
||||
|
||||
def test_streaming_emits_title_sse_event(self):
|
||||
# After the stream_end fix, title uses original session_id param (not s.session_id
|
||||
# which can be rotated during context compression — see #652 fix)
|
||||
self.assertIn(
|
||||
"put_event('title', {'session_id': s.session_id, 'title': s.title})",
|
||||
"put_event('title', {'session_id': session_id, 'title': s.title})",
|
||||
STREAMING_PY,
|
||||
"streaming.py should emit a title SSE event when title is updated",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user