Make get_plugin_config defaults robust

Set a default None for the agent parameter and normalize project_name/agent_profile to empty strings when calling find_plugin_asset. This prevents None values from being forwarded to the asset lookup and avoids errors when project or profile are not provided.

frdel committed Feb 21, 2026 at 17:50 UTC 5e4e7531a91cdc3621525ab5d4774cec78770544
1 file changed +2 -2
python/helpers/plugins.py
+2 -2
@@ -217,7 +217,7 @@ def get_webui_extensions(extension_point: str, filters: List[str] | None = None)
217 return entries
218
219
220 -def get_plugin_config(plugin_name: str, agent: Agent | None, project_name:str|None=None, agent_profile:str|None=None):
220 +def get_plugin_config(plugin_name: str, agent: Agent | None=None, project_name:str|None=None, agent_profile:str|None=None):
221
222 if project_name is None and agent is not None:
223 from python.helpers import projects
@@ -226,7 +226,7 @@ def get_plugin_config(plugin_name: str, agent: Agent | None, project_name:str|No
226 agent_profile = agent.config.profile
227
228 # find config.json in all possible places
229 - file_path = find_plugin_asset(plugin_name, CONFIG_FILE_NAME, project_name=project_name, agent_profile=agent_profile)
229 + file_path = find_plugin_asset(plugin_name, CONFIG_FILE_NAME, project_name=project_name or "", agent_profile=agent_profile or "")
230 # use default config if not found
231 if not file_path:
232 file_path = files.get_abs_path(