From 2d0b164081e00b0b46da8680c77c78e7c59e988b Mon Sep 17 00:00:00 2001 From: octo-patch Date: Sat, 25 Apr 2026 09:14:13 +0800 Subject: [PATCH] fix: always check project-level plugin config as fallback (fixes #1548) When agent_profile is set to a concrete value (e.g. "agent0"), the project/.a0proj/plugins//config.json path was skipped due to an overly restrictive guard condition. Only wildcard/empty profiles could reach the project-level config, making per-project plugin overrides (including _model_config) silently ineffective for all normal agent runs. Remove the guard so the project-level config is always checked as a fallback after the profile-scoped project path. Precedence is preserved: profile-scoped project config > project-level config > global config. Co-Authored-By: Octopus --- helpers/plugins.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/helpers/plugins.py b/helpers/plugins.py index 44f13a0b9..45bac7b05 100644 --- a/helpers/plugins.py +++ b/helpers/plugins.py @@ -752,13 +752,12 @@ def find_plugin_assets( ) if _collect(path, project_name, agent_profile): return results - if not agent_profile or agent_profile == "*": - # project/.a0proj/plugins//... - path = projects.get_project_meta( - project_name, files.PLUGINS_DIR, plugin_name, *subpaths - ) - if _collect(path, project_name, ""): - return results + # project/.a0proj/plugins//... (always check as fallback, even when agent_profile is set) + path = projects.get_project_meta( + project_name, files.PLUGINS_DIR, plugin_name, *subpaths + ) + if _collect(path, project_name, ""): + return results # usr/agents//plugins//... if agent_profile: