Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

merge pr #1410

Nandakishorcf81be8a2cf8
diff --cc tests/test_mcp_remote.py
index d9452427,ed1f0004..c60d0789
--- a/tests/test_mcp_remote.py
+++ b/tests/test_mcp_remote.py
@@@ -454,19 -461,7 +467,19 @@@ def test_remote_mcp_startup_and_every_t
for call in calls:
out = json.loads(call())
assert "error" not in out, out
+ # Exercise actual MCP parsing, with both model imports and HTTP forbidden.
+ import asyncio
+ def no_http(*args, **kwargs):
+ raise AssertionError("routing diagnostics attempted an HTTP request")
+ server._ROUTER._request = no_http
+ for name, arguments in (("laya_route", {"state": state, "questions": questions}),
+ ("laya_route_batch", {"requests": items})):
+ result = asyncio.run(server.server.call_tool(name, dict(arguments, explain=True)))
+ assert not result.is_error, result
+ out = json.loads(result.content[0].text)
+ decisions = out["decisions"] if name == "laya_route_batch" else [out]
+ assert all(set(d["diagnostic"]) == {"stage", "reason", "source"} for d in decisions)
- for tool in (server.laya_shortlist_tool, server.laya_tournament_tool):
+ for tool in (server.laya_shortlist_tool, server.laya_tournament_tool, server.laya_predict_long_tool):
try:
tool(state, questions)
except Exception as exc: