-
[OPIK-7110] [BE] fix: stop capping user-mapped variables on the agentic-tools path (#7414)
发布于
2026-07-13 09:07:45 +00:00 - [OPIK-7110] [BE] fix: stop capping user-mapped variables on the agentic-tools path
On the agentic-tools path, capReplacements() was truncating ALL variable
substitutions to 4K chars — including the user's scoring variables (output,
expected_output). The LLM then had to drill down via tools to recover the
full values, which was non-deterministic and produced intermittent
"Insufficient data" failures.Now capReplacements() accepts an uncappedKeys set: user-mapped variables
(trace sections and literals) are passed through at full length, while
sentinel variables (spans, trace, span) are still capped since the tools
are purpose-built to navigate them.- Revision: add agentic routing OTel counter
online_scoring_agentic_routing_total{path, trigger, workspace_id,
workspace_name} — emitted per evaluation in shouldUseAgenticTools,
tracks agentic vs inline routing by trigger reason and workspace.- Revision 2: add @VisibleForTesting to package-private test helpers
下载附件