open-notebook/api/routers
Nikita eae429b3bd
fix: complete SqliteSaver async compatibility in chat routers (#525)
* fix: use sync get_state() for SqliteSaver in chat routers

Replace async aget_state() calls with sync get_state() wrapped in
asyncio.to_thread() to fix SqliteSaver compatibility issues.

SqliteSaver does not support async methods, so we need to run
the sync version in a separate thread.

This is a follow-up to #519 which fixed the same issue in
graph_utils.py but missed four locations:
- chat.py: get_session() and execute_chat()
- source_chat.py: get_source_chat_session() and stream_source_chat_response()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: translate comments to English

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Luis Novo <lfnovo@gmail.com>
2026-02-06 15:55:05 -03:00
..
__init__.py Api podcast migration (#93) 2025-07-17 08:36:11 -03:00
auth.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
chat.py fix: complete SqliteSaver async compatibility in chat routers (#525) 2026-02-06 15:55:05 -03:00
commands.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
config.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
context.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
embedding.py feat: content-type aware chunking and unified embedding (#444) 2026-01-21 23:49:08 -03:00
embedding_rebuild.py Fix re-embedding issues and improve retry strategy (#515) 2026-01-31 18:55:01 -03:00
episode_profiles.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
insights.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
models.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
notebooks.py feat: add cascade deletion for notebooks with delete preview (#471) 2026-01-25 14:56:14 -03:00
notes.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
podcasts.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
search.py refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
settings.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
source_chat.py fix: complete SqliteSaver async compatibility in chat routers (#525) 2026-02-06 15:55:05 -03:00
sources.py [Bug]: execute_command_sync receives 300 (int) as context instead of timeout. #537 (#538) 2026-02-06 15:54:32 -03:00
speaker_profiles.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
transformations.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00