Skip to content

Advisor: make reframe non-blocking (ADR-0003 concurrency precursor) #1106

Description

@bjagg

Part of the ADR-0003 epic #1105. Plan: docs/operations/proposals/advisor-qp-direct-retrieval.md (PR #1104). Decision: ADR-0003.

Goal: Fix the blocking synchronous reframe that stalls the single uvicorn worker (concurrency precursor for both regimes).

Scope:

  • reframe_query_with_identifiers is a sync def running a blocking llm.invoke (components/lif/langchain_agent/core.py:238,248-249), called without await/threadpool from async ask_agent (core.py:177) on a single uvicorn worker (projects/lif_advisor_api/Dockerfile2:49) — it serializes concurrent conversations.
  • Make it async or wrap in run_in_threadpool.
  • Note the single-worker + in-memory conversation_states scaling limits.

Size: S · Depends on: — (may fold into #970)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions