Skip to content
Prompty

ContextRequest

Planning input handed to the context pipeline before one model invocation.

---
title: ContextRequest
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class ContextRequest {
        +string sessionId
        +string turnId
        +string invocationId
        +int32 iteration
        +Message[] messages
        +int32 stablePrefixMessages
        +InvocationContextState contextState
        +unknown inputs
    }
    class Message {
        +string role
        +ContentPart[] parts
        +dictionary metadata
    }
    ContextRequest *-- Message
    class InvocationContextState {
        +string portability
        +DelegatedStateReference[] delegatedState
    }
    ContextRequest *-- InvocationContextState
Name Type Description
sessionId string Stable session identifier
turnId string Stable turn identifier
invocationId string Stable model invocation identifier
iteration int32 Zero-based model loop iteration
messages Message[] Canonical messages entering context planning
stablePrefixMessages int32 Number of leading messages eligible for provider prefix-cache reuse
contextState InvocationContextState Provider-context state entering this invocation
inputs unknown Turn inputs

The following types are composed within ContextRequest: