diff --git a/backend/apps/agents/manager/configure_provider_env.py b/backend/apps/agents/manager/configure_provider_env.py index 5aca8c50..e16f4775 100644 --- a/backend/apps/agents/manager/configure_provider_env.py +++ b/backend/apps/agents/manager/configure_provider_env.py @@ -209,10 +209,10 @@ async def configure_provider_env( } # Pin subagent ids to whichever lane the user has, else CLI's # default Haiku 4.5 hits 9Router with no Claude route and 401s. - try: - sub_conns = _conns # reuse list fetched above - except NameError: - sub_conns = [] + # NOTE: sub_conns is the connection list passed in. Callers currently pass [] + # (see RunOptionsMixin), so `active` is empty and this pinning is inert until the + # real connection list is wired through — a latent regression from the run/ split, + # surfaced by pyright (the old inline `_conns` reference was left dangling here). active = {c.get("provider") for c in sub_conns if isinstance(c, dict) and c.get("isActive")} sub_model = None diff --git a/backend/apps/agents/manager/prompt/attachments.py b/backend/apps/agents/manager/prompt/attachments.py index 3a2b8e5b..3c3c97a7 100644 --- a/backend/apps/agents/manager/prompt/attachments.py +++ b/backend/apps/agents/manager/prompt/attachments.py @@ -1,5 +1,5 @@ import os -from typing import Dict, List, Optional, Tuple +from typing import List, Optional, Tuple from typeguard import typechecked diff --git a/backend/apps/agents/manager/session/history_compaction.py b/backend/apps/agents/manager/session/history_compaction.py index 92f7d0b6..632f20d7 100644 --- a/backend/apps/agents/manager/session/history_compaction.py +++ b/backend/apps/agents/manager/session/history_compaction.py @@ -1,6 +1,6 @@ import json import logging -from typing import Dict, List, Optional, Tuple +from typing import List, Optional, Tuple from typeguard import typechecked import os import re