semblance-dev/backend/app
michael 94f98b837b Add event loop tracking to LLM client getters
The previous lazy initialization fix wasn't sufficient - the genai.Client
internally caches async structures bound to the event loop at creation time.
With ASGI servers like Hypercorn, subsequent requests may come on different
event loop contexts, causing "Future attached to a different loop" errors.

Now tracks which event loop the client was created on and recreates it if
the loop has changed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 16:46:35 -06:00
..
auth changed permissions 2025-12-19 19:26:16 +00:00
models Remove __pycache__ files from git tracking 2025-12-19 13:28:19 -06:00
routes Remove __pycache__ files from git tracking 2025-12-19 13:28:19 -06:00
services Add event loop tracking to LLM client getters 2025-12-19 16:46:35 -06:00
utils Remove __pycache__ files from git tracking 2025-12-19 13:28:19 -06:00
.DS_Store changed permissions 2025-12-19 19:26:16 +00:00
__init__.py changed permissions 2025-12-19 19:26:16 +00:00
db.py changed permissions 2025-12-19 19:26:16 +00:00
extensions.py changed permissions 2025-12-19 19:26:16 +00:00
utils.py changed permissions 2025-12-19 19:26:16 +00:00
websocket_debug_tap.py changed permissions 2025-12-19 19:26:16 +00:00
websocket_manager.py changed permissions 2025-12-19 19:26:16 +00:00
websocket_manager_async.py changed permissions 2025-12-19 19:26:16 +00:00