add usage info to branch summary, compaction and tool result entries (#6671)
* add usage info to branch summary entries * add usage to compaction entries * allow custom tools to report llm usage in tool results * allow observing and patching usage in tool_result hooks * agent-harness: save usage in entries for compaction, branch summaries and tool results
This commit is contained in:
@@ -408,6 +408,8 @@ export interface ToolResultMessage<TDetails = any> {
|
||||
toolName: string;
|
||||
content: (TextContent | ImageContent)[]; // Supports text and images
|
||||
details?: TDetails;
|
||||
/** Usage from the tool execution itself, if available. Not part of main LLM context accounting. */
|
||||
usage?: Usage;
|
||||
/**
|
||||
* Names from `Context.tools` that became available after this result.
|
||||
* Providers with native deferred tool loading use this as the load point;
|
||||
|
||||
Reference in New Issue
Block a user