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/<plugin>/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 <liyuan851277048@icloud.com>
octo-patch committed
Apr 25, 2026 at 09:14 UTC
2d0b164081e00b0b46da8680c77c78e7c59e988b
1 file changed
+6
-7
helpers/plugins.py
+6
-7
@@ -752,13 +752,12 @@ def find_plugin_assets(
752
)
753
if _collect(path, project_name, agent_profile):
754
return results
755
- if not agent_profile or agent_profile == "*":
756
- # project/.a0proj/plugins/<plugin_name>/...
757
- path = projects.get_project_meta(
758
- project_name, files.PLUGINS_DIR, plugin_name, *subpaths
759
- )
760
- if _collect(path, project_name, ""):
761
- return results
755
+ # project/.a0proj/plugins/<plugin_name>/... (always check as fallback, even when agent_profile is set)
756
+ path = projects.get_project_meta(
757
+ project_name, files.PLUGINS_DIR, plugin_name, *subpaths
758
+ )
759
+ if _collect(path, project_name, ""):
760
+ return results
761
762
# usr/agents/<profile>/plugins/<plugin_name>/...
763
if agent_profile: