joeyutong commented on code in PR #924:
URL: https://github.com/apache/flink-agents/pull/924#discussion_r3679293265
##########
plan/src/main/java/org/apache/flink/agents/plan/actions/ChatModelAction.java:
##########
@@ -368,16 +370,27 @@ public ChatMessage call() throws Exception {
for (int attempt = 0; attempt < numRetries + 1; attempt++) {
try {
- response =
- chatAsync
- ? ctx.durableExecuteAsync(callable)
- : ctx.durableExecute(callable);
+ ExecutionReporters.started(ctx,
ExecutionReporter.EntityTypes.LLM, model);
Review Comment:
Good catch. Child durable-cache reuse remains out of scope because the
current durable boundary does not expose cache-hit state to
`ExecutionReporter`. I documented that cached LLM/Tool results may currently
appear as new successful executions; a reused child signal is follow-up work.
##########
runtime/src/main/java/org/apache/flink/agents/runtime/eventlog/FileEventLogger.java:
##########
@@ -199,24 +207,18 @@ public void append(EventContext context, Event event)
throws Exception {
}
ObjectNode rootNode = (ObjectNode) tree;
- // Truncate the event subtree at STANDARD level.
+ // Truncate event attributes at STANDARD level.
if (level == EventLogLevel.STANDARD && truncator != null) {
- JsonNode eventNode = rootNode.get("event");
- if (eventNode instanceof ObjectNode) {
- boolean truncated = truncator.truncate((ObjectNode) eventNode);
+ JsonNode attributesNode = rootNode.get("eventAttributes");
Review Comment:
Thanks, the protected-name mismatch was a bug. Truncation remains scoped to
`eventAttributes`; `JsonTruncator` now treats its entire input as payload, and
the regression test covers `eventType`, `id`, and `attributes` as ordinary
payload keys. I am keeping `entityMetadata` size policy separate rather than
truncating the whole record.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]