From 792885115d00b1b1b06e0a0dbf02eefa436f84bb Mon Sep 17 00:00:00 2001 From: Willem Jiang Date: Fri, 1 May 2026 21:51:44 +0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- backend/app/channels/manager.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/app/channels/manager.py b/backend/app/channels/manager.py index dc865911f..3bd674596 100644 --- a/backend/app/channels/manager.py +++ b/backend/app/channels/manager.py @@ -581,13 +581,17 @@ class ChannelManager: ) configurable = run_config.get("configurable") - if not isinstance(configurable, Mapping): + if isinstance(configurable, dict): + pass + elif isinstance(configurable, Mapping): + configurable = dict(configurable) + else: configurable = {} - run_config["configurable"] = configurable + run_config["configurable"] = configurable # Pin channel-triggered runs to the root graph namespace so follow-up # turns continue from the same conversation checkpoint. - configurable.setdefault("checkpoint_ns", "") - configurable.setdefault("thread_id", thread_id) + configurable["checkpoint_ns"] = "" + configurable["thread_id"] = thread_id run_context = _merge_dicts( DEFAULT_RUN_CONTEXT,