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.

test(mcp): cover null model forwarding

Ha1baraA119d3db4956ee7
diff --git a/tests/test_mcp.py b/tests/test_mcp.py
index 5ded2a28..0caf856e 100644
--- a/tests/test_mcp.py
+++ b/tests/test_mcp.py
@@ -390,10 +390,10 @@ def test_model_forwarding():
def __init__(self):
self.calls = []
- def predict(self, state, questions, **kwargs):
+ def predict(self, state, questions, model="auto", **kwargs):
# No `routing` key on purpose: what the tool then reports is the name it settled on,
# which is the piece an alias could have leaked through.
- self.calls.append(kwargs)
+ self.calls.append({"model": model, **kwargs})
return {"answers": {"department": {"choice": "billing", "confidence": 0.94}}}
router = EchoRouter()
@@ -404,6 +404,10 @@ def test_model_forwarding():
ok("forward/reports_canonical", by_alias["routing"]["model"] == "english", repr(by_alias["routing"]))
ok("forward/answers_identical", by_alias["answers"] == by_name["answers"])
+ laya_predict(STATE, QUESTIONS, model=None, router=router)
+ ok("forward/model_none_resolves_auto", router.calls[-1].get("model") == "auto",
+ repr(router.calls[-1]))
+
# --- shape (mocked router, no weights) ---------------------------------------