fix: MemoryManager kwarg 'llm' -> 'llm_router'; fix alembic script_location

- main.py: MemoryManager(pool=pool, llm=...) -> llm_router=...
  Class signature is __init__(self, pool, llm_router=None).

- alembic.ini: script_location = migrations -> agent_service/migrations
  When alembic runs from WORKDIR /app inside the container, 'migrations'
  resolves to /app/migrations (missing). Correct path is
  /app/agent_service/migrations where versions/ actually lives.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Carlos Garcia
2026-04-24 17:43:03 -04:00
parent 6d15859779
commit 65e471b6ce
2 changed files with 2 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ async def lifespan(app: FastAPI):
# 5. Memory manager
try:
from .memory.memory_manager import MemoryManager
memory_mgr = MemoryManager(pool=pool, llm=llm_router) if pool else None
memory_mgr = MemoryManager(pool=pool, llm_router=llm_router) if pool else None
except Exception as exc:
logger.error('Failed to init memory manager: %s', exc)
memory_mgr = None

View File

@@ -1,5 +1,5 @@
[alembic]
script_location = migrations
script_location = agent_service/migrations
prepend_sys_path = .
version_path_separator = os
sqlalchemy.url = postgresql+asyncpg://%(POSTGRES_USER)s:%(POSTGRES_PASSWORD)s@%(POSTGRES_HOST)s:%(POSTGRES_PORT)s/%(POSTGRES_DB)s