Interface: GenerationHookResult
Defined in: packages/agentos/src/api/generateText.ts:852
Context available to post-generation hooks. Hooks may return a modified copy to transform the generation output.
Properties
cacheDiagnostics?
optionalcacheDiagnostics:CacheDiagnostics|null
Defined in: packages/agentos/src/api/generateText.ts:868
Cache-diagnostics verdict for THIS step (Anthropic beta; present only
when the run opted in via GenerateTextOptions.cacheDiagnostics).
null = this step's request matched the previous one (cached prefix
stable). A populated cacheMissReason names the earliest divergence —
log it: it is the direct answer to "why did this step miss the cache".
step
step:
number
Defined in: packages/agentos/src/api/generateText.ts:860
Current agentic step index (0-based).
text
text:
string
Defined in: packages/agentos/src/api/generateText.ts:854
Generated text from the LLM.
toolCalls
toolCalls:
ToolCallRecord[]
Defined in: packages/agentos/src/api/generateText.ts:856
Tool calls requested by the LLM.
usage
usage:
TokenUsage
Defined in: packages/agentos/src/api/generateText.ts:858
Token usage for this step.