OptionaldurationDuration of the operation in milliseconds. This will be undefined if duration was not tracked.
Whether the AI operation was successful.
OptionaltokensToken usage information for the operation. This will be undefined if no token usage data is available.
OptionaltoolList of tool call identifiers made during the operation. This will be undefined if no tool calls were made.
Metrics information for AI operations that includes success status and token usage. This class combines success/failure tracking with token usage metrics.