refactor(agent/relay): fold relay_llm attempt scaffolding into _ManagedAttempt; dedupe runtime session/scope paths; drop dead relay_runtime module-level shims
This commit is contained in:
+435
-602
File diff suppressed because it is too large
Load Diff
+484
-924
File diff suppressed because it is too large
Load Diff
@@ -72,11 +72,7 @@ def execute(
|
||||
and relay_runtime._is_relay_wrapped_callback_error(exc, callback_error)
|
||||
):
|
||||
raise callback_error
|
||||
if (
|
||||
isinstance(exc, Exception)
|
||||
and callback_error is None
|
||||
and "value" in raw_result
|
||||
):
|
||||
if isinstance(exc, Exception) and callback_error is None and "value" in raw_result:
|
||||
logger.warning(
|
||||
"NeMo Relay tool post-processing failed after dispatch success; "
|
||||
"returning the Hermes tool result",
|
||||
|
||||
@@ -939,7 +939,7 @@ def test_execution_adapters_do_not_create_relay_host_without_a_consumer(
|
||||
|
||||
assert result is tool_result
|
||||
assert observed_args is tool_args
|
||||
assert relay_runtime.get_host(create=False) is None
|
||||
assert relay_runtime.HOST_REGISTRY.for_profile(create=False) is None
|
||||
assert imports == []
|
||||
|
||||
|
||||
@@ -958,7 +958,7 @@ def test_core_runtime_is_fail_open_without_a_published_binding(monkeypatch, capl
|
||||
monkeypatch.setattr(relay_runtime.importlib, "import_module", missing_relay)
|
||||
|
||||
assert relay_runtime.get_runtime() is None
|
||||
host = relay_runtime.get_host()
|
||||
host = relay_runtime.HOST_REGISTRY.for_profile()
|
||||
assert isinstance(host, relay_runtime.NoopRelayRuntime)
|
||||
assert host.profile_key == relay_runtime.current_profile_key()
|
||||
assert "nemo_relay" in host.reason
|
||||
|
||||
Reference in New Issue
Block a user