Skip to main content
Version: 1.x

Interface: AiResponseMetadata

Defined in: src/ai/types.ts:41

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

readonly duration: number

Defined in: src/ai/types.ts:43

Elapsed time in milliseconds for the AI call.


model?

readonly optional model: string

Defined in: src/ai/types.ts:49

Model identifier used for this request, if available.


retryable

readonly retryable: boolean

Defined in: src/ai/types.ts:45

Whether the caller can retry this operation.


suggestions

readonly suggestions: string[]

Defined in: src/ai/types.ts:47

Human-readable recovery hints for agents and testers.


tokens?

readonly optional tokens: number

Defined in: src/ai/types.ts:51

Total token count consumed, if available.