mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-29 18:46:59 +00:00
test(runtime): retain direct Relay interceptor coverage
Signed-off-by: Alex Fournier <afournier@nvidia.com>
This commit is contained in:
parent
6efc5fe0af
commit
df892a08f6
3 changed files with 9 additions and 4 deletions
|
|
@ -66,7 +66,7 @@ class RelayRuntime:
|
|||
self._execution_consumers.discard(consumer)
|
||||
|
||||
def managed_execution_enabled(self) -> bool:
|
||||
"""Return whether an active interceptor or subscriber needs the pipeline."""
|
||||
"""Return whether a Hermes-managed consumer needs the Relay pipeline."""
|
||||
with self._execution_consumers_lock:
|
||||
return bool(self._execution_consumers)
|
||||
|
||||
|
|
|
|||
|
|
@ -443,9 +443,11 @@ separate trajectories.
|
|||
|
||||
## Adaptive Execution Example
|
||||
|
||||
Hermes core always hands LLM and tool calls to NeMo Relay managed execution.
|
||||
The `observability/nemo_relay` plugin can install adaptive components on those
|
||||
boundaries.
|
||||
Hermes core owns the LLM and tool boundaries and enters NeMo Relay managed
|
||||
execution while a Hermes-managed Relay consumer is active. With no shared
|
||||
metrics subscriber or explicitly configured Relay plugin, Hermes calls the
|
||||
provider or tool directly. The `observability/nemo_relay` plugin retains the
|
||||
managed path while its adaptive components are installed on those boundaries.
|
||||
|
||||
Minimal `plugins.toml`:
|
||||
|
||||
|
|
|
|||
|
|
@ -185,6 +185,8 @@ def test_auxiliary_stream_uses_streaming_relay_primitive(monkeypatch):
|
|||
|
||||
def test_auxiliary_attempt_uses_real_relay_request_intercepts(relay_turn):
|
||||
relay, turn = relay_turn
|
||||
consumer = "test.auxiliary-request-intercept"
|
||||
turn.lease.host.retain_managed_execution(consumer)
|
||||
captured_requests = []
|
||||
client = SimpleNamespace(
|
||||
chat=SimpleNamespace(
|
||||
|
|
@ -228,6 +230,7 @@ def test_auxiliary_attempt_uses_real_relay_request_intercepts(relay_turn):
|
|||
result = run("compression")
|
||||
finally:
|
||||
relay.intercepts.deregister_llm_request("hermes-auxiliary-request")
|
||||
turn.lease.host.release_managed_execution(consumer)
|
||||
|
||||
assert result.choices[0].message.content == "ok"
|
||||
assert captured_requests[0]["temperature"] == 0.25
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue