Skip to content

Commit d5c46e4

Browse files
Jacksunweicopybara-github
authored andcommitted
fix: Do not re-create App object when loader returns an App
PiperOrigin-RevId: 813083541
1 parent fbf7576 commit d5c46e4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/google/adk/cli/adk_web_server.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -454,12 +454,8 @@ async def get_runner_async(self, app_name: str) -> Runner:
454454
)
455455
else:
456456
# Combine existing plugins with extra plugins
457-
all_plugins = (agent_or_app.plugins or []) + extra_plugins_instances
458-
agentic_app = App(
459-
name=agent_or_app.name,
460-
root_agent=agent_or_app.root_agent,
461-
plugins=all_plugins,
462-
)
457+
agent_or_app.plugins = agent_or_app.plugins + extra_plugins_instances
458+
agentic_app = agent_or_app
463459

464460
runner = self._create_runner(agentic_app)
465461
self.runner_dict[app_name] = runner

0 commit comments

Comments
 (0)