hermes(router-plugin): deliver hux_mode.py through the auto-router ConfigMap
The generator now ships the HUX-06 adoption module alongside the plugin, and the plugin degrades to its previous behaviour (no mode adoption) if it starts against a ConfigMap rendered before the module existed - the plugin can never fail to load mid-transition. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BvMSXH8VH2tMWXanb8SJdf
This commit is contained in:
parent
dc034cb738
commit
e2ad645733
@ -188,6 +188,7 @@ configMapGenerator:
|
||||
namespace: hermes
|
||||
files:
|
||||
- __init__.py=plugins/auto-router/__init__.py
|
||||
- hux_mode.py=plugins/auto-router/hux_mode.py
|
||||
- provider_status.py=plugins/auto-router/provider_status.py
|
||||
- plugin.yaml=plugins/auto-router/plugin.yaml
|
||||
- dashboard-manifest.json=plugins/auto-router/dashboard/manifest.json
|
||||
|
||||
@ -15,8 +15,12 @@ except ImportError: # Direct module loading in the small unit-test harness.
|
||||
|
||||
try:
|
||||
from .hux_mode import selection as _hux_mode_selection
|
||||
except ImportError: # Direct module loading in the small unit-test harness.
|
||||
from hux_mode import selection as _hux_mode_selection
|
||||
except ImportError:
|
||||
try: # Direct module loading in the small unit-test harness.
|
||||
from hux_mode import selection as _hux_mode_selection
|
||||
except ImportError: # A ConfigMap rendered before hux_mode.py shipped.
|
||||
def _hux_mode_selection(session): # noqa: ARG001 - contract shim
|
||||
return None
|
||||
|
||||
|
||||
POLICY_PATH = Path("/opt/data/workspace/coordinator/route-policy.json")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user