From b3f2b8fdc5999726649c0e0511f7a6080f1291b7 Mon Sep 17 00:00:00 2001 From: jenkins Date: Mon, 10 Aug 2026 05:20:09 -0300 Subject: [PATCH] fix(hermes): keep router compatible during rollout --- services/hermes/plugins/auto-router/__init__.py | 13 ++++++++++--- services/hermes/plugins/auto-router/plugin.yaml | 1 - 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/services/hermes/plugins/auto-router/__init__.py b/services/hermes/plugins/auto-router/__init__.py index 32bb17fd..24562c7a 100644 --- a/services/hermes/plugins/auto-router/__init__.py +++ b/services/hermes/plugins/auto-router/__init__.py @@ -854,9 +854,16 @@ def register(ctx: Any) -> None: ctx.register_hook( "pre_internal_route", lambda **kwargs: _pre_internal_route(ctx, **kwargs) ) - ctx.register_hook( - "pre_subagent_route", lambda **kwargs: _pre_subagent_route(ctx, **kwargs) - ) + # ConfigMaps can reconcile before the matching immutable image digest. The + # older image does not know this hook yet, so retain parent/internal routing + # during that short rollout window and enable child routing after image + # automation advances the pod. + try: + ctx.register_hook( + "pre_subagent_route", lambda **kwargs: _pre_subagent_route(ctx, **kwargs) + ) + except ValueError: + pass ctx.register_hook("post_llm_call", lambda **kwargs: _post_turn_route(ctx, **kwargs)) ctx.register_command( "route", diff --git a/services/hermes/plugins/auto-router/plugin.yaml b/services/hermes/plugins/auto-router/plugin.yaml index 7b0fd2d9..9c961998 100644 --- a/services/hermes/plugins/auto-router/plugin.yaml +++ b/services/hermes/plugins/auto-router/plugin.yaml @@ -4,4 +4,3 @@ description: Jetson-assisted provider, model, and reasoning-effort routing for A provides_hooks: - pre_turn_route - pre_internal_route - - pre_subagent_route