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.

docs(integrations): say when the routing-hint refusal fires

Aashish546ff1beee0a
diff --git a/docs/crewai.md b/docs/crewai.md
index bfc4f768..33490989 100644
--- a/docs/crewai.md
+++ b/docs/crewai.md
@@ -229,10 +229,10 @@ guard = LayaTaskGuard(
```
A node built on an `Agent` (`agent=Agent(...)`) reads neither, because an `Agent` has no routing step
-to read them in -- it answers on the checkpoint it was built with. Setting one there raises
-`ValueError` naming the argument instead of taking the call and dropping the hint, and a callable
-`lang_guess` on a `base_url` node raises before the request goes out rather than coming back as
-serve's 422 after it. The same rule lives in `laya.integrations._controls`, which the LangChain and
-LlamaIndex wrappers import; see the [LangChain
+to read them in -- it answers on the checkpoint it was built with. The node stores the hint, and its
+first call raises `ValueError` naming the argument before `predict` is reached rather than taking the
+call and dropping it. A callable `lang_guess` on a `base_url` node raises before the request goes out,
+rather than coming back as serve's 422 after it. The same rule lives in
+`laya.integrations._controls`, which the LangChain and LlamaIndex wrappers import; see the [LangChain
integration](langchain.md#9-which-checkpoint-answers) for the precedence, the measured count of
German queries detection leaves on the English checkpoint, and the recorded before.
diff --git a/docs/langchain.md b/docs/langchain.md
index d62d0870..9c6f6a34 100644
--- a/docs/langchain.md
+++ b/docs/langchain.md
@@ -539,8 +539,11 @@ with one raises `ValueError` before the request goes out rather than coming back
after it; install the callable on the `Router` where serve runs, or pass a code.
**`agent=` decides the rule.** A node handed `agent=Agent(...)` is answered by an `Agent`, and an
-`Agent` has no routing step to read a routing hint in -- `Agent.predict` takes neither name. Setting
-a hint on such a node raises instead of being dropped:
+`Agent` has no routing step to read a routing hint in -- `Agent.predict` takes neither name. The node
+still stores the hint, since declaring `extra = "allow"` is what lets a subclass add fields; what
+changes is that the first call raises instead of answering on the checkpoint the `Agent` was built
+with, and it raises before `predict` is reached, so no hook runs on a decision that cannot honour the
+hint:
```
ValueError: task is a routing hint, and Agent.predict does not read it: this runner answers on
diff --git a/docs/llamaindex.md b/docs/llamaindex.md
index a8e1d28d..1c5e2a24 100644
--- a/docs/llamaindex.md
+++ b/docs/llamaindex.md
@@ -233,10 +233,10 @@ selector = LayaSingleSelector(
```
A selector built on an `Agent` (`agent=Agent(...)`) reads neither routing hint, because an `Agent`
-has no routing step to read them in -- it answers on the checkpoint it was built with. Setting one
-there raises `ValueError` naming the argument instead of taking the call and dropping the hint, and a
-callable `lang_guess` on a `base_url` selector raises before the request goes out rather than coming
-back as serve's 422 after it. The same rule lives in `laya.integrations._controls`, which the LangChain
-and CrewAI wrappers import; see the [LangChain
+has no routing step to read them in -- it answers on the checkpoint it was built with. The selector
+stores the hint, and its first call raises `ValueError` naming the argument before `predict` is
+reached rather than taking the call and dropping it. A callable `lang_guess` on a `base_url` selector
+raises before the request goes out, rather than coming back as serve's 422 after it. The same rule
+lives in `laya.integrations._controls`, which the LangChain and CrewAI wrappers import; see the [LangChain
integration](langchain.md#9-which-checkpoint-answers) for the precedence and the
recorded before.