You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ldai): Wire LDAIMetrics tool_calls and duration_ms into tracker
The fields ``tool_calls`` and ``duration_ms`` on ``LDAIMetrics`` are now
honored by ``LDAIConfigTracker.track_metrics_of`` /
``track_metrics_of_async``: when ``duration_ms`` is set the tracker uses
that value instead of measuring elapsed time, and when ``tool_calls`` is
present the tracker emits one ``$ld:ai:tool_call`` event per key and
records the list on ``LDAIMetricSummary``.
These integration paths were introduced incrementally in the
``ManagedResult`` and OpenAI/LangChain runner stack; this commit adds
the test coverage that pins down the contract:
- ``LDAIMetrics.to_dict()`` exposes ``toolCalls`` and ``durationMs``
- runner-supplied ``duration_ms`` overrides the wall-clock measurement
- runner-supplied ``tool_calls`` triggers ``track_tool_calls`` events
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments