From c261b26e69c1a913cfed778d45c9ff87d79ad57a Mon Sep 17 00:00:00 2001 From: touale <136764239@qq.com> Date: Mon, 9 Feb 2026 15:03:40 +0800 Subject: [PATCH] perf: correct proxy function invocation logic --- src/framex/plugin/on.py | 2 +- tests/test_plugins.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/framex/plugin/on.py b/src/framex/plugin/on.py index 5029b3f..113e75d 100644 --- a/src/framex/plugin/on.py +++ b/src/framex/plugin/on.py @@ -149,7 +149,7 @@ async def wrapper(*args: Any, **kwargs: Any) -> Any: proxy_func_set = set(chain.from_iterable(proxy_settings.proxy_functions.values())) if full_func_name not in proxy_func_set: - return await safe_callable(**kwargs) + return await func(**kwargs) api_call = PluginApi( deployment_name=PROXY_PLUGIN_NAME, diff --git a/tests/test_plugins.py b/tests/test_plugins.py index d7ca5cf..19218ae 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -262,12 +262,12 @@ async def wrapper(*_: Any, **__: Any) -> None: @on_proxy() -@supply_exception async def local_exchange_key_value(a_str: str, b_int: int, c_model: ExchangeModel) -> Any: return {"a_str": a_str, "b_int": b_int, "c_model": c_model} @on_proxy() +@supply_exception async def remote_exchange_key_value(a_str: str, b_int: int, c_model: ExchangeModel) -> Any: raise RuntimeError("This function should be called remotely")