Interface: AiResponseMetadata
Defined in: src/ai/types.ts:30
Metadata attached to every AI response regardless of status.
Intent​
Track performance and provide self-healing hints.
Example​
const meta: AiResponseMetadata = {
duration: 1200,
retryable: true,
suggestions: ['Reduce token count', 'Switch model'],
model: 'gpt-4o',
tokens: 842,
};
Properties​
duration​
readonlyduration:number
Defined in: src/ai/types.ts:32
Elapsed time in milliseconds for the AI call.
model?​
readonlyoptionalmodel:string
Defined in: src/ai/types.ts:38
Model identifier used for this request, if available.
retryable​
readonlyretryable:boolean
Defined in: src/ai/types.ts:34
Whether the caller can retry this operation.
suggestions​
readonlysuggestions:string[]
Defined in: src/ai/types.ts:36
Human-readable recovery hints for agents and testers.
tokens?​
readonlyoptionaltokens:number
Defined in: src/ai/types.ts:40
Total token count consumed, if available.