Interface GMIModelCallContext

What GMIBaseConfig.beforeModelCall receives for one model attempt.

interface GMIModelCallContext {
    turnId: string;
    stepIndex: number;
    hop: number;
    providerId: string;
    modelId: string;
    messages: ChatMessage[];
}

Properties

turnId: string
stepIndex: number

0-based model step within the turn, as on the step's STEP_FINISHED.

hop: number

0 for the primary, n for the n-th fallback hop.

providerId: string
modelId: string
messages: ChatMessage[]

The attempt's prompt, system messages included. A copy: return the messages to send instead.