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.

fix(mcp): laya_predict_long's args row must name task and lang, and be gated

Aashish46e32d25c0d4
diff --git a/docs/cli-mcp.md b/docs/cli-mcp.md
index b98ec39c..f967aa8e 100644
--- a/docs/cli-mcp.md
+++ b/docs/cli-mcp.md
@@ -165,7 +165,7 @@ Laya does not open a network port.
| `laya_predict_batch` | Answers many requests in one call. Requests are routed first and grouped by checkpoint, so matching question schemas share forward passes; answers come back in input order. | `requests`, each `{state, questions, model?, task?, lang?, lang_guess?, max_len?, head_max_len?}`, optional `batch_size`, `hooks_timeout`, `min_confidence`, `sort_by_length` |
| `laya_route_batch` | Decides which checkpoint would answer each request, with no forward pass and no checkpoint load. | `requests`, each `{state, questions, model?, task?, lang?, lang_guess?}`, optional `hooks_timeout` |
| `laya_decide` | Answers a JSON-schema-shaped decision in one forward pass and returns the decided values with per-field confidence, instead of an answer map to parse. Schema properties may be enum choices, booleans, or integers with a minimum and maximum; free strings, arrays, and nested objects are rejected by path. | `state`, `schema`, optional `model`, `min_confidence` |
-| `laya_predict_long` | Scans a state longer than the context window in overlapping windows, then answers with per-answer window attribution and the window count. | `state`, `questions`, optional `model`, optional `window`, optional `stride` |
+| `laya_predict_long` | Scans a state longer than the context window in overlapping windows, then answers with per-answer window attribution and the window count. | `state`, `questions`, optional `model`, `window`, `stride`, `task`, `lang` |
The three batch and schema tools exist because the same operations are available on the SDK and
`laya-serve`: handling many requests, or serving a caller that already knows the answer shape,
diff --git a/tests/test_mcp.py b/tests/test_mcp.py
index 3e2e6406..ea62e453 100644
--- a/tests/test_mcp.py
+++ b/tests/test_mcp.py
@@ -2882,7 +2882,7 @@ def test_cli_mcp_page_tool_argument_rows():
return cells[2]
return None
- for tool in ("laya_status", "laya_route", "laya_predict",
+ for tool in ("laya_status", "laya_route", "laya_predict", "laya_predict_long",
"laya_shortlist", "laya_preset", "laya_decide"):
cell = row_cell(tool)
ok("docs-mcp/args_row_%s_present" % tool, cell is not None, "row not found")