Skip to content

Commit 639b8c4

Browse files
aditik0303claude
andcommitted
docs(llamaindex): hedge the AFTER_TOOL-via-next-BEFORE_MODEL claim
Review (#360 major): the claim only holds when the tool result is the latest message in the next request. Document the caveat rather than overstating coverage. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 2b0c10c commit 639b8c4

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

packages/uipath-llamaindex/src/uipath_llamaindex/governance/event_handler.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@
2929
the one-workflow-per-process runtime model.
3030
3131
LlamaIndex does **not** emit a tool-*end* instrumentation event, so AFTER_TOOL
32-
is not wired here; a tool's result is governed at the next ``LLMChatStartEvent``
33-
where it is fed back to the model as input (analogous to how the OpenAI adapter
34-
handles its missing tool-args).
32+
is not wired here; a tool's result is instead governed at the next
33+
``LLMChatStartEvent`` where it is fed back to the model as input. This holds
34+
only when the tool result is the **latest** message in that request (the usual
35+
case — BEFORE_MODEL scans the latest message, see
36+
:func:`_latest_message_text`); if the framework injects later messages before
37+
the next model call, an intervening tool result is not separately scanned.
38+
This is the LlamaIndex analogue of the OpenAI adapter's missing tool-args.
3539
3640
Chain-level boundaries (BEFORE_AGENT / AFTER_AGENT) are owned by the
3741
governance host and are intentionally not fired here.

0 commit comments

Comments
 (0)